diff options
author | Liu Ying <victor.liu@nxp.com> | 2023-08-21 11:40:01 +0800 |
---|---|---|
committer | Robert Foss <rfoss@kernel.org> | 2023-10-16 11:38:40 +0200 |
commit | 0de852d4c23a39d3ebff73d0c0c1b488eac6c5a8 (patch) | |
tree | 68c0f8587b6c6049eec86d36f2c02d2b87f82612 /include/drm/bridge | |
parent | ec20c510ee2d2a7f0d0a00e4bfd55c28e500d3b7 (diff) |
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
Diffstat (limited to 'include/drm/bridge')
-rw-r--r-- | include/drm/bridge/dw_mipi_dsi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h index f54621b17a69..246650f2814f 100644 --- a/include/drm/bridge/dw_mipi_dsi.h +++ b/include/drm/bridge/dw_mipi_dsi.h @@ -11,7 +11,10 @@ #include <linux/types.h> +#include <drm/drm_atomic.h> #include <drm/drm_bridge.h> +#include <drm/drm_connector.h> +#include <drm/drm_crtc.h> #include <drm/drm_modes.h> struct drm_display_mode; @@ -56,6 +59,14 @@ struct dw_mipi_dsi_plat_data { unsigned long mode_flags, u32 lanes, u32 format); + u32 *(*get_input_bus_fmts)(void *priv_data, + struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state, + u32 output_fmt, + unsigned int *num_input_fmts); + const struct dw_mipi_dsi_phy_ops *phy_ops; const struct dw_mipi_dsi_host_ops *host_ops; |