Skip to content

Commit 1db0605

Browse files
committed
drm: mxsfb: Set fallback bus format when the bridge doesn't provide one
If a bridge doesn't do any bus format handling MEDIA_BUS_FMT_FIXED is returned. Fallback to a reasonable default (MEDIA_BUS_FMT_RGB888_1X24) in that case. This unbreaks e.g. using mxsfb with the nwl bridge and mipi dsi panels. Reported-by: Martin Kepplinger <[email protected]> Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Reviewed-by: Sam Ravnborg <[email protected]> Acked-by: Stefan Agner <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/781f0352052cc50c823c199ef5f53c84902d0580.1633959458.git.agx@sigxcpu.org
1 parent e2e0ee7 commit 1db0605

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/mxsfb/mxsfb_kms.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,12 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc,
362362
drm_atomic_get_new_bridge_state(state,
363363
mxsfb->bridge);
364364
bus_format = bridge_state->input_bus_cfg.format;
365+
if (bus_format == MEDIA_BUS_FMT_FIXED) {
366+
dev_warn_once(drm->dev,
367+
"Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n"
368+
"Please fix bridge driver by handling atomic_get_input_bus_fmts.\n");
369+
bus_format = MEDIA_BUS_FMT_RGB888_1X24;
370+
}
365371
}
366372

367373
/* If there is no bridge, use bus format from connector */

0 commit comments

Comments
 (0)