mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marco Ziliani via B4 Relay <devnull+rylos78.gmail.com@kernel.org>
To: Daniel Scally <dan.scally@ideasonboard.com>,
	 Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, Chris Simpson <chris@nilk.net>,
	 Simon Kruse <simon0x+git@proton.me>,
	"D. Manresa" <dmanresa@gmail.com>,
	 linux-kernel@vger.kernel.org, Marco Ziliani <rylos78@gmail.com>
Subject: [PATCH 0/3] media: i2c: ov5693: Fix mode changes, flips and autosuspend
Date: Tue, 27 Oct 2026 21:29:44 +0100	[thread overview]
Message-ID: <20261027-ov5693-fixes-v1-0-3c8ab1ae104d@gmail.com> (raw)

Three fixes for the ov5693, found while getting the front camera of the
Microsoft Surface Pro 5 (IPU3) to work, and since tested on IPU6 and
IPU4P Surfaces as well.

Patch 1 programs the mode registers on every stream start. They are
only written on runtime PM resume, so a format change on a sensor that
stays powered never reaches the chip. This is the ov5693 counterpart of
commit 4e1446ac169a ("media: i2c: ov8865: Program the sensor on stream
start").

Patch 2 keeps the reported SBGGR10 order when a single flip is enabled
at full resolution: each flip moves the Bayer phase by one column, so
the output window is shifted by one column when hflip XOR vflip.

Patch 3 drops the usage count at stream stop with
pm_runtime_put_autosuspend(), so that the autosuspend delay counts from
stream stop rather than from the last resume.

Patch 1 has been public and in testing in the linux-surface tree since
2026-10-23 [2]. Simon Kruse's active state conversion [1], posted this
morning, makes the same change as part of a larger rework. Patch 1 is
kept here as a small standalone fix with a Fixes: tag, so that it can
be applied and backported on its own; should the rework land first, I
will rebase patches 2 and 3 on top of it.

Patches 1 and 2 were developed in the linux-surface tree and tested
there on a Surface Pro 5 (IPU3), a Surface Pro 7 (IPU4P) and a Surface
Pro 7+ and Pro 9 (IPU6); patch 3 follows a report by Dario Manresa in
the same thread [2]. The three patches as posted here have also been
run on a Surface Pro 7 (IPU4P) and a Surface Pro 9 (IPU6) there.

[1] https://lore.kernel.org/linux-media/20261027074933.21921-1-simon0x+git@proton.me/
[2] https://github.com/linux-surface/kernel/pull/181

Signed-off-by: Marco Ziliani <rylos78@gmail.com>
---
Marco Ziliani (3):
      media: i2c: ov5693: Program the mode registers on stream start
      media: i2c: ov5693: Keep the Bayer order when flipping at full resolution
      media: i2c: ov5693: Use autosuspend when stopping the stream

 drivers/media/i2c/ov5693.c | 71 ++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 62 insertions(+), 9 deletions(-)
---
base-commit: d7e7bca7169873b46e857c025c10f3336c1258d8
change-id: 20261027-ov5693-fixes-8ec29752893a

Best regards,
--  
Marco Ziliani <rylos78@gmail.com>



             reply	other threads:[~2026-10-27 20:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-27 20:29 Marco Ziliani via B4 Relay [this message]
2026-10-27 20:29 ` [PATCH 1/3] media: i2c: ov5693: Program the mode registers on stream start Marco Ziliani via B4 Relay
2026-10-28  8:16   ` Dan Scally
2026-10-27 20:29 ` [PATCH 2/3] media: i2c: ov5693: Keep the Bayer order when flipping at full resolution Marco Ziliani via B4 Relay
2026-10-28  9:31   ` Dan Scally
2026-10-28 11:31     ` Marco Ziliani
2026-10-27 20:29 ` [PATCH 3/3] media: i2c: ov5693: Use autosuspend when stopping the stream Marco Ziliani via B4 Relay
2026-10-28  8:19   ` Dan Scally
2026-10-27 21:08 ` [PATCH 0/3] media: i2c: ov5693: Fix mode changes, flips and autosuspend Chris Simpson
2026-10-27 23:48 ` Tony Garcia
2026-10-28  8:29 ` Simon Kruse
2026-10-28  9:44   ` 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=20261027-ov5693-fixes-v1-0-3c8ab1ae104d@gmail.com \
    --to=devnull+rylos78.gmail.com@kernel.org \
    --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=rylos78@gmail.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=simon0x+git@proton.me \
    /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

all inboxes | Powered by JetHome®