Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5971203rwl; Thu, 29 Dec 2022 05:50:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXv7/eZbyGQJw82qLj9BwRbe0bBC2VpJgeEwo/IZfAWnDmrDbAqga4yjQRybOxfXlgKyC6nz X-Received: by 2002:a17:906:279a:b0:7c1:10b4:4742 with SMTP id j26-20020a170906279a00b007c110b44742mr23735483ejc.55.1672321837961; Thu, 29 Dec 2022 05:50:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672321837; cv=none; d=google.com; s=arc-20160816; b=EnJTSM+5goEPrDQvYnqR3d1gPlms2qSlKnqxrSyXfwZCg0bhOVygswx0S3Npsd0+pj PONL+Els5ESiMbaUAfmnywFovbLSFNcahlkcDUGCfONebWEMcMiu+xlxSVBHE2di8NRh gHPCHUaaRDpaUlDUcOPwrVVx2JOK5Rvu/zkXmtPgQNEc/X1ITihMfrY9aMptFOp/RT27 HgRocrFwywLWmyMQb06STgt5dsGR5ze1DJnQGhElWzYjrhk73OnfdgeUYhyRBBORWYaE 9kserkIne/fqOuzZDYDhHGQv7jW+lxFfVYJie/dFIvEBsBc9Kpx7iCzTttm7YemXNB7Z 6N0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CmVEahmNOu/9XkwMiVdBvL6gDHPQH+245qlFUC5ws4k=; b=yd9UxGJWmwy48ep6QHi0VyuXwzraz8PwDz9+DxhWOQGFZSLaSnLEAr4XWmH+rj7X+J RrGUphAK9uatCM3J9Uz71anft4YnEgMgK19oN/CSd4Fz5EbpVCDaCJ2huuuKqd5m4PfD +sMRXcEO+KVPv+8VQ/kpH8gcZrfF8OuEczSubAKZB3elnhIJBYkv0VrYGyAXxbHLTpM4 Es6kW5Rq8R57/HRVmux5XkdS3mPf34E+3P9cD7b5pkXCH0U/oWI6qimM2Gtqc5OR2/ak 2tzz1GmpWeHvfef6FCKg75W4daYCFTjXSP+mmkESClO0NqdXu06gjrcVugAxgxS1rZrE Z89g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=apw5+e6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr19-20020a170907721300b0078dd12d0a9fsi15168440ejc.548.2022.12.29.05.50.23; Thu, 29 Dec 2022 05:50:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=apw5+e6a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233620AbiL2NeC (ORCPT + 62 others); Thu, 29 Dec 2022 08:34:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233553AbiL2Ndn (ORCPT ); Thu, 29 Dec 2022 08:33:43 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CC6311C24; Thu, 29 Dec 2022 05:33:04 -0800 (PST) Received: from booty.fritz.box (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 44FBCFF810; Thu, 29 Dec 2022 13:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1672320782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CmVEahmNOu/9XkwMiVdBvL6gDHPQH+245qlFUC5ws4k=; b=apw5+e6aWCj4dRLTZ1BGruiImviQ2Nozxdv0Zt9IRaT2cggI2CvLG/RdR8P6eEKCJS8Suu u2kZIH+RbxSjpo2pbioNY10citwaaoC0g65Bze8BWzeYq0dDGKIuNrVbv/r8g7lyHgMh8G yi+2i6wK24vxoXxRI1Z2K5ZoezHMJ52dk8BFMsqHgKHTTIbAuTwPMVra3wnMXwUJatGf+H oGqK3rso5948BeoOnuCCYlZSKhraFuOdCooH5D2EB8LCzApNmFJudq/U2r04ERrMIq9fG9 gsU/9f1JMqHeMukH67OtEDfrA0XM7BCPmf1q5vDF7tsGnPDrSm3QBuZd4JrImg== From: Luca Ceresoli To: Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Luca Ceresoli , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Mauro Carvalho Chehab , Greg Kroah-Hartman , Dmitry Osipenko , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, Thomas Petazzoni , Paul Kocialkowski , Richard Leitner Subject: [PATCH v3 18/21] staging: media: tegra-video: add syncpts for Tegra20 to struct tegra_vi Date: Thu, 29 Dec 2022 14:32:02 +0100 Message-Id: <20221229133205.981397-19-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221229133205.981397-1-luca.ceresoli@bootlin.com> References: <20221229133205.981397-1-luca.ceresoli@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In preparation to implement Tegra20 parallel video capture, add a variable to hold the required syncpt and document all the syncpt variables. Signed-off-by: Luca Ceresoli --- Changed in v3: - recycle mw_ack_sp[0] instead of adding out_sp No changes in v2 --- drivers/staging/media/tegra-video/vi.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/tegra-video/vi.h b/drivers/staging/media/tegra-video/vi.h index 8fadca33bcc9..d5e1ed4217e0 100644 --- a/drivers/staging/media/tegra-video/vi.h +++ b/drivers/staging/media/tegra-video/vi.h @@ -117,11 +117,13 @@ struct tegra_vi { * @vi: Tegra video input device structure * @frame_start_sp: host1x syncpoint pointer to synchronize programmed capture * start condition with hardware frame start events through host1x - * syncpoint counters. + * syncpoint counters. (Tegra210) * @mw_ack_sp: host1x syncpoint pointer to synchronize programmed memory write * ack trigger condition with hardware memory write done at end of - * frame through host1x syncpoint counters. + * frame through host1x syncpoint counters (On Tegra20 used for the + * OUT_1 syncpt) * @sp_incr_lock: protects cpu syncpoint increment. + * @next_out_sp_idx: next expected value for mw_ack_sp[0], i.e. OUT_1 (Tegra20) * * @kthread_start_capture: kthread to start capture of single frame when * vb buffer is available. This thread programs VI CSI hardware @@ -173,6 +175,7 @@ struct tegra_vi_channel { struct host1x_syncpt *mw_ack_sp[GANG_PORTS_MAX]; /* protects the cpu syncpoint increment */ spinlock_t sp_incr_lock[GANG_PORTS_MAX]; + u32 next_out_sp_idx; struct task_struct *kthread_start_capture; wait_queue_head_t start_wait; -- 2.34.1