From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5263C606A688 for ; Wed, 2 Dec 2026 05:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=r7jOuqrf; dkim=fail reason="signature verification failed" (1024-bit key) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=zohomail header.b=Vu+79KR2 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=ol7plAJcLpx2WU+aiAzKlUaEwPewFagX4EfGvfhfYWs=; b=r7jOuqrfPQGPJMRLAkTcsFQ43P 78cZtE4hsIqh/IyhtRMLwFLzrZQFLnTbC1AsjeP9VWBPUr8qBTbo/fl7/2g34nkaTdKQVm6CNPPRj xiIpJiFtKTRthHHavw/ZZukqsd0f0Fer3Ey/oTZBEnjtr7wwLgnjN1nTV20ufylqcfLieBj3a7Muu 1VG07u93IwutsG+bty+YVClbcI8h0mmU6sNQ8bTTtT4uXwGkl0F9cRUaY0bmQUlMH2+mWrx2cLCi7 tpPNMEqiNDHD5/3GWeyWBYCHq11PVQVNPKnNg9LlClwGN+BdpXCrPcNNfu6xKJ0ZQO6kWfzEJrc27 Tuy7HiJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYdAI-0000000AJuZ-3mln; Wed, 02 Dec 2026 05:46:02 +0000 Received: from sender6-op-o11.zoho.com ([165.173.180.11]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYdAG-0000000AJtj-110U; Wed, 02 Dec 2026 05:46:01 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1796190348; cv=none; d=zohomail.com; s=zohoarc; b=HGRc7d8VoiT7OrEHE2pPWgGbovDwfa/X+qAH8JJj4dkIpj0FKwM6P2kKd441U81ajBw2j73UeSSA+w7kfUzMFhdPF3pseW+mhWvkxpQ7M87Kbb4P/2pErC2hDQl5UqgPAmmTkihATwIVJFSph3x8ZUgPtY7SKV6ZLI4OQmE0XOU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1796190348; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=ol7plAJcLpx2WU+aiAzKlUaEwPewFagX4EfGvfhfYWs=; b=bnv8doDVh4ejR5mxXaE66tc2uXAavkT95JjfUBwL1ivThn10b7tzFpUm8XqVC/3OuwrQtr2twUwNHLGzcAO8tfAgX4tEKOIW/Y5UQTtSZ5xtuRwfx2qx0y5671swmSWY3r/xvnCbfZgOp/T75WFaWT0vokR6IG4zRGwbtLK0QGo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=sebastian.reichel@collabora.com; dmarc=pass header.from= DKIM-Signature: a=rsa-sha256; b=Vu+79KR2Us9cNh8AglrMdU1m2RTOK87z3tNCoALHcJxkx0G32smyI7nEBYlUukKoL0MpIJHSVD9f4dvFHPOjyGg0LZivOE9of9LB4dI+P5H7wFxeWAhq35tHVE/5SGKZxhHdqXBHKeHbVRkyq5aKyuxcPNgUKe5+c1bXYJiGmrU=; c=relaxed/relaxed; s=zohomail; d=collabora.com; v=1; bh=ol7plAJcLpx2WU+aiAzKlUaEwPewFagX4EfGvfhfYWs=; h=Content-Description:Content-ID:Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Resent-Sender:Resent-Cc:Resent-Date:Resent-To:Reply-To:Resent-Message-ID:Resent-From:Sender:Subject:To:Date:From:Message-Id:Reply-To:Subject:To:Cc; Received: by smtp.zohomail.com with SMTPS id 1796190345936512.5197017390485; Tue, 1 Dec 2026 21:45:45 -0800 (PST) Received: by venus (Postfix, from userid 1000) id 01517182056; Tue, 01 Dec 2026 23:16:09 +0100 (CET) Date: Tue, 1 Dec 2026 23:16:09 +0100 From: Sebastian Reichel To: aiyengar1990@gmail.com Cc: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Heiko Stuebner , Philipp Zabel , Cristian Ciocaltea , Damon Ding , linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Manivannan Sadhasivam Subject: Re: [PATCH v2] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off() Message-ID: References: <20261130-hdptx-lanes-pwroff-v2-1-fee377304ef6@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hxklnkn365du6mz5" Content-Disposition: inline In-Reply-To: <20261130-hdptx-lanes-pwroff-v2-1-fee377304ef6@gmail.com> X-Zoho-Virus-Status: 1 X-Zoho-AV-Stamp: zmail-av-0.2.28.1.5.5/296.168.99 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261201_214600_343723_9C9FA10E X-CRM114-Status: GOOD ( 25.41 ) X-Spam-Score: -0.6 (/) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 --hxklnkn365du6mz5 Content-Type: text/plain; protected-headers=v1; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Subject: Re: [PATCH v2] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off() MIME-Version: 1.0 Hi, On Mon, Nov 30, 2026 at 10:10:06PM +0000, Arun Iyengar via B4 Relay wrote: > From: Arun Iyengar >=20 > Since the PHY became a clock provider, rk_hdptx_phy_power_off() only > drops the usage count, which the consumers of the PHY PLL clock hold > too. On RK3588 the VOP holds it while runtime active, so with another > output in use the HDMI lanes keep driving the link after HDMI is > switched off. >=20 > Disable the lanes directly in rk_hdptx_phy_power_off() and keep the PLL > running for the clock consumers. DP mode is unchanged. Is there any gain from the DP check? It seems sensible to me to just always disable the lane in the power_off hook to have simpler code. Greetings, -- Sebastian > Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider= support") > Reviewed-by: Damon Ding > Reviewed-by: Heiko Stuebner > Reviewed-by: Manivannan Sadhasivam > Signed-off-by: Arun Iyengar > --- > Tested on an Orange Pi 5 (RK3588S): 102 HDMI off/on transitions over a > range of TMDS modes, picture back every time, lanes off (LNTOP_REG0207 > =3D 0) while off; three suspend-to-idle cycles resumed normally. >=20 > Developed with Claude (Anthropic) as a coding assistant; I reviewed and > tested it. > --- > Changes in v2: > - Shorter commit message (Damon); no code change > - Collected Reviewed-by tags > - Link to v1: https://patch.msgid.link/20261110-hdptx-lanes-pwroff-v1-1-c= 2f85b7e06a4@gmail.com > --- > drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) >=20 > diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/= phy/rockchip/phy-rockchip-samsung-hdptx.c > index 6879eecc5a9f..751bb503dcfe 100644 > --- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > +++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c > @@ -1768,10 +1768,25 @@ static int rk_hdptx_phy_power_on(struct phy *phy) > return ret; > } > =20 > +static void rk_hdptx_lane_disable(struct rk_hdptx_phy *hdptx) > +{ > + regmap_update_bits(hdptx->regmap, LNTOP_REG(0207), LANE_EN_MASK, > + FIELD_PREP(LANE_EN_MASK, 0)); > + reset_control_assert(hdptx->rsts[RST_LANE].rstc); > +} > + > static int rk_hdptx_phy_power_off(struct phy *phy) > { > struct rk_hdptx_phy *hdptx =3D phy_get_drvdata(phy); > =20 > + /* > + * The lanes are owned by the PHY consumer alone, hence shut them > + * down right away. The PLL is shared with the clock consumers, so > + * leave its fate to the usage count. > + */ > + if (phy_get_mode(phy) !=3D PHY_MODE_DP) > + rk_hdptx_lane_disable(hdptx); > + > return rk_hdptx_phy_consumer_put(hdptx, false); > } > =20 >=20 > --- > base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4 > change-id: 20261110-hdptx-lanes-pwroff-5ddc6e3fabb2 >=20 > Best regards, > -- =20 > Arun Iyengar >=20 >=20 >=20 --hxklnkn365du6mz5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmsPRyYACgkQ2O7X88g7 +prIvA/+MvChOQLwtdD9ERZuCCAeSd/uI2B6FkiiqqKnMTaqGBDIW70yS8ZPeSQ7 bJQ57jr/xhdS4YJ2L4MozVqkqEaB1U2PepkbASfLlpFGlWtTFg2Xaoshz4Kp77Oh asxprOFpb3XwP+QZfAeyZ7Hv7LG4vRRXYQf2ZaE5X6KlkBsu83R/1i727pACfN9k 8GWstz3SOWMoizcmRaz8VD3Tyxd24KByZa/0bfuCTKOnBqKS61KvOZQDRhb1gb3T 8eqx1PoDwkTkRhsyD9027DbGA7gk3M1wTmvBMh4bss5meR9tVrF2nZvLbGQyQfHu zTtwt5uALYYkePOwWPf3WyzHRWNFoStYGhSOzW7M4pHOj/yaYheoJ9Un6swFZcGC oOP9bhU7B6apynHZSYb5X4bc8TKUDAuqCYyStgkMUEvWb6lKA2+4QHb7X9WAtwfd h/iyWiZW9VXIUFJmfP0bNERJX9viQBiijGaT68gZRFJffE+7EQBaKvUGV2Mpv1b+ yEcKQeAlFkXB8z4o17Mq+t6YbQETkWwwA3LoxtyQ9H90RL3rKBlqKWX1wxX2sdPr pfJYc5ICD0Tod57q7LW0CXStG8CzCuUPrUTawn0SluedV4k/aKPeDm1GYfGIkFEb 4OnqAGhlWa11F1ht6ETuUiDIB0m+ah4ZJT/FenUlB6XDoW/f1kM= =xT3l -----END PGP SIGNATURE----- --hxklnkn365du6mz5--