Re: [PATCH 3/5] v4l2-async: Flag when media graph is complete

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

 



On Thu, Jun 11, 2020 at 01:50:19PM +0300, Sakari Ailus wrote:
> Hi Niklas,
> 
> On Thu, Jun 11, 2020 at 01:05:39AM +0200, Niklas Söderlund wrote:
> > When the notifier completes set the complete flag in the struct
> > media_device. This flag can can then be reported to user-space to let it
> > know the graph is complete.
> > 
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> > ---
> >  drivers/media/v4l2-core/v4l2-async.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> > 
> > diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c
> > index 8bde33c21ce45f98..331594ca5b3bb723 100644
> > --- a/drivers/media/v4l2-core/v4l2-async.c
> > +++ b/drivers/media/v4l2-core/v4l2-async.c
> > @@ -217,6 +217,11 @@ v4l2_async_notifier_try_complete(struct v4l2_async_notifier *notifier)
> >  	if (!v4l2_async_notifier_can_complete(notifier))
> >  		return 0;
> >  
> > +#if defined(CONFIG_MEDIA_CONTROLLER)
> > +	if (notifier->v4l2_dev->mdev)
> > +		notifier->v4l2_dev->mdev->complete = true;
> > +#endif
> > +
> >  	return v4l2_async_notifier_call_complete(notifier);
> >  }
> >  
> 
> Do we need this? Could you not use the complete callback from the main
> notifier, that gets called only when all async subdevs have been bound?

Ah. Please ignore the comment. Something like this is needed for the flag.

-- 
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