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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E63A8C433F5 for ; Fri, 11 Feb 2022 16:46:34 +0000 (UTC) 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=6iLHlNsfu+LlJqZVFq8SfoTXH4ZPM/jJSU1koHDVjcQ=; b=XxKJnmT4yGtANiYZy5DbB86Rc0 SFjpniq0yPsDZnjtmIdvagWTx0/rUZtc9isuXVvPYJlL+XUng07QiEpCPfPZyWL1j8NYSZ4AQE6MP z7FJIrHYXid0bw4I+bHEBe4pd/Eyo0zqAWEGDTaMQT8oJA40t63khoESoClogUoeBgoheggzTdK+1 am38F/zNNu279DxZythZHXNAjgJhdtQ+ef5IvPGtO2IaboHIZEnIVgQRw/l46kIzNlz1PdRUV7qBY jTFUJESuKg/EI/QH5jBMBJGp/wClyRHNn+5bBjspVGZADcZbawqSmBiikf9ZcSv3Zdj9TDimQXkjC t1E6N5aA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIZ2o-0085It-Sq; Fri, 11 Feb 2022 16:45:15 +0000 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIZ2j-0085GD-M2; Fri, 11 Feb 2022 16:45:11 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.west.internal (Postfix) with ESMTP id C10372B0011D; Fri, 11 Feb 2022 11:45:06 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 11 Feb 2022 11:45:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=eo8aiB2mus8/xVU+tXfVcKNpkakKTM0CPZmwuT Q+Md4=; b=OkQHq4iQXuj5DGw/FQexPgUXogxYrjqPUWML2VbmzfPJ2eUYtQ8nvv EiRgy+QJN8pY3m40VbWgF0mpZ+L3kYqv9KRpARy0/TTHMAFemv7NxIel+pEX/FeM R09c/a9ZDqnp6Jh9qDixD6HAkVRx5r2gKizzrmjuj+krKC0AmXIW6360yO4iVLUp s544StMYzUxFRdHc0a2aeeMm5cBQauEGlCwDS8U9yp5AEMG0jtZgkgwBT9JruTJY KR7L62BZVHn7S3BJZRrceuHyzUVJpaGyWPVUx75ThhM7+XEuNPSd12uGmBAQx3oM Hvqghp9GBrid+uo0u5Zy+W3Qqmt9yxsA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=eo8aiB2mus8/xVU+t XfVcKNpkakKTM0CPZmwuTQ+Md4=; b=Z4lYehPf3DNwVu/GkcgzeRBiF3+syGBKM PfUYC5CLUsb7TvDfymYt/3o4PGmYUVVW/PO9S0yidZqjac3a0eW7HBvnPuCcXg/b SFT2kEmzwIkMBH9yF8rqtckESs7lxXX07LskjmzPQXZHxrfI1/bhGm+26gGzpRm2 qrLNoqE+I9rfr1cvhKuXPxeegYB1VnLJjzY99tuO2iw3cV1uF8Aa1++VyNuUIDU2 GwX4SYKyduD1t1qdVm2S9+Zalga4ueQ5AvzG56xeiNbTJoHit6/OsFK5j8HYCMij FTQ8IswHgj3/6B3h4d5NzRVAf9HE81WSN+6DOk1ExhRvIGsU0v5rg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrieefgdeltdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeelkeeghefhuddtleejgfeljeffheffgfeijefhgfeufefhtdevteegheeiheeg udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 11 Feb 2022 11:45:04 -0500 (EST) Date: Fri, 11 Feb 2022 17:45:03 +0100 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 v2 32/66] media: sun6i-csi: Add capture state using vsync for page flip Message-ID: <20220211164503.5hftzazx56cwvk66@houat> References: <20220205185429.2278860-1-paul.kocialkowski@bootlin.com> <20220205185429.2278860-33-paul.kocialkowski@bootlin.com> <20220209092642.hhppmrrekj7zrorj@houat> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_084509_818378_8ADCE7D0 X-CRM114-Status: GOOD ( 26.42 ) 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="===============3520843890142246345==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============3520843890142246345== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k3t4wpl7ilwsk77w" Content-Disposition: inline --k3t4wpl7ilwsk77w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 11, 2022 at 04:40:55PM +0100, Paul Kocialkowski wrote: > Hi, >=20 > On Wed 09 Feb 22, 10:26, Maxime Ripard wrote: > > On Sat, Feb 05, 2022 at 07:53:55PM +0100, Paul Kocialkowski wrote: > > > This introduces a new state structure and associated helpers for > > > capture, which handles the buffer queue and state for each submitted > > > buffer. > > >=20 > > > Besides from the code refactoring, this changes the page flip point > > > to vsync instead of frame done, which allows working with only > > > two buffers without losing frames. This is apparently a more > > > appropriate thing to do with this controller. > >=20 > > Why? What issues were you seeing before, how does using a separate > > interrupt addresses it, and what makes you think it's more appropriate? >=20 > I'll try to update the commit log to address this, thanks. >=20 > One of the main issues that the rework is trying to address is the way > that double buffering is handled, which currently requires up to 3 buffers > to work, due to how buffer configuration is implemented. In particular, > it's synchronizing to the frame done interrupt which seems to hit after > scanout of the next frame begins, so page flips are always delayed by one > frame. >=20 > This is currently solved by setting two buffers when starting the stream: > the first one is set before vcap is enabled and seems to be sampled when = the > first frame scan begins and the second one is set after and stays until t= he > second vsync hits, at which point it becomes the current active buffer. > This way no frame is lost but 3 frames are needed to start. >=20 > This proposal changes the sync point to vsync which allows page flipping = to > happen for the next frame, thus only 2 buffers are required. This should be in your commit log Maxime --k3t4wpl7ilwsk77w Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYgaSjwAKCRDj7w1vZxhR xbTMAP0ZxnXJgdsVzBNK31eF7ZlX4Snoq2+j1MQhKokvYb7MgAD/WKJ1C/ETfaBn jWqoaBEKuLs4T72QKJN7yiyARbVePAI= =qBtU -----END PGP SIGNATURE----- --k3t4wpl7ilwsk77w-- --===============3520843890142246345== 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 --===============3520843890142246345==--