Skip to content

Commit 8ec116f

Browse files
committed
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 <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 9d26167 commit 8ec116f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/gpu/drm/display/drm_bridge_connector.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,24 @@ drm_bridge_connector_mode_valid(struct drm_connector *connector,
313313
return MODE_OK;
314314
}
315315

316+
static int drm_bridge_connector_atomic_check(struct drm_connector *connector,
317+
struct drm_atomic_state *state)
318+
{
319+
struct drm_bridge_connector *bridge_connector =
320+
to_drm_bridge_connector(connector);
321+
322+
if (bridge_connector->bridge_hdmi)
323+
return drm_atomic_helper_connector_hdmi_check(connector, state);
324+
325+
return 0;
326+
}
327+
316328
static const struct drm_connector_helper_funcs drm_bridge_connector_helper_funcs = {
317329
.get_modes = drm_bridge_connector_get_modes,
318330
.mode_valid = drm_bridge_connector_mode_valid,
319331
.enable_hpd = drm_bridge_connector_enable_hpd,
320332
.disable_hpd = drm_bridge_connector_disable_hpd,
333+
.atomic_check = drm_bridge_connector_atomic_check,
321334
};
322335

323336
static enum drm_mode_status

0 commit comments

Comments
 (0)