drm/i915: Avoid re-configure panel on every PSR re-enable.
authorRodrigo Vivi <rodrigo.vivi@gmail.com>
Tue, 16 Sep 2014 23:19:07 +0000 (19:19 -0400)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Sep 2014 19:00:46 +0000 (21:00 +0200)
The panel has to be reconfigured only when it really loose the power.
The traditional enable/disable sequence already take care of this so we can
minimize the time spend on every re-enable.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index 43b381a..c5ec821 100644 (file)
@@ -2121,10 +2121,7 @@ static void intel_edp_psr_do_enable(struct intel_dp *intel_dp)
        WARN_ON(dev_priv->psr.active);
        lockdep_assert_held(&dev_priv->psr.lock);
 
-       /* Enable PSR on the panel */
-       intel_edp_psr_enable_sink(intel_dp);
-
-       /* Enable PSR on the host */
+       /* Enable/Re-enable PSR on the host */
        intel_edp_psr_enable_source(intel_dp);
 
        dev_priv->psr.active = true;
@@ -2162,6 +2159,9 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp)
        I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |
                   EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
 
+       /* Enable PSR on the panel */
+       intel_edp_psr_enable_sink(intel_dp);
+
        dev_priv->psr.enabled = intel_dp;
 unlock:
        mutex_unlock(&dev_priv->psr.lock);