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

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>

authored by

Isaac Scott and committed by
Hans Verkuil
e687f5ca 5c731dba

+6
+6
drivers/media/platform/nxp/imx-mipi-csis.c
··· 1034 1034 format = v4l2_subdev_state_get_format(state, CSIS_PAD_SINK); 1035 1035 csis_fmt = find_csis_format(format->code); 1036 1036 1037 + ret = v4l2_get_active_data_lanes(csis->source.pad, csis->bus.num_data_lanes); 1038 + if (ret < 0) 1039 + goto err_unlock; 1040 + 1041 + csis->num_data_lanes = ret; 1042 + 1037 1043 ret = mipi_csis_calculate_params(csis, csis_fmt); 1038 1044 if (ret < 0) 1039 1045 goto err_unlock;