[PATCH v2 02/12] media: imx-mipi-csis: Simplify access to source pad

Laurent Pinchart laurent.pinchart at ideasonboard.com
Thu Aug 21 08:44:29 PDT 2025


On Thu, Aug 21, 2025 at 11:10:38AM -0400, Frank Li wrote:
> On Thu, Aug 21, 2025 at 03:09:34AM +0300, Laurent Pinchart wrote:
> > The mipi_csis_calculate_params() function needs to access the pad of the
> > connected source. The pad is already available in csis->source.pad, but
> > the function takes a convoluted path by getting the pad index and
> > indexing the source subdev's pads array. Simplify it.
> 
> Generally, I like add "No functionality change" in commit message to help
> reviewer or developer direct skip this commit when bisect commit to
> indentify problem.

Good point. I'll add

"No functional change is intended."

> Reviewed-by: Frank Li <Frank.Li at nxp.com>
> 
> Frank Li
> 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> >  drivers/media/platform/nxp/imx-mipi-csis.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
> > index 2beb5f43c2c0..46f93cd677e3 100644
> > --- a/drivers/media/platform/nxp/imx-mipi-csis.c
> > +++ b/drivers/media/platform/nxp/imx-mipi-csis.c
> > @@ -579,13 +579,11 @@ static void __mipi_csis_set_format(struct mipi_csis_device *csis,
> >  static int mipi_csis_calculate_params(struct mipi_csis_device *csis,
> >  				      const struct csis_pix_format *csis_fmt)
> >  {
> > -	struct media_pad *src_pad =
> > -		&csis->source.sd->entity.pads[csis->source.pad->index];
> >  	s64 link_freq;
> >  	u32 lane_rate;
> >
> >  	/* Calculate the line rate from the pixel rate. */
> > -	link_freq = v4l2_get_link_freq(src_pad, csis_fmt->width,
> > +	link_freq = v4l2_get_link_freq(csis->source.pad, csis_fmt->width,
> >  				       csis->bus.num_data_lanes * 2);
> >  	if (link_freq < 0) {
> >  		dev_err(csis->dev, "Unable to obtain link frequency: %d\n",

-- 
Regards,

Laurent Pinchart



More information about the linux-arm-kernel mailing list