Skip to content

Commit 3645146

Browse files
kleinermanholt
authored andcommitted
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 <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
1 parent acc1be1 commit 3645146

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/gpu/drm/vc4/vc4_crtc.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,13 @@ static bool vc4_crtc_mode_fixup(struct drm_crtc *crtc,
536536
const struct drm_display_mode *mode,
537537
struct drm_display_mode *adjusted_mode)
538538
{
539+
/* Do not allow doublescan modes from user space */
540+
if (adjusted_mode->flags & DRM_MODE_FLAG_DBLSCAN) {
541+
DRM_DEBUG_KMS("[CRTC:%d] Doublescan mode rejected.\n",
542+
crtc->base.id);
543+
return false;
544+
}
545+
539546
/*
540547
* Interlaced video modes got CRTC_INTERLACE_HALVE_V applied when
541548
* coming from user space. We don't want this, as it screws up

0 commit comments

Comments
 (0)