We can only enable the pfit if the pipe. Ensure that this is obied
with a neat assert.

Also check whether the pfit is off before enabling it - if not we've
lost track of things somewhere since the pfit is only ever used by the
lvds output.

Signed-off-by: Daniel Vetter <daniel.vet...@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_lvds.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lvds.c 
b/drivers/gpu/drm/i915/intel_lvds.c
index ca2d903..1ff981f 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -159,6 +159,9 @@ static void intel_pre_enable_lvds(struct intel_encoder 
*encoder)
        if (HAS_PCH_SPLIT(dev) || !enc->pfit_control)
                return;
 
+       WARN_ON(I915_READ(PFIT_CONTROL) & PFIT_ENABLE);
+       assert_pipe_disabled(dev_priv, to_intel_crtc(encoder->base.crtc)->pipe);
+
        /*
         * Enable automatic panel scaling so that non-native modes
         * fill the screen.  The panel fitter should only be
-- 
1.7.10.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to