summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorPaulo Zanoni2014-01-17 16:51:13 +0100
committerDaniel Vetter2014-02-12 18:53:11 +0100
commit7ad25d488faf2622d5c1c3c04e42e8efe9539da0 (patch)
tree4139bee5cf4daf303f9907ebd206f5c7cd8cfacd /drivers/gpu/drm/i915/intel_display.c
parentdrm/i915: remove wait_for_vblank argument form intel_enable_pipe (diff)
downloadkernel-qcow2-linux-7ad25d488faf2622d5c1c3c04e42e8efe9539da0.tar.gz
kernel-qcow2-linux-7ad25d488faf2622d5c1c3c04e42e8efe9539da0.tar.xz
kernel-qcow2-linux-7ad25d488faf2622d5c1c3c04e42e8efe9539da0.zip
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: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b040bd43bfd7..43b4281daf25 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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);