On 7/7/26 2:23 PM, Maxime Ripard wrote: > Hi, > > On Thu, Jul 02, 2026 at 05:46:22PM +0300, Cristian Ciocaltea wrote: >> Validate the computed TMDS character rate against >> connector->hdmi.max_tmds_char_rate when no driver-specific >> tmds_char_rate_valid() hook is provided. >> >> This gives HDMI connectors a common fallback for rejecting modes whose >> TMDS character rate exceeds the connector limit, while still allowing >> drivers with custom validation requirements to implement their own >> tmds_char_rate_valid() callback. >> >> Signed-off-by: Cristian Ciocaltea <[email protected]> >> --- >> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +++ >> 1 file changed, 3 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..db76699093e8 100644 >> --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c >> +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c >> @@ -566,6 +566,9 @@ hdmi_clock_valid(const struct drm_connector *connector, >> status = funcs->tmds_char_rate_valid(connector, mode, clock); >> if (status != MODE_OK) >> return status; >> + } else if (connector->hdmi.max_tmds_char_rate) { >> + if (clock > connector->hdmi.max_tmds_char_rate) >> + return MODE_CLOCK_HIGH; > > I think we should handle this the same way we do for > info->max_tmds_clock: if it's set, we always check that before calling > the driver. > > It reduces the boilerplate in drivers, and it's always a relevant check > anyway. Ack.
Thanks, Cristian
