* [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants
@ 2026-05-19 14:46 Javier Martinez Canillas
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
` (8 more replies)
0 siblings, 9 replies; 34+ 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] 34+ messages in thread
* [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
@ 2026-05-19 14:46 ` Javier Martinez Canillas
2026-05-19 15:20 ` Jani Nikula
` (3 more replies)
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
` (7 subsequent siblings)
8 siblings, 4 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:46 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, David Airlie,
Dmitry Baryshkov, Jani Nikula, Nicolas Frattaroli, Simona Vetter,
dri-devel
Several DRM drivers already define their own constants for minimum and
maximum TMDS character rates.
By defining common rate constants in a shared header, drivers can just use
them instead of having driver local define macros or use magic numbers.
The values defined in the <drm/display/drm_hdmi_helper.h> header correspond
to maximum TMDS character rates defined by each HDMI specification version:
- DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions)
- DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum)
- DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum)
- DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum)
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
include/drm/display/drm_hdmi_helper.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h
index 9c31ed90516b..0ee246ff82e0 100644
--- a/include/drm/display/drm_hdmi_helper.h
+++ b/include/drm/display/drm_hdmi_helper.h
@@ -5,6 +5,12 @@
#include <linux/hdmi.h>
+/* HDMI spec TMDS character rate limits (in Hz) */
+#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
+#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
+#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
+#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
+
struct drm_connector;
struct drm_connector_state;
struct drm_display_mode;
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 2/8] drm/bridge: dw-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:46 ` [PATCH 1/8] " Javier Martinez Canillas
@ 2026-05-19 14:46 ` Javier Martinez Canillas
2026-05-20 12:59 ` Heiko Stuebner
` (2 more replies)
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
` (6 subsequent siblings)
8 siblings, 3 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:46 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Andrzej Hajda, Andy Yan,
David Airlie, Dmitry Baryshkov, Jernej Skrabec, Jonas Karlman,
Laurent Pinchart, Liu Ying, Luca Ceresoli, Maarten Lankhorst,
Neil Armstrong, Robert Foss, Shengjiu Wang, Simona Vetter,
Thomas Zimmermann, dri-devel
Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
constant defined in the <drm/display/drm_hdmi_helper.h> header.
The local define incorrectly referenced HDMI 1.4, but the 340 MHz
maximum TMDS character rate was actually introduced in HDMI 1.3.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 41b3a9cfa2f5..d7c0a599aa42 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -51,8 +51,6 @@
/* DW-HDMI Controller >= 0x200a are at least compliant with SCDC version 1 */
#define SCDC_MIN_SOURCE_VERSION 0x1
-#define HDMI14_MAX_TMDSCLK 340000000
-
static const u16 csc_coeff_default[3][4] = {
{ 0x2000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x2000, 0x0000, 0x0000 },
@@ -1426,7 +1424,7 @@ void dw_hdmi_set_high_tmds_clock_ratio(struct dw_hdmi *hdmi,
/* Control for TMDS Bit Period/TMDS Clock-Period Ratio */
if (dw_hdmi_support_scdc(hdmi, display)) {
- if (mtmdsclock > HDMI14_MAX_TMDSCLK)
+ if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 1);
else
drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 0);
@@ -1671,7 +1669,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi,
}
/* Wait for resuming transmission of TMDS clock and data */
- if (mtmdsclock > HDMI14_MAX_TMDSCLK)
+ if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
msleep(100);
return dw_hdmi_phy_power_on(hdmi);
@@ -2032,7 +2030,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
/* Set up HDMI_FC_INVIDCONF */
inv_val = (hdmi->hdmi_data.hdcp_enable ||
(dw_hdmi_support_scdc(hdmi, display) &&
- (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
+ (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
hdmi_info->scdc.scrambling.low_rates)) ?
HDMI_FC_INVIDCONF_HDCP_KEEPOUT_ACTIVE :
HDMI_FC_INVIDCONF_HDCP_KEEPOUT_INACTIVE);
@@ -2100,7 +2098,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
/* Scrambling Control */
if (dw_hdmi_support_scdc(hdmi, display)) {
- if (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
+ if (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
hdmi_info->scdc.scrambling.low_rates) {
/*
* HDMI2.0 Specifies the following procedure:
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 3/8] drm/bridge: dw-hdmi-qp: 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:46 ` [PATCH 1/8] " Javier Martinez Canillas
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
@ 2026-05-19 14:46 ` Javier Martinez Canillas
2026-05-20 13:33 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
` (5 subsequent siblings)
8 siblings, 2 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:46 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Andrzej Hajda, Andy Yan,
Chris Morgan, Cristian Ciocaltea, Daniel Stone, David Airlie,
Dmitry Baryshkov, Heiko Stuebner, Jernej Skrabec, Jonas Karlman,
Laurent Pinchart, Luca Ceresoli, Maarten Lankhorst,
Neil Armstrong, Robert Foss, Sebastian Reichel, Simona Vetter,
Thomas Zimmermann, dri-devel
Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
constant defined in the <drm/display/drm_hdmi_helper.h> header.
The local define incorrectly referenced HDMI 1.4, but the 340 MHz
maximum TMDS character rate was actually introduced in HDMI 1.3.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
index 0dbb12743609..37d8292b6f7f 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
@@ -38,8 +38,6 @@
#define DDC_CI_ADDR 0x37
#define DDC_SEGMENT_ADDR 0x30
-#define HDMI14_MAX_TMDSCLK 340000000
-
#define SCRAMB_POLL_DELAY_MS 3000
/*
@@ -835,9 +833,9 @@ dw_hdmi_qp_bridge_tmds_char_rate_valid(const struct drm_bridge *bridge,
/*
* TODO: when hdmi->no_hpd is 1 we must not support modes that
* require scrambling, including every mode with a clock above
- * HDMI14_MAX_TMDSCLK.
+ * DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3.
*/
- if (rate > HDMI14_MAX_TMDSCLK) {
+ if (rate > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3) {
dev_dbg(hdmi->dev, "Unsupported TMDS char rate: %lld\n", rate);
return MODE_CLOCK_HIGH;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 4/8] drm/bridge: inno-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
` (2 preceding siblings ...)
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
@ 2026-05-19 14:47 ` Javier Martinez Canillas
2026-05-20 13:00 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
` (4 subsequent siblings)
8 siblings, 2 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:47 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Andrzej Hajda, Andy Yan,
David Airlie, Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Luca Ceresoli, Maarten Lankhorst, Neil Armstrong, Robert Foss,
Simona Vetter, Thomas Zimmermann, dri-devel
Replace the driver local INNO_HDMI_MIN_TMDS_CLOCK define with the shared
constant defined in the <drm/display/drm_hdmi_helper.h> header.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/bridge/inno-hdmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/inno-hdmi.c b/drivers/gpu/drm/bridge/inno-hdmi.c
index 1091af29ad8f..4387493c13a1 100644
--- a/drivers/gpu/drm/bridge/inno-hdmi.c
+++ b/drivers/gpu/drm/bridge/inno-hdmi.c
@@ -31,8 +31,6 @@
#include <drm/display/drm_hdmi_helper.h>
#include <drm/display/drm_hdmi_state_helper.h>
-#define INNO_HDMI_MIN_TMDS_CLOCK 25000000U
-
#define DDC_SEGMENT_ADDR 0x30
#define HDMI_SCL_RATE (100 * 1000)
@@ -820,7 +818,7 @@ static enum drm_mode_status inno_hdmi_bridge_mode_valid(struct drm_bridge *bridg
mpixelclk = mode->clock * 1000;
- if (mpixelclk < INNO_HDMI_MIN_TMDS_CLOCK)
+ if (mpixelclk < DRM_HDMI_TMDS_CHAR_RATE_MIN)
return MODE_CLOCK_LOW;
if (inno_hdmi_find_phy_config(hdmi, mpixelclk) < 0)
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
` (3 preceding siblings ...)
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
@ 2026-05-19 14:47 ` Javier Martinez Canillas
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
` (3 subsequent siblings)
8 siblings, 1 reply; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:47 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Alain Volmat,
David Airlie, Maarten Lankhorst, Raphael Gallais-Pou,
Simona Vetter, Thomas Zimmermann, dri-devel
Replace the 340000000 and 165000000 magic numbers with the shared
constants defined in the <drm/display/drm_hdmi_helper.h> header.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
index d25ecd4f4b67..1c5a54cb999a 100644
--- a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
+++ b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
@@ -4,6 +4,7 @@
* Author: Vincent Abriou <vincent.abriou@st.com> for STMicroelectronics.
*/
+#include <drm/display/drm_hdmi_helper.h>
#include <drm/drm_print.h>
#include "sti_hdmi_tx3g4c28phy.h"
@@ -102,7 +103,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi)
tmdsck = ckpxpll;
pllctrl |= 40 << PLL_CFG_NDIV_SHIFT;
- if (tmdsck > 340000000) {
+ if (tmdsck > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3) {
DRM_ERROR("output TMDS clock (%d) out of range\n", tmdsck);
goto err;
}
@@ -135,7 +136,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi)
HDMI_SRZ_CFG_EN_BIASRES_DETECTION |
HDMI_SRZ_CFG_EN_SINK_TERM_DETECTION);
- if (tmdsck > 165000000)
+ if (tmdsck > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0)
val |= HDMI_SRZ_CFG_EN_SRC_TERMINATION;
/*
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ 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
` (4 preceding siblings ...)
2026-05-19 14:47 ` [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
@ 2026-05-19 14:47 ` Javier Martinez Canillas
2026-05-19 14:57 ` Chen-Yu Tsai
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
` (2 subsequent siblings)
8 siblings, 2 replies; 34+ 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] 34+ messages in thread
* [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
` (5 preceding siblings ...)
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:47 ` Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
2026-05-25 12:44 ` Claude review: drm/display: hdmi: Add common TMDS character rate constants Claude Code Review Bot
8 siblings, 2 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:47 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Abhinav Kumar,
Brian Masney, David Airlie, Dmitry Baryshkov, Jessica Zhang,
Konrad Dybcio, Marijn Suijten, Rob Clark, Sean Paul,
Simona Vetter, dri-devel, freedreno, linux-arm-msm
Replace the driver local defines, for the minimum and maximum TMDS char
rates, with shared constants defined in <drm/display/drm_hdmi_helper.h>.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
index 36e928b0fd5a..a2eb84358b01 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c
@@ -6,14 +6,13 @@
#include <linux/clk-provider.h>
#include <linux/delay.h>
+#include <drm/display/drm_hdmi_helper.h>
+
#include "hdmi.h"
#define HDMI_VCO_MAX_FREQ 12000000000UL
#define HDMI_VCO_MIN_FREQ 8000000000UL
-#define HDMI_PCLK_MAX_FREQ 600000000
-#define HDMI_PCLK_MIN_FREQ 25000000
-
#define HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD 3400000000UL
#define HDMI_DIG_FREQ_BIT_CLK_THRESHOLD 1500000000UL
#define HDMI_MID_FREQ_BIT_CLK_THRESHOLD 750000000UL
@@ -632,7 +631,9 @@ static int hdmi_8996_pll_prepare(struct clk_hw *hw)
static int hdmi_8996_pll_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
- req->rate = clamp_t(unsigned long, req->rate, HDMI_PCLK_MIN_FREQ, HDMI_PCLK_MAX_FREQ);
+ req->rate = clamp_t(unsigned long, req->rate,
+ DRM_HDMI_TMDS_CHAR_RATE_MIN,
+ DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0);
return 0;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ messages in thread
* [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
` (6 preceding siblings ...)
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
@ 2026-05-19 14:47 ` Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-25 12:44 ` Claude review: drm/display: hdmi: Add common TMDS character rate constants Claude Code Review Bot
8 siblings, 2 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-19 14:47 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, Abhinav Kumar,
Brian Masney, David Airlie, Dmitry Baryshkov, Jessica Zhang,
Konrad Dybcio, Marijn Suijten, Rob Clark, Sean Paul,
Simona Vetter, dri-devel, freedreno, linux-arm-msm
Replace the driver local defines, for the minimum and maximum TMDS char
rates, with shared constants defined in <drm/display/drm_hdmi_helper.h>.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
index a86ff3706369..3d2c1de975da 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c
@@ -7,14 +7,13 @@
#include <linux/clk-provider.h>
#include <linux/delay.h>
+#include <drm/display/drm_hdmi_helper.h>
+
#include "hdmi.h"
#define HDMI_VCO_MAX_FREQ 12000000000UL
#define HDMI_VCO_MIN_FREQ 8000000000UL
-#define HDMI_PCLK_MAX_FREQ 600000000
-#define HDMI_PCLK_MIN_FREQ 25000000
-
#define HDMI_HIGH_FREQ_BIT_CLK_THRESHOLD 3400000000UL
#define HDMI_DIG_FREQ_BIT_CLK_THRESHOLD 1500000000UL
#define HDMI_MID_FREQ_BIT_CLK_THRESHOLD 750000000UL
@@ -649,7 +648,9 @@ static int hdmi_8998_pll_prepare(struct clk_hw *hw)
static int hdmi_8998_pll_determine_rate(struct clk_hw *hw,
struct clk_rate_request *req)
{
- req->rate = clamp_t(unsigned long, req->rate, HDMI_PCLK_MIN_FREQ, HDMI_PCLK_MAX_FREQ);
+ req->rate = clamp_t(unsigned long, req->rate,
+ DRM_HDMI_TMDS_CHAR_RATE_MIN,
+ DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0);
return 0;
}
--
2.54.0
^ permalink raw reply related [flat|nested] 34+ 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
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
1 sibling, 0 replies; 34+ 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] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
@ 2026-05-19 15:20 ` Jani Nikula
2026-05-20 7:40 ` Javier Martinez Canillas
2026-05-20 9:56 ` Dmitry Baryshkov
` (2 subsequent siblings)
3 siblings, 1 reply; 34+ messages in thread
From: Jani Nikula @ 2026-05-19 15:20 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Javier Martinez Canillas, Maxime Ripard, David Airlie,
Dmitry Baryshkov, Nicolas Frattaroli, Simona Vetter, dri-devel
On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
> Several DRM drivers already define their own constants for minimum and
> maximum TMDS character rates.
>
> By defining common rate constants in a shared header, drivers can just use
> them instead of having driver local define macros or use magic numbers.
>
> The values defined in the <drm/display/drm_hdmi_helper.h> header correspond
> to maximum TMDS character rates defined by each HDMI specification version:
>
> - DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum)
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> include/drm/display/drm_hdmi_helper.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h
> index 9c31ed90516b..0ee246ff82e0 100644
> --- a/include/drm/display/drm_hdmi_helper.h
> +++ b/include/drm/display/drm_hdmi_helper.h
> @@ -5,6 +5,12 @@
>
> #include <linux/hdmi.h>
>
> +/* HDMI spec TMDS character rate limits (in Hz) */
> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
Usually everything in DRM is in kHz, and Hz is the exception.
I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
code. I won't remember what they mean in Hz or kHz, and I'll have to
look them up every single time.
BR,
Jani.
> +
> struct drm_connector;
> struct drm_connector_state;
> struct drm_display_mode;
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 15:20 ` Jani Nikula
@ 2026-05-20 7:40 ` Javier Martinez Canillas
2026-05-20 7:51 ` Jani Nikula
2026-05-20 8:13 ` Maxime Ripard
0 siblings, 2 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-20 7:40 UTC (permalink / raw)
To: Jani Nikula, linux-kernel
Cc: Maxime Ripard, David Airlie, Dmitry Baryshkov, Nicolas Frattaroli,
Simona Vetter, dri-devel
Jani Nikula <jani.nikula@intel.com> writes:
Hello Jani,
> On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
[...]
>>
>> +/* HDMI spec TMDS character rate limits (in Hz) */
>> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
>
> Usually everything in DRM is in kHz, and Hz is the exception.
>
That is correct but in this case these constants are to be used with the
HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and
the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect
the TMDS char rate to be defined in Hz.
If we define these in kHz, it means that drivers will have to * 1000 at
every call site.
> I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
> code. I won't remember what they mean in Hz or kHz, and I'll have to
> look them up every single time.
>
I discussed this with Maxime before posting the patches since I wondered
the same. He suggested that the max TMDS character rate was linked to the
HDMI spec versions and that it would be more readable to name it using
the spec version rather than the resolution.
The other naming I suggested was:
/* HDMI spec TMDS character rate limits (in Hz) */
#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
#define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000
#define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000
#define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000
#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000
> BR,
> Jani.
>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-20 7:40 ` Javier Martinez Canillas
@ 2026-05-20 7:51 ` Jani Nikula
2026-05-20 8:13 ` Maxime Ripard
1 sibling, 0 replies; 34+ messages in thread
From: Jani Nikula @ 2026-05-20 7:51 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Maxime Ripard, David Airlie, Dmitry Baryshkov, Nicolas Frattaroli,
Simona Vetter, dri-devel
On Wed, 20 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
> Jani Nikula <jani.nikula@intel.com> writes:
>
> Hello Jani,
>
>> On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
>
> [...]
>
>>>
>>> +/* HDMI spec TMDS character rate limits (in Hz) */
>>> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
>>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
>>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
>>> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
>>
>> Usually everything in DRM is in kHz, and Hz is the exception.
>>
>
> That is correct but in this case these constants are to be used with the
> HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and
> the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect
> the TMDS char rate to be defined in Hz.
I guess I'm surprised those things were defined in terms of Hz then.
> If we define these in kHz, it means that drivers will have to * 1000 at
> every call site.
Yeah, not ideal.
>> I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
>> code. I won't remember what they mean in Hz or kHz, and I'll have to
>> look them up every single time.
>>
>
> I discussed this with Maxime before posting the patches since I wondered
> the same. He suggested that the max TMDS character rate was linked to the
> HDMI spec versions and that it would be more readable to name it using
> the spec version rather than the resolution.
Frankly I've never thought of the limits in terms of the spec versions,
but maybe it's just me. *shrug*
BR,
Jani.
>
> The other naming I suggested was:
>
> /* HDMI spec TMDS character rate limits (in Hz) */
> #define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> #define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000
> #define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000
> #define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000
> #define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000
>
>> BR,
>> Jani.
>>
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-20 7:40 ` Javier Martinez Canillas
2026-05-20 7:51 ` Jani Nikula
@ 2026-05-20 8:13 ` Maxime Ripard
2026-05-20 8:36 ` Javier Martinez Canillas
1 sibling, 1 reply; 34+ messages in thread
From: Maxime Ripard @ 2026-05-20 8:13 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Jani Nikula, linux-kernel, David Airlie, Dmitry Baryshkov,
Nicolas Frattaroli, Simona Vetter, dri-devel
[-- Attachment #1: Type: text/plain, Size: 2386 bytes --]
On Wed, May 20, 2026 at 09:40:17AM +0200, Javier Martinez Canillas wrote:
> Jani Nikula <jani.nikula@intel.com> writes:
>
> Hello Jani,
>
> > On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
>
> [...]
>
> >>
> >> +/* HDMI spec TMDS character rate limits (in Hz) */
> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
> >
> > Usually everything in DRM is in kHz, and Hz is the exception.
> >
>
> That is correct but in this case these constants are to be used with the
> HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and
> the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect
> the TMDS char rate to be defined in Hz.
>
> If we define these in kHz, it means that drivers will have to * 1000 at
> every call site.
As long as the unit is obvious from the name, I think we'll be fine, and
we can even have both Hz and kHz defines if we want to.
> > I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
> > code. I won't remember what they mean in Hz or kHz, and I'll have to
> > look them up every single time.
> >
>
> I discussed this with Maxime before posting the patches since I wondered
> the same. He suggested that the max TMDS character rate was linked to the
> HDMI spec versions and that it would be more readable to name it using
> the spec version rather than the resolution.
As usual, it's both the spec and hardware capabilities. But some like
the HDMI 1.3/1.4 max is used to know where to setup the scrambler for
example, and is used everywhere.
I still think it has value, but we don't have to force anyone to use
them either.
I'd prefer to use the DRM_HDMI_$SPEC_TMDS_CHAR_RATE_MAX_HZ though
> The other naming I suggested was:
>
> /* HDMI spec TMDS character rate limits (in Hz) */
> #define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> #define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000
> #define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000
> #define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000
> #define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000
Honestly, I'm not sure if it's worth defining if we'll have the
frequency in the define name.
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-20 8:13 ` Maxime Ripard
@ 2026-05-20 8:36 ` Javier Martinez Canillas
0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-20 8:36 UTC (permalink / raw)
To: Maxime Ripard
Cc: Jani Nikula, linux-kernel, David Airlie, Dmitry Baryshkov,
Nicolas Frattaroli, Simona Vetter, dri-devel
Maxime Ripard <mripard@kernel.org> writes:
> On Wed, May 20, 2026 at 09:40:17AM +0200, Javier Martinez Canillas wrote:
>> Jani Nikula <jani.nikula@intel.com> writes:
>>
>> Hello Jani,
>>
>> > On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
>>
>> [...]
>>
>> >>
>> >> +/* HDMI spec TMDS character rate limits (in Hz) */
>> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
>> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
>> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
>> >> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
>> >
>> > Usually everything in DRM is in kHz, and Hz is the exception.
>> >
>>
>> That is correct but in this case these constants are to be used with the
>> HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and
>> the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect
>> the TMDS char rate to be defined in Hz.
>>
>> If we define these in kHz, it means that drivers will have to * 1000 at
>> every call site.
>
> As long as the unit is obvious from the name, I think we'll be fine, and
Yes, I agree.
> we can even have both Hz and kHz defines if we want to.
>
>> > I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
>> > code. I won't remember what they mean in Hz or kHz, and I'll have to
>> > look them up every single time.
>> >
>>
>> I discussed this with Maxime before posting the patches since I wondered
>> the same. He suggested that the max TMDS character rate was linked to the
>> HDMI spec versions and that it would be more readable to name it using
>> the spec version rather than the resolution.
>
> As usual, it's both the spec and hardware capabilities. But some like
> the HDMI 1.3/1.4 max is used to know where to setup the scrambler for
> example, and is used everywhere.
>
> I still think it has value, but we don't have to force anyone to use
> them either.
>
> I'd prefer to use the DRM_HDMI_$SPEC_TMDS_CHAR_RATE_MAX_HZ though
>
Ok, I'll change it in v2.
>> The other naming I suggested was:
>>
>> /* HDMI spec TMDS character rate limits (in Hz) */
>> #define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
>> #define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000
>> #define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000
>> #define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000
>> #define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000
>
> Honestly, I'm not sure if it's worth defining if we'll have the
> frequency in the define name.
>
Fair. I think is still worth it but I agree with your opinion that
having the $SPEC in the name makes more sense.
> Maxime
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
@ 2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2026-05-20 9:51 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Maxime Ripard, Abhinav Kumar, Brian Masney,
David Airlie, Dmitry Baryshkov, Jessica Zhang, Konrad Dybcio,
Marijn Suijten, Rob Clark, Sean Paul, Simona Vetter, dri-devel,
freedreno, linux-arm-msm
On Tue, May 19, 2026 at 04:47:03PM +0200, Javier Martinez Canillas wrote:
> Replace the driver local defines, for the minimum and maximum TMDS char
> rates, with shared constants defined in <drm/display/drm_hdmi_helper.h>.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
@ 2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Dmitry Baryshkov @ 2026-05-20 9:51 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Maxime Ripard, Abhinav Kumar, Brian Masney,
David Airlie, Dmitry Baryshkov, Jessica Zhang, Konrad Dybcio,
Marijn Suijten, Rob Clark, Sean Paul, Simona Vetter, dri-devel,
freedreno, linux-arm-msm
On Tue, May 19, 2026 at 04:47:04PM +0200, Javier Martinez Canillas wrote:
> Replace the driver local defines, for the minimum and maximum TMDS char
> rates, with shared constants defined in <drm/display/drm_hdmi_helper.h>.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
2026-05-19 15:20 ` Jani Nikula
@ 2026-05-20 9:56 ` Dmitry Baryshkov
2026-05-20 12:17 ` Javier Martinez Canillas
2026-05-20 12:58 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
3 siblings, 1 reply; 34+ messages in thread
From: Dmitry Baryshkov @ 2026-05-20 9:56 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Maxime Ripard, David Airlie, Jani Nikula,
Nicolas Frattaroli, Simona Vetter, dri-devel
On Tue, May 19, 2026 at 04:46:57PM +0200, Javier Martinez Canillas wrote:
> Several DRM drivers already define their own constants for minimum and
> maximum TMDS character rates.
>
> By defining common rate constants in a shared header, drivers can just use
> them instead of having driver local define macros or use magic numbers.
>
> The values defined in the <drm/display/drm_hdmi_helper.h> header correspond
> to maximum TMDS character rates defined by each HDMI specification version:
>
> - DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum)
These values are also used by the HDMI PHY drivers. Would it make sense
to define them in <linux/hdmi.h> instead?
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> include/drm/display/drm_hdmi_helper.h | 6 ++++++
> 1 file changed, 6 insertions(+)
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-20 9:56 ` Dmitry Baryshkov
@ 2026-05-20 12:17 ` Javier Martinez Canillas
0 siblings, 0 replies; 34+ messages in thread
From: Javier Martinez Canillas @ 2026-05-20 12:17 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: linux-kernel, Maxime Ripard, David Airlie, Jani Nikula,
Nicolas Frattaroli, Simona Vetter, dri-devel
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> writes:
Hello Dmitry,
> On Tue, May 19, 2026 at 04:46:57PM +0200, Javier Martinez Canillas wrote:
>> Several DRM drivers already define their own constants for minimum and
>> maximum TMDS character rates.
>>
>> By defining common rate constants in a shared header, drivers can just use
>> them instead of having driver local define macros or use magic numbers.
>>
>> The values defined in the <drm/display/drm_hdmi_helper.h> header correspond
>> to maximum TMDS character rates defined by each HDMI specification version:
>>
>> - DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions)
>> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum)
>> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum)
>> - DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum)
>
> These values are also used by the HDMI PHY drivers. Would it make sense
> to define them in <linux/hdmi.h> instead?
>
Yes, I think you are correct.
In fact I spotted more HDMI PHY drivers that could also use these defined
constants but just included the most obvious ones in this patch series.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
2026-05-19 15:20 ` Jani Nikula
2026-05-20 9:56 ` Dmitry Baryshkov
@ 2026-05-20 12:58 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
3 siblings, 0 replies; 34+ messages in thread
From: Heiko Stuebner @ 2026-05-20 12:58 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Javier Martinez Canillas, Maxime Ripard, David Airlie,
Dmitry Baryshkov, Jani Nikula, Nicolas Frattaroli, Simona Vetter,
dri-devel, Javier Martinez Canillas
Am Dienstag, 19. Mai 2026, 16:46:57 Mitteleuropäische Sommerzeit schrieb Javier Martinez Canillas:
> Several DRM drivers already define their own constants for minimum and
> maximum TMDS character rates.
>
> By defining common rate constants in a shared header, drivers can just use
> them instead of having driver local define macros or use magic numbers.
>
> The values defined in the <drm/display/drm_hdmi_helper.h> header correspond
> to maximum TMDS character rates defined by each HDMI specification version:
>
> - DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum)
> - DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum)
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
checked against the rate definitions, and of course they match :-)
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
> ---
>
> include/drm/display/drm_hdmi_helper.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h
> index 9c31ed90516b..0ee246ff82e0 100644
> --- a/include/drm/display/drm_hdmi_helper.h
> +++ b/include/drm/display/drm_hdmi_helper.h
> @@ -5,6 +5,12 @@
>
> #include <linux/hdmi.h>
>
> +/* HDMI spec TMDS character rate limits (in Hz) */
> +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
> +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
> +
> struct drm_connector;
> struct drm_connector_state;
> struct drm_display_mode;
>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
@ 2026-05-20 12:59 ` Heiko Stuebner
2026-05-20 13:32 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2 siblings, 0 replies; 34+ messages in thread
From: Heiko Stuebner @ 2026-05-20 12:59 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Javier Martinez Canillas, Maxime Ripard, Andrzej Hajda, Andy Yan,
David Airlie, Dmitry Baryshkov, Jernej Skrabec, Jonas Karlman,
Laurent Pinchart, Liu Ying, Luca Ceresoli, Maarten Lankhorst,
Neil Armstrong, Robert Foss, Shengjiu Wang, Simona Vetter,
Thomas Zimmermann, dri-devel, Javier Martinez Canillas
Am Dienstag, 19. Mai 2026, 16:46:58 Mitteleuropäische Sommerzeit schrieb Javier Martinez Canillas:
> Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
> constant defined in the <drm/display/drm_hdmi_helper.h> header.
>
> The local define incorrectly referenced HDMI 1.4, but the 340 MHz
> maximum TMDS character rate was actually introduced in HDMI 1.3.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 4/8] drm/bridge: inno-hdmi: Use the common TMDS char rate constant
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
@ 2026-05-20 13:00 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Heiko Stuebner @ 2026-05-20 13:00 UTC (permalink / raw)
To: linux-kernel, dri-devel
Cc: Javier Martinez Canillas, Maxime Ripard, Andrzej Hajda, Andy Yan,
David Airlie, Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Luca Ceresoli, Maarten Lankhorst, Neil Armstrong, Robert Foss,
Simona Vetter, Thomas Zimmermann, dri-devel,
Javier Martinez Canillas
Am Dienstag, 19. Mai 2026, 16:47:00 Mitteleuropäische Sommerzeit schrieb Javier Martinez Canillas:
> Replace the driver local INNO_HDMI_MIN_TMDS_CLOCK define with the shared
> constant defined in the <drm/display/drm_hdmi_helper.h> header.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 12:59 ` Heiko Stuebner
@ 2026-05-20 13:32 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2 siblings, 0 replies; 34+ messages in thread
From: Neil Armstrong @ 2026-05-20 13:32 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Maxime Ripard, Andrzej Hajda, Andy Yan, David Airlie,
Dmitry Baryshkov, Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Liu Ying, Luca Ceresoli, Maarten Lankhorst, Robert Foss,
Shengjiu Wang, Simona Vetter, Thomas Zimmermann, dri-devel
On 5/19/26 16:46, Javier Martinez Canillas wrote:
> Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
> constant defined in the <drm/display/drm_hdmi_helper.h> header.
>
> The local define incorrectly referenced HDMI 1.4, but the 340 MHz
> maximum TMDS character rate was actually introduced in HDMI 1.3.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index 41b3a9cfa2f5..d7c0a599aa42 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -51,8 +51,6 @@
> /* DW-HDMI Controller >= 0x200a are at least compliant with SCDC version 1 */
> #define SCDC_MIN_SOURCE_VERSION 0x1
>
> -#define HDMI14_MAX_TMDSCLK 340000000
> -
> static const u16 csc_coeff_default[3][4] = {
> { 0x2000, 0x0000, 0x0000, 0x0000 },
> { 0x0000, 0x2000, 0x0000, 0x0000 },
> @@ -1426,7 +1424,7 @@ void dw_hdmi_set_high_tmds_clock_ratio(struct dw_hdmi *hdmi,
>
> /* Control for TMDS Bit Period/TMDS Clock-Period Ratio */
> if (dw_hdmi_support_scdc(hdmi, display)) {
> - if (mtmdsclock > HDMI14_MAX_TMDSCLK)
> + if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
> drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 1);
> else
> drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 0);
> @@ -1671,7 +1669,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi,
> }
>
> /* Wait for resuming transmission of TMDS clock and data */
> - if (mtmdsclock > HDMI14_MAX_TMDSCLK)
> + if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
> msleep(100);
>
> return dw_hdmi_phy_power_on(hdmi);
> @@ -2032,7 +2030,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
> /* Set up HDMI_FC_INVIDCONF */
> inv_val = (hdmi->hdmi_data.hdcp_enable ||
> (dw_hdmi_support_scdc(hdmi, display) &&
> - (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
> + (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
> hdmi_info->scdc.scrambling.low_rates)) ?
> HDMI_FC_INVIDCONF_HDCP_KEEPOUT_ACTIVE :
> HDMI_FC_INVIDCONF_HDCP_KEEPOUT_INACTIVE);
> @@ -2100,7 +2098,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
>
> /* Scrambling Control */
> if (dw_hdmi_support_scdc(hdmi, display)) {
> - if (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
> + if (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
> hdmi_info->scdc.scrambling.low_rates) {
> /*
> * HDMI2.0 Specifies the following procedure:
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 34+ messages in thread
* Re: [PATCH 3/8] drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
@ 2026-05-20 13:33 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Neil Armstrong @ 2026-05-20 13:33 UTC (permalink / raw)
To: Javier Martinez Canillas, linux-kernel
Cc: Maxime Ripard, Andrzej Hajda, Andy Yan, Chris Morgan,
Cristian Ciocaltea, Daniel Stone, David Airlie, Dmitry Baryshkov,
Heiko Stuebner, Jernej Skrabec, Jonas Karlman, Laurent Pinchart,
Luca Ceresoli, Maarten Lankhorst, Robert Foss, Sebastian Reichel,
Simona Vetter, Thomas Zimmermann, dri-devel
On 5/19/26 16:46, Javier Martinez Canillas wrote:
> Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
> constant defined in the <drm/display/drm_hdmi_helper.h> header.
>
> The local define incorrectly referenced HDMI 1.4, but the 340 MHz
> maximum TMDS character rate was actually introduced in HDMI 1.3.
>
> Suggested-by: Maxime Ripard <mripard@kernel.org>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> index 0dbb12743609..37d8292b6f7f 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c
> @@ -38,8 +38,6 @@
> #define DDC_CI_ADDR 0x37
> #define DDC_SEGMENT_ADDR 0x30
>
> -#define HDMI14_MAX_TMDSCLK 340000000
> -
> #define SCRAMB_POLL_DELAY_MS 3000
>
> /*
> @@ -835,9 +833,9 @@ dw_hdmi_qp_bridge_tmds_char_rate_valid(const struct drm_bridge *bridge,
> /*
> * TODO: when hdmi->no_hpd is 1 we must not support modes that
> * require scrambling, including every mode with a clock above
> - * HDMI14_MAX_TMDSCLK.
> + * DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3.
> */
> - if (rate > HDMI14_MAX_TMDSCLK) {
> + if (rate > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3) {
> dev_dbg(hdmi->dev, "Unsupported TMDS char rate: %lld\n", rate);
> return MODE_CLOCK_HIGH;
> }
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Thanks,
Neil
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
2026-05-20 14:43 ` [PATCH v2 3/8] drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant Javier Martinez Canillas
@ 2026-05-25 11:45 ` Claude Code Review Bot
0 siblings, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 11:45 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Same replacement as patch 2, applied to dw-hdmi-qp.c. The comment in the TODO block is also updated:
```c
- * HDMI14_MAX_TMDSCLK.
+ * HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ.
```
No issues.
**Reviewed-by tag:** Neil Armstrong.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
` (7 preceding siblings ...)
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
@ 2026-05-25 12:44 ` Claude Code Review Bot
8 siblings, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/display: hdmi: Add common TMDS character rate constants
Author: Javier Martinez Canillas <javierm@redhat.com>
Patches: 24
Reviewed: 2026-05-25T22:44:49.028545
---
This is a clean, well-structured cleanup series that introduces four common TMDS character rate constants (`DRM_HDMI_TMDS_CHAR_RATE_MIN`, `_MAX_1_0`, `_MAX_1_3`, `_MAX_2_0`) into `<drm/display/drm_hdmi_helper.h>` and replaces per-driver duplicates and magic numbers across 7 driver files. The series is straightforward and low-risk. The constants are correctly valued per the HDMI specifications. The series also opportunistically fixes two documentation errors (HDMI 1.4 → 1.3, HDMI ≤ 1.2 → HDMI 1.0). The one-patch-per-driver split is appropriate for independent merging.
No functional changes are introduced — all replacements are exact value matches against the existing defines or magic numbers. No issues found.
**Verdict: Looks good. Ready to merge.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/display: hdmi: Add common TMDS character rate constants
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
` (2 preceding siblings ...)
2026-05-20 12:58 ` Heiko Stuebner
@ 2026-05-25 12:44 ` Claude Code Review Bot
3 siblings, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Adds four `#define` constants to `include/drm/display/drm_hdmi_helper.h`:
```c
#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000
#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000
#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000
```
The values are correct per the HDMI specifications. The naming convention `DRM_HDMI_TMDS_CHAR_RATE_MAX_<version>` is clear and consistent. The comment `/* HDMI spec TMDS character rate limits (in Hz) */` is appropriate. The placement before the struct forward declarations is fine.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/bridge: dw-hdmi: Use the common TMDS char rate constant
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 12:59 ` Heiko Stuebner
2026-05-20 13:32 ` Neil Armstrong
@ 2026-05-25 12:44 ` Claude Code Review Bot
2 siblings, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Removes `#define HDMI14_MAX_TMDSCLK 340000000` and replaces all four uses with `DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3`. The old name `HDMI14` was misleading (340 MHz is HDMI 1.3, not 1.4), and the commit message correctly notes this. All four substitution sites are 1:1 replacements with the same value (340000000).
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
2026-05-20 13:33 ` Neil Armstrong
@ 2026-05-25 12:44 ` Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Same pattern as patch 2 — removes `#define HDMI14_MAX_TMDSCLK 340000000` from `dw-hdmi-qp.c` and replaces its single use plus the comment reference. The TODO comment is also updated from `HDMI14_MAX_TMDSCLK` to `DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3`, which is good.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/bridge: inno-hdmi: Use the common TMDS char rate constant
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
2026-05-20 13:00 ` Heiko Stuebner
@ 2026-05-25 12:44 ` Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Removes `#define INNO_HDMI_MIN_TMDS_CLOCK 25000000U` and replaces its single use with `DRM_HDMI_TMDS_CHAR_RATE_MIN`. The old define had a `U` suffix while the new constant does not, but since `mpixelclk` is `unsigned long`, the comparison promotes correctly regardless. The header `<drm/display/drm_hdmi_helper.h>` is already included in this file, so no new `#include` is needed.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/sti: hdmi: Use the common TMDS char rate constants
2026-05-19 14:47 ` [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
@ 2026-05-25 12:44 ` Claude Code Review Bot
0 siblings, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Replaces two magic numbers in `sti_hdmi_tx3g4c28phy.c`:
- `340000000` → `DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3`
- `165000000` → `DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0`
Adds the necessary `#include <drm/display/drm_hdmi_helper.h>`. Both values are exact matches. Note that there's also a `340000000` in the `pll_mode` table on line 60 (`{170000000, 340000000, 16, ODF_DIV_1}`), but that's table data representing a range boundary, not a named threshold check, so leaving it as a literal is reasonable.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: 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
@ 2026-05-25 12:44 ` Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Replaces `165000000` with `DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0` and updates the comment from `/* 165 MHz is the typical max pixelclock frequency for HDMI <= 1.2 */` to `/* HDMI 1.0 max TMDS character rate */`. The commit message notes the HDMI version correction — the old comment said "HDMI ≤ 1.2" but 165 MHz is actually the HDMI 1.0 maximum. This is a nice incidental fix.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
@ 2026-05-25 12:44 ` Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Removes `#define HDMI_PCLK_MAX_FREQ 600000000` and `#define HDMI_PCLK_MIN_FREQ 25000000` from `hdmi_phy_8996.c`, replacing them with `DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0` and `DRM_HDMI_TMDS_CHAR_RATE_MIN` respectively. The values are exact matches. Adds the required `#include <drm/display/drm_hdmi_helper.h>`.
The `clamp_t` line is reformatted to wrap at 80 columns, which is a sensible style improvement.
**No issues.**
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
* Claude review: drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
@ 2026-05-25 12:44 ` Claude Code Review Bot
1 sibling, 0 replies; 34+ messages in thread
From: Claude Code Review Bot @ 2026-05-25 12:44 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
Identical pattern to patch 7, applied to `hdmi_phy_8998.c`. Removes the same local defines (`HDMI_PCLK_MAX_FREQ`, `HDMI_PCLK_MIN_FREQ`), replaces with the shared constants, adds the include. Values are exact matches.
**No issues.**
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 34+ messages in thread
end of thread, other threads:[~2026-05-25 12:44 UTC | newest]
Thread overview: 34+ 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:46 ` [PATCH 1/8] " Javier Martinez Canillas
2026-05-19 15:20 ` Jani Nikula
2026-05-20 7:40 ` Javier Martinez Canillas
2026-05-20 7:51 ` Jani Nikula
2026-05-20 8:13 ` Maxime Ripard
2026-05-20 8:36 ` Javier Martinez Canillas
2026-05-20 9:56 ` Dmitry Baryshkov
2026-05-20 12:17 ` Javier Martinez Canillas
2026-05-20 12:58 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:46 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 12:59 ` Heiko Stuebner
2026-05-20 13:32 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
2026-05-20 13:33 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
2026-05-20 13:00 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
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
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-25 12:44 ` Claude review: drm/display: hdmi: Add common TMDS character rate constants Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-20 14:43 [PATCH v2 0/8] " Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 3/8] drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-25 11:45 ` Claude review: " Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox