diff options
Diffstat (limited to 'include/uapi/drm/drm_mode.h')
-rw-r--r-- | include/uapi/drm/drm_mode.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 86574b0005ff..ca788e01dab2 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h | |||
@@ -272,6 +272,13 @@ struct drm_mode_get_connector { | |||
272 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) | 272 | #define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) |
273 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) | 273 | #define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) |
274 | 274 | ||
275 | /* the PROP_ATOMIC flag is used to hide properties from userspace that | ||
276 | * is not aware of atomic properties. This is mostly to work around | ||
277 | * older userspace (DDX drivers) that read/write each prop they find, | ||
278 | * witout being aware that this could be triggering a lengthy modeset. | ||
279 | */ | ||
280 | #define DRM_MODE_PROP_ATOMIC 0x80000000 | ||
281 | |||
275 | struct drm_mode_property_enum { | 282 | struct drm_mode_property_enum { |
276 | __u64 value; | 283 | __u64 value; |
277 | char name[DRM_PROP_NAME_LEN]; | 284 | char name[DRM_PROP_NAME_LEN]; |
@@ -338,7 +345,7 @@ struct drm_mode_fb_cmd2 { | |||
338 | 345 | ||
339 | /* | 346 | /* |
340 | * In case of planar formats, this ioctl allows up to 4 | 347 | * In case of planar formats, this ioctl allows up to 4 |
341 | * buffer objects with offets and pitches per plane. | 348 | * buffer objects with offsets and pitches per plane. |
342 | * The pitch and offset order is dictated by the fourcc, | 349 | * The pitch and offset order is dictated by the fourcc, |
343 | * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: | 350 | * e.g. NV12 (http://fourcc.org/yuv.php#NV12) is described as: |
344 | * | 351 | * |
@@ -346,9 +353,9 @@ struct drm_mode_fb_cmd2 { | |||
346 | * followed by an interleaved U/V plane containing | 353 | * followed by an interleaved U/V plane containing |
347 | * 8 bit 2x2 subsampled colour difference samples. | 354 | * 8 bit 2x2 subsampled colour difference samples. |
348 | * | 355 | * |
349 | * So it would consist of Y as offset[0] and UV as | 356 | * So it would consist of Y as offsets[0] and UV as |
350 | * offeset[1]. Note that offset[0] will generally | 357 | * offsets[1]. Note that offsets[0] will generally |
351 | * be 0. | 358 | * be 0 (but this is not required). |
352 | */ | 359 | */ |
353 | __u32 handles[4]; | 360 | __u32 handles[4]; |
354 | __u32 pitches[4]; /* pitch for each plane */ | 361 | __u32 pitches[4]; /* pitch for each plane */ |
@@ -519,4 +526,27 @@ struct drm_mode_destroy_dumb { | |||
519 | uint32_t handle; | 526 | uint32_t handle; |
520 | }; | 527 | }; |
521 | 528 | ||
529 | /* page-flip flags are valid, plus: */ | ||
530 | #define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 | ||
531 | #define DRM_MODE_ATOMIC_NONBLOCK 0x0200 | ||
532 | #define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 | ||
533 | |||
534 | #define DRM_MODE_ATOMIC_FLAGS (\ | ||
535 | DRM_MODE_PAGE_FLIP_EVENT |\ | ||
536 | DRM_MODE_PAGE_FLIP_ASYNC |\ | ||
537 | DRM_MODE_ATOMIC_TEST_ONLY |\ | ||
538 | DRM_MODE_ATOMIC_NONBLOCK |\ | ||
539 | DRM_MODE_ATOMIC_ALLOW_MODESET) | ||
540 | |||
541 | struct drm_mode_atomic { | ||
542 | __u32 flags; | ||
543 | __u32 count_objs; | ||
544 | __u64 objs_ptr; | ||
545 | __u64 count_props_ptr; | ||
546 | __u64 props_ptr; | ||
547 | __u64 prop_values_ptr; | ||
548 | __u64 reserved; | ||
549 | __u64 user_data; | ||
550 | }; | ||
551 | |||
522 | #endif | 552 | #endif |