From patchwork Fri Jul 21 12:03:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 123838 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp183628vqg; Fri, 21 Jul 2023 05:57:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlEOt/xwmq+76+/ZEUG6wBUIIAut4+Hl4giFMfOmetKMYsCIAhMyY+AdXb4Ez8AYsLfP7eR5 X-Received: by 2002:a17:907:1b1d:b0:96f:9cea:a34d with SMTP id mp29-20020a1709071b1d00b0096f9ceaa34dmr8329469ejc.21.1689944269786; Fri, 21 Jul 2023 05:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689944269; cv=none; d=google.com; s=arc-20160816; b=AET3ildvD3teCaRgrdja+qMQNBN/Tho1S65yneth7ZiSnklEPRP9s0oqnsTUpzlhj4 IEsrqPiQROlLwKUmtGWylx0g7AleMSmV+n7tSSOA5arrhPE/n7FPqh57f+Vy9swGAPkX fkca4ollt7gxzsz+ie3xvDbalf8k7ibcvj/kk2WrRPi+rOUUMAP3FsMMFG3PgV9QC+XV A+jCfj2W3DtpNQf4Vx7o1M0Cn6bSDAlYq430CveC+FPTF4FECPjnsk6UAREZ07H6D/nh fOPWoxYfvlTc6X6NuVE/N2MGd5o8jm7QYIiJTCf1AcTJTxEw0q6yryQYOHEtck2FHuTJ 03iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yMYPnlq3CX+IDIIWlWaS3qUmcJLHPYtyYe6d6EzMC/U=; fh=PKoI0iI58tpzq6v8zXy8p3AhZsiNFodbqL5+P6RXzwM=; b=vZByeFLn3JyXkKJm7jCh0OJ1yo7JU8asYlB3I+DNgxIwRwFg/Pd2g0VW866GufgbfD CRLSM4w5dhD8WWALS/BGwU+MwTgfMpw5xat2hw0ruXNpVff9V/4t76FhPcZ53LoCmJuO IwHIv/eC57jsXPBGvP8oYHlicCzRmMqu35xobQYHeZY9Vj2nZYVKWc2TvLdRyu5chj25 SxrOkmqs9+PBseqyBb2VGbalznJK8alA41G5/eTJ6c5l6fJSaqfNoxlU48u8RLIfWmBs nupa6nuTb43I2mI5pI5YO9i9JT8SpQRus0v3G6YJyYzzB8d7H8+H3P8YK73pFoJWZv+G Xjzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=16U4ld99; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o21-20020a170906861500b009935121ecd5si2250741ejx.646.2023.07.21.05.56.59; Fri, 21 Jul 2023 05:57:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=16U4ld99; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231309AbjGUMEv (ORCPT + 99 others); Fri, 21 Jul 2023 08:04:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbjGUMEk (ORCPT ); Fri, 21 Jul 2023 08:04:40 -0400 Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 651C13A94; Fri, 21 Jul 2023 05:04:17 -0700 (PDT) Received: from pps.filterd (m0241204.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36L9YEJh006034; Fri, 21 Jul 2023 14:04:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=yMYPnlq3CX+IDIIWlWaS3qUmcJLHPYtyYe6d6EzMC/U=; b=16U4ld99ILMHnT9772VvZEQEP4HamPG2eZE+s7Z1bGxFvlpzQ+kC1hrdcQRq5eiUoK9X 6UdhZVl69O+3I0qtVaWXAW/3HcFDwfvluGlkYVLqkRw1gyh+qPb2tKLTaAp0N2UN7a/C K1H8qk7sfuz3FsEuF9QLl0Cyl6fSVlHVaaKyYOx8e4BrK8e2QAEhivhh9Ti1NZibc5bs gBO3dXFRwSCJO7FDctE7HjCbEPRBZYoFz9/Ac2N3fHe19MLHRXS8vaPoOUqXtzG0hnzv 4t0Bs+5P06cyn80VSfy3R4rUuCRf9845X8nu530HPOD4DGtz6M5bBCX9mRVAq6FJ5/oy fA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ryqgms5gx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 14:04:11 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C70D610003D; Fri, 21 Jul 2023 14:04:10 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id C0EF2229A68; Fri, 21 Jul 2023 14:04:10 +0200 (CEST) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 21 Jul 2023 14:04:10 +0200 From: Alain Volmat To: Benjamin Mugnier , Sylvain Petinot , Mauro Carvalho Chehab CC: Alain Volmat , , Subject: [PATCH v2 1/2] media: i2c: st_mipid02: cascade s_stream call to the source subdev Date: Fri, 21 Jul 2023 14:03:14 +0200 Message-ID: <20230721120316.1172445-2-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721120316.1172445-1-alain.volmat@foss.st.com> References: <20230721120316.1172445-1-alain.volmat@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-21_07,2023-07-20_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772035002404453037 X-GMAIL-MSGID: 1772035002404453037 Cascade the s_stream call to the source subdev whenever the bridge streaming is enable / disabled. Signed-off-by: Alain Volmat Reviewed-By: Benjamin Mugnier --- v2: correct uninitialized ret variable in mipid02_stream_disable drivers/media/i2c/st-mipid02.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/st-mipid02.c b/drivers/media/i2c/st-mipid02.c index 906553a28676..ee456bd4cf76 100644 --- a/drivers/media/i2c/st-mipid02.c +++ b/drivers/media/i2c/st-mipid02.c @@ -545,7 +545,14 @@ static int mipid02_configure_from_code(struct mipid02_dev *bridge) static int mipid02_stream_disable(struct mipid02_dev *bridge) { struct i2c_client *client = bridge->i2c_client; - int ret; + int ret = -EINVAL; + + if (!bridge->s_subdev) + goto error; + + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 0); + if (ret) + goto error; /* Disable all lanes */ ret = mipid02_write_reg(bridge, MIPID02_CLK_LANE_REG1, 0); @@ -633,6 +640,10 @@ static int mipid02_stream_enable(struct mipid02_dev *bridge) if (ret) goto error; + ret = v4l2_subdev_call(bridge->s_subdev, video, s_stream, 1); + if (ret) + goto error; + return 0; error: From patchwork Fri Jul 21 12:03:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alain Volmat X-Patchwork-Id: 123827 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp155623vqg; Fri, 21 Jul 2023 05:07:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlGeygDnwnQ7J/LIClN3m98aqHvC004b8TMhH7wiEpLPFeMV3ybDaPvqSCgboRona8J+1ANK X-Received: by 2002:a17:906:8468:b0:992:be80:ab01 with SMTP id hx8-20020a170906846800b00992be80ab01mr1678180ejc.58.1689941245521; Fri, 21 Jul 2023 05:07:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689941245; cv=none; d=google.com; s=arc-20160816; b=nr8V1HAQVGct6qS8s6lZeYHThzBIRQDVE35NEyfyCc+idFRxZQ4cODeVXSSCemZvlU sFaxji02DBSdcUW5YlDP3prLefXYI/oIBD/0ZRNXERIK/j3rykC58RQQp1FqPySIE4M7 9VAJho7f1RnAmXS7Ou5N0rVrwNZumRyXl8zybWJ7Se9dNZ3LJTcCFFV4qcEvLCMgrHPx 7afby5PJ1pq4nLpDvuJrBboDuE8JoqnC8lZtzUVXQeZDRrEH+gqb1BwrZgPaDmiqTKs9 inoF6TthZRPWxBV8AesrurFiF+pdHg0CFV8kLacyV0PDG/UM7WtlXi7WxSbJqTgT631J Ur8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QJv4FgeoZI13kyNGmPPMTf96OOf5S9wcDXXdOT9sXaA=; fh=XmE4zrmBBC8RQ12CATIba9N0qRjRsqMEByNmtkLSYB8=; b=eB+g9j1HtgkzqHwZ4UDne58KSQtiQ+AyLqpVkHEqGwGVkGwYAGpQJVdbWcnlRS/t2z 5zwEnDJeLLDvK/i7A0nFjfBQH62gnZhudeaA+lZ7SsCOxsxrHlCfqXjFwYeU7fg3EeYA QJ+Ru8cd7X8LZizQ3k7pFrWdUcKfdQwVMWbflRcM8L63usUhGQHcji/sJRBBMhzV2ARQ hDhom+KoroQShZ4PXO7YueOX/Lys2aLsL4Y0SYXFS9asBjnoiefxyh30/iqXcjyYV5sn MhSngFVAqmvxIk7oEvPRx6dIKOnDlKsxzmNcF/7elKDrFwMrjDWG8JUWdARKjCAQ/hs7 YvyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=SPlergAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rp16-20020a170906d97000b0098e15543465si1881462ejb.280.2023.07.21.05.06.50; Fri, 21 Jul 2023 05:07:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=SPlergAN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230459AbjGUMFG (ORCPT + 99 others); Fri, 21 Jul 2023 08:05:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231296AbjGUMEt (ORCPT ); Fri, 21 Jul 2023 08:04:49 -0400 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E81A3AAF; Fri, 21 Jul 2023 05:04:29 -0700 (PDT) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36LA44aI007067; Fri, 21 Jul 2023 14:04:13 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=QJv4FgeoZI13kyNGmPPMTf96OOf5S9wcDXXdOT9sXaA=; b=SPlergAN5qCyFlQD1Rgi4TrAYSiH16tnHAUvFadudLoVT95J31goXCai1qdZI0N9ds4l gjW4OFoD3DEaizGAdlRPr5gVUp4R88TC6jPN8uR6TgHjpGV/+LawgGcvvkJv/2kE2c7Z fashXyVjnlXFOVxrcqqKm4dtFVaMRD8lahyyK8f0D01rmPM3larc/aVcD+E8JcNqQGOP ZYd0mA9j5yhBLjrZ+I0OXt0N5tcQ/WUEpxc/cG2k3v7+rG1Me0LgQjXEPxuejDy3aDQy OYzVS1fEz9aZARet9pmlvPaAdBfSpe3ME1msu8eOjmhKXZFBChCjAdoprwmmeLu+fGsq hg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3ryqxjgvtp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 14:04:12 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0672B10002A; Fri, 21 Jul 2023 14:04:12 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id F3103229A68; Fri, 21 Jul 2023 14:04:11 +0200 (CEST) Received: from localhost (10.129.178.213) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Fri, 21 Jul 2023 14:04:11 +0200 From: Alain Volmat To: Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue CC: Alain Volmat , , , , Subject: [PATCH v2 2/2] media: stm32: dcmi: only call s_stream on the source subdev Date: Fri, 21 Jul 2023 14:03:15 +0200 Message-ID: <20230721120316.1172445-3-alain.volmat@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721120316.1172445-1-alain.volmat@foss.st.com> References: <20230721120316.1172445-1-alain.volmat@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.129.178.213] X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-21_07,2023-07-20_01,2023-05-22_02 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772031831638017312 X-GMAIL-MSGID: 1772031831638017312 Avoid calling s_stream on each subdev until reaching the sensor and instead call s_stream on the source subdev only (which will in turn do whatever needed to start the stream). Signed-off-by: Alain Volmat Reviewed-by: Hugues FRUCHET --- drivers/media/platform/st/stm32/stm32-dcmi.c | 63 +++++--------------- 1 file changed, 14 insertions(+), 49 deletions(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index dad6e22e4ce4..ac8a5031dce6 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -134,6 +134,7 @@ struct stm32_dcmi { struct video_device *vdev; struct v4l2_async_notifier notifier; struct v4l2_subdev *source; + struct v4l2_subdev *s_subdev; struct v4l2_format fmt; struct v4l2_rect crop; bool do_crop; @@ -692,51 +693,6 @@ static int dcmi_pipeline_s_fmt(struct stm32_dcmi *dcmi, return 0; } -static int dcmi_pipeline_s_stream(struct stm32_dcmi *dcmi, int state) -{ - struct media_entity *entity = &dcmi->vdev->entity; - struct v4l2_subdev *subdev; - struct media_pad *pad; - int ret; - - /* Start/stop all entities within pipeline */ - while (1) { - pad = &entity->pads[0]; - if (!(pad->flags & MEDIA_PAD_FL_SINK)) - break; - - pad = media_pad_remote_pad_first(pad); - if (!pad || !is_media_entity_v4l2_subdev(pad->entity)) - break; - - entity = pad->entity; - subdev = media_entity_to_v4l2_subdev(entity); - - ret = v4l2_subdev_call(subdev, video, s_stream, state); - if (ret < 0 && ret != -ENOIOCTLCMD) { - dev_err(dcmi->dev, "%s: \"%s\" failed to %s streaming (%d)\n", - __func__, subdev->name, - state ? "start" : "stop", ret); - return ret; - } - - dev_dbg(dcmi->dev, "\"%s\" is %s\n", - subdev->name, state ? "started" : "stopped"); - } - - return 0; -} - -static int dcmi_pipeline_start(struct stm32_dcmi *dcmi) -{ - return dcmi_pipeline_s_stream(dcmi, 1); -} - -static void dcmi_pipeline_stop(struct stm32_dcmi *dcmi) -{ - dcmi_pipeline_s_stream(dcmi, 0); -} - static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count) { struct stm32_dcmi *dcmi = vb2_get_drv_priv(vq); @@ -758,9 +714,12 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count) goto err_pm_put; } - ret = dcmi_pipeline_start(dcmi); - if (ret) + ret = v4l2_subdev_call(dcmi->s_subdev, video, s_stream, 1); + if (ret < 0) { + dev_err(dcmi->dev, "%s: Failed to start source subdev, error (%d)\n", + __func__, ret); goto err_media_pipeline_stop; + } spin_lock_irq(&dcmi->irqlock); @@ -862,7 +821,7 @@ static int dcmi_start_streaming(struct vb2_queue *vq, unsigned int count) return 0; err_pipeline_stop: - dcmi_pipeline_stop(dcmi); + v4l2_subdev_call(dcmi->s_subdev, video, s_stream, 0); err_media_pipeline_stop: video_device_pipeline_stop(dcmi->vdev); @@ -889,8 +848,12 @@ static void dcmi_stop_streaming(struct vb2_queue *vq) { struct stm32_dcmi *dcmi = vb2_get_drv_priv(vq); struct dcmi_buf *buf, *node; + int ret; - dcmi_pipeline_stop(dcmi); + ret = v4l2_subdev_call(dcmi->s_subdev, video, s_stream, 0); + if (ret < 0) + dev_err(dcmi->dev, "%s: Failed to stop source subdev, error (%d)\n", + __func__, ret); video_device_pipeline_stop(dcmi->vdev); @@ -1876,6 +1839,8 @@ static int dcmi_graph_notify_bound(struct v4l2_async_notifier *notifier, dev_dbg(dcmi->dev, "DCMI is now linked to \"%s\"\n", subdev->name); + dcmi->s_subdev = subdev; + return ret; }