Re: [PATCH 1/1] ipu3-cio2: Fix pixel-rate derived link frequency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

Thank you for the patch.

On Mon, Feb 15, 2021 at 09:57:42AM +0200, Sakari Ailus wrote:
> The driver uses v4l2_get_link_freq() helper to obtain the link frequency
> using the LINK_FREQ but also the PIXEL_RATE control. The divisor for the
> pixel rate derived link frequency was wrong, missing the bus uses double
> data rate. Fix this.
> 
> Reported-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
> Fixes: 4b6c129e87a3 ("media: ipu3-cio2: Use v4l2_get_link_freq helper")
> Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
>  drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> index 6e8c0c230e11..fecef85bd62e 100644
> --- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
> @@ -302,7 +302,7 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, struct cio2_queue *q,
>  	if (!q->sensor)
>  		return -ENODEV;
>  
> -	freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes);
> +	freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes * 2);
>  	if (freq < 0) {
>  		dev_err(dev, "error %lld, invalid link_freq\n", freq);
>  		return freq;

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux