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=-9.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 F164CC433EF for ; Mon, 13 Sep 2021 08:20:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B619260EE9 for ; Mon, 13 Sep 2021 08:20:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B619260EE9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q1WrpzvJDXxtmkmGymjvO64dqwvcqdWxgDFSckha+TA=; b=losdoriuYVmUr8eu1q6OY9ftyL 2nFiMfzPggRY/obhDayv17SenlZumU0sb910u/4T+iDx0c8zFhz2F8j8BorrrQdojauY/OgzXTQZU awaryMimkmbSuZxcjUgYkOOtHFIB+sVYeOozWKURWPvr6qiSvmuC2lJpFUPLHKKDj98GMaqvZ5MV/ Xq3QBWfrb+4jJdWg5mtD/x2LUKqJIcyDOiIxBEkNtUb4fjkAlHj05u74FvLdD4LaMvrJR0xtKFhUT T7HNrCMh/mRne3z5YUhOiK2NdnUWs5yrfkGFKpGkXP3FPv/V9aHrgRM/GjlQPmsSvo6WSMDEbkhCG uxNtCQ/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPh9U-000gdC-96; Mon, 13 Sep 2021 08:17:21 +0000 Received: from new4-smtp.messagingengine.com ([66.111.4.230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mPh9M-000gZP-Ui; Mon, 13 Sep 2021 08:17:15 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.nyi.internal (Postfix) with ESMTP id 9631F580B75; Mon, 13 Sep 2021 04:17:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 13 Sep 2021 04:17:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=LfsxPMaIAkjFAolr1YO0jdkBTkA SxQKSZB3Inh4PV88=; b=Iw769SMlc9Hc8sWUZevD469xuhrgj74nKPZttihMbEE DWemQ6Sl61z/n/MkQc0cyP5Vug1e+vdTkMtqM5L+M7wrgFLG34LHldBknuiRsvUo edjf++/223EowstTkqYw4YcVxNog99wYqkJ8iY721wWpyRyrB78BFaulrYvSrAv4 zaKaGlRcDUSRx4MABs88OB2n+lDoG+DY/93QA69KG05W033W9hBK15IjSeU362pl TWd+XdGDlBQuwqCAJU90SWJFtdcpnTzL5eDPkaDaKPHP9t95hsZsj52XJS7JPTkl rJ90FRv0sCFRrVJe1cddLFHtx2rFX4CJcExcPqt5IWA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=LfsxPM aIAkjFAolr1YO0jdkBTkASxQKSZB3Inh4PV88=; b=rmALdPeLVpMm48citIobyL GhLS5q1khENgaWJRSOCdlbf7H3sys/oIe+h7iQkgfC8nmzeXrXG+F+mtPelrYJ5C 4xJyuVya+jeHrn/qNk8N9Zs8vs7Frd7DOLoLVODtPy78dLPxk5FxsTASxYXXBOBr WJhRG8eVoJSBtp+DIAoRasfgjVC4bP8cFmdq4M61zE3TyygNhAdBhFHzzerZV2hf rI9KoIb0AAyRJMGRBPZNf48kuV/4yScosDHQUpB5ZDjBo16Uj4RmyAipBFtC3GZN gjYagHNlU2BrRg4XcPobh2yy1YX6RQWDU9GFWbnMkWZAt+VTxTnX4LVXAxviuIqg == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegjedgtdduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepleekgeehhfdutdeljefgleejffehfffgieejhffgueefhfdtveetgeehieeh gedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 13 Sep 2021 04:17:09 -0400 (EDT) Date: Mon, 13 Sep 2021 10:17:07 +0200 From: Maxime Ripard To: Paul Kocialkowski Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Rob Herring , Sakari Ailus , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Laurent Pinchart , Thomas Petazzoni Subject: Re: [PATCH 15/22] media: sunxi: Remove the sun6i-csi driver implementation Message-ID: <20210913081707.3pjcfuwan46pbdep@gilmour> References: <20210910184147.336618-1-paul.kocialkowski@bootlin.com> <20210910184147.336618-16-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 In-Reply-To: <20210910184147.336618-16-paul.kocialkowski@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210913_011713_347505_EDC9554E X-CRM114-Status: GOOD ( 30.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1082132907508942534==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1082132907508942534== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qx7qqsz6t7rnfx4y" Content-Disposition: inline --qx7qqsz6t7rnfx4y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 10, 2021 at 08:41:40PM +0200, Paul Kocialkowski wrote: > As described in the commit adding support for the new sun6i-csi driver, > a complete rewrite was necessary to support the Allwinner A31 ISP as > well as fix a number of issues with the current implementation. >=20 > Farewell and thanks for all the pixels! >=20 > Signed-off-by: Paul Kocialkowski For completeness, this is what the other commit log mentions: > While adapting the sun6i-csi driver for MIPI CSI-2 support was > possible, it became clear that adding support for the ISP required > very heavy changes to the driver which were quite hard to break down > into a series of subsequent changes. > The first major difficulty comes from the lack of v4l2 subdev that > acts a bridge, separate from the video node representing the DMA > engine. To support the ISP, only parts of the hardware must be > configured (excluding aspects related to the DMA output), which made > the separation a hard requirement. > Another significant difficulty was the specific dance that is required > to have both the ISP and CSI device be part of the same media device. > Because the ISP and CSI are two different hardware blocks, they have > two distinct drivers that will each try to register their own v4l2 > and media devices, resulting in two distinct pipelines. When the ISP > is in use, we actually want the CSI driver to register with the ISP's > v4l2 and media devices while keeping the ability to register its own > when the ISP is not in use. This is done by: > 1. Having the CSI driver check whether the ISP is available, using > sun6i_csi_isp_detect(); > 2. If not, it can register when its own async subdevs are ready, using > sun6i_csi_v4l2_complete(); > 3. If so, it will register its bridge as an async subdev which will > be picked-up by the ISP driver (from the fwnode graph link); > 4. When the subdev becomes bound to the ISP's v4l2 device, we can > then access that device (and the associated media device) to > complete registration of the capture video node, using > sun6i_csi_isp_complete(); > Besides the logic rework, other issues were identified and resolved: > - The sync mechanism for buffer flipping was based on the frame done > interrupt, which is too late (next frame is already being processed). > This lead to requiring 3 buffers to start and writing two addresses > when starting. Using vsync as a sync point seems to be the correct > approach and allows using only two buffers without tearing; > - Using devm_regmap_init_mmio_clk was incorrect since the reset also > comes into play; > - Some register definitions were inverted compared to their actual > effect (which was inherited from the Allwinner documentation and > code): comments were added where relevant; > - The deprecated v4l2_async_notifier_parse_fwnode_endpoints() helper > is no longer used by the driver; With that being said, NAK. Having heavy changes to a driver is completely fine, and is kind of expected really with such a big change. Breaking all possibility of bisection and throwing away years of stabilization and maintenance isn't. And all those small bug fixes you mention at the end are just that: small bug fixes that can be done on the current driver just fine too. Maxime --qx7qqsz6t7rnfx4y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYT8JAwAKCRDj7w1vZxhR xW80AQCzT1oqLXHmMJV4J378rDLxly3+QLuNLMF+HS7LpVSZ5AEAxuTn0WIx3q7k rXKUJwy3GnQot8aoogsuY7kqOfSWQQk= =Gphx -----END PGP SIGNATURE----- --qx7qqsz6t7rnfx4y-- --===============1082132907508942534== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============1082132907508942534==--