public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Umang Jain <umang.jain@ideasonboard.com>
Cc: linux-media@vger.kernel.org, libcamera-devel@lists.libcamera.org,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Bingbu Cao <bingbu.cao@intel.com>
Subject: Re: [PATCH 1/2] media: imx258: Rectify mismatch of VTS value
Date: Fri, 23 Jul 2021 14:50:35 +0300	[thread overview]
Message-ID: <YPqtC0KITMbB2I4F@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20210723112233.1361319-2-umang.jain@ideasonboard.com>

Hi Umang,

Thank you for the patch.

(Expanding the CC list)

On Fri, Jul 23, 2021 at 04:52:32PM +0530, Umang Jain wrote:
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> The frame_length_lines (0x0340) registers are hard-coded as follows:
> 
> - 4208x3118
>   frame_length_lines = 0x0c50
> 
> - 2104x1560
>   frame_length_lines = 0x0638
> 
> - 1048x780
>   frame_length_lines = 0x034c
> 
> The driver exposes the V4L2_CID_VBLANK control in read-only mode and
> sets its value to vts_def - height, where vts_def is a mode-dependent
> value coming from the supported_modes array. It is set using one of
> the following macros defined in the driver:
> 
>   #define IMX258_VTS_30FPS                0x0c98
>   #define IMX258_VTS_30FPS_2K             0x0638
>   #define IMX258_VTS_30FPS_VGA            0x034c
> 
> There's a clear mismatch in the value for the full resolution mode i.e.
> IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for
> the frame_length_lines register as stated above.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>

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

> ---
>  drivers/media/i2c/imx258.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c
> index 7ab9e5f9f267..4e695096e5d0 100644
> --- a/drivers/media/i2c/imx258.c
> +++ b/drivers/media/i2c/imx258.c
> @@ -23,7 +23,7 @@
>  #define IMX258_CHIP_ID			0x0258
>  
>  /* V_TIMING internal */
> -#define IMX258_VTS_30FPS		0x0c98
> +#define IMX258_VTS_30FPS		0x0c50
>  #define IMX258_VTS_30FPS_2K		0x0638
>  #define IMX258_VTS_30FPS_VGA		0x034c
>  #define IMX258_VTS_MAX			0xffff

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2021-07-23 11:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 11:22 [PATCH 0/2] IMX258 driver fixes Umang Jain
2021-07-23 11:22 ` [PATCH 1/2] media: imx258: Rectify mismatch of VTS value Umang Jain
2021-07-23 11:50   ` Laurent Pinchart [this message]
2021-07-26  2:20     ` Bingbu Cao
2021-07-23 11:22 ` [PATCH 2/2] media: imx258: Limit the max analogue gain to 480 Umang Jain
2021-07-23 11:44   ` [libcamera-devel] " Laurent Pinchart
2021-07-23 11:52     ` Laurent Pinchart
2021-07-23 12:29       ` Krzysztof Kozlowski
2021-07-23 12:36       ` Dave Stevenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YPqtC0KITMbB2I4F@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=bingbu.cao@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=krzk@kernel.org \
    --cc=libcamera-devel@lists.libcamera.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=umang.jain@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox