[Intel-gfx] [PATCH] drm/i915/dp: Poll for DDI Idle status to be 0 after enabling DDI Buf
Manasi Navare
manasi.d.navare at intel.com
Tue Jun 16 19:30:56 UTC 2020
The Bspec sequence expects us to poll for DDI Idle status
to be 0 (not idle) with a timeout of 600usecs after enabling the
DDI BUF CTL. But currently in the driver we just wait for 600usecs
without polling so add that.
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Cc: Imre Deak <imre.deak at intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare at intel.com>
---
drivers/gpu/drm/i915/display/intel_ddi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index ca7bb2294d2b..de7e15de0bc5 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4023,7 +4023,11 @@ static void intel_ddi_prepare_link_retrain(struct intel_dp *intel_dp)
intel_de_write(dev_priv, DDI_BUF_CTL(port), intel_dp->DP);
intel_de_posting_read(dev_priv, DDI_BUF_CTL(port));
- udelay(600);
+ if (wait_for_us(!(intel_de_read(dev_priv, DDI_BUF_CTL(port)) &
+ DDI_BUF_IS_IDLE),
+ 600))
+ drm_err(&dev_priv->drm, "DDI port:%c buffer idle\n",
+ port_name(port));
}
static void intel_ddi_set_link_train(struct intel_dp *intel_dp,
--
2.19.1
More information about the Intel-gfx
mailing list