aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-12-18 16:01:50 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-01-05 07:54:38 -0500
commit88a48e297b3a3bac6022c03babfb038f1a886cea (patch)
tree8b914276b0e77e447aa3de5f4d7cefc1597911b1 /include/uapi
parent95cbf110756c21397946ded181cc5ea4ab568c11 (diff)
drm: add atomic properties
Once a driver is using atomic helpers for modeset, the next step is to switch over to atomic properties. To do this, make sure that any modeset objects have their ->atomic_{get,set}_property() vfuncs suitably populated if they have custom properties (you did already remember to plug in atomic-helper func for the legacy ->set_property() vfuncs, right?), and then set DRIVER_ATOMIC bit in driver_features flag. A new cap is introduced, DRM_CLIENT_CAP_ATOMIC, for the purposes of shielding legacy userspace from atomic properties. Mostly for the benefit of legacy DDX drivers that do silly things like getting/setting each property at startup (since some of the new atomic properties will be able to trigger modeset). Signed-off-by: Rob Clark <robdclark@gmail.com> [danvet: Squash in fixup patch to check for DRM_MODE_PROP_ATOMIC instaed of the CAP define when filtering properties. Reported by Tvrtko Uruslin, acked by Rob.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/drm.h7
-rw-r--r--include/uapi/drm/drm_mode.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index b0b855613641..f7b2baf7ecb2 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 */
658struct drm_set_client_cap { 665struct drm_set_client_cap {
659 __u64 capability; 666 __u64 capability;
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index aae71cb32123..b8f9c0f2e7fe 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
275struct drm_mode_property_enum { 282struct drm_mode_property_enum {
276 __u64 value; 283 __u64 value;
277 char name[DRM_PROP_NAME_LEN]; 284 char name[DRM_PROP_NAME_LEN];