1 From 39d618a032d26655dfa62299034394e5d1ea7712 Mon Sep 17 00:00:00 2001
2 From: Mario Kleiner <mario.kleiner.de@gmail.com>
3 Date: Tue, 19 Jul 2016 20:58:59 +0200
4 Subject: [PATCH] drm/vc4: Reject doublescan modes.
6 We can't handle doublescan modes at the moment, so if
7 userspace tries to set one, reject the mode set.
9 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
10 Signed-off-by: Eric Anholt <eric@anholt.net>
12 drivers/gpu/drm/vc4/vc4_crtc.c | 7 +++++++
13 1 file changed, 7 insertions(+)
15 --- a/drivers/gpu/drm/vc4/vc4_crtc.c
16 +++ b/drivers/gpu/drm/vc4/vc4_crtc.c
17 @@ -542,6 +542,13 @@ static bool vc4_crtc_mode_fixup(struct d
18 const struct drm_display_mode *mode,
19 struct drm_display_mode *adjusted_mode)
21 + /* Do not allow doublescan modes from user space */
22 + if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) {
23 + DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n",
29 * Interlaced video modes got CRTC_INTERLACE_HALVE_V applied when
30 * coming from user space. We don't want this, as it screws up