aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stone2017-04-04 15:38:56 -0500
committerDaniel Stone2017-04-06 14:32:43 -0500
commite379c6a137bba5c40d9a126b71a667b4d7f5697a (patch)
tree4cd682a6f711e517a1a612481cd3841e6e82dce7 /include
parent0010d312dbf0dae05652b75cdef7cd361f686623 (diff)
downloadexternal-libgbm-e379c6a137bba5c40d9a126b71a667b4d7f5697a.tar.gz
external-libgbm-e379c6a137bba5c40d9a126b71a667b4d7f5697a.tar.xz
external-libgbm-e379c6a137bba5c40d9a126b71a667b4d7f5697a.zip
Headers: Sync drm{,_mode}.h with the kernel
Generated using make headers_install, based on drm-misc-next commit 5db06a8a98f515f67446a69c57577c4c363ec65d. This clarifies the comments around modifiers such that they are per-framebuffer rather than per-plane, adds the beginnings of aspect ratio mode flags, link status properties, and updates the 'reserved' field from vblank events to include the CRTC ID. v2: Split into separate patch, pull in full kernel changes. v3: Undo revert of connector-type enums, since it is not actually harmful. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm.h3
-rw-r--r--include/drm/drm_mode.h45
2 files changed, 33 insertions, 15 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index f6fd5c2c..1e7a4bc7 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -641,6 +641,7 @@ struct drm_gem_open {
641#define DRM_CAP_CURSOR_HEIGHT 0x9 641#define DRM_CAP_CURSOR_HEIGHT 0x9
642#define DRM_CAP_ADDFB2_MODIFIERS 0x10 642#define DRM_CAP_ADDFB2_MODIFIERS 0x10
643#define DRM_CAP_PAGE_FLIP_TARGET 0x11 643#define DRM_CAP_PAGE_FLIP_TARGET 0x11
644#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
644 645
645/** DRM_IOCTL_GET_CAP ioctl argument type */ 646/** DRM_IOCTL_GET_CAP ioctl argument type */
646struct drm_get_cap { 647struct drm_get_cap {
@@ -845,7 +846,7 @@ struct drm_event_vblank {
845 __u32 tv_sec; 846 __u32 tv_sec;
846 __u32 tv_usec; 847 __u32 tv_usec;
847 __u32 sequence; 848 __u32 sequence;
848 __u32 reserved; 849 __u32 crtc_id; /* 0 on older kernels that do not support this */
849}; 850};
850 851
851/* typedef area */ 852/* typedef area */
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index df0e3504..70571af6 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -47,7 +47,15 @@ extern "C" {
47#define DRM_MODE_TYPE_DRIVER (1<<6) 47#define DRM_MODE_TYPE_DRIVER (1<<6)
48 48
49/* Video mode flags */ 49/* Video mode flags */
50/* bit compatible with the xorg definitions. */ 50/* bit compatible with the xrandr RR_ definitions (bits 0-13)
51 *
52 * ABI warning: Existing userspace really expects
53 * the mode flags to match the xrandr definitions. Any
54 * changes that don't match the xrandr definitions will
55 * likely need a new client cap or some other mechanism
56 * to avoid breaking existing userspace. This includes
57 * allocating new flags in the previously unused bits!
58 */
51#define DRM_MODE_FLAG_PHSYNC (1<<0) 59#define DRM_MODE_FLAG_PHSYNC (1<<0)
52#define DRM_MODE_FLAG_NHSYNC (1<<1) 60#define DRM_MODE_FLAG_NHSYNC (1<<1)
53#define DRM_MODE_FLAG_PVSYNC (1<<2) 61#define DRM_MODE_FLAG_PVSYNC (1<<2)
@@ -107,6 +115,10 @@ extern "C" {
107#define DRM_MODE_DIRTY_ON 1 115#define DRM_MODE_DIRTY_ON 1
108#define DRM_MODE_DIRTY_ANNOTATE 2 116#define DRM_MODE_DIRTY_ANNOTATE 2
109 117
118/* Link Status options */
119#define DRM_MODE_LINK_STATUS_GOOD 0
120#define DRM_MODE_LINK_STATUS_BAD 1
121
110struct drm_mode_modeinfo { 122struct drm_mode_modeinfo {
111 __u32 clock; 123 __u32 clock;
112 __u16 hdisplay; 124 __u16 hdisplay;
@@ -220,14 +232,16 @@ struct drm_mode_get_encoder {
220 232
221/* This is for connectors with multiple signal types. */ 233/* This is for connectors with multiple signal types. */
222/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */ 234/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
223#define DRM_MODE_SUBCONNECTOR_Automatic 0 235enum drm_mode_subconnector {
224#define DRM_MODE_SUBCONNECTOR_Unknown 0 236 DRM_MODE_SUBCONNECTOR_Automatic = 0,
225#define DRM_MODE_SUBCONNECTOR_DVID 3 237 DRM_MODE_SUBCONNECTOR_Unknown = 0,
226#define DRM_MODE_SUBCONNECTOR_DVIA 4 238 DRM_MODE_SUBCONNECTOR_DVID = 3,
227#define DRM_MODE_SUBCONNECTOR_Composite 5 239 DRM_MODE_SUBCONNECTOR_DVIA = 4,
228#define DRM_MODE_SUBCONNECTOR_SVIDEO 6 240 DRM_MODE_SUBCONNECTOR_Composite = 5,
229#define DRM_MODE_SUBCONNECTOR_Component 8 241 DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
230#define DRM_MODE_SUBCONNECTOR_SCART 9 242 DRM_MODE_SUBCONNECTOR_Component = 8,
243 DRM_MODE_SUBCONNECTOR_SCART = 9,
244};
231 245
232#define DRM_MODE_CONNECTOR_Unknown 0 246#define DRM_MODE_CONNECTOR_Unknown 0
233#define DRM_MODE_CONNECTOR_VGA 1 247#define DRM_MODE_CONNECTOR_VGA 1
@@ -392,17 +406,20 @@ struct drm_mode_fb_cmd2 {
392 * offsets[1]. Note that offsets[0] will generally 406 * offsets[1]. Note that offsets[0] will generally
393 * be 0 (but this is not required). 407 * be 0 (but this is not required).
394 * 408 *
395 * To accommodate tiled, compressed, etc formats, a per-plane 409 * To accommodate tiled, compressed, etc formats, a
396 * modifier can be specified. The default value of zero 410 * modifier can be specified. The default value of zero
397 * indicates "native" format as specified by the fourcc. 411 * indicates "native" format as specified by the fourcc.
398 * Vendor specific modifier token. This allows, for example, 412 * Vendor specific modifier token. Note that even though
399 * different tiling/swizzling pattern on different planes. 413 * it looks like we have a modifier per-plane, we in fact
400 * See discussion above of DRM_FORMAT_MOD_xxx. 414 * do not. The modifier for each plane must be identical.
415 * Thus all combinations of different data layouts for
416 * multi plane formats must be enumerated as separate
417 * modifiers.
401 */ 418 */
402 __u32 handles[4]; 419 __u32 handles[4];
403 __u32 pitches[4]; /* pitch for each plane */ 420 __u32 pitches[4]; /* pitch for each plane */
404 __u32 offsets[4]; /* offset of each plane */ 421 __u32 offsets[4]; /* offset of each plane */
405 __u64 modifier[4]; /* ie, tiling, compressed (per plane) */ 422 __u64 modifier[4]; /* ie, tiling, compress */
406}; 423};
407 424
408#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 425#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01