Skip to content

Commit 0574bd8

Browse files
committed
drm/i915: Reject odd pipe source width with double wide/dual link
In order to guarantee that pipe_src_w/h matches the user mode h/vdisplay we must not adjust pipe_src_w to accommodate double wide/dual link. Instead just reject the mode outright. This will allows us to rely on crtc_state->mode for plane clipping. Cc: Laurent Pinchart <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Thierry Reding <[email protected]>
1 parent a63b8e7 commit 0574bd8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6372,9 +6372,18 @@ static int intel_crtc_compute_config(struct intel_crtc *crtc,
63726372
* - LVDS dual channel mode
63736373
* - Double wide pipe
63746374
*/
6375-
if ((intel_crtc_has_type(pipe_config, INTEL_OUTPUT_LVDS) &&
6376-
intel_is_dual_link_lvds(dev)) || pipe_config->double_wide)
6377-
pipe_config->pipe_src_w &= ~1;
6375+
if (pipe_config->pipe_src_w & 1) {
6376+
if (pipe_config->double_wide) {
6377+
DRM_DEBUG_KMS("Odd pipe source width not supported with double wide pipe\n");
6378+
return -EINVAL;
6379+
}
6380+
6381+
if (intel_crtc_has_type(pipe_config, INTEL_OUTPUT_LVDS) &&
6382+
intel_is_dual_link_lvds(dev)) {
6383+
DRM_DEBUG_KMS("Odd pipe source width not supported with dual link LVDS\n");
6384+
return -EINVAL;
6385+
}
6386+
}
63786387

63796388
/* Cantiga+ cannot handle modes with a hsync front porch of 0.
63806389
* WaPruneModeWithIncorrectHsyncOffset:ctg,elk,ilk,snb,ivb,vlv,hsw.

0 commit comments

Comments
 (0)