Re: [PATCH] media: ov5640: fix incorrect frame frate issue for defulat VGA

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

 



Hi Guoniu

On Sun, Apr 23, 2023 at 10:14:58AM +0800, Guoniu.zhou wrote:
> If runn OV5640 with 640x480@30 default setting after power up,
> the real frame rate for it is 60, not 30. The reason is default
> frame interval parameter initialized in probe is 30 but default
> link frequency is to generate 60 frame rate, so correct it.
>
> Signed-off-by: Guoniu.zhou <guoniu.zhou@xxxxxxx>

The frame_interval calls are only used for parallel mode and are
ignored in CSI-2 mode. This means that the frame rate has to be
controlled by adjusting blankings (and possibly LINK_FREQ which this
driver registers in read-only mode though).

I recall the choice of that DEFAULT_LINK_FREQ was the one that allowed
to obtain the highest frame rates, hence I think it's right to chose
it by default.

Maybe this comment, that reports @30, is misleading
         *
	 * default init sequence initialize sensor to
	 * YUV422 UYVY VGA@30fps
	 *

> ---
>  drivers/media/i2c/ov5640.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
> index 1536649b9e90..80e1a2858abd 100644
> --- a/drivers/media/i2c/ov5640.c
> +++ b/drivers/media/i2c/ov5640.c
> @@ -179,7 +179,7 @@ static const s64 ov5640_csi2_link_freqs[] = {
>  };
>
>  /* Link freq for default mode: UYVY 16 bpp, 2 data lanes. */
> -#define OV5640_DEFAULT_LINK_FREQ	13
> +#define OV5640_DEFAULT_LINK_FREQ	19
>
>  enum ov5640_format_mux {
>  	OV5640_FMT_MUX_YUV422 = 0,
> --
> 2.37.1
>



[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