aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä2015-06-22 11:26:02 -0500
committerEmil Velikov2015-06-29 13:01:19 -0500
commited44e0b9585c563905447eceed12af9c1c7ca8d4 (patch)
tree99c759a7b1e2e24875ec32bef4d45115c891ea40 /include
parent5b0e76f143887c4ec7db45c54a7ba27a58f59227 (diff)
downloadexternal-libgbm-ed44e0b9585c563905447eceed12af9c1c7ca8d4.tar.gz
external-libgbm-ed44e0b9585c563905447eceed12af9c1c7ca8d4.tar.xz
external-libgbm-ed44e0b9585c563905447eceed12af9c1c7ca8d4.zip
Support atomic modesetting ioctl
Add support for the atomic modesetting ioctl through a property-set API. v1: Squashed intermediate patches from Ville, Rob and myself. Updated for current kernel interface (no blobs). v2: Rewrite user-facing API to provide transactional/cursor interface. Use memclear to zero out ioctl. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Rob Clark <robclark@freedesktop.org> Signed-off-by: Daniel Stone <daniels@collabora.com> v3 [Emil Velikov]: Remove DRM_CAP_ATOMIC - superseded by DRM_CLIENT_CAP_ATOMIC. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm.h8
-rw-r--r--include/drm/drm_mode.h16
2 files changed, 24 insertions, 0 deletions
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 229a29f9..d1dc3e38 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -635,6 +635,13 @@ struct drm_get_cap {
635 */ 635 */
636#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 636#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2
637 637
638/**
639 * DRM_CLIENT_CAP_ATOMIC
640 *
641 * If set to 1, the DRM core will allow atomic modesetting requests.
642 */
643#define DRM_CLIENT_CAP_ATOMIC 3
644
638/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ 645/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
639struct drm_set_client_cap { 646struct drm_set_client_cap {
640 __u64 capability; 647 __u64 capability;
@@ -758,6 +765,7 @@ struct drm_prime_handle {
758#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) 765#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
759#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) 766#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
760#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) 767#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
768#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
761 769
762/** 770/**
763 * Device specific ioctls should only be in their respective headers 771 * Device specific ioctls should only be in their respective headers
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index a2ab88a5..66f856fc 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -507,4 +507,20 @@ struct drm_mode_destroy_dumb {
507 __u32 handle; 507 __u32 handle;
508}; 508};
509 509
510/* page-flip flags are valid, plus: */
511#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100
512#define DRM_MODE_ATOMIC_NONBLOCK 0x0200
513#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400
514
515struct drm_mode_atomic {
516 __u32 flags;
517 __u32 count_objs;
518 __u64 objs_ptr;
519 __u64 count_props_ptr;
520 __u64 props_ptr;
521 __u64 prop_values_ptr;
522 __u64 reserved;
523 __u64 user_data;
524};
525
510#endif 526#endif