Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1838614imm; Thu, 27 Sep 2018 03:24:30 -0700 (PDT) X-Google-Smtp-Source: ACcGV616N8xF6O/9NeusLoMwvqfAO+8S0RW0hoJ7AqagifuhSXfIgXxl9dGW7KIsclIC3MTz5fKE X-Received: by 2002:a17:902:6a2:: with SMTP id 31-v6mr1445080plh.1.1538043869908; Thu, 27 Sep 2018 03:24:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538043869; cv=none; d=google.com; s=arc-20160816; b=F0Fw+aT/z4PMVvZFkoNKce4OnNYsUKx/RlGsnQwqMvMhQyy8BKhQsqBhZHEGsG5GyQ rBanQuLYAIO2F9dnq/maL4cVllXDaIEpjmedfR5SlHGMr72yMqwAjlzel8PxXMtfDR5v cQrXEHO32Sx+QNwLBlpEKd3Z0h4BttUqEVNCw+K66xPVRqFQ0m9HV4HxhyBOEcR2CyuP yeTFPUGFX9dnGb8lRJZjqmn+ShrxwtRfhFr672ycgJIw19SrQBBsRHC013GJNDvnN/pW mSLDLr3A10nWPzbs6ME0HEs0FEfQlYbPzLMehoZr0tFlGnwG1YXuhBpxg7wCys7oPpDl VY9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=HP0+Cq44njJVT3eh3SsaQs2TqPwlHG8XbRwEbV9d0lU=; b=ozN+6fJJbEWDjMqJbqKkyR6oZQlYSbp5+AZzXK8cK/+xLktlkCEOdNPMz5g4NDc2EI ObiZaa0sGHTgJontEz3KPJjvgCHFj7Af3mI3SNWcpz9bXZ4ktyimntDEumb9RQt4g7N8 KZ1+WXMRf7ghNRs5S7dqZEGD6oi29VG5cgdo+IIELfmfiUI95SEb6vk9JfFEcNq+66S4 cFPXDolAX/OMcIh3aroakddOawrc+QjY/+EsrolzuwM18s3kI2iz8/jxyHpedlON3eCh xvT9HmUX/sFRmKFJapHmuG/Pq39WDaumvA9qeQUQa+yuXoRoIL6eH8I9k7iwOgHmOTo6 YIJQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9-v6si1649897pld.28.2018.09.27.03.24.13; Thu, 27 Sep 2018 03:24:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727201AbeI0QkO (ORCPT + 99 others); Thu, 27 Sep 2018 12:40:14 -0400 Received: from lb1-smtp-cloud8.xs4all.net ([194.109.24.21]:58285 "EHLO lb1-smtp-cloud8.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727015AbeI0QkO (ORCPT ); Thu, 27 Sep 2018 12:40:14 -0400 Received: from [192.168.1.10] ([80.101.105.217]) by smtp-cloud8.xs4all.net with ESMTPA id 5TRNgvTr6gyCD5TROgUw6o; Thu, 27 Sep 2018 12:22:38 +0200 Subject: Re: [PATCH 0/2] media: intel-ipu3: allow the media graph to be used even if a subdev fails To: Mauro Carvalho Chehab Cc: Javier Martinez Canillas , linux-kernel@vger.kernel.org, Tian Shu Qiu , Sakari Ailus , Mauro Carvalho Chehab , Jian Xu Zheng , Yong Zhi , Bingbu Cao , linux-media@vger.kernel.org References: <20180904113018.14428-1-javierm@redhat.com> <0e31ae40-276e-22be-c6aa-b62f8dbea79e@xs4all.nl> <20180927071330.1fa3cfdd@coco.lan> From: Hans Verkuil Message-ID: <865b545d-3c3a-a2d3-4c1b-2a5b41a7ff37@xs4all.nl> Date: Thu, 27 Sep 2018 12:22:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180927071330.1fa3cfdd@coco.lan> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfG0IaJs7LNwzHx9hQWTvlWXAowmwx3nvr4ap0+9nFZUiFMTxJBHTHmpVeU/nqqBJtVO4sC5qq7tNAyRYyFNsXRMFBVGkJOdEJWWWrrnqW4rT8ZuVvZ+4 BwLhTCXOsdm9NDgxMs+cO6chDfgCgf1PY/ACQ0/jws3fLfq8MXKfWCXwLOszfn/aCs4gaohPHlqxCicTPAgj5WXQvHgDy6OI+31u7+9YKsmY1woxDlXDgAfX By7Q7W1eIW86+lVKCNcwBOIx4h77tCTxOvKNZTqI5krW4R1lzp28NqKUXxHtiiHy4jnO1heh8bW08+9Sd9cXOWRrm0amXJhA6JV0+5YTQufhqk2D6mSyoTrd KNlMMoP+VwsxRhzOpsoZGbnUZsJqqXySx6yTJ66TxO4VQUV6llc2oHTieQPuEBtBAWxOxN2ltCFn+pGiKv5rtYSSxHOTSBZo28KtY4q+pwyaxOzIj5x2z8Ny XmjuoytgQ5XLmI7xzRtC1W/CpP+h6WKFJkY0qQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/27/2018 12:13 PM, Mauro Carvalho Chehab wrote: > Em Thu, 27 Sep 2018 11:52:35 +0200 > Hans Verkuil escreveu: > >> Hi Javier, >> >> On 09/04/2018 01:30 PM, Javier Martinez Canillas wrote: >>> Hello, >>> >>> This series allows the ipu3-cio2 driver to properly expose a subset of the >>> media graph even if some drivers for the pending subdevices fail to probe. >>> >>> Currently the driver exposes a non-functional graph since the pad links are >>> created and the subdev dev nodes are registered in the v4l2 async .complete >>> callback. Instead, these operations should be done in the .bound callback. >>> >>> Patch #1 just adds a v4l2_device_register_subdev_node() function to allow >>> registering a single device node for a subdev of a v4l2 device. >>> >>> Patch #2 moves the logic of the ipu3-cio2 .complete callback to the .bound >>> callback. The .complete callback is just removed since is empy after that. >> >> Sorry, I missed this series until you pointed to it on irc just now :-) >> >> I have discussed this topic before with Sakari and Laurent. My main problem >> with this is how an application can discover that not everything is online? >> And which parts are offline? > > Via the media controller? It should be possible for an application to see > if a videonode is missing using it. > >> Perhaps a car with 10 cameras can function with 9, but not with 8. How would >> userspace know? > > I guess this is not the only case where someone submitted a patch for > a driver that would keep working if some device node registration fails. > > It could be just déjà vu, but I have a vague sensation that I merged something > similar to it in the past on another driver, but I can't remember any details. > >> >> I completely agree that we need to support these advanced scenarios (including >> what happens when a camera suddenly fails), but it is the userspace aspects >> for which I would like to see an RFC first before you can do these things. > > Dynamic runtime fails should likely rise some signal. Perhaps a sort of > media controller event? See this old discussion: https://patchwork.kernel.org/patch/9849317/ My point is that someone needs to think about this and make a proposal. There may well be a simple approach, but it needs to be specced first. Regards, Hans > >> >> Regards, >> >> Hans >> >>> >>> Best regards, >>> Javier >>> >>> >>> Javier Martinez Canillas (2): >>> [media] v4l: allow to register dev nodes for individual v4l2 subdevs >>> media: intel-ipu3: create pad links and register subdev nodes at bound >>> time >>> >>> drivers/media/pci/intel/ipu3/ipu3-cio2.c | 66 ++++++----------- >>> drivers/media/v4l2-core/v4l2-device.c | 90 ++++++++++++++---------- >>> include/media/v4l2-device.h | 10 +++ >>> 3 files changed, 85 insertions(+), 81 deletions(-) >>> >> > > > > Thanks, > Mauro >