All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Ziliani <rylos78@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Daniel Scally <dan.scally@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, Chris Simpson <chris@nilk.net>,
	Tony Garcia <tony@loafecho.com>,
	Simon Kruse <simon0x+git@proton.me>,
	"D . Manresa" <dmanresa@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] media: i2c: ov5693: Program the mode registers on stream start
Date: Fri, 20 Nov 2026 18:28:19 +0100	[thread overview]
Message-ID: <20261120172819.257562-1-rylos78@gmail.com> (raw)
In-Reply-To: <awAUxukyHCqtABs_@kekkonen.localdomain>

Hi Sakari,

Thanks for the review.

On Fri, Nov 20, 2026 at 11:37:10AM +0200, Sakari Ailus wrote:
> This doesn't seem quite right. The static register list should be written
> on power-on and the rest when they change. Also there shouldn't be overlap
> between the register list and the registers programmatically determined by
> the driver.

There are three such overlaps in ov5693_global_regs today: 0x3820 and
0x3821 (FORMAT1/FORMAT2, whose binning and flip bits the driver sets
from the format and the flip controls) and 0x350b (the low byte of the
analogue gain). They predate this series, but I'll fix them in v3 with
a separate patch: drop 0x350b from the list, and let the driver program
0x3820/0x3821 whole, including the bits it doesn't manage today.

For the rest, I'd keep writing the mode registers on power-on as
before, and also write them from set_fmt() and set_selection() on the
active state when the sensor is powered, instead of on every stream
start. That needs pm_runtime_get_if_active() rather than the
pm_runtime_get_if_in_use() the controls use, so that a change made
during the autosuspend delay is written too. It fixes the same bug:
today a format change made while the sensor stays powered never reaches
the hardware.

Does that match what you had in mind?

Thanks,
Marco

  reply	other threads:[~2026-11-20 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29  9:27 [PATCH v2 0/3] media: i2c: ov5693: Fix mode changes, flips and autosuspend Marco Ziliani
2026-10-29  9:27 ` [PATCH v2 1/3] media: i2c: ov5693: Program the mode registers on stream start Marco Ziliani
2026-10-29 16:56   ` Chris Simpson
2026-11-03 21:01   ` technosf
2026-11-03 21:01   ` technosf
2026-11-20  9:37   ` Sakari Ailus
2026-11-20 17:28     ` Marco Ziliani [this message]
2026-10-29  9:27 ` [PATCH v2 2/3] media: i2c: ov5693: Keep the Bayer order when flipping at full resolution Marco Ziliani
2026-10-29  9:27 ` [PATCH v2 3/3] media: i2c: ov5693: Use autosuspend when stopping the stream Marco Ziliani

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=20261120172819.257562-1-rylos78@gmail.com \
    --to=rylos78@gmail.com \
    --cc=chris@nilk.net \
    --cc=dan.scally@ideasonboard.com \
    --cc=dmanresa@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=simon0x+git@proton.me \
    --cc=tony@loafecho.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.