lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250922080935.GJ10540@pendragon.ideasonboard.com>
Date: Mon, 22 Sep 2025 11:09:35 +0300
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Isaac Scott <isaac.scott@...asonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
	Rui Miguel Silva <rmfrfs@...il.com>,
	Martin Kepplinger <martink@...teo.de>,
	Purism Kernel Team <kernel@...i.sm>,
	Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v3 3/3] media: imx-mipi-csis: Get number of active lanes
 via mbus_config

Hi Isaac,

Thank you for the patch.

On Mon, Sep 15, 2025 at 02:18:35PM +0100, Isaac Scott wrote:
> The number of lanes actively used by a MIPI CSI transmitter may differ
> from that which is defined in device tree. As such, call on
> v4l2_get_active_data_lanes() to check if the driver reports a
> differing number of lanes to device tree, and use that number of active
> lanes.

It would be useful to explain there that the difference would be caused
by the source using less data lanes than the number of connected lanes
on the board.

> If the number of active data lanes is invalid, or the op is not
> supported, use the number of lanes defined in device tree.

Is this still true ?

> Signed-off-by: Isaac Scott <isaac.scott@...asonboard.com>
> ---
>  drivers/media/platform/nxp/imx-mipi-csis.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
> index 6afbedfe131e..d3424ad54b4e 100644
> --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> @@ -967,6 +967,9 @@ 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);
>  
> +	csis->num_data_lanes = v4l2_get_active_data_lanes(csis->source.pad,
> +							  csis->bus.num_data_lanes);
> +

If the function returns an error you'll have a problem.

>  	ret = mipi_csis_calculate_params(csis, csis_fmt);
>  	if (ret < 0)
>  		goto err_unlock;

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ