[Intel-gfx] [PATCH 8/9] drm/i915: PSR: respect vbt time for link trains when available.

Rodrigo Vivi rodrigo.vivi at intel.com
Mon Jan 12 10:14:35 PST 2015


If link is off we need to give enough time for source to do link train.
This time is usually set at VBT.

VBT tp time comse in multiple of hundreds.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
 drivers/gpu/drm/i915/intel_psr.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 313347a..d1c2c31 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -603,6 +603,10 @@ void intel_psr_flush(struct drm_device *dev,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct drm_crtc *crtc;
 	enum pipe pipe;
+	bool link_on = dev_priv->psr.link_standby;
+	int tp = 100 * dev_priv->vbt.psr.tp2_tp3_wakeup_time +
+		 100 * dev_priv->vbt.psr.tp1_wakeup_time;
+	int delay = tp && !link_on ? tp : 100;
 
 	mutex_lock(&dev_priv->psr.lock);
 	if (!dev_priv->psr.enabled) {
@@ -635,7 +639,7 @@ void intel_psr_flush(struct drm_device *dev,
 
 	if (!dev_priv->psr.active && !dev_priv->psr.busy_frontbuffer_bits)
 		schedule_delayed_work(&dev_priv->psr.work,
-				      msecs_to_jiffies(100));
+				      msecs_to_jiffies(delay));
 	mutex_unlock(&dev_priv->psr.lock);
 }
 
-- 
2.1.0



More information about the Intel-gfx mailing list