[PATCH] drm/i915: Skip the uncalibarated snps phys

Ramalingam C ramalingam.c at intel.com
Wed Feb 23 20:27:32 UTC 2022


If the SNPS phys are not calibarated, skip the output setup for them.

Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index e4260806c2a4..682a19158260 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -4254,6 +4254,13 @@ static void intel_ddi_encoder_shutdown(struct intel_encoder *encoder)
 	intel_tc_port_flush_work(dig_port);
 }
 
+static inline bool
+intel_snps_phy_calibrated(struct drm_i915_private *i915, enum phy phy)
+{
+	return !(intel_uncore_read_notrace(&i915->uncore, DG2_PHY_MISC(phy)) &
+		 DG2_PHY_DP_TX_ACK_MASK);
+}
+
 #define port_tc_name(port) ((port) - PORT_TC1 + '1')
 #define tc_port_name(tc_port) ((tc_port) - TC_PORT_1 + '1')
 
@@ -4277,6 +4284,10 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port)
 		return;
 	}
 
+	if (intel_phy_is_snps(dev_priv, phy))
+		if (!intel_snps_phy_calibrated(dev_priv, phy))
+			return;
+
 	devdata = intel_bios_encoder_data_lookup(dev_priv, port);
 	if (!devdata) {
 		drm_dbg_kms(&dev_priv->drm,
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list