Re: [PATCH 2/6] media: v4l: subdev: Also return pads array information on stream functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 16, 2023 at 11:24:52AM +0300, Laurent Pinchart wrote:
> Hi Sakari,
> 
> On Fri, Oct 13, 2023 at 11:13:00AM +0000, Sakari Ailus wrote:
> > On Fri, Oct 13, 2023 at 02:07:41PM +0300, Laurent Pinchart wrote:
> > > On Fri, Oct 13, 2023 at 01:44:20PM +0300, Sakari Ailus wrote:
> > > > There are two sets of functions that return information from sub-device
> > > > state, one for stream-unaware users and another for stream-aware users.
> > > > Add support for stream-aware functions to return format, crop and compose
> > > > information from pad-based array that are functionally equivalent to the
> > > > old, stream-unaware ones.
> > > > 
> > > > Also check state is non-NULL, in order to guard against old drivers
> > > > potentially calling this with NULL state for active formats or selection
> > > > rectangles.
> > > 
> > > I'm not too keen on this I'm afraid :-( I think it gets confusing for
> > > drivers that are not stream-aware to have to call a function that takes
> > > a stream number. I don't see a problem with keeping two different sets
> > > of functions, one for stream-aware drivers, and one for other drivers.
> > 
> > This becomes a nuisance in drivers such as CCS that work with sub-devices
> > some of which have streams and others which don't. I don't see why we
> > should have two sets of functions to access the same information, even
> > though it's stored differently.
> > 
> > I can add a wrapper using C11 _Generic to make the stream number go away.
> 
> That could possibly be interesting.

I'll add this for v2.

-- 
Sakari Ailus



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux