aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2013-09-27 07:11:48 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-01 01:45:44 -0400
commitf7e121b76469624459152542c1b809a1ebc835fe (patch)
tree295475386ab301b48c0010d1f3d3eb84baeffb7b /include/drm
parente454a05da623c26544721b159caaacdb6dfe448c (diff)
drm: Code stereo layouts as an enum rather than a bit field
This allows us to use fewer bits in the mode structure, leaving room for future work while allowing more stereo layouts types than we could have ever dreamt of. I also exposed the previously private DRM_MODE_FLAG_3D_MASK to set in stone that we are using 5 bits for the stereo layout enum, reserving 32 values. Even with that reservation, we gain 3 bits from the previous encoding. The code adding the mandatory stereo modes needeed to be adapted as it was relying or being able to or stereo layouts together. Suggested-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_crtc.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index b2d08ca68ee7..eb6b8dc971d9 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -181,15 +181,6 @@ struct drm_display_mode {
181 int hsync; /* in kHz */ 181 int hsync; /* in kHz */
182}; 182};
183 183
184#define DRM_MODE_FLAG_3D_MASK (DRM_MODE_FLAG_3D_FRAME_PACKING | \
185 DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE | \
186 DRM_MODE_FLAG_3D_LINE_ALTERNATIVE | \
187 DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL | \
188 DRM_MODE_FLAG_3D_L_DEPTH | \
189 DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH | \
190 DRM_MODE_FLAG_3D_TOP_AND_BOTTOM | \
191 DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF)
192
193static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode) 184static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode)
194{ 185{
195 return mode->flags & DRM_MODE_FLAG_3D_MASK; 186 return mode->flags & DRM_MODE_FLAG_3D_MASK;