From patchwork Wed Aug 14 13:48:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues FRUCHET X-Patchwork-Id: 11094031 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 A87EA912 for ; Wed, 14 Aug 2019 13:49:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 953CE2851B for ; Wed, 14 Aug 2019 13:49:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9311C2880D; Wed, 14 Aug 2019 13:49:26 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 266622851B for ; Wed, 14 Aug 2019 13:49:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8YvDPU2r85w+gLyS95aX1FiZhBEG/dd7SHjrilnKeck=; b=p2z0ACBFHyvDXi wM9/XIYqm5lcdK7vP9UtXwlp4EDUgp81yRzqWI/8b1hBcohUfI3Uyv+9UPKBOIvkIx7uXbZEzpGyz 1lD3/KLZu3bhc0cTo9g6HdwvD0/cfw6hTf2a0E+9iyGKHEVZlOhffxcpwDyWBwHmLRXbfmrhlGRcz 3iveSkAIOEbir00gwpnuKrR3fd0DrRopdhDfaLd8rTNdd95yKvvvTWZ2KybbaQxR58X53s5w6ZhKm zHbZZXNGI9Uqwm2bZJr3kPdffC8lc5+7i2Lz4SbNkrskFgXwoQEpNa8AD+aDgheYr/81WcoQLvd+w fPyMTyuS93aJEfqDNR1g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hxteX-0003ws-1U; Wed, 14 Aug 2019 13:49:25 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hxteF-0003lB-NZ for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2019 13:49:09 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x7EDkpET005599; Wed, 14 Aug 2019 15:48:58 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=STMicroelectronics; bh=02fgRcS3o94dkivorsS1cbke+inlHjELAELbDohhyj8=; b=tObPM2iI7760MF5HfbWryB8sIj0wOoiBwiT9labl+sxd3wkT99PKLhApFxGYrohWHeE3 Hgkn+NSAHxucxOmIajmY8660hm+TR+dr41ZCvEZ0Gw3U2jiLxQFXiEuymLBsiVdHvGgs Y8XCudgUQnHwOvHRIrAanuCDCBe3wMPoVnUxVsxpJNDv9ksKc/BfLl5sPvb1OC+pr05d koNw0VT9QhCLYGgqSs0P3On/inBOX7/djb/X48FjLdRfCQM8Uhx9oGoMPcn1pGT6++oz LRIEGQPdAX/sd9AyKYQqaI8YA1DuFXbjTo9DuZnHXdtHWexZqv2IBsc2k5odIVY7ZL+/ vg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2u9k2a64rj-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 14 Aug 2019 15:48:58 +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 4E79831; Wed, 14 Aug 2019 13:48:57 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 3E06F2FFE88; Wed, 14 Aug 2019 15:48:57 +0200 (CEST) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 15:48:57 +0200 Received: from localhost (10.201.23.19) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 14 Aug 2019 15:48:56 +0200 From: Hugues Fruchet To: Alexandre Torgue , Mauro Carvalho Chehab , Hans Verkuil , Sakari Ailus Subject: [PATCH v6 0/4] DCMI bridge support Date: Wed, 14 Aug 2019 15:48:49 +0200 Message-ID: <1565790533-10043-1-git-send-email-hugues.fruchet@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.201.23.19] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-08-14_05:, , signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_064908_116518_0397E4A0 X-CRM114-Status: GOOD ( 11.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mickael GUENE , linux-kernel@vger.kernel.org, Philippe CORNU , Yannick Fertre , Benjamin Gaignard , Hugues Fruchet , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch serie allows to connect non-parallel camera sensor to DCMI thanks to a bridge connected in between such as STMIPID02 [1]. Media controller support is introduced first, then support of several sub-devices within pipeline with dynamic linking between them. In order to keep backward compatibility with applications relying on V4L2 interface only, format set on video node is propagated to all sub-devices connected to camera interface. [1] https://www.spinics.net/lists/devicetree/msg278002.html =========== = history = =========== version 6: - As per Sakari remark: add a FIXME explaining that this version only supports subdevices which expose RGB & YUV "parallel form" mbus code (_2X8) - Add some trace around subdev_call(s_fmt) error & format changes to debug subdev which only expose serial mbus code - Conform to "": when tracing subdev infos version 5: - Remove remaining Change-Id - Add Acked-by: Sakari Ailus version 4: - Also drop subdev nodes registry as suggested by Hans: https://www.spinics.net/lists/arm-kernel/msg743375.html version 3: - Drop media device registry to not expose media controller interface to userspace as per Laurent' suggestion: https://www.spinics.net/lists/linux-media/msg153417.html - Prefer "source" instead of "sensor" and keep it in dcmi_graph_entity struct, move asd as first member of struct as per Sakari' suggestion: https://www.spinics.net/lists/linux-media/msg153119.html - Drop dcmi_graph_deinit() as per Sakari' suggestion: https://www.spinics.net/lists/linux-media/msg153417.html version 2: - Fix bus_info not consistent between media and V4L: https://www.spinics.net/lists/arm-kernel/msg717676.html - Propagation of format set on video node to the sub-devices chain connected on camera interface version 1: - Initial submission Hugues Fruchet (4): media: stm32-dcmi: improve sensor subdev naming media: stm32-dcmi: trace the supported fourcc/mbus_code media: stm32-dcmi: add media controller support media: stm32-dcmi: add support of several sub-devices drivers/media/platform/Kconfig | 2 +- drivers/media/platform/stm32/stm32-dcmi.c | 317 +++++++++++++++++++++++++----- 2 files changed, 267 insertions(+), 52 deletions(-)