mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antoine Pichot <antoine.pichot@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-media@vger.kernel.org, sakari.ailus@linux.intel.com,
	mchehab@kernel.org, hansg@kernel.org,
	dan.scally@ideasonboard.com, djrscally@gmail.com,
	dmanresa@gmail.com, dave.stevenson@raspberrypi.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/9] media: i2c: ov7251: Use sub-device active state
Date: Fri, 30 Oct 2026 23:26:37 +0900	[thread overview]
Message-ID: <20261030142637.2235350-1-antoine.pichot@gmail.com> (raw)
In-Reply-To: <auNSB_yCjo8KVGJF@ashevche-desk.local>

Hi Andy,

On Thu, Oct 29, 2026 at 04:02:47PM +0200, Andy Shevchenko wrote:
> I'm wondering if v4l2 provides the set of conditional guards and hence
> some kind of ACQUIRE() macro.

Not today. Nothing under include/media or drivers/media defines a
guard class (no DEFINE_GUARD, DEFINE_CLASS, DEFINE_LOCK_GUARD or
DEFINE_FREE), and the state lock is unconditional:
v4l2_subdev_lock_state() is a plain mutex_lock(), so ACQUIRE_ERR()
would have nothing to report.

A guard class could be added: Tomi proposed one in September 2024
[1]; Laurent preferred a __free() annotation and the series stalled.
I would rather not add it in this series. The explicit pair is what
imx290, imx415, ov2740 and ov8858 do in s_stream, and what Sakari
asked to keep in the ov5647 conversion last December [2] until the
driver moves to .enable_streams() and .disable_streams(), after which
the core takes the state lock itself and the pairs go away.

[1] https://lore.kernel.org/linux-media/20240917-scoped-state-v1-0-b8ba3fbe5952@ideasonboard.com/
[2] https://lore.kernel.org/linux-media/aVLOlkqSHn-N5Wi0@kekkonen.localdomain/

Thanks,
Antoine

  reply	other threads:[~2026-10-30 14:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 11:21 [PATCH v2 0/9] media: i2c: ov7251: fixes and infrared strobe for Surface Book 2 Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 1/9] media: i2c: ov7251: Use in-range PLL1 dividers for the 319.2 MHz link Antoine Pichot
2026-10-29 13:57   ` Andy Shevchenko
2026-10-29 19:06   ` Dave Stevenson
2026-10-30 14:26     ` Antoine Pichot
2026-10-30 14:26     ` Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 2/9] media: i2c: ov7251: Fix link frequency index Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 3/9] media: i2c: ov7251: Report the pixel array rate for both link frequencies Antoine Pichot
2026-10-29 13:59   ` Andy Shevchenko
2026-10-28 11:21 ` [PATCH v2 4/9] media: i2c: ov7251: Reset vblank when the frame interval changes Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 5/9] media: i2c: ov7251: Use sub-device active state Antoine Pichot
2026-10-29 14:02   ` Andy Shevchenko
2026-10-30 14:26     ` Antoine Pichot [this message]
2026-10-28 11:21 ` [PATCH v2 6/9] media: i2c: ov7251: Add orientation and rotation controls Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 7/9] media: i2c: ov7251: Move the strobe registers out of the mode tables Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 8/9] media: i2c: ov7251: Add strobe output enable control Antoine Pichot
2026-10-30 12:12   ` Antoine Pichot
2026-10-28 11:21 ` [PATCH v2 9/9] media: ipu-bridge: Add a rotation quirk for the Surface Book 2 and Pro 7+ Antoine Pichot
2026-10-29 14:04   ` Andy Shevchenko

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=20261030142637.2235350-1-antoine.pichot@gmail.com \
    --to=antoine.pichot@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=djrscally@gmail.com \
    --cc=dmanresa@gmail.com \
    --cc=hansg@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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

all inboxes | Powered by JetHome®