drm/i915/lvds: Always use 0 to disable the pfit controller
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Jan 2011 18:09:58 +0000 (18:09 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Jan 2011 20:27:11 +0000 (20:27 +0000)
... and just any combination of bits & ~PFIT_ENABLE. This way we do not
attempt disable to the panel fitter controller uselessly upon
intel_lvds_disable().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_lvds.c

index 4e7dcb330dadba8156ce46aa7923d09fef4c3446..8f4f6bd33ee9ec99684eeafd7d6a778f50df9bff 100644 (file)
@@ -374,6 +374,10 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
        }
 
 out:
+       if ((pfit_control & PFIT_ENABLE) == 0) {
+               pfit_control = 0;
+               pfit_pgm_ratios = 0;
+       }
        if (pfit_control != intel_lvds->pfit_control ||
            pfit_pgm_ratios != intel_lvds->pfit_pgm_ratios) {
                intel_lvds->pfit_control = pfit_control;