diff mbox series

[2/2] drm/i915/mtl: Add TC port lockdep assert to AUX power well enabling

Message ID 20230830140421.2031111-2-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/i915/dp: Drop redundant AUX power get/put in intel_dp_force() | expand

Commit Message

Imre Deak Aug. 30, 2023, 2:04 p.m. UTC
Similarly to earlier platforms, assert in the MTL AUX power well
enabling handler for TC AUX CH power wells that the TC port using the
AUX CH is locked.

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

Comments

Rodrigo Vivi Aug. 30, 2023, 9:31 p.m. UTC | #1
On Wed, Aug 30, 2023 at 05:04:21PM +0300, Imre Deak wrote:
> Similarly to earlier platforms, assert in the MTL AUX power well
> enabling handler for TC AUX CH power wells that the TC port using the
> AUX CH is locked.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_power_well.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> index 916009894d89c..820b7d41a0a8f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> @@ -1794,6 +1794,11 @@ static void xelpdp_aux_power_well_enable(struct drm_i915_private *dev_priv,
>  					 struct i915_power_well *power_well)
>  {
>  	enum aux_ch aux_ch = i915_power_well_instance(power_well)->xelpdp.aux_ch;
> +	enum phy phy = icl_aux_pw_to_phy(dev_priv, power_well);
> +
> +	if (intel_phy_is_tc(dev_priv, phy))
> +		icl_tc_port_assert_ref_held(dev_priv, power_well,
> +					    aux_ch_to_digital_port(dev_priv, aux_ch));
>  
>  	intel_de_rmw(dev_priv, XELPDP_DP_AUX_CH_CTL(aux_ch),
>  		     XELPDP_DP_AUX_CH_CTL_POWER_REQUEST,
> -- 
> 2.37.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c
index 916009894d89c..820b7d41a0a8f 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
@@ -1794,6 +1794,11 @@  static void xelpdp_aux_power_well_enable(struct drm_i915_private *dev_priv,
 					 struct i915_power_well *power_well)
 {
 	enum aux_ch aux_ch = i915_power_well_instance(power_well)->xelpdp.aux_ch;
+	enum phy phy = icl_aux_pw_to_phy(dev_priv, power_well);
+
+	if (intel_phy_is_tc(dev_priv, phy))
+		icl_tc_port_assert_ref_held(dev_priv, power_well,
+					    aux_ch_to_digital_port(dev_priv, aux_ch));
 
 	intel_de_rmw(dev_priv, XELPDP_DP_AUX_CH_CTL(aux_ch),
 		     XELPDP_DP_AUX_CH_CTL_POWER_REQUEST,