Skip to content

Commit 0db3cef

Browse files
nikhildevshatwarmartinezjavier
authored andcommitted
drm/bridge: mhdp8546: Add minimal format negotiation
With new connector model, mhdp bridge will not create the connector and SoC driver will rely on format negotiation to setup the encoder format. Support minimal format negotiations hooks in the drm_bridge_funcs. Complete format negotiation can be added based on EDID data. This patch adds the minimal required support to avoid failure after moving to new connector model. Signed-off-by: Nikhil Devshatwar <[email protected]> [a-bhatia1: Drop the output_fmt check condition] 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 584a340 commit 0db3cef

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,27 @@ cdns_mhdp_bridge_atomic_reset(struct drm_bridge *bridge)
21462146
return &cdns_mhdp_state->base;
21472147
}
21482148

2149+
static u32 *cdns_mhdp_get_input_bus_fmts(struct drm_bridge *bridge,
2150+
struct drm_bridge_state *bridge_state,
2151+
struct drm_crtc_state *crtc_state,
2152+
struct drm_connector_state *conn_state,
2153+
u32 output_fmt,
2154+
unsigned int *num_input_fmts)
2155+
{
2156+
u32 *input_fmts;
2157+
2158+
*num_input_fmts = 0;
2159+
2160+
input_fmts = kzalloc(sizeof(*input_fmts), GFP_KERNEL);
2161+
if (!input_fmts)
2162+
return NULL;
2163+
2164+
*num_input_fmts = 1;
2165+
input_fmts[0] = MEDIA_BUS_FMT_RGB121212_1X36;
2166+
2167+
return input_fmts;
2168+
}
2169+
21492170
static int cdns_mhdp_atomic_check(struct drm_bridge *bridge,
21502171
struct drm_bridge_state *bridge_state,
21512172
struct drm_crtc_state *crtc_state,
@@ -2210,6 +2231,7 @@ static const struct drm_bridge_funcs cdns_mhdp_bridge_funcs = {
22102231
.atomic_duplicate_state = cdns_mhdp_bridge_atomic_duplicate_state,
22112232
.atomic_destroy_state = cdns_mhdp_bridge_atomic_destroy_state,
22122233
.atomic_reset = cdns_mhdp_bridge_atomic_reset,
2234+
.atomic_get_input_bus_fmts = cdns_mhdp_get_input_bus_fmts,
22132235
.detect = cdns_mhdp_bridge_detect,
22142236
.get_edid = cdns_mhdp_bridge_get_edid,
22152237
.hpd_enable = cdns_mhdp_bridge_hpd_enable,

0 commit comments

Comments
 (0)