diff options
author | Daniel Vetter | 2016-03-30 08:44:42 -0500 |
---|---|---|
committer | Daniel Vetter | 2016-04-12 06:15:49 -0500 |
commit | 89cdda3d5f4fcfcbc3508cc4ebe0c43768e2a65c (patch) | |
tree | feee6ae45d29f2957fcc6aaf4d9611106b13ec7e /include | |
parent | 268ae7cae5afd76462c3ef14ed9021a2d40c2e57 (diff) | |
download | external-libgbm-89cdda3d5f4fcfcbc3508cc4ebe0c43768e2a65c.tar.gz external-libgbm-89cdda3d5f4fcfcbc3508cc4ebe0c43768e2a65c.tar.xz external-libgbm-89cdda3d5f4fcfcbc3508cc4ebe0c43768e2a65c.zip |
headers: Update drm_mode.h
Generated using make headers_install.
Only cosmetics&new definitions here now.
Generated fromd drm-misc commit 249c4f538b1aae55d41699f8bafc6cb762a7f48f
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include')
-rw-r--r-- | include/drm/drm_mode.h | 170 |
1 files changed, 119 insertions, 51 deletions
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 115f36e4..7a7856e0 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -27,6 +27,8 @@ | |||
27 | #ifndef _DRM_MODE_H | 27 | #ifndef _DRM_MODE_H |
28 | #define _DRM_MODE_H | 28 | #define _DRM_MODE_H |
29 | 29 | ||
30 | #include "drm.h" | ||
31 | |||
30 | #define DRM_DISPLAY_INFO_LEN 32 | 32 | #define DRM_DISPLAY_INFO_LEN 32 |
31 | #define DRM_CONNECTOR_NAME_LEN 32 | 33 | #define DRM_CONNECTOR_NAME_LEN 32 |
32 | #define DRM_DISPLAY_MODE_LEN 32 | 34 | #define DRM_DISPLAY_MODE_LEN 32 |
@@ -56,6 +58,10 @@ | |||
56 | #define DRM_MODE_FLAG_PIXMUX (1<<11) | 58 | #define DRM_MODE_FLAG_PIXMUX (1<<11) |
57 | #define DRM_MODE_FLAG_DBLCLK (1<<12) | 59 | #define DRM_MODE_FLAG_DBLCLK (1<<12) |
58 | #define DRM_MODE_FLAG_CLKDIV2 (1<<13) | 60 | #define DRM_MODE_FLAG_CLKDIV2 (1<<13) |
61 | /* | ||
62 | * When adding a new stereo mode don't forget to adjust DRM_MODE_FLAGS_3D_MAX | ||
63 | * (define not exposed to user space). | ||
64 | */ | ||
59 | #define DRM_MODE_FLAG_3D_MASK (0x1f<<14) | 65 | #define DRM_MODE_FLAG_3D_MASK (0x1f<<14) |
60 | #define DRM_MODE_FLAG_3D_NONE (0<<14) | 66 | #define DRM_MODE_FLAG_3D_NONE (0<<14) |
61 | #define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) | 67 | #define DRM_MODE_FLAG_3D_FRAME_PACKING (1<<14) |
@@ -82,6 +88,11 @@ | |||
82 | #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ | 88 | #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */ |
83 | #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ | 89 | #define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */ |
84 | 90 | ||
91 | /* Picture aspect ratio options */ | ||
92 | #define DRM_MODE_PICTURE_ASPECT_NONE 0 | ||
93 | #define DRM_MODE_PICTURE_ASPECT_4_3 1 | ||
94 | #define DRM_MODE_PICTURE_ASPECT_16_9 2 | ||
95 | |||
85 | /* Dithering mode options */ | 96 | /* Dithering mode options */ |
86 | #define DRM_MODE_DITHERING_OFF 0 | 97 | #define DRM_MODE_DITHERING_OFF 0 |
87 | #define DRM_MODE_DITHERING_ON 1 | 98 | #define DRM_MODE_DITHERING_ON 1 |
@@ -94,8 +105,16 @@ | |||
94 | 105 | ||
95 | struct drm_mode_modeinfo { | 106 | struct drm_mode_modeinfo { |
96 | __u32 clock; | 107 | __u32 clock; |
97 | __u16 hdisplay, hsync_start, hsync_end, htotal, hskew; | 108 | __u16 hdisplay; |
98 | __u16 vdisplay, vsync_start, vsync_end, vtotal, vscan; | 109 | __u16 hsync_start; |
110 | __u16 hsync_end; | ||
111 | __u16 htotal; | ||
112 | __u16 hskew; | ||
113 | __u16 vdisplay; | ||
114 | __u16 vsync_start; | ||
115 | __u16 vsync_end; | ||
116 | __u16 vtotal; | ||
117 | __u16 vscan; | ||
99 | 118 | ||
100 | __u32 vrefresh; | 119 | __u32 vrefresh; |
101 | 120 | ||
@@ -113,8 +132,10 @@ struct drm_mode_card_res { | |||
113 | __u32 count_crtcs; | 132 | __u32 count_crtcs; |
114 | __u32 count_connectors; | 133 | __u32 count_connectors; |
115 | __u32 count_encoders; | 134 | __u32 count_encoders; |
116 | __u32 min_width, max_width; | 135 | __u32 min_width; |
117 | __u32 min_height, max_height; | 136 | __u32 max_width; |
137 | __u32 min_height; | ||
138 | __u32 max_height; | ||
118 | }; | 139 | }; |
119 | 140 | ||
120 | struct drm_mode_crtc { | 141 | struct drm_mode_crtc { |
@@ -124,30 +145,35 @@ struct drm_mode_crtc { | |||
124 | __u32 crtc_id; /**< Id */ | 145 | __u32 crtc_id; /**< Id */ |
125 | __u32 fb_id; /**< Id of framebuffer */ | 146 | __u32 fb_id; /**< Id of framebuffer */ |
126 | 147 | ||
127 | __u32 x, y; /**< Position on the frameuffer */ | 148 | __u32 x; /**< x Position on the framebuffer */ |
149 | __u32 y; /**< y Position on the framebuffer */ | ||
128 | 150 | ||
129 | __u32 gamma_size; | 151 | __u32 gamma_size; |
130 | __u32 mode_valid; | 152 | __u32 mode_valid; |
131 | struct drm_mode_modeinfo mode; | 153 | struct drm_mode_modeinfo mode; |
132 | }; | 154 | }; |
133 | 155 | ||
134 | #define DRM_MODE_PRESENT_TOP_FIELD (1<<0) | 156 | #define DRM_MODE_PRESENT_TOP_FIELD (1<<0) |
135 | #define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) | 157 | #define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1) |
136 | 158 | ||
137 | /* Planes blend with or override other bits on the CRTC */ | 159 | /* Planes blend with or override other bits on the CRTC */ |
138 | struct drm_mode_set_plane { | 160 | struct drm_mode_set_plane { |
139 | __u32 plane_id; | 161 | __u32 plane_id; |
140 | __u32 crtc_id; | 162 | __u32 crtc_id; |
141 | __u32 fb_id; /* fb object contains surface format type */ | 163 | __u32 fb_id; /* fb object contains surface format type */ |
142 | __u32 flags; | 164 | __u32 flags; /* see above flags */ |
143 | 165 | ||
144 | /* Signed dest location allows it to be partially off screen */ | 166 | /* Signed dest location allows it to be partially off screen */ |
145 | __s32 crtc_x, crtc_y; | 167 | __s32 crtc_x; |
146 | __u32 crtc_w, crtc_h; | 168 | __s32 crtc_y; |
169 | __u32 crtc_w; | ||
170 | __u32 crtc_h; | ||
147 | 171 | ||
148 | /* Source values are 16.16 fixed point */ | 172 | /* Source values are 16.16 fixed point */ |
149 | __u32 src_x, src_y; | 173 | __u32 src_x; |
150 | __u32 src_h, src_w; | 174 | __u32 src_y; |
175 | __u32 src_h; | ||
176 | __u32 src_w; | ||
151 | }; | 177 | }; |
152 | 178 | ||
153 | struct drm_mode_get_plane { | 179 | struct drm_mode_get_plane { |
@@ -233,8 +259,11 @@ struct drm_mode_get_connector { | |||
233 | __u32 connector_type_id; | 259 | __u32 connector_type_id; |
234 | 260 | ||
235 | __u32 connection; | 261 | __u32 connection; |
236 | __u32 mm_width, mm_height; /**< HxW in millimeters */ | 262 | __u32 mm_width; /**< width in millimeters */ |
263 | __u32 mm_height; /**< height in millimeters */ | ||
237 | __u32 subpixel; | 264 | __u32 subpixel; |
265 | |||
266 | __u32 pad; | ||
238 | }; | 267 | }; |
239 | 268 | ||
240 | #define DRM_MODE_PROP_PENDING (1<<0) | 269 | #define DRM_MODE_PROP_PENDING (1<<0) |
@@ -259,6 +288,13 @@ struct drm_mode_get_connector { | |||
259 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) | 288 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) |
260 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) | 289 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) |
261 | 290 | ||
291 | /* the PROP_ATOMIC flag is used to hide properties from userspace that | ||
292 | * is not aware of atomic properties. This is mostly to work around | ||
293 | * older userspace (DDX drivers) that read/write each prop they find, | ||
294 | * witout being aware that this could be triggering a lengthy modeset. | ||
295 | */ | ||
296 | #define DRM_MODE_PROP_ATOMIC 0x80000000 | ||
297 | |||
262 | struct drm_mode_property_enum { | 298 | struct drm_mode_property_enum { |
263 | __u64 value; | 299 | __u64 value; |
264 | char name[DRM_PROP_NAME_LEN]; | 300 | char name[DRM_PROP_NAME_LEN]; |
@@ -273,6 +309,8 @@ struct drm_mode_get_property { | |||
273 | char name[DRM_PROP_NAME_LEN]; | 309 | char name[DRM_PROP_NAME_LEN]; |
274 | 310 | ||
275 | __u32 count_values; | 311 | __u32 count_values; |
312 | /* This is only used to count enum values, not blobs. The _blobs is | ||
313 | * simply because of a historical reason, i.e. backwards compat. */ | ||
276 | __u32 count_enum_blobs; | 314 | __u32 count_enum_blobs; |
277 | }; | 315 | }; |
278 | 316 | ||
@@ -290,6 +328,7 @@ struct drm_mode_connector_set_property { | |||
290 | #define DRM_MODE_OBJECT_FB 0xfbfbfbfb | 328 | #define DRM_MODE_OBJECT_FB 0xfbfbfbfb |
291 | #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb | 329 | #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb |
292 | #define DRM_MODE_OBJECT_PLANE 0xeeeeeeee | 330 | #define DRM_MODE_OBJECT_PLANE 0xeeeeeeee |
331 | #define DRM_MODE_OBJECT_ANY 0 | ||
293 | 332 | ||
294 | struct drm_mode_obj_get_properties { | 333 | struct drm_mode_obj_get_properties { |
295 | __u64 props_ptr; | 334 | __u64 props_ptr; |
@@ -314,7 +353,8 @@ struct drm_mode_get_blob { | |||
314 | 353 | ||
315 | struct drm_mode_fb_cmd { | 354 | struct drm_mode_fb_cmd { |
316 | __u32 fb_id; | 355 | __u32 fb_id; |
317 | __u32 width, height; | 356 | __u32 width; |
357 | __u32 height; | ||
318 | __u32 pitch; | 358 | __u32 pitch; |
319 | __u32 bpp; | 359 | __u32 bpp; |
320 | __u32 depth; | 360 | __u32 depth; |
@@ -327,9 +367,10 @@ struct drm_mode_fb_cmd { | |||
327 | 367 | ||
328 | struct drm_mode_fb_cmd2 { | 368 | struct drm_mode_fb_cmd2 { |
329 | __u32 fb_id; | 369 | __u32 fb_id; |
330 | __u32 width, height; | 370 | __u32 width; |
371 | __u32 height; | ||
331 | __u32 pixel_format; /* fourcc code from drm_fourcc.h */ | 372 | __u32 pixel_format; /* fourcc code from drm_fourcc.h */ |
332 | __u32 flags; | 373 | __u32 flags; /* see above flags */ |
333 | 374 | ||
334 | /* | 375 | /* |
335 | * In case of planar formats, this ioctl allows up to 4 | 376 | * In case of planar formats, this ioctl allows up to 4 |
@@ -341,9 +382,9 @@ struct drm_mode_fb_cmd2 { | |||
341 | * followed by an interleaved U/V plane containing | 382 | * followed by an interleaved U/V plane containing |
342 | * 8 bit 2x2 subsampled colour difference samples. | 383 | * 8 bit 2x2 subsampled colour difference samples. |
343 | * | 384 | * |
344 | * So it would consist of Y as offset[0] and UV as | 385 | * So it would consist of Y as offsets[0] and UV as |
345 | * offset[1]. Note that offset[0] will generally | 386 | * offsets[1]. Note that offsets[0] will generally |
346 | * be 0. | 387 | * be 0 (but this is not required). |
347 | * | 388 | * |
348 | * To accommodate tiled, compressed, etc formats, a per-plane | 389 | * To accommodate tiled, compressed, etc formats, a per-plane |
349 | * modifier can be specified. The default value of zero | 390 | * modifier can be specified. The default value of zero |
@@ -362,6 +403,8 @@ struct drm_mode_fb_cmd2 { | |||
362 | #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 | 403 | #define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 |
363 | #define DRM_MODE_FB_DIRTY_FLAGS 0x03 | 404 | #define DRM_MODE_FB_DIRTY_FLAGS 0x03 |
364 | 405 | ||
406 | #define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 | ||
407 | |||
365 | /* | 408 | /* |
366 | * Mark a region of a framebuffer as dirty. | 409 | * Mark a region of a framebuffer as dirty. |
367 | * | 410 | * |
@@ -402,20 +445,21 @@ struct drm_mode_mode_cmd { | |||
402 | struct drm_mode_modeinfo mode; | 445 | struct drm_mode_modeinfo mode; |
403 | }; | 446 | }; |
404 | 447 | ||
405 | #define DRM_MODE_CURSOR_BO (1<<0) | 448 | #define DRM_MODE_CURSOR_BO 0x01 |
406 | #define DRM_MODE_CURSOR_MOVE (1<<1) | 449 | #define DRM_MODE_CURSOR_MOVE 0x02 |
450 | #define DRM_MODE_CURSOR_FLAGS 0x03 | ||
407 | 451 | ||
408 | /* | 452 | /* |
409 | * depending on the value in flags diffrent members are used. | 453 | * depending on the value in flags different members are used. |
410 | * | 454 | * |
411 | * CURSOR_BO uses | 455 | * CURSOR_BO uses |
412 | * crtc | 456 | * crtc_id |
413 | * width | 457 | * width |
414 | * height | 458 | * height |
415 | * handle - if 0 turns the cursor of | 459 | * handle - if 0 turns the cursor off |
416 | * | 460 | * |
417 | * CURSOR_MOVE uses | 461 | * CURSOR_MOVE uses |
418 | * crtc | 462 | * crtc_id |
419 | * x | 463 | * x |
420 | * y | 464 | * y |
421 | */ | 465 | */ |
@@ -453,6 +497,21 @@ struct drm_mode_crtc_lut { | |||
453 | __u64 blue; | 497 | __u64 blue; |
454 | }; | 498 | }; |
455 | 499 | ||
500 | struct drm_color_ctm { | ||
501 | /* Conversion matrix in S31.32 format. */ | ||
502 | __s64 matrix[9]; | ||
503 | }; | ||
504 | |||
505 | struct drm_color_lut { | ||
506 | /* | ||
507 | * Data is U0.16 fixed point format. | ||
508 | */ | ||
509 | __u16 red; | ||
510 | __u16 green; | ||
511 | __u16 blue; | ||
512 | __u16 reserved; | ||
513 | }; | ||
514 | |||
456 | #define DRM_MODE_PAGE_FLIP_EVENT 0x01 | 515 | #define DRM_MODE_PAGE_FLIP_EVENT 0x01 |
457 | #define DRM_MODE_PAGE_FLIP_ASYNC 0x02 | 516 | #define DRM_MODE_PAGE_FLIP_ASYNC 0x02 |
458 | #define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC) | 517 | #define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT|DRM_MODE_PAGE_FLIP_ASYNC) |
@@ -469,11 +528,14 @@ struct drm_mode_crtc_lut { | |||
469 | * flip is already pending as the ioctl is called, EBUSY will be | 528 | * flip is already pending as the ioctl is called, EBUSY will be |
470 | * returned. | 529 | * returned. |
471 | * | 530 | * |
472 | * The ioctl supports one flag, DRM_MODE_PAGE_FLIP_EVENT, which will | 531 | * Flag DRM_MODE_PAGE_FLIP_EVENT requests that drm sends back a vblank |
473 | * request that drm sends back a vblank event (see drm.h: struct | 532 | * event (see drm.h: struct drm_event_vblank) when the page flip is |
474 | * drm_event_vblank) when the page flip is done. The user_data field | 533 | * done. The user_data field passed in with this ioctl will be |
475 | * passed in with this ioctl will be returned as the user_data field | 534 | * returned as the user_data field in the vblank event struct. |
476 | * in the vblank event struct. | 535 | * |
536 | * Flag DRM_MODE_PAGE_FLIP_ASYNC requests that the flip happen | ||
537 | * 'as soon as possible', meaning that it not delay waiting for vblank. | ||
538 | * This may cause tearing on the screen. | ||
477 | * | 539 | * |
478 | * The reserved field must be zero until we figure out something | 540 | * The reserved field must be zero until we figure out something |
479 | * clever to use it for. | 541 | * clever to use it for. |
@@ -489,27 +551,27 @@ struct drm_mode_crtc_page_flip { | |||
489 | 551 | ||
490 | /* create a dumb scanout buffer */ | 552 | /* create a dumb scanout buffer */ |
491 | struct drm_mode_create_dumb { | 553 | struct drm_mode_create_dumb { |
492 | __u32 height; | 554 | __u32 height; |
493 | __u32 width; | 555 | __u32 width; |
494 | __u32 bpp; | 556 | __u32 bpp; |
495 | __u32 flags; | 557 | __u32 flags; |
496 | /* handle, pitch, size will be returned */ | 558 | /* handle, pitch, size will be returned */ |
497 | __u32 handle; | 559 | __u32 handle; |
498 | __u32 pitch; | 560 | __u32 pitch; |
499 | __u64 size; | 561 | __u64 size; |
500 | }; | 562 | }; |
501 | 563 | ||
502 | /* set up for mmap of a dumb scanout buffer */ | 564 | /* set up for mmap of a dumb scanout buffer */ |
503 | struct drm_mode_map_dumb { | 565 | struct drm_mode_map_dumb { |
504 | /** Handle for the object being mapped. */ | 566 | /** Handle for the object being mapped. */ |
505 | __u32 handle; | 567 | __u32 handle; |
506 | __u32 pad; | 568 | __u32 pad; |
507 | /** | 569 | /** |
508 | * Fake offset to use for subsequent mmap call | 570 | * Fake offset to use for subsequent mmap call |
509 | * | 571 | * |
510 | * This is a fixed-size type for 32/64 compatibility. | 572 | * This is a fixed-size type for 32/64 compatibility. |
511 | */ | 573 | */ |
512 | __u64 offset; | 574 | __u64 offset; |
513 | }; | 575 | }; |
514 | 576 | ||
515 | struct drm_mode_destroy_dumb { | 577 | struct drm_mode_destroy_dumb { |
@@ -517,9 +579,16 @@ struct drm_mode_destroy_dumb { | |||
517 | }; | 579 | }; |
518 | 580 | ||
519 | /* page-flip flags are valid, plus: */ | 581 | /* page-flip flags are valid, plus: */ |
520 | #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 | 582 | #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 |
521 | #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 | 583 | #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 |
522 | #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 | 584 | #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 |
585 | |||
586 | #define DRM_MODE_ATOMIC_FLAGS (\ | ||
587 | DRM_MODE_PAGE_FLIP_EVENT |\ | ||
588 | DRM_MODE_PAGE_FLIP_ASYNC |\ | ||
589 | DRM_MODE_ATOMIC_TEST_ONLY |\ | ||
590 | DRM_MODE_ATOMIC_NONBLOCK |\ | ||
591 | DRM_MODE_ATOMIC_ALLOW_MODESET) | ||
523 | 592 | ||
524 | struct drm_mode_atomic { | 593 | struct drm_mode_atomic { |
525 | __u32 flags; | 594 | __u32 flags; |
@@ -552,5 +621,4 @@ struct drm_mode_destroy_blob { | |||
552 | __u32 blob_id; | 621 | __u32 blob_id; |
553 | }; | 622 | }; |
554 | 623 | ||
555 | |||
556 | #endif | 624 | #endif |