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] [day] [month] [year] [list]
Message-ID: <37877d57-f0c6-4985-b907-d23204a29b1d@cherry.de>
Date: Mon, 15 Jul 2024 14:47:17 +0200
From: Quentin Schulz <quentin.schulz@...rry.de>
To: Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Quentin Schulz <quentin.schulz@...obroma-systems.com>,
 Jacopo Mondi <jacopo@...ndi.org>
Cc: Johan Hovold <johan@...nel.org>,
 Kieran Bingham <kieran.bingham@...asonboard.com>,
 dave.stevenson@...pberrypi.com, linux-media@...r.kernel.org,
 linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH v3] media: ov5675: Fix power on/off delay timings

Hi Bryan,

On 7/14/24 12:33 AM, Bryan O'Donoghue wrote:
> The ov5675 specification says that the gap between XSHUTDN deassert and the
> first I2C transaction should be a minimum of 8192 XVCLK cycles.
> 
> Right now we use a usleep_rage() that gives a sleep time of between about
> 430 and 860 microseconds.
> 
> On the Lenovo X13s we have observed that in about 1/20 cases the current
> timing is too tight and we start transacting before the ov5675's reset
> cycle completes, leading to I2C bus transaction failures.
> 
> The reset racing is sometimes triggered at initial chip probe but, more
> usually on a subsequent power-off/power-on cycle e.g.
> 
> [   71.451662] ov5675 24-0010: failed to write reg 0x0103. error = -5
> [   71.451686] ov5675 24-0010: failed to set plls
> 
> The current quiescence period we have is too tight. Instead of expressing
> the post reset delay in terms of the current XVCLK this patch converts the
> power-on and power-off delays to the maximum theoretical delay @ 6 MHz with
> an additional buffer.
> 
> 1.365 milliseconds on the power-on path is 1.5 milliseconds with grace.
> 85.3 microseconds on the power-off path is 90 microseconds with grace.
> 
> Fixes: 49d9ad719e89 ("media: ov5675: add device-tree support and support runtime PM")
> Cc: stable@...r.kernel.org
> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@...aro.org>

Reviewed-by: Quentin Schulz <quentin.schulz@...rry.de>

Doesn't seem to break my camera on RK3399 Puma on Haikou with Haikou 
Video Demo adapter, so:

Tested-by: Quentin Schulz <quentin.schulz@...rry.de> # RK3399 Puma with 
Haikou Video Demo

Thanks!
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ