drm/bridge: synopsys: dw-mipi-dsi: Add input bus format negotiation support
authorLiu Ying <victor.liu@nxp.com>
Mon, 21 Aug 2023 03:40:01 +0000 (11:40 +0800)
committerRobert Foss <rfoss@kernel.org>
Mon, 16 Oct 2023 09:38:40 +0000 (11:38 +0200)
commit0de852d4c23a39d3ebff73d0c0c1b488eac6c5a8
tree68c0f8587b6c6049eec86d36f2c02d2b87f82612
parentec20c510ee2d2a7f0d0a00e4bfd55c28e500d3b7
drm/bridge: synopsys: dw-mipi-dsi: Add input bus format negotiation support

Introduce ->get_input_bus_fmts() callback to struct dw_mipi_dsi_plat_data
so that vendor drivers can implement specific methods to get input bus
formats for Synopsys DW MIPI DSI.

While at it, implement a generic callback for ->atomic_get_input_bus_fmts(),
where we try to get the input bus formats through pdata->get_input_bus_fmts()
first.  If it's unavailable, fall back to the only format - MEDIA_BUS_FMT_FIXED,
which matches the default behavior if ->atomic_get_input_bus_fmts() is not
implemented as ->atomic_get_input_bus_fmts()'s kerneldoc indicates.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230821034008.3876938-3-victor.liu@nxp.com
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
include/drm/bridge/dw_mipi_dsi.h