[PATCH 3/5] drm/vc4: Reject doublescan modes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Cc: Eric Anholt <eric@xxxxxxxxxx>
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 7 +++++++
 1 file changed, 7 insertions(+)

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
-- 
2.7.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux