]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
authorCristian Ciocaltea <cristian.ciocaltea@collabora.com>
Tue, 28 Oct 2025 08:00:54 +0000 (10:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:03:08 +0000 (14:03 +0100)
commit26efe0db47e5c07a5e6db10391422b71d1272c8e
treeed627c683f3d386cdfe1b834a4e366e1e61be921
parenta614c316a8c29ba35da15dad77155a972a04499e
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode

[ Upstream commit 72126e9623e1696ea83c77ef6d0306a6263bdd6b ]

When making use of the clock provider functionality, the output clock
does normally match the TMDS character rate, which is what the PHY PLL
gets configured to.

However, this is only applicable for default color depth of 8 bpc.  For
higher depths, the output clock is further divided by the hardware
according to the formula:

  output_clock_rate = tmds_char_rate * 8 / bpc

Since the existence of the clock divider wasn't taken into account when
support for high bpc has been introduced, make the necessary adjustments
to report the correct clock rate.

Fixes: 9d0ec51d7c22 ("phy: rockchip: samsung-hdptx: Add high color depth management")
Reported-by: Andy Yan <andy.yan@rock-chips.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20251028-phy-hdptx-fixes-v1-1-ecc642a59d94@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c