aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-09-25 11:45:22 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:27 -0400
commit61d8e3282541139cf5bb31e4c42f952a6cc168f8 (patch)
treeff765d5d44879ddc36f6430632fdb5211553e296 /include
parent4aa17cf0d889cfc984b68a78ae02070cef21bb6b (diff)
drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl
This capability allows user space to control the delivery of modes with the 3D flags set. This is to not play games with current user space users not knowing anything about stereo 3D flags and that could try to set a mode with one or several of those bits set. So, the plan is to remove the stereo modes from the list of modes we give to DRM clients by default, and let them through if we are being told otherwise. stereo_allowed is bound to the drm_file structure to make it a per-client setting, not a global one. v2: Replace clearing 3D flags by discarding the stereo modes now that they are regular modes. v3: SET_CAP -> SET_CLIENT_CAP rename (Chris Wilson) Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h3
-rw-r--r--include/uapi/drm/drm.h9
2 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index dbc86b06a724..c65f496ad6b6 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -433,6 +433,9 @@ struct drm_file {
433 struct drm_master *master; /* master this node is currently associated with 433 struct drm_master *master; /* master this node is currently associated with
434 N.B. not always minor->master */ 434 N.B. not always minor->master */
435 435
436 /* true when the client has asked us to expose stereo 3D mode flags */
437 bool stereo_allowed;
438
436 /** 439 /**
437 * fbs - List of framebuffers associated with this file. 440 * fbs - List of framebuffers associated with this file.
438 * 441 *
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 526baed365ff..9b24d65fed72 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -627,6 +627,15 @@ struct drm_get_cap {
627 __u64 value; 627 __u64 value;
628}; 628};
629 629
630/**
631 * DRM_CLIENT_CAP_STEREO_3D
632 *
633 * if set to 1, the DRM core will expose the stereo 3D capabilities of the
634 * monitor by advertising the supported 3D layouts in the flags of struct
635 * drm_mode_modeinfo.
636 */
637#define DRM_CLIENT_CAP_STEREO_3D 1
638
630/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */ 639/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
631struct drm_set_client_cap { 640struct drm_set_client_cap {
632 __u64 capability; 641 __u64 capability;