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 7C240606A31C for ; Sun, 29 Nov 2026 17:13:13 +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=fp8b62T3; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.a=rsa-sha256 header.s=gloria202408 header.b=d+okpkvl 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:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=GuPGXfTX3Ju+pBwD8YWKXfH5MHBYnePqcs0cVcgEW5M=; b=fp8b62T3nl61/cLy91EAiTkNP4 dv17BeIq93QDwK0c8tNE8R4sUtBkaE2OWzgdXIPdzC1WlIcIO67yjxA5yuEVxS4RyzSH9qqM0nN2A Z1Im3tb8Vw5d7mujBve97DgyMvZkLbALVYKaOSDJirSsYJug0+xl1HcVJA2r6PQuN7leuaWgu8ecq loGHp5fgm5toKYJiM0xd3aAx+EoxLXMjJaLgPHFtsgGG3Ua9HhYEH8QlJnMia0ugQh1DByg/+pjSZ 2Wk2bylpBRzQuKfMxOe6IeatqlpTygOpavRjQYuxcfkWU7Viv9AuYfELB3EGr8dkcQGxkju8RFHX+ a+OIZJsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXiSS-00000002HuC-3D92; Sun, 29 Nov 2026 17:13:00 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xXiSR-00000002Htc-0krx; Sun, 29 Nov 2026 17:13:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=GuPGXfTX3Ju+pBwD8YWKXfH5MHBYnePqcs0cVcgEW5M=; b=d+okpkvlnQ/nbib0Z7vOSFvjPO fDiLIwt9XpM+/MowW8QXGKMk3my23Q+dHklKRi7Dun803u2xtxB+IbHWtmN0paOYN78HTioa+9Rfy YlCh8hJpM/PLQUWG4acw/vvTCJlJNL8CjUA8sfmA5tFf8HbYwCrh4LeaJW00o4hGxvYjCXtIaA3kM KOpz4V0thOA25yZoYfU7VcVLSLKCDv6BAFYThJiqy6B5vkmvk6IYKXJ5tfxFX55ca5oFfylacOi3/ 1U5zqg7LnFP1qE1HCwG7Hgu2sbTmmTBpJw2V+neMIxDLVu16Shr+FzXdR/0O/fB9MSdwWELuoJodC FRXOT5KQ==; From: Heiko Stuebner To: Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Philipp Zabel , Cristian Ciocaltea , aiyengar1990@gmail.com Cc: linux-phy@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off() Date: Sun, 29 Nov 2026 18:12:52 +0100 Message-ID: <53_xeZk5SIWsPxtDV7trpA@sntech.de> In-Reply-To: <20261110-hdptx-lanes-pwroff-v1-1-c2f85b7e06a4@gmail.com> References: <20261110-hdptx-lanes-pwroff-v1-1-c2f85b7e06a4@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261129_091259_222235_87628315 X-CRM114-Status: GOOD ( 15.97 ) X-Spam-Score: -2.1 (--) 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=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,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 Am Dienstag, 10. November 2026, 08:16:41 Mitteleurop=C3=A4ische Normalzeit = schrieb Arun Iyengar via B4 Relay: > From: Arun Iyengar >=20 > Since the PHY became a clock provider, rk_hdptx_phy_power_off() does > nothing but drop the shared usage count, and the PHY is only really > disabled when that count reaches zero. The count is also held by every > clock consumer of the PHY PLL, so with a clock reference outstanding > the lanes keep driving the link after the HDMI controller has asked for > the PHY to be powered off. >=20 > On RK3588 a clock reference is almost always outstanding: the VOP lists > the PHY clock among its clocks so it can source its DCLK from it, and > the Rockchip power domain driver puts every clock of a device under > pm_clk, which prepares the PHY clock (i.e. bumps the usage count) > whenever the VOP is runtime active. As soon as any other video port is > in use, e.g. a DP output, switching the HDMI CRTC off therefore leaves > the HDMI lanes enabled and the TMDS clock on the cable, so the sink > never sees the link go away. The lanes stay on until the whole VOP > goes to runtime suspend. >=20 > The lanes belong to the PHY consumer alone, whereas the PLL is shared > with the clock consumers. Hence disable the lane output and hold the > lanes in reset in rk_hdptx_phy_power_off() regardless of the usage > count, and keep leaving the PLL to the count. This is the state the > PHY is in between PLL and lane bring-up anyway, and the next > rk_hdptx_phy_power_on() restores the lanes through the regular > rk_hdptx_post_enable_lane() path, so no additional PLL re-init is > needed. The vendor driver does the same: its power_off callback only > clears the lane enable bits, leaving the PLL to the clock refcount. >=20 > The DP mode is left untouched: its PLL is not exposed as a clock and > the lanes are torn down by rk_hdptx_dp_reset() from the usage count. >=20 > Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider= support") > Signed-off-by: Arun Iyengar Reviewed-by: Heiko Stuebner