All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mika Kahola" <mika.kahola@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/display: Select AUX path before power-up
Date: Fri, 04 Dec 2026 14:52:46 +0000	[thread overview]
Message-ID: <sashiko-outbox-250024@kernel.org> (raw)
In-Reply-To: <20261204142043.1049728-1-mika.kahola@intel.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] drm/i915/display: xelpdp_aux_power_well_disable() clears
  TBT_IO too early
- [Medium] drm/i915/display: xelpdp_aux_power_well_enable() skips TBT_IO
  on ver 14
--

commit 4c5f6daa4386532d889228f0dd6a09e08e617e3b
Author: Mika Kahola <mika.kahola@intel.com>

drm/i915/display: Select AUX path before power-up

This patch programs DP_AUX_CH_CTL_TBT_IO alongside the AUX power request
on display version 20+ during AUX power-well enable, and clears it during
AUX power-well disable.

> 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 cc91eafb30f8c..044b819cf1ef0 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
> @@ -1941,11 +1941,20 @@ static void xelpdp_aux_power_well_enable(struct intel_display *display,
>  					 struct i915_power_well *power_well)
>  {
>  	enum aux_ch aux_ch = i915_power_well_instance(power_well)->xelpdp.aux_ch;
> +	struct intel_digital_port *dig_port = aux_ch_to_digital_port(display, aux_ch);
>  	enum phy phy = icl_aux_pw_to_phy(display, power_well);
> +	u32 clear_bits = XELPDP_DP_AUX_CH_CTL_POWER_REQUEST |
> +			 DP_AUX_CH_CTL_SEND_BUSY;
> +	u32 set_bits = XELPDP_DP_AUX_CH_CTL_POWER_REQUEST;
>  
>  	if (icl_aux_pw_is_tc_phy(display, power_well))
> -		icl_tc_port_assert_ref_held(display, power_well,
> -					    aux_ch_to_digital_port(display, aux_ch));
> +		icl_tc_port_assert_ref_held(display, power_well, dig_port);
> +
> +	if (DISPLAY_VER(display) >= 20) {
> +		clear_bits |= DP_AUX_CH_CTL_TBT_IO;
> +		if (dig_port && intel_tc_port_in_tbt_alt_mode(dig_port))
> +			set_bits |= DP_AUX_CH_CTL_TBT_IO;
> +	}

[Severity: Medium]
As reported by Imre Deak on v1 [1], should DP_AUX_CH_CTL_TBT_IO also be
set and cleared on display version 14 (MTL), rather than gating both paths
on DISPLAY_VER(display) >= 20?

Display version 14 shares xelpdp_aux_power_well_ops, sets both TBT_IO and
POWER_REQUEST in skl_get_aux_send_ctl(), and was added in 40151be79668
("drm/i915/mtl: Add display power wells") citing BSpec 65247, which this
patch also cites.

Skipping TBT_IO on version 14 leaves it unset on first TBT AUX power-up
and stale across mode switches.  Because version 14 sleeps rather than
polling XELPDP_DP_AUX_CH_CTL_POWER_STATUS, any power-up failure surfaces
as later AUX transfer errors.

[ ... ]

> @@ -1980,12 +1987,16 @@ static void xelpdp_aux_power_well_disable(struct intel_display *display,
>  {
>  	enum aux_ch aux_ch = i915_power_well_instance(power_well)->xelpdp.aux_ch;
>  	enum phy phy = icl_aux_pw_to_phy(display, power_well);
> +	u32 clear_bits = XELPDP_DP_AUX_CH_CTL_POWER_REQUEST |
> +			 DP_AUX_CH_CTL_SEND_BUSY;
> +	u32 set_bits = 0;
> +
> +	if (DISPLAY_VER(display) >= 20)
> +		clear_bits |= DP_AUX_CH_CTL_TBT_IO;
>  
>  	/* don't write Send Busy back as 1, see the enable path */
>  	intel_de_rmw(display, XELPDP_DP_AUX_CH_CTL(display, aux_ch),
> -		     XELPDP_DP_AUX_CH_CTL_POWER_REQUEST |
> -		     DP_AUX_CH_CTL_SEND_BUSY,
> -		     0);
> +		     clear_bits, set_bits);
>  
>  	if (HAS_LT_PHY(display)) {
>  		if (intel_de_wait_for_clear_ms(display, XELPDP_DP_AUX_CH_CTL(display, aux_ch),

[Severity: Medium]
Can clearing DP_AUX_CH_CTL_TBT_IO in the same RMW as
XELPDP_DP_AUX_CH_CTL_POWER_REQUEST disturb TBT AUX power-down or cause the
XELPDP_DP_AUX_CH_CTL_POWER_STATUS poll to see 0 prematurely?

Because AUX power-up requires DP_AUX_CH_CTL_TBT_IO for the power status
handshake on HAS_LT_PHY, switching back to native before waiting can read
the already-off native status.  Sibling paths like
intel_mtl_tbt_pll_disable_clock() wait for the ack before clearing TBT.

Clearing DP_AUX_CH_CTL_TBT_IO only after the power-down wait completes
would keep the TBT path selected throughout teardown.

[1] https://lore.kernel.org/r/axAvV0P0N-rYAfyG@ideak-desk.lan

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204142043.1049728-1-mika.kahola@intel.com?part=1

  parent reply	other threads:[~2026-12-04 14:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04 14:20 [PATCH v2] drm/i915/display: Select AUX path before power-up Mika Kahola
2026-12-04 14:37 ` ✓ CI.KUnit: success for drm/i915/display: Select AUX path before power-up (rev2) Patchwork
2026-12-04 14:52 ` sashiko-bot [this message]
2026-12-04 15:25 ` ✓ i915.CI.BAT: " Patchwork
2026-12-04 16:09 ` [PATCH v2] drm/i915/display: Select AUX path before power-up Imre Deak
2026-12-05  2:58 ` ✗ i915.CI.Full: failure for drm/i915/display: Select AUX path before power-up (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sashiko-outbox-250024@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.