diff options
author | Dave Airlie <airlied@redhat.com> | 2015-01-08 18:22:40 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-01-08 18:22:40 -0500 |
commit | c93546a5e32bd788c22aefa072385f3784551c13 (patch) | |
tree | 558c75a3424be58551822d1cfe6b284c3173cada /include/uapi | |
parent | e5202a2289d746a94703ad937157d398fb2607cf (diff) | |
parent | 179f158ccf15fb9425f53d589d1b48eab90449a6 (diff) |
Merge tag 'topic/atomic-core-2015-01-05' of git://anongit.freedesktop.org/drm-intel into drm-next
Next batch of atomic work. Most important is the propertification from Rob
and the nth iteration of the actual atomic ioctl originally from Ville.
Big differences compared to earlier revisions:
- Core properties are now fully handled by the core, drivers can only
handle driver-specific properties.
- Atomic props&ioctl are opt-in per file_priv, userspace needs to
explicitly ask for it (like universal plane support).
- For now all hidden behind the atomic module option until this has
settled a bit.
- Atomic modesets are currently not possible since the exact abi for how
to handle the mode property is still under discussion.
Besides this some cleanup patches from me and the addition of per-object
state to global state backpointers to simplify drivers.
* tag 'topic/atomic-core-2015-01-05' of git://anongit.freedesktop.org/drm-intel:
drm: Ensure universal_planes is set for atomic
drm/atomic: Hide drm.ko internal interfaces
drm: Atomic modeset ioctl
drm/atomic: atomic connector properties
drm/atomic: atomic plane properties
drm: small property creation cleanup
drm/atomic: atomic_check functions
drm: add atomic properties
drm: refactor getproperties/getconnector
drm: tweak getconnector locking
drm: add atomic_get_property
drm: add atomic_set_property wrappers
drm: get rid of direct property value access
drm: store property instead of id in obj attachment
drm: allow property validation for refcnted props
drm/atomic: Introduce state->obj backpointers
drm/atomic-helper: Again check modeset *before* plane states
drm/atomic-helper: Export both plane and modeset check helpers
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/drm/drm.h | 8 | ||||
-rw-r--r-- | include/uapi/drm/drm_mode.h | 30 |
2 files changed, 38 insertions, 0 deletions
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index b0b855613641..01b2d6d0e355 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h | |||
@@ -654,6 +654,13 @@ struct drm_get_cap { | |||
654 | */ | 654 | */ |
655 | #define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 | 655 | #define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 |
656 | 656 | ||
657 | /** | ||
658 | * DRM_CLIENT_CAP_ATOMIC | ||
659 | * | ||
660 | * If set to 1, the DRM core will expose atomic properties to userspace | ||
661 | */ | ||
662 | #define DRM_CLIENT_CAP_ATOMIC 3 | ||
663 | |||
657 | /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ | 664 | /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ |
658 | struct drm_set_client_cap { | 665 | struct drm_set_client_cap { |
659 | __u64 capability; | 666 | __u64 capability; |
@@ -777,6 +784,7 @@ struct drm_prime_handle { | |||
777 | #define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) | 784 | #define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) |
778 | #define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) | 785 | #define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) |
779 | #define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) | 786 | #define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) |
787 | #define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) | ||
780 | 788 | ||
781 | /** | 789 | /** |
782 | * Device specific ioctls should only be in their respective headers | 790 | * Device specific ioctls should only be in their respective headers |
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index aae71cb32123..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]; |
@@ -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 |