The CSIS doesn't support data lanes reordering. Reject invalid settings. Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> --- drivers/staging/media/imx/imx7-mipi-csis.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c index 07b331667db7..6e235c86e0aa 100644 --- a/drivers/staging/media/imx/imx7-mipi-csis.c +++ b/drivers/staging/media/imx/imx7-mipi-csis.c @@ -1115,6 +1115,7 @@ static int mipi_csis_async_register(struct csi_state *state) }; struct v4l2_async_subdev *asd; struct fwnode_handle *ep; + unsigned int i; int ret; v4l2_async_notifier_init(&state->notifier); @@ -1128,6 +1129,14 @@ static int mipi_csis_async_register(struct csi_state *state) if (ret) goto err_parse; + for (i = 0; i < vep.bus.mipi_csi2.num_data_lanes; ++i) { + if (vep.bus.mipi_csi2.data_lanes[i] != i + 1) { + dev_err(state->dev, + "data lanes reordering is not supported"); + goto err_parse; + } + } + state->bus = vep.bus.mipi_csi2; dev_dbg(state->dev, "data lanes: %d\n", state->bus.num_data_lanes); -- Regards, Laurent Pinchart