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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 7B6D2C4742C for ; Thu, 5 Nov 2020 14:15:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D2E1C206DB for ; Thu, 5 Nov 2020 14:15:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="G0JHwWE6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2E1C206DB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=epQ0Zb+u336Hxm4eU+SCRrvowADmC8/xwldRyDEQRIg=; b=G0JHwWE6j5ELhtAat3wsi2yQ1 EyKOBQIrHozsBrLzJeXOI7nGa76UjuzcA0+3hTFaE5bv2aX8qjyIO39TWnnL3+kosAtumxhhqI2pi WdG4Ni30iqnhAmjo8PoenN9/HNss8xE/YZDNrG1fcDix+Fc1TCqfZr+PFmjSUd/HMhdGQUtFRNR/8 +NQFzy63QA3MzYnI7MWlWI8fjTF3V/kbKQzcF+bEB6DQZrfNuf5BKbRw+B51GURP2sB4/lfXQ5c0e yraZ+i8gaa0TxTOOPyYsZxpPt5275LijTfFCWAIhCRtjR//+9ihLYEZ1S8r+6TG2XL6FFrAXRbUb8 r69jiJJ6A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kag2W-0001G3-Qu; Thu, 05 Nov 2020 14:15:00 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kag2U-0001Ez-77 for linux-arm-kernel@lists.infradead.org; Thu, 05 Nov 2020 14:14:59 +0000 Received: from [IPv6:2804:14c:483:7e3e::1003] (unknown [IPv6:2804:14c:483:7e3e::1003]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: koike) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2E3581F4644C; Thu, 5 Nov 2020 14:14:51 +0000 (GMT) Subject: Re: [PATCH 08/14] media: sunxi: Add support for the A31 MIPI CSI-2 controller To: Maxime Ripard References: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> <20201023174546.504028-9-paul.kocialkowski@bootlin.com> <1a3a615c-a058-e282-2dbb-c99dfa98be68@collabora.com> <20201102092110.ro6a456lvbrktwoz@gilmour.lan> <20201104111710.GB287014@aptenodytes> <20201104184538.f6qagsmjdoijbzmv@gilmour.lan> From: Helen Koike Message-ID: <3b99b055-ff53-c873-19b2-fd2ccc86956d@collabora.com> Date: Thu, 5 Nov 2020 11:14:47 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: <20201104184538.f6qagsmjdoijbzmv@gilmour.lan> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201105_091458_445733_3C4CBF26 X-CRM114-Status: GOOD ( 24.44 ) 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: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Philipp Zabel , Kishon Vijay Abraham I , Thomas Petazzoni , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Paul Kocialkowski , linux-sunxi@googlegroups.com, Rob Herring , Vinod Koul , Yong Deng , Sakari Ailus , Hans Verkuil , Mauro Carvalho Chehab , Hans Verkuil , kevin.lhopital@hotmail.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/4/20 3:45 PM, Maxime Ripard wrote: > On Wed, Nov 04, 2020 at 01:38:08PM -0300, Helen Koike wrote: >> >> >> On 11/4/20 8:17 AM, Paul Kocialkowski wrote: >>> Hi, >>> >>> On Mon 02 Nov 20, 10:21, Maxime Ripard wrote: >>>> On Fri, Oct 30, 2020 at 07:45:18PM -0300, Helen Koike wrote: >>>>> On 10/23/20 2:45 PM, Paul Kocialkowski wrote: >>>>>> The A31 MIPI CSI-2 controller is a dedicated MIPI CSI-2 controller >>>>>> found on Allwinner SoCs such as the A31 and V3/V3s. >>>>>> >>>>>> It is a standalone block, connected to the CSI controller on one side >>>>>> and to the MIPI D-PHY block on the other. It has a dedicated address >>>>>> space, interrupt line and clock. >>>>>> >>>>>> Currently, the MIPI CSI-2 controller is hard-tied to a specific CSI >>>>>> controller (CSI0) but newer SoCs (such as the V5) may allow switching >>>>>> MIPI CSI-2 controllers between CSI controllers. >>>>>> >>>>>> It is represented as a V4L2 subdev to the CSI controller and takes a >>>>>> MIPI CSI-2 sensor as its own subdev, all using the fwnode graph and >>>>>> media controller API. >>>>> >>>>> Maybe this is a bad idea, but I was thinking: >>>>> This driver basically just turn on/off and catch some interrupts for errors, >>>>> and all the rest of v4l2 config you just forward to the next subdevice >>>>> on the pipeline. >>>>> >>>>> So instead of exposing it as a subdevice, I was wondering if modeling >>>>> this driver also through the phy subsystem wouldn't be cleaner, so >>>>> you won't need all the v4l2 subdevice/topology boilerplate code that >>>>> it seems you are not using (unless you have plans to add controls or >>>>> some specific configuration on this node later). >>>>> >>>>> But this would require changes on the sun6i-csi driver. >>>>> >>>>> What do you think? >>>> >>>> Eventually we'll need to filter the virtual channels / datatypes I >>>> guess, so it's definitely valuable to have it in v4l2 >> >> Which kind of datatypes? > > MIPI-CSI datatypes. Each packet on the MIPI-CSI bus is assigned a > virtual channel and data type so that you can multiplex multiple streams > (like a 3d camera would send for example, through the virtual channels) > and data types (like frames and metadata) and MIPI-CSI controllers > usually allow to filter them based on what you want. > >> I ask to know if this shouldn't be configured through the video node >> instead of subdevice. > > Not really, some setups have a mux that can split the multiple virtual > channels to multiple video nodes for example. > >> Regarding channels, we had a discussion to implement it through the video >> node (and not subdevice) [1]. But we discussed about blitters and multi-scalers, >> so now I'm wondering if we could use the same API for mipi-csi virtual channels >> in the video entity device, or if it doesn't apply and we need another API >> for that in a subdevice instead. >> >> [1] https://patchwork.linuxtv.org/project/linux-media/cover/20200717115435.2632623-1-helen.koike@collabora.com/ > > There's already an API to deal with MIPI-CSI virtual channels: > https://patchwork.kernel.org/project/linux-renesas-soc/cover/20190328200608.9463-1-jacopo+renesas@jmondi.org/ > > Maxime > Thanks for the explanation :) Helen _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel