* [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx
@ 2025-12-21 10:36 Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output Cristian Ciocaltea
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2025-12-21 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Heiko Stuebner, Dmitry Baryshkov
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Derek Foreman
The Samsung HDMI/eDP TX PHY is currently not able to provide an accurate
enough PLL output frequency to match the TMDS rate of a 1080p@120Hz
display mode, when used with 10 bpc RGB.
This patch set adds a new entry to the TMDS configuration table,
providing the necessary frequency division coefficients for the PHY PLL
to generate the expected 461.101250 MHz output.
Additionally, it drops a bunch of unused members from struct
ropll_config and makes the configuration table more readable.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
Changes in v2:
- Dropped one more unused member from struct ropll_config (sdm_clk_div)
- Swapped the TMDS config entry corresponding to the 108000000ULL rate
with 106500000ULL, to fix an unspotted ordering issue
- Collected Tested-by tag from Derek
- Rebased series onto v6.19-rc1
- Link to v1: https://lore.kernel.org/r/20251204-phy-hdptx-pll-fix-v1-0-d94fd6cfd59b@collabora.com
---
Cristian Ciocaltea (2):
phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output
phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 80 +++++++----------------
1 file changed, 24 insertions(+), 56 deletions(-)
---
base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
change-id: 20251204-phy-hdptx-pll-fix-0787c92e0cfe
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output
2025-12-21 10:36 [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Cristian Ciocaltea
@ 2025-12-21 10:36 ` Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 2/2] phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table Cristian Ciocaltea
2025-12-23 17:44 ` [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2025-12-21 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Heiko Stuebner, Dmitry Baryshkov
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Derek Foreman
Attempting to make use of a 1080p@120Hz display mode with 10 bpc RGB on
my Acer XV275K P3 monitor results in a blank image. A similar behavior
has been reported on Philips 279M1RV.
The faulty modeline is created by drm_gtf_mode_complex() based on the
following EDID entry from the Standard Timings block:
GTF: 1920x1080 119.999987 Hz 16:9 138.840 kHz 368.759000 MHz
It's worth noting the computed pixel clock ends up being slightly higher
at 368.881000 MHz. Nevertheless, this seems to work consistently fine
with 8 bpc RGB.
After switching to 10 bpc, the TMDS character rate expected for the mode
increases to 461.101250 MHz, as per drm_hdmi_compute_mode_clock().
Since there is no entry for this rate in the ropll_tmds_cfg table, the
necessary HDMI PLL configuration parameters are calculated dynamically
by rk_hdptx_phy_clk_pll_calc(). However, the resulting output rate is
not quite a perfect match, i.e. 461.100000 MHz. That proved to be the
actual root cause of the problem.
Add a new entry to the TMDS configuration table and provide the
necessary frequency division coefficients for the PHY PLL to generate
the expected 461.101250 MHz output.
Fixes: 9d0ec51d7c22 ("phy: rockchip: samsung-hdptx: Add high color depth management")
Tested-by: Derek Foreman <derek.foreman@collabora.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 29de2f7bdae8..cafa618d70fd 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -414,6 +414,8 @@ struct rk_hdptx_phy {
static const struct ropll_config ropll_tmds_cfg[] = {
{ 594000000ULL, 124, 124, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
+ { 461101250ULL, 97, 97, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 71, 1, 53, 2, 6,
+ 35, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 371250000ULL, 155, 155, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 297000000ULL, 124, 124, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
--
2.51.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table
2025-12-21 10:36 [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output Cristian Ciocaltea
@ 2025-12-21 10:36 ` Cristian Ciocaltea
2025-12-23 17:44 ` [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Cristian Ciocaltea @ 2025-12-21 10:36 UTC (permalink / raw)
To: Vinod Koul, Neil Armstrong, Heiko Stuebner, Dmitry Baryshkov
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip, linux-kernel
Drop a bunch of unused members from struct ropll_config and make the
static ropll_tmds_cfg table more readable:
* add a table header
* sort rows by rate
* convert hex values to decimal (for consistency)
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 82 +++++++----------------
1 file changed, 24 insertions(+), 58 deletions(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index cafa618d70fd..e3d817e81d6d 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -336,27 +336,13 @@ struct ropll_config {
u8 pms_pdiv;
u8 pms_refdiv;
u8 pms_sdiv;
- u8 pms_iqdiv_rstn;
- u8 ref_clk_sel;
u8 sdm_en;
- u8 sdm_rstn;
- u8 sdc_frac_en;
- u8 sdc_rstn;
- u8 sdm_clk_div;
u8 sdm_deno;
u8 sdm_num_sign;
u8 sdm_num;
u8 sdc_n;
u8 sdc_num;
u8 sdc_deno;
- u8 sdc_ndiv_rstn;
- u8 ssc_en;
- u8 ssc_fm_dev;
- u8 ssc_fm_freq;
- u8 ssc_clk_div_sel;
- u8 ana_cpp_ctrl;
- u8 ana_lpf_c_sel;
- u8 cd_tx_ser_rate_sel;
};
struct tx_drv_ctrl {
@@ -412,50 +398,30 @@ struct rk_hdptx_phy {
};
static const struct ropll_config ropll_tmds_cfg[] = {
- { 594000000ULL, 124, 124, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 461101250ULL, 97, 97, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 71, 1, 53, 2, 6,
- 35, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 371250000ULL, 155, 155, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 297000000ULL, 124, 124, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 162000000ULL, 135, 135, 1, 1, 3, 1, 1, 0, 1, 1, 1, 1, 4, 0, 3, 5, 5, 0x10,
- 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 185625000ULL, 155, 155, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 154000000ULL, 193, 193, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 193, 1, 32, 2, 1,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 148500000ULL, 0x7b, 0x7b, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 0, 3, 5, 5,
- 0x10, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 146250000ULL, 122, 122, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 244, 1, 16, 2, 1, 1,
- 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 119000000ULL, 149, 149, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 149, 1, 16, 2, 1, 1,
- 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 106500000ULL, 89, 89, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 89, 1, 16, 1, 0, 1,
- 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 108000000ULL, 135, 135, 1, 1, 5, 1, 1, 0, 1, 0, 1, 1, 0x9, 0, 0x05, 0,
- 0x14, 0x18, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 85500000ULL, 214, 214, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 214, 1, 16, 2, 1,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 83500000ULL, 105, 105, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 42, 1, 16, 1, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 92812500ULL, 155, 155, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 74250000ULL, 124, 124, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 62, 1, 16, 5, 0,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 65000000ULL, 162, 162, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 54, 0, 16, 4, 1,
- 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 50250000ULL, 84, 84, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 11, 1, 4, 5,
- 4, 11, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 33750000ULL, 0x70, 0x70, 1, 1, 0xf, 1, 1, 1, 1, 1, 1, 1, 0x2, 0, 0x01, 5,
- 1, 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 40000000ULL, 100, 100, 1, 1, 11, 1, 1, 0, 1, 0, 1, 1, 0x9, 0, 0x05, 0,
- 0x14, 0x18, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 27000000ULL, 0x5a, 0x5a, 1, 1, 0xf, 1, 1, 0, 1, 0, 1, 1, 0x9, 0, 0x05, 0,
- 0x14, 0x18, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
- { 25175000ULL, 84, 84, 1, 1, 0xf, 1, 1, 1, 1, 1, 1, 1, 168, 1, 16, 4, 1, 1,
- 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
+ /* | pms | sdm | sdc | */
+ /* rate, mdiv, mdafc, pdiv, rdiv, sdiv, en, deno, nsig, num, n, num, deno, */
+ { 594000000ULL, 124, 124, 1, 1, 0, 1, 62, 1, 16, 5, 0, 1, },
+ { 461101250ULL, 97, 97, 1, 1, 0, 1, 71, 1, 53, 2, 6, 35, },
+ { 371250000ULL, 155, 155, 1, 1, 1, 1, 62, 1, 16, 5, 0, 1, },
+ { 297000000ULL, 124, 124, 1, 1, 1, 1, 62, 1, 16, 5, 0, 1, },
+ { 185625000ULL, 155, 155, 1, 1, 3, 1, 62, 1, 16, 5, 0, 1, },
+ { 162000000ULL, 135, 135, 1, 1, 3, 0, 4, 0, 3, 5, 5, 16, },
+ { 154000000ULL, 193, 193, 1, 1, 5, 1, 193, 1, 32, 2, 1, 1, },
+ { 148500000ULL, 123, 123, 1, 1, 3, 1, 4, 0, 3, 5, 5, 16, },
+ { 146250000ULL, 122, 122, 1, 1, 3, 1, 244, 1, 16, 2, 1, 1, },
+ { 119000000ULL, 149, 149, 1, 1, 5, 1, 149, 1, 16, 2, 1, 1, },
+ { 108000000ULL, 135, 135, 1, 1, 5, 0, 9, 0, 5, 0, 20, 24, },
+ { 106500000ULL, 89, 89, 1, 1, 3, 1, 89, 1, 16, 1, 0, 1, },
+ { 92812500ULL, 155, 155, 1, 1, 7, 1, 62, 1, 16, 5, 0, 1, },
+ { 85500000ULL, 214, 214, 1, 1, 11, 1, 214, 1, 16, 2, 1, 1, },
+ { 83500000ULL, 105, 105, 1, 1, 5, 1, 42, 1, 16, 1, 0, 1, },
+ { 74250000ULL, 124, 124, 1, 1, 7, 1, 62, 1, 16, 5, 0, 1, },
+ { 65000000ULL, 162, 162, 1, 1, 11, 1, 54, 0, 16, 4, 1, 1, },
+ { 50250000ULL, 84, 84, 1, 1, 7, 1, 11, 1, 4, 5, 4, 11, },
+ { 40000000ULL, 100, 100, 1, 1, 11, 0, 9, 0, 5, 0, 20, 24, },
+ { 33750000ULL, 112, 112, 1, 1, 15, 1, 2, 0, 1, 5, 1, 1, },
+ { 27000000ULL, 90, 90, 1, 1, 15, 0, 9, 0, 5, 0, 20, 24, },
+ { 25175000ULL, 84, 84, 1, 1, 15, 1, 168, 1, 16, 4, 1, 1, },
};
static const struct reg_sequence rk_hdtpx_common_cmn_init_seq[] = {
--
2.51.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx
2025-12-21 10:36 [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 2/2] phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table Cristian Ciocaltea
@ 2025-12-23 17:44 ` Vinod Koul
2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2025-12-23 17:44 UTC (permalink / raw)
To: Neil Armstrong, Heiko Stuebner, Dmitry Baryshkov, Cristian Ciocaltea
Cc: kernel, linux-phy, linux-arm-kernel, linux-rockchip,
linux-kernel, Derek Foreman
On Sun, 21 Dec 2025 12:36:22 +0200, Cristian Ciocaltea wrote:
> The Samsung HDMI/eDP TX PHY is currently not able to provide an accurate
> enough PLL output frequency to match the TMDS rate of a 1080p@120Hz
> display mode, when used with 10 bpc RGB.
>
> This patch set adds a new entry to the TMDS configuration table,
> providing the necessary frequency division coefficients for the PHY PLL
> to generate the expected 461.101250 MHz output.
>
> [...]
Applied, thanks!
[1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output
commit: f2daf0c67a1767ff6536aa3e96599afb42ca42e7
[2/2] phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table
commit: 3be8131ee936abb6ff56ca9ec9d38c911251410b
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-12-23 17:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-21 10:36 [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 1/2] phy: rockchip: samsung-hdptx: Pre-compute HDMI PLL config for 461.10125 MHz output Cristian Ciocaltea
2025-12-21 10:36 ` [PATCH v2 2/2] phy: rockchip: samsung-hdptx: Cleanup TMDS PLL config table Cristian Ciocaltea
2025-12-23 17:44 ` [PATCH v2 0/2] Fixup HDMI PLL for phy-rockchip-samsung-hdptx 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®