* [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants
@ 2026-05-19 14:46 Javier Martinez Canillas
2026-05-19 14:47 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:46 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Abhinav Kumar, Alain Volmat,
Andrzej Hajda, Andy Yan, Brian Masney, Chen-Yu Tsai, Chris Morgan,
Cristian Ciocaltea, Daniel Stone, David Airlie, Dmitry Baryshkov,
Dmitry Baryshkov, Heiko Stuebner, Jani Nikula, Jernej Skrabec,
Jessica Zhang, Jonas Karlman, Konrad Dybcio, Laurent Pinchart,
Liu Ying, Luca Ceresoli, Maarten Lankhorst, Marijn Suijten,
Maxime Ripard, Neil Armstrong, Nicolas Frattaroli,
Raphael Gallais-Pou, Rob Clark, Robert Foss, Samuel Holland,
Sean Paul, Sebastian Reichel, Shengjiu Wang, Simona Vetter,
Thomas Zimmermann, dri-devel, freedreno, linux-arm-kernel,
linux-arm-msm, linux-sunxi
Several DRM drivers define their own local macros or use magic numbers for
the standard HDMI TMDS character rate limits. Maxime Ripard suggested that
instead these common rate constants could be included to a shared header.
This series introduces these constants to the <drm/display/drm_hdmi_helper.h>
header and replaces the local defined constants or magic numbers in drivers.
I split the changes as one patch per driver, so that these can be reviewed
individually and merged at their own pace.
Javier Martinez Canillas (8):
drm/display: hdmi: Add common TMDS character rate constants
drm/bridge: dw-hdmi: Use the common TMDS char rate constant
drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
drm/bridge: inno-hdmi: Use the common TMDS char rate constant
drm/sti: hdmi: Use the common TMDS char rate constants
drm/sun4i: hdmi: Use the common TMDS char rate constant
drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
drivers/gpu/drm/bridge/inno-hdmi.c | 4 +---
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 6 ++----
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++------
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 9 +++++----
drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 9 +++++----
drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 5 +++--
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 4 ++--
include/drm/display/drm_hdmi_helper.h | 6 ++++++
8 files changed, 28 insertions(+), 25 deletions(-)
--
2.54.0
base-commit: fa81649af168a4d6d5260ed0fa9bbb5f6db3f11c
branch: add-common-tmds-rates
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
@ 2026-05-19 14:47 ` Javier Martinez Canillas
2026-05-19 14:57 ` Chen-Yu Tsai
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:47 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Chen-Yu Tsai,
David Airlie, Jernej Skrabec, Maarten Lankhorst, Samuel Holland,
Simona Vetter, Thomas Zimmermann, dri-devel, linux-arm-kernel,
linux-sunxi
Replace the 165000000 magic number with the shared constant defined
in the <drm/display/drm_hdmi_helper.h> header.
The old comment referenced "HDMI <= 1.2" but 165 MHz is actually
the maximum TMDS character rate defined by the HDMI 1.0 spec.
Suggested-by: Maxime Ripard <mripard@kernel•org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat•com>
---
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index 07e2afcb4f95..723a6a11c94e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -189,8 +189,8 @@ sun4i_hdmi_connector_clock_valid(const struct drm_connector *connector,
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
return MODE_BAD;
- /* 165 MHz is the typical max pixelclock frequency for HDMI <= 1.2 */
- if (clock > 165000000)
+ /* HDMI 1.0 max TMDS character rate */
+ if (clock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0)
return MODE_CLOCK_HIGH;
rounded_rate = clk_round_rate(hdmi->tmds_clk, clock);
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant
2026-05-19 14:47 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
@ 2026-05-19 14:57 ` Chen-Yu Tsai
0 siblings, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2026-05-19 14:57 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Maxime Ripard, David Airlie, Jernej Skrabec,
Maarten Lankhorst, Samuel Holland, Simona Vetter,
Thomas Zimmermann, dri-devel, linux-arm-kernel, linux-sunxi
On Tue, May 19, 2026 at 10:47 PM Javier Martinez Canillas
<javierm@redhat•com> wrote:
>
> Replace the 165000000 magic number with the shared constant defined
> in the <drm/display/drm_hdmi_helper.h> header.
>
> The old comment referenced "HDMI <= 1.2" but 165 MHz is actually
> the maximum TMDS character rate defined by the HDMI 1.0 spec.
>
> Suggested-by: Maxime Ripard <mripard@kernel•org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat•com>
Reviewed-by: Chen-Yu Tsai <wens@kernel•org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-05-19 14:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
2026-05-19 14:47 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-19 14:57 ` Chen-Yu Tsai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox