Re: [PATCH] phy: rockchip: samsung-hdptx: Power down the lanes on phy_power_off()

From: Manivannan Sadhasivam

Date: Fri Nov 27 2026 - 07:23:18 EST


On 2026-11-10 07:16 +0000, Arun Iyengar wrote:
> 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.
>
> 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.
>
> 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.
>
> 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.
>
> Fixes: c4b09c562086 ("phy: phy-rockchip-samsung-hdptx: Add clock provider support")
> Signed-off-by: Arun Iyengar <aiyengar1990@xxxxxxxxx>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>

- Mani