From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A361C433E0 for ; Thu, 11 Jun 2020 10:53:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2FED207ED for ; Thu, 11 Jun 2020 10:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727823AbgFKKxK (ORCPT ); Thu, 11 Jun 2020 06:53:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727037AbgFKKxF (ORCPT ); Thu, 11 Jun 2020 06:53:05 -0400 Received: from hillosipuli.retiisi.org.uk (hillosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::81:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAA29C08C5C1; Thu, 11 Jun 2020 03:53:04 -0700 (PDT) Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id 2EE30634C87; Thu, 11 Jun 2020 13:52:58 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1jjKpN-0000NW-Ny; Thu, 11 Jun 2020 13:52:57 +0300 Date: Thu, 11 Jun 2020 13:52:57 +0300 From: Sakari Ailus To: Niklas =?iso-8859-1?Q?S=F6derlund?= Cc: Hans Verkuil , Laurent Pinchart , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 3/5] v4l2-async: Flag when media graph is complete Message-ID: <20200611105256.GF805@valkosipuli.retiisi.org.uk> References: <20200610230541.1603067-1-niklas.soderlund+renesas@ragnatech.se> <20200610230541.1603067-4-niklas.soderlund+renesas@ragnatech.se> <20200611105019.GD805@valkosipuli.retiisi.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200611105019.GD805@valkosipuli.retiisi.org.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 > > --- > > 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