drm/connector: hdmi: Add custom hook to filter TMDS character rate
authorMaxime Ripard <mripard@kernel.org>
Mon, 27 May 2024 13:58:02 +0000 (15:58 +0200)
committerMaxime Ripard <mripard@kernel.org>
Tue, 28 May 2024 08:12:59 +0000 (10:12 +0200)
commite5030a74f976b4e808e28e78805c87203ac1a48d
tree3ee795b86c635644b160b5c447ad4391890e0cfe
parent62eea520755e867aac35e087634ac40ad54d3201
drm/connector: hdmi: Add custom hook to filter TMDS character rate

Most of the HDMI controllers have an upper TMDS character rate limit
they can't exceed. On "embedded"-grade display controllers, it will
typically be lower than what high-grade monitors can provide these days,
so drivers will filter the TMDS character rate based on the controller
capabilities.

To make that easier to handle for drivers, let's provide an optional
hook to be implemented by drivers so they can tell the HDMI controller
helpers if a given TMDS character rate is reachable for them or not.

This will then be useful to figure out the best format and bpc count for
a given mode.

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240527-kms-hdmi-connector-state-v15-13-c5af16c3aae2@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/display/drm_hdmi_state_helper.c
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/tests/drm_connector_test.c
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
include/drm/drm_connector.h