summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2016-07-19 20:58:59 +0200
committerEric Anholt <eric@anholt.net>2016-08-19 19:05:52 -0700
commit3645146706f716be7ef2b88ebcc26f7f1fc4e4aa (patch)
treef33b7583717a7c7958eb8b012825b43a1f70a52c /drivers/gpu
parentacc1be1d351e8d5c0c8d14dad904ae0e39fc3653 (diff)
downloadop-kernel-dev-3645146706f716be7ef2b88ebcc26f7f1fc4e4aa.zip
op-kernel-dev-3645146706f716be7ef2b88ebcc26f7f1fc4e4aa.tar.gz
drm/vc4: Reject doublescan modes.
We can't handle doublescan modes at the moment, so if userspace tries to set one, reject the mode set. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_crtc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c
index a479d3d..2bfa247 100644
--- a/drivers/gpu/drm/vc4/vc4_crtc.c
+++ b/drivers/gpu/drm/vc4/vc4_crtc.c
@@ -536,6 +536,13 @@ static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc,
const struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
+ /* Do not allow doublescan modes from user space */
+ if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) {
+ DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n",
+ crtc->base.id);
+ return false;
+ }
+
/*
* Interlaced video modes got CRTC_INTERLACE_HALVE_V applied when
* coming from user space. We don't want this, as it screws up
OpenPOWER on IntegriCloud