* [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx
@ 2025-10-28 8:00 Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode Cristian Ciocaltea
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Cristian Ciocaltea @ 2025-10-28 8:00 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner,
Dmitry Baryshkov, Algea Cao
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Andy Yan
These patches were initially part of the HDMI 2.1 FRL support series [1]
aiming to provide a few fixes for the Samsung HDMI/eDP Transmitter Combo
PHY.
I'm sending this as a distinct series right now, since the FRL part
might require additional time for review.
[1] https://lore.kernel.org/r/20250818-phy-hdptx-frl-v3-0-c79997d8bb2b@collabora.com
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
Cristian Ciocaltea (3):
phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 27 +++++++++++++----------
1 file changed, 15 insertions(+), 12 deletions(-)
---
base-commit: 33bcf93b9a6b028758105680f8b538a31bc563cf
change-id: 20250902-phy-hdptx-fixes-7308ffea4c6a
--
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND 1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
@ 2025-10-28 8:00 ` Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 2/3] phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth Cristian Ciocaltea
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Cristian Ciocaltea @ 2025-10-28 8:00 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner,
Dmitry Baryshkov, Algea Cao
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Andy Yan
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>
---
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 01bbf668e05e..aee03e8655f6 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -1037,7 +1037,8 @@ static int rk_hdptx_ropll_tmds_cmn_config(struct rk_hdptx_phy *hdptx)
ret = rk_hdptx_post_enable_pll(hdptx);
if (!ret)
- hdptx->hw_rate = hdptx->hdmi_cfg.tmds_char_rate;
+ hdptx->hw_rate = DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.tmds_char_rate * 8,
+ hdptx->hdmi_cfg.bpc);
return ret;
}
@@ -1895,19 +1896,20 @@ static long rk_hdptx_phy_clk_round_rate(struct clk_hw *hw, unsigned long rate,
* hence ensure rk_hdptx_phy_clk_set_rate() won't be invoked with
* a different rate argument.
*/
- return hdptx->hdmi_cfg.tmds_char_rate;
+ return DIV_ROUND_CLOSEST_ULL(hdptx->hdmi_cfg.tmds_char_rate * 8, hdptx->hdmi_cfg.bpc);
}
static int rk_hdptx_phy_clk_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{
struct rk_hdptx_phy *hdptx = to_rk_hdptx_phy(hw);
+ unsigned long long tmds_rate = DIV_ROUND_CLOSEST_ULL(rate * hdptx->hdmi_cfg.bpc, 8);
/* Revert any unlikely TMDS char rate change since round_rate() */
- if (hdptx->hdmi_cfg.tmds_char_rate != rate) {
- dev_warn(hdptx->dev, "Reverting unexpected rate change from %lu to %llu\n",
- rate, hdptx->hdmi_cfg.tmds_char_rate);
- hdptx->hdmi_cfg.tmds_char_rate = rate;
+ if (hdptx->hdmi_cfg.tmds_char_rate != tmds_rate) {
+ dev_warn(hdptx->dev, "Reverting unexpected rate change from %llu to %llu\n",
+ tmds_rate, hdptx->hdmi_cfg.tmds_char_rate);
+ hdptx->hdmi_cfg.tmds_char_rate = tmds_rate;
}
/*
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND 2/3] phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode Cristian Ciocaltea
@ 2025-10-28 8:00 ` Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 3/3] phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits Cristian Ciocaltea
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Cristian Ciocaltea @ 2025-10-28 8:00 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner,
Dmitry Baryshkov, Algea Cao
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip, linux-kernel
Due to its relatively low frequency, a noise stemming from the 24MHz PLL
reference clock may traverse the low-pass loop filter of ROPLL, which
could potentially generate some HDMI flash artifacts.
Reduce ROPLL loop bandwidth in an attempt to mitigate the problem.
Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver")
Co-developed-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index aee03e8655f6..8ba9b53c2309 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -500,9 +500,7 @@ static const struct reg_sequence rk_hdtpx_common_cmn_init_seq[] = {
REG_SEQ0(CMN_REG(0043), 0x00),
REG_SEQ0(CMN_REG(0044), 0x46),
REG_SEQ0(CMN_REG(0045), 0x24),
- REG_SEQ0(CMN_REG(0046), 0xff),
REG_SEQ0(CMN_REG(0047), 0x00),
- REG_SEQ0(CMN_REG(0048), 0x44),
REG_SEQ0(CMN_REG(0049), 0xfa),
REG_SEQ0(CMN_REG(004a), 0x08),
REG_SEQ0(CMN_REG(004b), 0x00),
@@ -575,6 +573,8 @@ static const struct reg_sequence rk_hdtpx_tmds_cmn_init_seq[] = {
REG_SEQ0(CMN_REG(0034), 0x00),
REG_SEQ0(CMN_REG(003d), 0x40),
REG_SEQ0(CMN_REG(0042), 0x78),
+ REG_SEQ0(CMN_REG(0046), 0xdd),
+ REG_SEQ0(CMN_REG(0048), 0x11),
REG_SEQ0(CMN_REG(004e), 0x34),
REG_SEQ0(CMN_REG(005c), 0x25),
REG_SEQ0(CMN_REG(005e), 0x4f),
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH RESEND 3/3] phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 2/3] phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth Cristian Ciocaltea
@ 2025-10-28 8:00 ` Cristian Ciocaltea
2025-11-19 8:25 ` [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Neil Armstrong
2025-11-20 17:11 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Cristian Ciocaltea @ 2025-10-28 8:00 UTC (permalink / raw)
To: Vinod Koul, Kishon Vijay Abraham I, Heiko Stuebner,
Dmitry Baryshkov, Algea Cao
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip, linux-kernel
Fixup PHY deskew FIFO to prevent the phase of D2 lane going ahead of
other lanes. It's worth noting this might only happen when dealing with
HDMI 2.0 rates.
Fixes: 553be2830c5f ("phy: rockchip: Add Samsung HDMI/eDP Combo PHY driver")
Co-developed-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 8ba9b53c2309..29de2f7bdae8 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -668,13 +668,9 @@ static const struct reg_sequence rk_hdtpx_common_lane_init_seq[] = {
static const struct reg_sequence rk_hdtpx_tmds_lane_init_seq[] = {
REG_SEQ0(LANE_REG(0312), 0x00),
- REG_SEQ0(LANE_REG(031e), 0x00),
REG_SEQ0(LANE_REG(0412), 0x00),
- REG_SEQ0(LANE_REG(041e), 0x00),
REG_SEQ0(LANE_REG(0512), 0x00),
- REG_SEQ0(LANE_REG(051e), 0x00),
REG_SEQ0(LANE_REG(0612), 0x00),
- REG_SEQ0(LANE_REG(061e), 0x08),
REG_SEQ0(LANE_REG(0303), 0x2f),
REG_SEQ0(LANE_REG(0403), 0x2f),
REG_SEQ0(LANE_REG(0503), 0x2f),
@@ -687,6 +683,11 @@ static const struct reg_sequence rk_hdtpx_tmds_lane_init_seq[] = {
REG_SEQ0(LANE_REG(0406), 0x1c),
REG_SEQ0(LANE_REG(0506), 0x1c),
REG_SEQ0(LANE_REG(0606), 0x1c),
+ /* Keep Inter-Pair Skew in the limits */
+ REG_SEQ0(LANE_REG(031e), 0x02),
+ REG_SEQ0(LANE_REG(041e), 0x02),
+ REG_SEQ0(LANE_REG(051e), 0x02),
+ REG_SEQ0(LANE_REG(061e), 0x0a),
};
static struct tx_drv_ctrl tx_drv_ctrl_rbr[4][4] = {
--
2.51.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
` (2 preceding siblings ...)
2025-10-28 8:00 ` [PATCH RESEND 3/3] phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits Cristian Ciocaltea
@ 2025-11-19 8:25 ` Neil Armstrong
2025-11-20 17:11 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Neil Armstrong @ 2025-11-19 8:25 UTC (permalink / raw)
To: Cristian Ciocaltea, Vinod Koul, Kishon Vijay Abraham I,
Heiko Stuebner, Dmitry Baryshkov, Algea Cao
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Andy Yan
On 10/28/25 09:00, Cristian Ciocaltea wrote:
> These patches were initially part of the HDMI 2.1 FRL support series [1]
> aiming to provide a few fixes for the Samsung HDMI/eDP Transmitter Combo
> PHY.
>
> I'm sending this as a distinct series right now, since the FRL part
> might require additional time for review.
>
> [1] https://lore.kernel.org/r/20250818-phy-hdptx-frl-v3-0-c79997d8bb2b@collabora.com
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
> ---
> Cristian Ciocaltea (3):
> phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
> phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
> phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
>
> drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 27 +++++++++++++----------
> 1 file changed, 15 insertions(+), 12 deletions(-)
> ---
> base-commit: 33bcf93b9a6b028758105680f8b538a31bc563cf
> change-id: 20250902-phy-hdptx-fixes-7308ffea4c6a
For the serie:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
` (3 preceding siblings ...)
2025-11-19 8:25 ` [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Neil Armstrong
@ 2025-11-20 17:11 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2025-11-20 17:11 UTC (permalink / raw)
To: Kishon Vijay Abraham I, Heiko Stuebner, Dmitry Baryshkov,
Algea Cao, Cristian Ciocaltea
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Andy Yan
On Tue, 28 Oct 2025 10:00:53 +0200, Cristian Ciocaltea wrote:
> These patches were initially part of the HDMI 2.1 FRL support series [1]
> aiming to provide a few fixes for the Samsung HDMI/eDP Transmitter Combo
> PHY.
>
> I'm sending this as a distinct series right now, since the FRL part
> might require additional time for review.
>
> [...]
Applied, thanks!
[1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode
commit: 72126e9623e1696ea83c77ef6d0306a6263bdd6b
[2/3] phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth
commit: 8daaced9f5eeb4a2c8ca08b0a8286b6a498a8387
[3/3] phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits
commit: 51023cf6cc5db3423dea6620746d9087e336e024
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-20 17:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-28 8:00 [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 1/3] phy: rockchip: samsung-hdptx: Fix reported clock rate in high bpc mode Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 2/3] phy: rockchip: samsung-hdptx: Reduce ROPLL loop bandwidth Cristian Ciocaltea
2025-10-28 8:00 ` [PATCH RESEND 3/3] phy: rockchip: samsung-hdptx: Prevent Inter-Pair Skew from exceeding the limits Cristian Ciocaltea
2025-11-19 8:25 ` [PATCH RESEND 0/3] Fixes for phy-rockchip-samsung-hdptx Neil Armstrong
2025-11-20 17:11 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®