diff mbox series

[12/12] drm/i915/dp: Abort AUX on disconnected native DP ports

Message ID 20240104083008.2715733-13-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Fix HPD handling during driver init/shutdown | expand

Commit Message

Imre Deak Jan. 4, 2024, 8:30 a.m. UTC
An AUX transfer on any disconnected DP port results in long
timeout/retry delays the same way as this is described for TypeC port in

commit a972cd3f0eb5 ("drm/i915/tc: Abort DP AUX transfer on a disconnected TC port")

Prevent the delay on non-TypeC ports as well by aborting the transfer if
the port is disconnected. For eDP keep the current behavior as the
support for HPD signaling is optional for it.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_aux.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Hogander, Jouni Jan. 8, 2024, 10:33 a.m. UTC | #1
On Thu, 2024-01-04 at 10:30 +0200, Imre Deak wrote:
> An AUX transfer on any disconnected DP port results in long
> timeout/retry delays the same way as this is described for TypeC port
> in
> 
> commit a972cd3f0eb5 ("drm/i915/tc: Abort DP AUX transfer on a
> disconnected TC port")
> 
> Prevent the delay on non-TypeC ports as well by aborting the transfer
> if
> the port is disconnected. For eDP keep the current behavior as the
> support for HPD signaling is optional for it.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_aux.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> index b36ef321e835e..4f4a0e3b31140 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
> @@ -231,8 +231,6 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
>         struct intel_digital_port *dig_port =
> dp_to_dig_port(intel_dp);
>         struct intel_encoder *encoder = &dig_port->base;
>         struct drm_i915_private *i915 = to_i915(dig_port-
> >base.base.dev);
> -       enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
> -       bool is_tc_port = intel_phy_is_tc(i915, phy);
>         i915_reg_t ch_ctl, ch_data[5];
>         u32 aux_clock_divider;
>         enum intel_display_power_domain aux_domain;
> @@ -252,9 +250,8 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
>          * Abort transfers on a disconnected port as required by
>          * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX
>          * timeouts that would otherwise happen.
> -        * TODO: abort the transfer on non-TC ports as well.
>          */
> -       if (is_tc_port &&
> +       if (!intel_dp_is_edp(intel_dp) &&
>             !intel_digital_port_connected_locked(&dig_port->base)) {
>                 ret = -ENXIO;
>                 goto out_unlock;
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp_aux.c b/drivers/gpu/drm/i915/display/intel_dp_aux.c
index b36ef321e835e..4f4a0e3b31140 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_aux.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_aux.c
@@ -231,8 +231,6 @@  intel_dp_aux_xfer(struct intel_dp *intel_dp,
 	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
 	struct intel_encoder *encoder = &dig_port->base;
 	struct drm_i915_private *i915 = to_i915(dig_port->base.base.dev);
-	enum phy phy = intel_port_to_phy(i915, dig_port->base.port);
-	bool is_tc_port = intel_phy_is_tc(i915, phy);
 	i915_reg_t ch_ctl, ch_data[5];
 	u32 aux_clock_divider;
 	enum intel_display_power_domain aux_domain;
@@ -252,9 +250,8 @@  intel_dp_aux_xfer(struct intel_dp *intel_dp,
 	 * Abort transfers on a disconnected port as required by
 	 * DP 1.4a link CTS 4.2.1.5, also avoiding the long AUX
 	 * timeouts that would otherwise happen.
-	 * TODO: abort the transfer on non-TC ports as well.
 	 */
-	if (is_tc_port &&
+	if (!intel_dp_is_edp(intel_dp) &&
 	    !intel_digital_port_connected_locked(&dig_port->base)) {
 		ret = -ENXIO;
 		goto out_unlock;