<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com> <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
-Clint</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div id="signature_bookmark"></div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>From:</b> Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> on behalf of Khaled Almahallawy <khaled.almahallawy@intel.com><br>
<b>Sent:</b> Friday, September 16, 2022 2:25 PM<br>
<b>To:</b> intel-gfx@lists.freedesktop.org <intel-gfx@lists.freedesktop.org><br>
<b>Subject:</b> [Intel-gfx] [PATCH v2] drm/i915/display: Don't disable DDI/Transcoder when setting phy test pattern</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Bspecs has updated recently to remove the restriction to disable<br>
DDI/Transcoder before setting PHY test pattern. This update is to<br>
address PHY compliance test failures observed on a port with LTTPR.<br>
The issue is that when Transc. is disabled, the main link signals fed<br>
to LTTPR will be dropped invalidating link training, which will affect<br>
the quality of the phy test pattern when the transcoder is enabled again.<br>
<br>
v2: Update commit message (Clint)<br>
<br>
Bspec: 50482<br>
Cc: Imre Deak <imre.deak@intel.com><br>
Cc: Clint Taylor <clinton.a.taylor@intel.com><br>
Cc: Or Cochvi <or.cochvi@intel.com><br>
Tested-by: Khaled Almahallawy <khaled.almahallawy@intel.com><br>
---<br>
drivers/gpu/drm/i915/display/intel_dp.c | 59 -------------------------<br>
1 file changed, 59 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c<br>
index c9be61d2348e..2bf323f3f155 100644<br>
--- a/drivers/gpu/drm/i915/display/intel_dp.c<br>
+++ b/drivers/gpu/drm/i915/display/intel_dp.c<br>
@@ -3675,61 +3675,6 @@ static void intel_dp_phy_pattern_update(struct intel_dp *intel_dp,<br>
}<br>
}<br>
<br>
-static void<br>
-intel_dp_autotest_phy_ddi_disable(struct intel_dp *intel_dp,<br>
- const struct intel_crtc_state *crtc_state)<br>
-{<br>
- struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);<br>
- struct drm_device *dev = dig_port->base.base.dev;<br>
- struct drm_i915_private *dev_priv = to_i915(dev);<br>
- struct intel_crtc *crtc = to_intel_crtc(dig_port->base.base.crtc);<br>
- enum pipe pipe = crtc->pipe;<br>
- u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value;<br>
-<br>
- trans_ddi_func_ctl_value = intel_de_read(dev_priv,<br>
- TRANS_DDI_FUNC_CTL(pipe));<br>
- trans_conf_value = intel_de_read(dev_priv, PIPECONF(pipe));<br>
- dp_tp_ctl_value = intel_de_read(dev_priv, TGL_DP_TP_CTL(pipe));<br>
-<br>
- trans_ddi_func_ctl_value &= ~(TRANS_DDI_FUNC_ENABLE |<br>
- TGL_TRANS_DDI_PORT_MASK);<br>
- trans_conf_value &= ~PIPECONF_ENABLE;<br>
- dp_tp_ctl_value &= ~DP_TP_CTL_ENABLE;<br>
-<br>
- intel_de_write(dev_priv, PIPECONF(pipe), trans_conf_value);<br>
- intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),<br>
- trans_ddi_func_ctl_value);<br>
- intel_de_write(dev_priv, TGL_DP_TP_CTL(pipe), dp_tp_ctl_value);<br>
-}<br>
-<br>
-static void<br>
-intel_dp_autotest_phy_ddi_enable(struct intel_dp *intel_dp,<br>
- const struct intel_crtc_state *crtc_state)<br>
-{<br>
- struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);<br>
- struct drm_device *dev = dig_port->base.base.dev;<br>
- struct drm_i915_private *dev_priv = to_i915(dev);<br>
- enum port port = dig_port->base.port;<br>
- struct intel_crtc *crtc = to_intel_crtc(dig_port->base.base.crtc);<br>
- enum pipe pipe = crtc->pipe;<br>
- u32 trans_ddi_func_ctl_value, trans_conf_value, dp_tp_ctl_value;<br>
-<br>
- trans_ddi_func_ctl_value = intel_de_read(dev_priv,<br>
- TRANS_DDI_FUNC_CTL(pipe));<br>
- trans_conf_value = intel_de_read(dev_priv, PIPECONF(pipe));<br>
- dp_tp_ctl_value = intel_de_read(dev_priv, TGL_DP_TP_CTL(pipe));<br>
-<br>
- trans_ddi_func_ctl_value |= TRANS_DDI_FUNC_ENABLE |<br>
- TGL_TRANS_DDI_SELECT_PORT(port);<br>
- trans_conf_value |= PIPECONF_ENABLE;<br>
- dp_tp_ctl_value |= DP_TP_CTL_ENABLE;<br>
-<br>
- intel_de_write(dev_priv, PIPECONF(pipe), trans_conf_value);<br>
- intel_de_write(dev_priv, TGL_DP_TP_CTL(pipe), dp_tp_ctl_value);<br>
- intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(pipe),<br>
- trans_ddi_func_ctl_value);<br>
-}<br>
-<br>
static void intel_dp_process_phy_request(struct intel_dp *intel_dp,<br>
const struct intel_crtc_state *crtc_state)<br>
{<br>
@@ -3748,14 +3693,10 @@ static void intel_dp_process_phy_request(struct intel_dp *intel_dp,<br>
intel_dp_get_adjust_train(intel_dp, crtc_state, DP_PHY_DPRX,<br>
link_status);<br>
<br>
- intel_dp_autotest_phy_ddi_disable(intel_dp, crtc_state);<br>
-<br>
intel_dp_set_signal_levels(intel_dp, crtc_state, DP_PHY_DPRX);<br>
<br>
intel_dp_phy_pattern_update(intel_dp, crtc_state);<br>
<br>
- intel_dp_autotest_phy_ddi_enable(intel_dp, crtc_state);<br>
-<br>
drm_dp_dpcd_write(&intel_dp->aux, DP_TRAINING_LANE0_SET,<br>
intel_dp->train_set, crtc_state->lane_count);<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</body>
</html>