stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
@ 2020-03-30 15:22 Imre Deak
  2020-03-30 18:18 ` [Intel-gfx] " Souza, Jose
  2020-03-31 13:11 ` Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Imre Deak @ 2020-03-30 15:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable

The DDI IO power well must not be enabled for a TypeC port in TBT mode,
ensure this during driver loading/system resume.

This gets rid of error messages like
[drm] *ERROR* power well DDI E TC2 IO state mismatch (refcount 1/enabled 0)

and avoids leaking the power ref when disabling the output.

Cc: <stable@vger.kernel.org> # v5.4+
Signed-off-by: Imre Deak <imre.deak@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 916a802af788..654151d9a6db 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -1899,7 +1899,11 @@ static void intel_ddi_get_power_domains(struct intel_encoder *encoder,
 		return;
 
 	dig_port = enc_to_dig_port(encoder);
-	intel_display_power_get(dev_priv, dig_port->ddi_io_power_domain);
+
+	if (!intel_phy_is_tc(dev_priv, phy) ||
+	    dig_port->tc_mode != TC_PORT_TBT_ALT)
+		intel_display_power_get(dev_priv,
+					dig_port->ddi_io_power_domain);
 
 	/*
 	 * AUX power is only needed for (e)DP mode, and for HDMI mode on TC
-- 
2.23.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Intel-gfx] [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
  2020-03-30 15:22 [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode Imre Deak
@ 2020-03-30 18:18 ` Souza, Jose
  2020-03-31 13:11 ` Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Souza, Jose @ 2020-03-30 18:18 UTC (permalink / raw)
  To: intel-gfx@lists.freedesktop.org, Deak, Imre; +Cc: stable@vger.kernel.org

On Mon, 2020-03-30 at 18:22 +0300, Imre Deak wrote:
> The DDI IO power well must not be enabled for a TypeC port in TBT
> mode,
> ensure this during driver loading/system resume.
> 
> This gets rid of error messages like
> [drm] *ERROR* power well DDI E TC2 IO state mismatch (refcount
> 1/enabled 0)
> 
> and avoids leaking the power ref when disabling the output.

Matches intel_ddi_post_disable_dp and
tgl_ddi_pre_enable_dp/hsw_ddi_pre_enable_dp.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Cc: <stable@vger.kernel.org> # v5.4+
> Signed-off-by: Imre Deak <imre.deak@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 916a802af788..654151d9a6db 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -1899,7 +1899,11 @@ static void intel_ddi_get_power_domains(struct
> intel_encoder *encoder,
>  		return;
>  
>  	dig_port = enc_to_dig_port(encoder);
> -	intel_display_power_get(dev_priv, dig_port-
> >ddi_io_power_domain);
> +
> +	if (!intel_phy_is_tc(dev_priv, phy) ||
> +	    dig_port->tc_mode != TC_PORT_TBT_ALT)
> +		intel_display_power_get(dev_priv,
> +					dig_port->ddi_io_power_domain);
>  
>  	/*
>  	 * AUX power is only needed for (e)DP mode, and for HDMI mode
> on TC

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode
  2020-03-30 15:22 [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode Imre Deak
  2020-03-30 18:18 ` [Intel-gfx] " Souza, Jose
@ 2020-03-31 13:11 ` Sasha Levin
  1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2020-03-31 13:11 UTC (permalink / raw)
  To: Sasha Levin, Imre Deak, intel-gfx; +Cc: stable, stable

Hi

[This is an automated email]

This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: 5.4+

The bot has tested the following trees: v5.5.13, v5.4.28.

v5.5.13: Failed to apply! Possible dependencies:
    1326a92c3466 ("drm/i915: Perform automated conversions for crtc uapi/hw split, base -> hw.")
    2225f3c6f1d7 ("drm/i915: Perform automated conversions for crtc uapi/hw split, base -> uapi.")
    2b808b3a27d1 ("drm/i915: Add aliases for uapi and hw to crtc_state")
    54ed6902cabc ("drm/i915/dsi: abstract afe_clk calculation")
    b7d02c3a124d ("drm/i915: Pass intel_encoder to enc_to_*()")

v5.4.28: Failed to apply! Possible dependencies:
    0456417ef680 ("drm: Add for_each_oldnew_intel_crtc_in_state_reverse()")
    131d3b1af105 ("drm/i915: Stop using drm_atomic_helper_check_planes()")
    2225f3c6f1d7 ("drm/i915: Perform automated conversions for crtc uapi/hw split, base -> uapi.")
    2b808b3a27d1 ("drm/i915: Add aliases for uapi and hw to crtc_state")
    2e7f76c1e4b6 ("drm/i915: s/pipe_config/crtc_state/ in intel_crtc_atomic_check()")
    3e30d70805d5 ("drm/i915: Make .modeset_calc_cdclk() mandatory")
    54ed6902cabc ("drm/i915/dsi: abstract afe_clk calculation")
    af9fbfa657c8 ("drm/i915: Introduce and use intel_atomic_crtc_state_for_each_plane_state.")
    b7d02c3a124d ("drm/i915: Pass intel_encoder to enc_to_*()")
    bb6ae9e653dc ("drm/i915: Allow planes to declare their minimum acceptable cdclk")
    d06a79d33e0f ("drm/i915: Use enum pipe instead of crtc index to track active pipes")
    fe4709a8d033 ("drm/i915: Extract intel_modeset_calc_cdclk()")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-31 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30 15:22 [PATCH] drm/i915/icl+: Don't enable DDI IO power on a TypeC port in TBT mode Imre Deak
2020-03-30 18:18 ` [Intel-gfx] " Souza, Jose
2020-03-31 13:11 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).