summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Scott <isaac.scott@ideasonboard.com>2025-10-29 18:03:21 +0000
committerHans Verkuil <hverkuil+cisco@kernel.org>2025-11-13 10:57:52 +0100
commite687f5cae591dba4a0a968c24cbe7b6141027d93 (patch)
treeecf4cfa0d46220fbad5ef2c7ce467a537b25552c
parent5c731dba1d8b92ecb935031cf33dabb2bd6793c4 (diff)
media: imx-mipi-csis: Support active data lanes differing from maximum
Call on v4l2_get_active_data_lanes() to check if the driver reports that the number of lanes actively used by the MIPI CSI transmitter differs to the maximum defined in device tree. If the number of active data lanes reported by the driver is invalid, catch and return the error. If the operation is not supported, fall back to the number of allowed data lanes. Signed-off-by: Isaac Scott <isaac.scott@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
-rw-r--r--drivers/media/platform/nxp/imx-mipi-csis.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
index 1569299be4ec..088b2945aee3 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -1034,6 +1034,12 @@ static int mipi_csis_s_stream(struct v4l2_subdev *sd, int enable)
format = v4l2_subdev_state_get_format(state, CSIS_PAD_SINK);
csis_fmt = find_csis_format(format->code);
+ ret = v4l2_get_active_data_lanes(csis->source.pad, csis->bus.num_data_lanes);
+ if (ret < 0)
+ goto err_unlock;
+
+ csis->num_data_lanes = ret;
+
ret = mipi_csis_calculate_params(csis, csis_fmt);
if (ret < 0)
goto err_unlock;