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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221219144414.lfusj67ojjk2phkv@uno.localdomain>
Date:   Mon, 19 Dec 2022 15:44:14 +0100
From:   Jacopo Mondi <jacopo@...ndi.org>
To:     shravan kumar <shravan.chippa@...rochip.com>
Cc:     paul.j.murphy@...el.com, daniele.alessandrelli@...el.com,
        mchehab@...nel.org, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 1/5] media: i2c: imx334: modify link frequency as for
 the configureation

Hi Shravan

On Mon, Dec 19, 2022 at 11:45:22AM +0530, shravan kumar wrote:
> From: Shravan Chippa <shravan.chippa@...rochip.com>
>
> Currently imx334 sensor driver is configured for 1782Mbps/lane for
> 3840x2160@60 resolution with reqired reg mode values but if we run the
> command "v4l2-ctl --all -d /dev/v4l-subdevX" it is showing incorrect link
> frequeny, This is because of the incorrect value of IMX334_LINK_FREQ
> witch is 891000000. it should be 1782000000.
>
> In general with the value of 891000000 link frequency it is not possible
> to configure 3840x2160@60 resolution.
>
> Fixes: 9746b11715c3 ("media: i2c: Add imx334 camera sensor driver")
>
> Signed-off-by: Shravan Chippa <shravan.chippa@...rochip.com>
> ---
>  drivers/media/i2c/imx334.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
> index 7b0a9086447d..acc9f9f15e47 100644
> --- a/drivers/media/i2c/imx334.c
> +++ b/drivers/media/i2c/imx334.c
> @@ -49,7 +49,7 @@
>  #define IMX334_INCLK_RATE	24000000
>
>  /* CSI2 HW configuration */
> -#define IMX334_LINK_FREQ	891000000
> +#define IMX334_LINK_FREQ	1782000000

Is this your reasoning ?

width: 3840
hblank: 560
height: 2160
vblank: 2340
bpp: 12
fps: 60
lanes: 4

Total bandwidth: (3840 + 560) * (2160 + 2340) * 60 * 12 = 14.256.000.000
Bandwidth per lane = Total / 4 = 3.564.000.000
mipi clock = Bandwidth_per_lane / 2 = 1.782.000.000

Two questions:

- Should you update the pixel clock as well ? It is currently set to
  594000000 while as per the above reasoning it should be doubled too.

- Where is the sensor's clock tree programmed in the driver ?
  It's kind of weird that the pixel_clock and link_freq in the driver
  are half of what they theoretically should be...



>  #define IMX334_NUM_DATA_LANES	4
>
>  #define IMX334_REG_MIN		0x00
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ