Linux Media Controller development
 help / color / mirror / Atom feed
From: Fernando Rimoli <fernandorimoli11@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	Daniel Scally <dan.scally@ideasonboard.com>,
	linux-media@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/4] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock
Date: Mon, 31 Aug 2026 20:16:10 +0200	[thread overview]
Message-ID: <20260831181610.316648-1-fernandorimoli11@gmail.com> (raw)
In-Reply-To: <amsBU-5t8pmSLXBr@kekkonen.localdomain>

Hi Sakari,

Thanks for the review, and sorry for the slow response.

> > Gating the clock lane was determined to be necessary and sufficient by
> > sweeping the register at runtime on a Surface Pro 9 (IPU6): every value
[...]
> This paragraph fits better to the cover page than to a commit message.

Moved to the cover letter in v4, and expanded there since it now also has
to cover the bit 2 question below.

> How about calling this OV5693_MIPI_CTRL00_LP11?
>
> Didn't IPU6 work with this sensor without setting the 2nd bit?

It did, so I have dropped bit 2 entirely in v4 rather than renaming it.
The macro is gone and only the clock-lane gate is written. The remaining
macro keeps the name ov5647 uses for the same bit.

To answer it properly, from the runtime sweep on my Surface Pro 9 (IPU6),
3 trials of 30 frames plus a 300-frame stability run per value:

  0x20  bit5                    300/300 frames, steady 28.6 fps
  0x24  bit5+bit2               300/300 frames, steady 28.6 fps
  0x00  power-on default        0 frames, "stream stop time out"
  0x04  bit2 alone              0 frames, "stream stop time out"

0x20 and 0x24 are indistinguishable, and bit 2 on its own does nothing
for the link, so bit 5 is both necessary and sufficient here. I had set
bit 2 only because it is part of ov5640's canonical value for this
register, not because anything on IPU6 needed it. That is a bad reason
to write a bit, so it is gone. v4 writes bit 5 only.

While I was in there, the same sweep also covers why the value differs
from ov5647's despite the mechanism being copied from it: bit 4 (line
sync) breaks the link on this receiver rather than being merely
unnecessary.

  0x10  bit4 alone              0 frames, "stream stop time out"
  0x30  bit5+bit4               2 frames, stream collapses
  0x34  bit5+bit4+bit2          2 frames, stream collapses

A bit5-only value recovered to 300/300 later in the same run, after the
bit 4 failures, so these are genuine value effects and not a link that
had got itself wedged.

Since v3 a linux-surface user has reproduced the value question
independently on a Surface Pro 8, a different IPU6 generation (0x9a19,
Tiger Lake) with the INT33BE HID rather than OVTI5693, reading every
value back after writing [1]:

  0x2d  vendor value (control)  30 frames, 28.65 fps
  0x24  bit5+bit2               30 frames, 28.65 fps
  0x20  bit5                    30 frames, 28.65 fps
  0x0d  0x2d with bit 5 clear   0 frames
  0x08  bit3 alone              0 frames
  0x04  bit2 alone              0 frames
  0x01  bit0 alone              0 frames

That 0x0d row is the test I had not run: the vendor value with only bit 5
removed does not stream, so bit 5 is necessary and not just sufficient.
That set has two limits. The register was written over I2C into a stalled
capture rather than by running the patch, and the write lands after
stream on rather than before. So it confirms the value on a second device
and IPU generation, but says nothing about the plumbing. Both sweeps are
in the cover letter.

One further change in v4 that you have not seen: the bit is now set with
cci_update_bits() rather than cci_write(). The ov5693 does not otherwise
program MIPI_CTRL00, and the driver also serves IPU3/CIO2 and Rockchip,
so modifying the single bit leaves whatever the platform left in the
register intact. On the devices in question it reads 0x00 beforehand, so
the two are equivalent in practice and this is just the smaller claim.
It was suggested on the linux-surface thread [1] and seemed right.

One consequence: Dan reviewed and Jakob tested v3's 0x24, and since v4
changes both the value and the form of the write, I dropped both tags
rather than carry them across a behaviour change. Both are asked in the
cover letter to re-confirm.

[1] https://github.com/linux-surface/linux-surface/pull/2171#issuecomment-5298352360

Thanks,
Fernando

  reply	other threads:[~2026-08-31 18:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-08 21:36 [PATCH] media: ov5693: add OVTI5693 ACPI HID for IPU6 Surface devices Fernando Rimoli
2026-07-09 13:17 ` Dan Scally
2026-07-14  9:32 ` Sakari Ailus
2026-07-17 13:20 ` [PATCH v2 0/3] media: Enable the OV5693 front camera on " Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 1/3] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 2/3] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-07-17 13:20   ` [PATCH v2 3/3] media: i2c: ov5693: Gate the MIPI clock lane for IPU6 Fernando Rimoli
2026-07-19 16:25     ` Jakob Berg Jespersen
2026-07-19 22:42     ` Sakari Ailus
2026-07-20 16:38   ` [PATCH v3 0/4] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-07-20 16:38     ` [PATCH v3 1/4] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-07-20 16:38     ` [PATCH v3 2/4] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-07-20 21:09       ` Dan Scally
2026-07-20 16:38     ` [PATCH v3 3/4] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-07-20 21:49       ` Dan Scally
2026-07-30  7:46       ` Sakari Ailus
2026-08-31 18:16         ` Fernando Rimoli [this message]
2026-07-20 16:38     ` [PATCH v3 4/4] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli
2026-07-20 21:56       ` Dan Scally
2026-07-20 23:50         ` Fernando Rimoli
2026-07-30  7:32           ` Sakari Ailus
2026-08-31 18:17             ` Fernando Rimoli
2026-08-31 18:18         ` Fernando Rimoli
2026-08-31 18:18     ` [PATCH v4 0/6] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 1/6] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 2/6] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-08-31 18:18       ` [PATCH v4 3/6] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-09-01  9:32         ` Jakob Berg Jespersen
2026-09-01  9:56           ` Fernando Rimoli
2026-09-01 16:34           ` Fernando Rimoli
2026-09-01 18:32             ` Jakob Berg Jespersen
2026-09-01 18:46         ` Fil Dunsky
2026-09-02  7:27         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 4/6] media: ipu-bridge: Assign endpoint property indices dynamically Fernando Rimoli
2026-09-02  6:33         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 5/6] media: ipu-bridge: Match sensor configs per IPU and add config flags Fernando Rimoli
2026-09-01  9:57         ` Fernando Rimoli
2026-09-02  6:42         ` Sakari Ailus
2026-08-31 18:18       ` [PATCH v4 6/6] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli
2026-09-02  4:42         ` Kengo Oki
2026-09-02 14:23       ` [PATCH v5 0/7] media: Enable the OV5693 front camera on IPU6 Surface devices Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 1/7] media: i2c: ov5693: Add OVTI5693 ACPI HID Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 2/7] media: ipu-bridge: Add OVTI5693 to the list of supported sensors Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 3/7] dt-bindings: media: ov5693: Add clock-noncontinuous Fernando Rimoli
2026-09-02 17:27           ` Conor Dooley
2026-09-02 14:23         ` [PATCH v5 4/7] media: i2c: ov5693: Gate the MIPI clock lane for non-continuous clock Fernando Rimoli
2026-09-02 19:11           ` Fil Dunsky
2026-09-02 14:23         ` [PATCH v5 5/7] media: ipu-bridge: Assign endpoint property indices dynamically Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 6/7] media: ipu-bridge: Match sensor configs per IPU and add config flags Fernando Rimoli
2026-09-02 14:23         ` [PATCH v5 7/7] media: ipu-bridge: Request non-continuous clock for ov5693 on IPU6 Fernando Rimoli

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=20260831181610.316648-1-fernandorimoli11@gmail.com \
    --to=fernandorimoli11@gmail.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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