[PATCH v9 15/61] drm/display: hdmi-state-helper: Add source TMDS rate validation

From: Cristian Ciocaltea

Date: Wed Jul 22 2026 - 21:38:37 EST


Validate the computed TMDS character rate against
connector->hdmi.max_tmds_char_rate, when provided by the driver/source.

This gives HDMI connectors common support for rejecting modes whose TMDS
character rate exceeds the source supported limit, while still allowing
drivers with custom validation requirements to implement their own
tmds_char_rate_valid() callback.

Tested-by: Maud Spierings <maud_spierings@xxxxxxxxxxx>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
---
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index ce17eeefc2da..92be6278ea44 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -560,6 +560,10 @@ hdmi_clock_valid(const struct drm_connector *connector,
if (info->max_tmds_clock && clock > info->max_tmds_clock * 1000)
return MODE_CLOCK_HIGH;

+ if (connector->hdmi.max_tmds_char_rate &&
+ clock > connector->hdmi.max_tmds_char_rate)
+ return MODE_CLOCK_HIGH;
+
if (funcs && funcs->tmds_char_rate_valid) {
enum drm_mode_status status;


--
2.55.0