From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796225308; b=u/46yrhf36thw0rEAzch9CcmPmlba0GTf2mBd5bMOtHTx3nFzuRBs/kW5d6h0cDD/7WQ 307Of+a9/hr5zc5sCiXesvOvaSDZSQR8c1xnuWtiNG0PYl4Glv7oBOokX7sr4UhfoYrgt GA82EBM82eSPQUcttmwx7BbX/d2F7YUl37hoLhxvusLlWewr/dr3DDTEb+SYXIaJQiJdJ KFYavlTQvgCam98ze0CJNgjZA1CD9GXwGdArjSU0D0muKeboKJdlo78A+cdy6+GQZhAbZ Wqb8u+ty5EBZ6wk931skztIzdQxUdIDxDQpZNeCUYR37KxaQiJRFsrpzET946Ki+mpQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796225308; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=JwUTaGTIr2iq5GmPytM6PY7wLsNax0xml90Ga9okk5k=; b=Qc/8XnzHS17HgLqfwbNywLDUlJvtl9JvU9rlP0pCOCk5hBoeKnezSJFKf1N+HGsrIVN9 8ucueod7bUguejtayxnX4VtIwkE4kof5+CiMgfyo516JXimqeqTLx07bQeyF97mkuhba5 Mk1JzfEKaUsC7Y5G9mVkCu2dQz645PPZU+5ti7slnfP0To+z7gH8FzxGckUAXMB8nAe2f R9Jys2InArHxfal7lUfgGcE7k68AbkGefZ79dBnpANNbb0wu72/wKjAWRRKZ1Byyz7cC0 Td5rUkbQL7/e6dP8Tsc9sv+sStMZxVXvSduOykGRt4MkdkO/QcQQkaAuNlqoX+SL+pg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Fo0ucN4o; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DABEE606A31A for ; Wed, 2 Dec 2026 15:28:28 +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=Fo0ucN4o Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F5F41F00919; Wed, 2 Dec 2026 15:28:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796225308; bh=JwUTaGTIr2iq5GmPytM6PY7wLsNax0xml90Ga9okk5k=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Fo0ucN4oeAmo7EbI7D3mVyMP2xH0uzErLpKUblqDSiamdwdL9x4vwXOMOrQDWIBeK gsfCXgNeQzOu8yHRPU32XcPasNwNhkcgFyMsHWPlyODGZL+W/6+mpEwc9hmowuhDUz xPjTbzG7aadgjAgiKOmWPFEkI2MTQWkt08T5DHmpy0R9Wf6Mr34K9bhWJzca7w7bpL wSKxeDMqI9N1jJerAQ3/K8W5JZFhA+s/2lGcYb+V6bFQZ9uMBlbp5cRi0ESpGIgRY/ kdQNrIdvZ7UMuw9E0tE1YC7ktJ/VHPcgmpe2V5wFxgidk/Kvq1Xf87WnyFv1zC32z3 Uq0UimnFiV9LQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 11/22] phy: cadence-torrent: use link lane count and mlane for DP config Reply-To: sashiko-reviews@lists.linux.dev To: "Benjamin Robin" Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org, neil.armstrong@linaro.org, olteanv@gmail.com In-Reply-To: <20261202-phy-cadence-torrent-ng-v2-11-0b493387347b@bootlin.com> References: <20261202-phy-cadence-torrent-ng-v2-0-0b493387347b@bootlin.com> <20261202-phy-cadence-torrent-ng-v2-11-0b493387347b@bootlin.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 15:28:27 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] phy: cadence-torrent: per-lane CDB init uses num_lanes instead of max_lanes -- commit a7bb6d81b805f076baf2e912724f7f59b580f8d8 Author: Benjamin Robin phy: cadence-torrent: use link lane count and mlane for DP config This commit splits the link lane count into max_lanes and num_lanes in struct tp_link so DisplayPort reconfiguration uses the active lane count when set_lanes is not set, and shifts per-lane register masks by link->mlane. > diff --git a/drivers/phy/cadence/phy-cadence-torrent.c b/drivers/phy/cade= nce/phy-cadence-torrent.c > index 28627bd234458..6e48c315e6b1a 100644 > --- a/drivers/phy/cadence/phy-cadence-torrent.c > +++ b/drivers/phy/cadence/phy-cadence-torrent.c [ ... ] > @@ -1190,7 +1209,7 @@ static int tp_dp_configure_rate(struct tp_data *tp_= data, struct tp_link *link, > /* PMA common configuration 100MHz */ > cdns_torrent_dp_pma_cmn_vco_cfg_100mhz(tp_data, dp->link_rate, dp->ssc= ); > =20 > - cdns_torrent_dp_pma_cmn_rate(tp_data, link, dp->link_rate, dp->lanes); > + cdns_torrent_dp_pma_cmn_rate(tp_data, link, dp->link_rate, link->num_la= nes); > =20 > /* Enable the associated PLL (cmn_pll0_en or cmn_pll1_en) */ > tp_reg_set_bits(reg_base, PHY_PMA_PLL_RAW_CTRL, pll_mask); [ ... ] > @@ -1286,58 +1295,53 @@ static void cdns_torrent_dp_set_a0_pll(struct tp_= data *tp_data, [ ... ] > + /* release master lane reset */ > + value |=3D 1 << mlane; > tp_reg_dptx_write(tp_data, PHY_RESET, value); > =20 > + /* update the number of used lanes */ > + link->num_lanes =3D num_lanes; > + > /* Wait, until PHY gets ready after releasing PHY reset signal. */ > ret =3D tp_dptx_wait_pma_cmn_ready(tp_data); [Severity: Medium] Does updating link->num_lanes to the active DisplayPort lane count leave upper physical lanes unconfigured when the lane count is later increased? After tp_dp_set_lanes() reduces link->num_lanes below link->max_lanes (for example from 4 lanes to 1 or 2), cdns_torrent_phy_configure_multilink() (called on system resume by tp_resume_noirq() after reset assertion) and tp_phy_init() still loop up to link->num_lanes instead of link->max_lanes when programming per-lane CDB tables (xcvr_diag_vals, tx_ln_vals, rx_ln_vals): drivers/phy/cadence/phy-cadence-torrent.c:cdns_torrent_phy_configure_multil= ink() { ... mlane =3D tp_data->links[node].mlane; ssc =3D tp_data->links[node].ssc_mode; num_lanes =3D tp_data->links[node].num_lanes; ... if (xcvr_diag_vals) { reg_pairs =3D xcvr_diag_vals->reg_pairs; num_regs =3D xcvr_diag_vals->num_regs; for (i =3D 0; i < num_lanes; i++) { ... } If the system suspends and resumes while fewer than max_lanes are active and a later phy_configure() increases dp->lanes back to 4, tp_dp_set_lanes() releases the upper lanes from reset without their per-lane CDB registers initialized (which also remains the case in tp_configure_links() after commit "phy: cadence-torrent: rewrite Torrent PHY driver"). Similarly, tp_dp_configure_rate() passes link->num_lanes to cdns_torrent_dp_pma_cmn_rate(), which only writes XCVR_DIAG_HSCLK_DIV for 0 .. link->num_lanes - 1; if a rate change happens at 1 or 2 lanes and a subsequent phy_configure() increases the lane count via set_lanes without set_rate, the newly enabled lanes keep stale XCVR_DIAG_HSCLK_DIV values (though commit "phy: cadence-torrent: rewrite Torrent PHY driver" later updates the XCVR_DIAG_HSCLK_DIV write to use link->max_lanes). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202-phy-cadenc= e-torrent-ng-v2-0-0b493387347b@bootlin.com?part=3D11