Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: cdns-dsi: Add input format negotiation

Add support for the input format negotiation hook, that uses the helper
drm_mipi_dsi_get_input_bus_fmt() for dsi hosts, to figure out the
required input format.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Tested-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Aradhya Bhatia <a-bhatia1@ti.com>
Signed-off-by: Aradhya Bhatia <aradhya.bhatia@linux.dev>
Link: https://lore.kernel.org/r/20250329113925.68204-9-aradhya.bhatia@linux.dev
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>

authored by

Aradhya Bhatia and committed by
Dmitry Baryshkov
bc36ee98 e83967c3

+28
+28
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c
··· 936 936 cdns_dsi_hs_init(dsi); 937 937 } 938 938 939 + static u32 *cdns_dsi_bridge_get_input_bus_fmts(struct drm_bridge *bridge, 940 + struct drm_bridge_state *bridge_state, 941 + struct drm_crtc_state *crtc_state, 942 + struct drm_connector_state *conn_state, 943 + u32 output_fmt, 944 + unsigned int *num_input_fmts) 945 + { 946 + struct cdns_dsi_input *input = bridge_to_cdns_dsi_input(bridge); 947 + struct cdns_dsi *dsi = input_to_dsi(input); 948 + struct cdns_dsi_output *output = &dsi->output; 949 + u32 *input_fmts; 950 + 951 + *num_input_fmts = 0; 952 + 953 + input_fmts = kzalloc(sizeof(*input_fmts), GFP_KERNEL); 954 + if (!input_fmts) 955 + return NULL; 956 + 957 + input_fmts[0] = drm_mipi_dsi_get_input_bus_fmt(output->dev->format); 958 + if (!input_fmts[0]) 959 + return NULL; 960 + 961 + *num_input_fmts = 1; 962 + 963 + return input_fmts; 964 + } 965 + 939 966 static const struct drm_bridge_funcs cdns_dsi_bridge_funcs = { 940 967 .attach = cdns_dsi_bridge_attach, 941 968 .mode_valid = cdns_dsi_bridge_mode_valid, ··· 973 946 .atomic_reset = drm_atomic_helper_bridge_reset, 974 947 .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, 975 948 .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, 949 + .atomic_get_input_bus_fmts = cdns_dsi_bridge_get_input_bus_fmts, 976 950 }; 977 951 978 952 static int cdns_dsi_attach(struct mipi_dsi_host *host,