Skip to content

Commit b1c08ff

Browse files
Aradhya Bhatiamartinezjavier
authored andcommitted
drm/bridge: sii902x: Set input_bus_flags in atomic_check
input_bus_flags are specified in drm_bridge_timings (legacy) as well as drm_bridge_state->input_bus_cfg.flags The flags from the timings will be deprecated. Bridges are supposed to validate and set the bridge state flags from atomic_check. Implement atomic_check hook for the same. Signed-off-by: Aradhya Bhatia <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Tomi Valkeinen <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7978ec7 commit b1c08ff

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

drivers/gpu/drm/bridge/sii902x.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,20 @@ static u32 *sii902x_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
494494
return input_fmts;
495495
}
496496

497+
static int sii902x_bridge_atomic_check(struct drm_bridge *bridge,
498+
struct drm_bridge_state *bridge_state,
499+
struct drm_crtc_state *crtc_state,
500+
struct drm_connector_state *conn_state)
501+
{
502+
/*
503+
* There might be flags negotiation supported in future but
504+
* set the bus flags in atomic_check statically for now.
505+
*/
506+
bridge_state->input_bus_cfg.flags = bridge->timings->input_bus_flags;
507+
508+
return 0;
509+
}
510+
497511
static const struct drm_bridge_funcs sii902x_bridge_funcs = {
498512
.attach = sii902x_bridge_attach,
499513
.mode_set = sii902x_bridge_mode_set,
@@ -505,6 +519,7 @@ static const struct drm_bridge_funcs sii902x_bridge_funcs = {
505519
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
506520
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
507521
.atomic_get_input_bus_fmts = sii902x_bridge_atomic_get_input_bus_fmts,
522+
.atomic_check = sii902x_bridge_atomic_check,
508523
};
509524

510525
static int sii902x_mute(struct sii902x *sii902x, bool mute)

0 commit comments

Comments
 (0)