Re: [PATCH v4 27/29] media: v4l2-subdev: Add v4l2_subdev_call_ci_active_state

Sakari Ailus
2026-04-21T16:34:36Z

Hi Laurent,

On Tue, Apr 21, 2026 at 07:12:20PM +0300, Laurent Pinchart wrote:
> On Tue, Apr 21, 2026 at 07:04:26PM +0300, Sakari Ailus wrote:
> > On Thu, Apr 16, 2026 at 08:38:21PM +0300, Laurent Pinchart wrote:
> > > On Wed, Apr 08, 2026 at 06:39:36PM +0300, Sakari Ailus wrote:
> > > > Add v4l2_subdev_call_ci_active_state(), to call sub-device pad ops that
> > > > take struct v4l2_subdev_client_info pointer as an argument.
> > >
> > > If we drop the client info parameter from .get_fmt(), the only driver
> > > calling this new macro will be
> > > drivers/media/platform/ti/cal/cal-video.c. I would just pass NULL
> > > explicitly there and drop this patch.
> >
> > That'd make the arguments for set_fmt and get_fmt different. I'm not sure
> > if that'd be a problem in practice, perhaps not.
>
> All drivers should eventually implement .get_fmt() using the
> v4l2_subdev_get_fmt() helper. There should be no need for client info
> there.
>
> > I could imagine in the end we'll need to include the client flags in more
> > callbacks than set_fmt(). It might not be a bad idea to add them to all pad
> > ops. Of course we could revisit this later when needed.
>
> We should really minimize addition of new client caps flags, and really,
> really try to implement them all in the subdev core.

Yes -- if we can. In this case the common raw sensor model affects how the
driver's UAPI works so there's no really an option. I could imagine there
are other such capability flags as well. But let's see.

--
Kind regards,

Sakari Ailus