From patchwork Tue Sep 4 11:30:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 10587183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7264E14E0 for ; Tue, 4 Sep 2018 11:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61E712922A for ; Tue, 4 Sep 2018 11:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 559B729236; Tue, 4 Sep 2018 11:30:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC9912922A for ; Tue, 4 Sep 2018 11:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726319AbeIDPzN (ORCPT ); Tue, 4 Sep 2018 11:55:13 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45216 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbeIDPzN (ORCPT ); Tue, 4 Sep 2018 11:55:13 -0400 Received: by mail-wr1-f66.google.com with SMTP id 20-v6so3534395wrb.12 for ; Tue, 04 Sep 2018 04:30:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=vSCn6fiZzyTTaQUxUDlBKjxYgYBbsl94RTnRD9W7vnA=; b=Gr7RWBHEsGOXoKDZU/IIrQiMHm4oRfajKytvbLu+pYzmJGeVMNgNHSxvxCE3V4VYRB KvmRcbUlabFwR7eS154vkoBKIE/4SymbzvTnIEtk7SRpod/vWytx00H6/VACy9ANLmYJ bftNJhRJ4j96G62pN2eWHL31zHhpxEq0w99EWbmjYTqrGM5LVmikBZAY2WFwEPw8HaLz EXt3AWbcE4N5fixyWl4IpuFSMixs45BjTO0rbx5EOnplhopap+Nn2vDKC1k0BM1PJzHz vQvrQSr4o6zkCpieEAKjc4+Rxdp4zQp+3uSWuAu4q2Wc04UPzzwAmUGc0TsJHL2PgI8C ataw== X-Gm-Message-State: APzg51A/rgO4lGbcPJraJxMBXHhVXsGL1uSjk+u/P2xucCwWwmky32sn ix74s51pP3L6hNsaVUywFBx4ww== X-Google-Smtp-Source: ANB0VdaOeALn37x8g0nlE0xujV4dwwnGB16RHmhafGUr3v28rkb7h6HU8ZIX21Y7xyB2hhURvXZSyw== X-Received: by 2002:a5d:6841:: with SMTP id o1-v6mr22152860wrw.159.1536060629096; Tue, 04 Sep 2018 04:30:29 -0700 (PDT) Received: from minerva.redhat.com ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id s13-v6sm22574155wrq.39.2018.09.04.04.30.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Sep 2018 04:30:28 -0700 (PDT) From: Javier Martinez Canillas To: linux-kernel@vger.kernel.org Cc: Tian Shu Qiu , Sakari Ailus , Javier Martinez Canillas , Mauro Carvalho Chehab , Jian Xu Zheng , Yong Zhi , Hans Verkuil , Bingbu Cao , linux-media@vger.kernel.org Subject: [PATCH 0/2] media: intel-ipu3: allow the media graph to be used even if a subdev fails Date: Tue, 4 Sep 2018 13:30:16 +0200 Message-Id: <20180904113018.14428-1-javierm@redhat.com> X-Mailer: git-send-email 2.17.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. 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(-)