diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-12-10 16:16:47 +0200 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2024-12-24 04:00:48 +0200 |
commit | 8ec116ff21a97918d187491dc8f90d7eb173dc1d (patch) | |
tree | e0834e8e30285c51874a47fd1e70d74a9eeca720 /drivers | |
parent | 9d2616754ce7e16a9e73ab6c00efc27fe47cb943 (diff) |
drm/display: bridge_connector: provide atomic_check for HDMI bridges
The bridges using HDMI connector framework have a call to
drm_atomic_helper_connector_hdmi_check() in their atomic_check()
callback. In order to reduce boilerplate and make simplify bridge's
code, use drm_atomic_helper_connector_hdmi_check() to implement
drm_connector.atomic_check() for HDMI bridges.
Acked-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20241210-bridge_hdmi_check-v1-1-a8fdd8c5afa5@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/display/drm_bridge_connector.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c index 512ced87ea18..f6e0b6f1ffdd 100644 --- a/drivers/gpu/drm/display/drm_bridge_connector.c +++ b/drivers/gpu/drm/display/drm_bridge_connector.c @@ -313,11 +313,24 @@ drm_bridge_connector_mode_valid(struct drm_connector *connector, return MODE_OK; } +static int drm_bridge_connector_atomic_check(struct drm_connector *connector, + struct drm_atomic_state *state) +{ + struct drm_bridge_connector *bridge_connector = + to_drm_bridge_connector(connector); + + if (bridge_connector->bridge_hdmi) + return drm_atomic_helper_connector_hdmi_check(connector, state); + + return 0; +} + static const struct drm_connector_helper_funcs drm_bridge_connector_helper_funcs = { .get_modes = drm_bridge_connector_get_modes, .mode_valid = drm_bridge_connector_mode_valid, .enable_hpd = drm_bridge_connector_enable_hpd, .disable_hpd = drm_bridge_connector_disable_hpd, + .atomic_check = drm_bridge_connector_atomic_check, }; static enum drm_mode_status |