]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: WARN in case we're enabling the pipe and it's enabled
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Fri, 17 Jan 2014 15:51:13 +0000 (13:51 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 12 Feb 2014 17:53:11 +0000 (18:53 +0100)
... and QUIRK_PIPEA_FORCE is not present.

I initially thought that case was impossible and just added a WARN on
it, but then I was told this case is possible due to
QUIRK_PIPEA_FORCE. So let's add a WARN that serves two purposes:
  - tell us in case we have done something wrong;
  - document the only case where we expect this.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index b040bd43bfd71b1608944f0f271c067cfb9cd34d..43b4281daf252efc66df72b09f55ffb3a1a101c5 100644 (file)
@@ -1793,8 +1793,11 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
 
        reg = PIPECONF(cpu_transcoder);
        val = I915_READ(reg);
-       if (val & PIPECONF_ENABLE)
+       if (val & PIPECONF_ENABLE) {
+               WARN_ON(!(pipe == PIPE_A &&
+                         dev_priv->quirks & QUIRK_PIPEA_FORCE));
                return;
+       }
 
        I915_WRITE(reg, val | PIPECONF_ENABLE);
        POSTING_READ(reg);