From 3d3ecf3fda188ea499fe563b519b4dcc88d2c6b7 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 24 May 2013 22:05:28 +0200 Subject: [PATCH] drm/i915: Quirk the pipe A quirk in the modeset state checker If we always force the pipe A to on we can't use the hw state to decide whether it should be on. Hence quirk the quirk. Note that in the hw state readout we don't really care since we have a big hack to force-enable pipe A anyway. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64764 Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index d63bb3fa..deabdfd 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1695,13 +1695,16 @@ static void intel_disable_pipe(struct drm_i915_private *dev_priv, if (pipe == PIPE_A && (dev_priv->quirks & QUIRK_PIPEA_FORCE)) return; + printk("in intel_disable_pipe for pipe %i\n", pipe); reg = PIPECONF(cpu_transcoder); val = I915_READ(reg); if ((val & PIPECONF_ENABLE) == 0) return; + printk("disabling pipe %i\n", pipe); I915_WRITE(reg, val & ~PIPECONF_ENABLE); intel_wait_for_pipe_off(dev_priv->dev, pipe); + printk("pipe %i status: 0x%08x\n", pipe, I915_READ(PIPECONF(pipe))); } /* @@ -8099,6 +8102,11 @@ intel_modeset_check_state(struct drm_device *dev) pipe_config.cpu_transcoder = crtc->config.cpu_transcoder; active = dev_priv->display.get_pipe_config(crtc, &pipe_config); + + /* hw state is unreliable with the pipe A quirk */ + if (dev_priv->quirks & QUIRK_PIPEA_FORCE) + active = crtc->active; + WARN(crtc->active != active, "crtc active state doesn't match with hw state " "(expected %i, found %i)\n", crtc->active, active); -- 1.7.10.4