From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Hans de Goede <johannes.goede@oss.qualcomm.com>
Cc: Kate Hsuan <hpa@redhat.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Hans de Goede <hansg@kernel.org>
Subject: Re: [PATCH v11] media: Add t4ka3 camera sensor driver
Date: Wed, 18 Mar 2026 00:35:04 +0200 [thread overview]
Message-ID: <abnXGIi_eYZtJhy-@kekkonen.localdomain> (raw)
In-Reply-To: <590df779-96a2-4dc2-97b0-0f8753bd7eda@oss.qualcomm.com>
Hi Hans,
On Tue, Mar 17, 2026 at 08:56:47PM +0100, Hans de Goede wrote:
> Hi,
>
> On 17-Mar-26 18:58, Sakari Ailus wrote:
>
> ...
>
> >>>> +
> >>>> + /* Only apply changes to the controls if the device is powered up */
> >>>> + if (!pm_runtime_get_if_in_use(sensor->sd.dev)) {
> >>>> + t4ka3_set_bayer_order(sensor, fmt);
> >>>
> >>> Does this call belong here?
> >>
> >> Yes, if the hflip/vflip controls change then fmt->code needs to be
> >> updated to the now changed bayer-order. t4ka3_set_bayer_order()
> >> uses the cached ctrl->val values so it is cheap enough to
> >> always do this instead of checking if the changed ctrl is
> >> vflip or hflip.
> >>
> >> In case the sensor is actually streaming and we don't hit this path,
> >> the t4ka3_t_vflip()helper will return -EBUSY since changing
> >> the active fmt while streaming is not a good idea.
> >
> > This should also apply to non-active state (albeit implementation requires
> > implementing get_fmt locally). This will get "fixed" with the metadata
> > series eventually with generic raw formats.
>
> Ok, so what you are saying is that given the special need to
> set fmt->code based on the flip ctrl values, this driver should
> not use v4l2_subdev_get_fmt directly, but instead it should
> provide its own subdev_get_fmt() which wraps v4l2_subdev_get_fmt()
> overriding fmt->code based on the flip settings before returning it ?
>
> Do I have that right ?
I'd like to say "no", but yes, that's right. :-)
--
Sakari Ailus
next prev parent reply other threads:[~2026-03-17 22:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 8:57 Kate Hsuan
2026-03-16 22:00 ` Sakari Ailus
2026-03-17 12:04 ` Hans de Goede
2026-03-17 12:24 ` Hans de Goede
2026-03-17 13:26 ` Kate Hsuan
2026-03-17 17:58 ` Sakari Ailus
2026-03-17 19:56 ` Hans de Goede
2026-03-17 22:35 ` Sakari Ailus [this message]
2026-03-17 13:24 ` Kate Hsuan
2026-03-17 17:53 ` Sakari Ailus
2026-03-17 20:17 ` Hans de Goede
2026-03-18 7:28 ` Kate Hsuan
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=abnXGIi_eYZtJhy-@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=hansg@kernel.org \
--cc=hpa@redhat.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/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®