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 43B00C38A02 for ; Mon, 31 Oct 2022 09:16:22 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S9APt33G1A7HWY1YXv0hVQsPyAdzk71MnYpupVs9p/M=; b=OCuFUuVzDpBamN HdKB0SNNAl0O4+KazrH995f95UmQNLmCasZyVAC7IjXkejhL5VSAZ2pDkwhlctPIAqevmJIKHtiss z0VE0j23gR+ti9kWGUBpdkz/xBTJeKl7dqGqSwN7Jryx15LN61xfk/JU+yOQLbrTsV0gaDtTMfMOH /TbFLshvhGdGo9kX+1Ci/bALCfMFDbjvEzd/cEr6cpokzTDZy2K3oC897TQDyYjmamDVngIAcUvwO 561VahbIWSJ816MUopZ23GtVrX7n/IxODgVfFxw61Hq7Q0Bx6xL7xanOLOmzaBbdcEu0r4R0M5LGh i7MehJqKNzgivzapfmsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opQtD-009vzE-OY; Mon, 31 Oct 2022 09:15:27 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opQtB-009vvx-1N for linux-arm-kernel@lists.infradead.org; Mon, 31 Oct 2022 09:15:26 +0000 Received: by mail-ej1-x631.google.com with SMTP id q9so27864146ejd.0 for ; Mon, 31 Oct 2022 02:15:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y7TwjvYNuBTQx7bSJpCvwsU7T5xZI7GJ6V6t+msfW3s=; b=YtoDP2wWwbUmxTRehDOaGIGN1GnNV3a0NFQs7iFRYgfhjfaihmwLGTLxzQnbzQGXU5 EGaVEfJdwOPHRFbCjyT0wTdi9NbmUSrq3AbPOak0QFhG+KA/S7sG/tBbM1Q7tGoBFNBN V2YYvqTfLDIWoMx8r6oGP2Tb9cZ2F5AiF/ra9Fkb9AAU6Nu3OfTjkmSlp20L0PFHSVqf VaaINVD9CLuqnVeb1ov8fZ8nPWh5NQf8baw2TxRobi68SeSfb8oY1Ot30YxLR3j1uBUz s5mT+ca9et0ZA6v1W3u/TUqDjebHMnbZTraWZzrzIfIeQ/jmZtNHUveRBQN+SoDak3Nb +DoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y7TwjvYNuBTQx7bSJpCvwsU7T5xZI7GJ6V6t+msfW3s=; b=AHD/unos5PyJt6bb+2Cm2QVtKQU3cq2EfTfuzJ/AOhBsdHRwkPJD2cooT6opo7OROW yvj5rXIt5QCZXPWyN1fFVi34cBVVQx+hYFB9HVLYsI2d02yocmsdOxW1wGEUhLobOw1N c+98aWQJJ8XPU2tTrgAVby+gE326EF8XxyxZiOKj+d1vI7QmAlrMFTVsSdR/vX26j4rD xjw3Gy+2H3+qG61xKZsg0RB1xBirRaeabcuqpUDSjZrxNPpqPmdilAPoBrm1IcA6RZeh pQxJ0/MLWhwkHtY4LVU6yeqIMncjsbNF36ACBO4h1ZaM194xtTDeK4GZxFb22rCokLz3 GIaQ== X-Gm-Message-State: ACrzQf2CyyppfNKzONj87rGUBBuTT9ed6a8W0TzzbyZQxttDw+y5Cpvj 7TyW9dGdNWEAY43JynqEvu8= X-Google-Smtp-Source: AMsMyM4ojgBpWutM2rjCIsSZc3d6j1JKupNDLVQUYOV2wnNM6eKqbV1rt+t2ysp1MYsBQrg1TZjcEg== X-Received: by 2002:a17:907:2e01:b0:78d:f24b:7330 with SMTP id ig1-20020a1709072e0100b0078df24b7330mr11763582ejc.604.1667207722748; Mon, 31 Oct 2022 02:15:22 -0700 (PDT) Received: from kista.localnet (82-149-19-102.dynamic.telemach.net. [82.149.19.102]) by smtp.gmail.com with ESMTPSA id gy8-20020a170906f24800b007317f017e64sm2741662ejb.134.2022.10.31.02.15.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 02:15:22 -0700 (PDT) From: Jernej =?utf-8?B?xaBrcmFiZWM=?= To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Paul Kocialkowski Cc: Yong Deng , Paul Kocialkowski , Mauro Carvalho Chehab , Chen-Yu Tsai , Samuel Holland , Laurent Pinchart , Maxime Ripard , Thomas Petazzoni Subject: Re: [PATCH v6 18/43] media: sun6i-csi: Add capture state using vsync for page flip Date: Mon, 31 Oct 2022 10:15:21 +0100 Message-ID: <4778394.31r3eYUQgx@kista> In-Reply-To: <20220826183240.604834-19-paul.kocialkowski@bootlin.com> References: <20220826183240.604834-1-paul.kocialkowski@bootlin.com> <20220826183240.604834-19-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_021525_137970_5F42DF02 X-CRM114-Status: GOOD ( 19.53 ) 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: 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 Dne petek, 26. avgust 2022 ob 20:32:15 CET je Paul Kocialkowski napisal(a): > The current implementation requires up to 3 buffers to properly > implement page flipping without losing frames: one is configured > before the video stream is started, one just after that and page > flipping is synchronized to the frame done interrupt. The comment in > the code mentions that "CSI will lookup the next dma buffer for next > frame before the current frame done IRQ triggered". > > Based on observations of the CSI unit behavior, it seems that the > buffer DMA address is sampled when the frame scan begins (in addition > to starting the stream), which corresponds to the vblank interrupt > that hits just before the frame-done interrupt of the previous frame. > > As a result, the address configured at the frame done interrupt is not > actually used for the next frame but for the one after that. > > This proposal changes the page flipping sync point to the vsync > interrupt, which allows the DMA address to be sampled for the next > frame instead and allows operating with only two buffers. > > In addition to the change in the sync point, the code is refactored > to introduce a notion of state that clarifies tracking of the buffers > with tidy functions. > > Signed-off-by: Paul Kocialkowski Acked-by: Jernej Skrabec Best regards, Jernej _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel