[PATCH v2 1/8] video/hdmi: Add common TMDS character rate constants

From: Javier Martinez Canillas

Date: Wed May 20 2026 - 10:54:11 EST


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 <linux/hdmi.h> header correspond to maximum TMDS
character rates defined by each HDMI specification version:

- HDMI_TMDS_CHAR_RATE_MIN_HZ: 25 MHz (minimum for all versions)
- HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ: 165 MHz (HDMI 1.0 maximum)
- HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ: 340 MHz (HDMI 1.3 maximum)
- HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ: 600 MHz (HDMI 2.0 maximum)

Suggested-by: Maxime Ripard <mripard@xxxxxxxxxx>
Signed-off-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>
Reviewed-by: Heiko Stuebner <heiko@xxxxxxxxx>
---

Changes in v2:
- Change naming convention to HDMI_$SPEC_TMDS_CHAR_RATE_MAX_HZ (Maxime).
- Define the constants in <linux/hdmi.h> (Dmitry).

include/linux/hdmi.h | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 96bda41d9148..8dab78e1f61b 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -50,6 +50,12 @@ enum hdmi_infoframe_type {
HDMI_INFOFRAME_TYPE_DRM = 0x87,
};

+/* HDMI spec maximum TMDS character rates, in Hz */
+#define HDMI_TMDS_CHAR_RATE_MIN_HZ 25000000
+#define HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ 165000000
+#define HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ 340000000
+#define HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ 600000000
+
#define HDMI_IEEE_OUI 0x000c03
#define HDMI_FORUM_IEEE_OUI 0xc45dd8
#define HDMI_INFOFRAME_HEADER_SIZE 4
--
2.54.0