[PATCH v16 5/5] media: qcom: camss: Use data-lanes starting at 1 for new CSIPHY mode

sashiko-bot at kernel.org sashiko-bot at kernel.org
Sun Sep 6 05:00:01 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The patch introduces a build failure due to an undeclared identifier `CSI2_MAX_DATA_LANES` used in the bounds check. The correct identifier is likely `V4L2_MBUS_CSI2_MAX_DATA_LANES`.
--

commit 6412cb87019badaa2684393747963c54499766bc
Author: Bryan O'Donoghue <bryan.odonoghue at linaro.org>

media: qcom: camss: Use data-lanes starting at 1 for new CSIPHY mode

This patch updates the CSIPHY logic to accommodate a change where data-lane
indexing starts at 1 instead of 0 for new CSIPHY modes. It introduces a
lane_base offset to dynamically normalize the lane indices depending on
whether the PHY is legacy or new.

> diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/platform/qcom/camss/camss.c
> index 84097d82d99c9..8a4d8a206cf0d 100644
> --- a/drivers/media/platform/qcom/camss/camss.c
> +++ b/drivers/media/platform/qcom/camss/camss.c

[ ... ]

> @@ -4777,7 +4778,14 @@ static int camss_parse_endpoint_node(struct device *dev,
>  		return -ENOMEM;
>  
>  	for (i = 0; i < lncfg->num_data; i++) {
> -		lncfg->data[i].pos = mipi_csi2->data_lanes[i];
> +		u8 lane = mipi_csi2->data_lanes[i];
> +
> +		if (lane < lane_base || lane - lane_base >= CSI2_MAX_DATA_LANES) {

[Severity: Low]
Is there a missing declaration for CSI2_MAX_DATA_LANES here? This looks like it
might cause a build failure. Should this be V4L2_MBUS_CSI2_MAX_DATA_LANES
instead?

> +			dev_err(dev, "invalid data-lane %u\n", lane);
> +			return -EINVAL;
> +		}
> +
> +		lncfg->data[i].pos = mipi_csi2->data_lanes[i] - lane_base;
>  		lncfg->data[i].pol = mipi_csi2->lane_polarities[i + 1];
>  	}
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260906-b4-linux-next-25-03-13-dtsi-x1e80100-camss-v16-0-f7bd68b5369f@linaro.org?part=5



More information about the linux-phy mailing list