Commit 7ad25d48 authored by Paulo Zanoni's avatar Paulo Zanoni Committed by Daniel Vetter

drm/i915: WARN in case we're enabling the pipe and it's enabled

... 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: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent e1fdc473
...@@ -1793,8 +1793,11 @@ static void intel_enable_pipe(struct intel_crtc *crtc) ...@@ -1793,8 +1793,11 @@ static void intel_enable_pipe(struct intel_crtc *crtc)
reg = PIPECONF(cpu_transcoder); reg = PIPECONF(cpu_transcoder);
val = I915_READ(reg); val = I915_READ(reg);
if (val & PIPECONF_ENABLE) if (val & PIPECONF_ENABLE) {
WARN_ON(!(pipe == PIPE_A &&
dev_priv->quirks & QUIRK_PIPEA_FORCE));
return; return;
}
I915_WRITE(reg, val | PIPECONF_ENABLE); I915_WRITE(reg, val | PIPECONF_ENABLE);
POSTING_READ(reg); POSTING_READ(reg);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment