diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2013-09-27 13:11:50 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-01 07:45:45 +0200 |
commit | 5848ad409c1817f5b70507e6b4440fcbd002f6c5 (patch) | |
tree | 9d1244efe4cbf2d2fa37789acc1007ac1eeffa35 /drivers/gpu/drm/drm_crtc.c | |
parent | drm: Revert "drm: Reject modes with more than 1 stereo flags set" (diff) | |
download | linux-5848ad409c1817f5b70507e6b4440fcbd002f6c5.tar.xz linux-5848ad409c1817f5b70507e6b4440fcbd002f6c5.zip |
drm: Reject stereo modes with an unknown layout
The kernel shouldn't accept invalid modes, just say No.
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 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 2ce80ed55b08..d7a8370e3cdc 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -1319,6 +1319,9 @@ static int drm_crtc_convert_umode(struct drm_display_mode *out, if (in->clock > INT_MAX || in->vrefresh > INT_MAX) return -ERANGE; + if ((in->flags & DRM_MODE_FLAG_3D_MASK) > DRM_MODE_FLAG_3D_MAX) + return -EINVAL; + out->clock = in->clock; out->hdisplay = in->hdisplay; out->hsync_start = in->hsync_start; |