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

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

 



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?

-- 
Sakari Ailus



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux