From af101c2ff47b6ea107f3fd4d75c80e36924768fe Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Mon, 17 Dec 2012 21:10:17 +0100 Subject: [PATCH] drm/i915: Extend the checks in intel_check_plane_mapping() Check the also the current plane's configuration if it is configured with the correct pipe. Signed-off-by: Peter Ujfalusi --- drivers/gpu/drm/i915/intel_display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 391c3c6..e40184a 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -8112,13 +8112,20 @@ intel_check_plane_mapping(struct intel_crtc *crtc) if (dev_priv->num_pipe == 1) return true; + /* Check if the other enabled plane is using the pipe */ reg = DSPCNTR(!crtc->plane); val = I915_READ(reg); - if ((val & DISPLAY_PLANE_ENABLE) && (!!(val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe)) return false; + /* Validate the plane <-> pipe configuration */ + reg = DSPCNTR(crtc->plane); + val = I915_READ(reg); + if ((val & DISPLAY_PLANE_ENABLE) == 0 && + (!!(val & DISPPLANE_SEL_PIPE_MASK) != crtc->pipe)) + return false; + return true; } -- 1.8.0.2