From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 874D7606A322 for ; Fri, 4 Dec 2026 14:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=JBQnolpA Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4AFCB112FFD; Fri, 4 Dec 2026 14:52:55 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id B349A112FF9; Fri, 4 Dec 2026 14:52:48 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id A165C6229D; Fri, 4 Dec 2026 14:52:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB9C81F000C2; Fri, 4 Dec 2026 14:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796395967; bh=fGrZPg7ozrclyDF7NAfbTVH8uQBP1It4mOPbGSRwvTo=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=JBQnolpASyLxG5Xt+sWMzucoyF0jwChLcTNdPZO1MFcMvZC/hSPK+WH4glblwo1CM NJxbDqk/x/1eM7hNvWW6LDcA0nTsukV8eU20DADI+L2URNkIjeEUtwZUor3CFwBzPa 3dIT7K2NjVQlmKCKLshKB2D5Z7pOJwMp0n3eqdeQynDP7uwbtPO2Uv8dEub/iNV3c6 lkgIFnP4RlSS8huRPkuxVxiv5C/Fgd04M9C3cyLwKIu+HtxAq74NYhfL7RXJo+R6Ne Ai7mK5n+/nbJ93cfsDr7po5fdqDvL4ZVwVwAKa056yIYAPi2SOHcjzeQcGCYjf4z6P UxmgivijlV2zw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] drm/i915/display: Select AUX path before power-up To: "Mika Kahola" , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org In-Reply-To: <20261204142043.1049728-1-mika.kahola@intel.com> References: <20261204142043.1049728-1-mika.kahola@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 14:52:46 +0000 X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "Intel-xe" X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 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/dr= ivers/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 i= ntel_display *display, > struct i915_power_well *power_well) > { > enum aux_ch aux_ch =3D i915_power_well_instance(power_well)->xelpdp.aux= _ch; > + struct intel_digital_port *dig_port =3D aux_ch_to_digital_port(display,= aux_ch); > enum phy phy =3D icl_aux_pw_to_phy(display, power_well); > + u32 clear_bits =3D XELPDP_DP_AUX_CH_CTL_POWER_REQUEST | > + DP_AUX_CH_CTL_SEND_BUSY; > + u32 set_bits =3D XELPDP_DP_AUX_CH_CTL_POWER_REQUEST; > =20 > 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) >=3D 20) { > + clear_bits |=3D DP_AUX_CH_CTL_TBT_IO; > + if (dig_port && intel_tc_port_in_tbt_alt_mode(dig_port)) > + set_bits |=3D 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) >=3D 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 =3D i915_power_well_instance(power_well)->xelpdp.aux= _ch; > enum phy phy =3D icl_aux_pw_to_phy(display, power_well); > + u32 clear_bits =3D XELPDP_DP_AUX_CH_CTL_POWER_REQUEST | > + DP_AUX_CH_CTL_SEND_BUSY; > + u32 set_bits =3D 0; > + > + if (DISPLAY_VER(display) >=3D 20) > + clear_bits |=3D DP_AUX_CH_CTL_TBT_IO; > =20 > /* 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); > =20 > 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 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204142043.1049= 728-1-mika.kahola@intel.com?part=3D1