[PATCH v8 09/39] drm/display: hdmi-state-helper: Add fallback TMDS rate validation
Maxime Ripard
mripard at kernel.org
Tue Jul 7 04:23:25 PDT 2026
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 <cristian.ciocaltea at collabora.com>
> ---
> 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.
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20260707/cee476e3/attachment.sig>
More information about the linux-arm-kernel
mailing list