From patchwork Mon Nov 28 15:23:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 26840 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp5751444wrr; Mon, 28 Nov 2022 07:29:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf7co3M6grMykRp0QEsVoP4JTJ8Jy0/IJtlgzQII2OaDZWFH44jZobXViq7ty6GijYtZHdgW X-Received: by 2002:a17:906:901:b0:7ae:23c:3cb4 with SMTP id i1-20020a170906090100b007ae023c3cb4mr702477ejd.599.1669649396102; Mon, 28 Nov 2022 07:29:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669649396; cv=none; d=google.com; s=arc-20160816; b=CjJQVhcUWT13el1Ew921oSyJSw8zDbuhDrjsQjBE0xtIQN5BS9aDwKCe/PrzhXVxW4 30rEZDndrmA91HHDxotfxA9alfiPJTRHAbg9VWzmddqoqtDb0XK1R4EtPe6BZGntALez JaJJ1YrOR0iwN9pHE5Kxd/SS9TTPGEJovp2uprl+IRnboUrD8aHgJWLBFgYAUGjMduQp uEmm3WqpGsYh3pDvM7TetuEUMa9bNY3u1rQ1yQSteLcH/qO6LFO3ZjsWVzBirfdCbghq 5V4KomvGLCV59d8WpaiE/tAaHeHjVToFwIPDtHjo1XC2a1KaVTQuUGUFsL+EH+V2IfcG AMFQ== 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=KAKVyFgksg4NSXevr0L+QPIAsthqMqdls7iQD9SYOTY=; b=cBZkjulq8aGypxpPoLglraDh3SKpFB0rPBaPI6Qb898CU4UwmQLmuPq0p8FH2oYUsJ BbVI0hdcxnrbdPrCkMO5Uck1XsJNr/p2O44IEDJ5CMxgPcXL4aUvZHcHm9PNIh0gov/I Al1uDo5YR5geC1r+jJRepJOMNsp2W2rxsZFNR+gRGW75vci54lMfH6la9T8c3+l0BxlY xz4lIzlP466mnzNOE86/gxpsY4FNusG2VuCsgLv2PCLkhDOV01hNymTcCOch4mBIxT5W UJAdxDIVJuXgYGZsss1NBVOB/76jtfLezCnrEc0X5UGVcNHD+lv8aOLjBHiZTINCYoCr fwfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="WTSsCb/E"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv16-20020a17090760d000b00782e85ae302si10947193ejc.574.2022.11.28.07.29.32; Mon, 28 Nov 2022 07:29:56 -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="WTSsCb/E"; 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 S232016AbiK1P2K (ORCPT + 99 others); Mon, 28 Nov 2022 10:28:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231886AbiK1P1T (ORCPT ); Mon, 28 Nov 2022 10:27:19 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15CBE24970; Mon, 28 Nov 2022 07:25:38 -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 E9413100002; Mon, 28 Nov 2022 15:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1669649137; 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=KAKVyFgksg4NSXevr0L+QPIAsthqMqdls7iQD9SYOTY=; b=WTSsCb/En4Ownxk3os3UhuBlYqEUxtb6B/S8PprqoJD6aWUVoaSSaCII0LMlcBh04drJ3a f1DzEn9XS/FONn/DxlMs7/AvCfYs3TLi1B6TJFfA9ZICSR3L0YiZIipStoENaWEqIQy20I +zjXU/a30rR3nGsgR+McYkjWV2XmSMMdp/1ZR1GgAWVD8oBx6igjyfmLQubPELjFg35dLT ntMCWBWqsG4hgCvpoE8tYkSb9/Nc9T5qaYGfB5otk8BrHNSO75opiZ3jQm3HuYGGX86vHS DBAyOdITvRJyV2wA7Ok+rFojWYg5nJJ+2kH9kugnmTNVYdGrFmVwYW+7cr429w== From: Luca Ceresoli To: David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Thierry Reding , Jonathan Hunter , Sowjanya Komatineni , Mauro Carvalho Chehab , Greg Kroah-Hartman , Dmitry Osipenko , Hans Verkuil Cc: Luca Ceresoli , 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 v2 17/21] staging: media: tegra-video: add syncpts for Tegra20 to struct tegra_vi Date: Mon, 28 Nov 2022 16:23:32 +0100 Message-Id: <20221128152336.133953-18-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221128152336.133953-1-luca.ceresoli@bootlin.com> References: <20221128152336.133953-1-luca.ceresoli@bootlin.com> MIME-Version: 1.0 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, RCVD_IN_MSPIKE_H2,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750754284783981041?= X-GMAIL-MSGID: =?utf-8?q?1750754284783981041?= In preparation to implement Tegra20 parallel video capture, add variables to hold the required syncpt. Signed-off-by: Luca Ceresoli --- No changes in v2 --- drivers/staging/media/tegra-video/vi.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/tegra-video/vi.h b/drivers/staging/media/tegra-video/vi.h index 8fadca33bcc9..ba563cd17296 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. (Tegra210) * @sp_incr_lock: protects cpu syncpoint increment. + * @out_sp: host1x syncpoint pointer for frame sync (Tegra20) + * @next_out_sp_idx: next expected value for @out_sp (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,8 @@ 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]; + struct host1x_syncpt *out_sp; + u32 next_out_sp_idx; struct task_struct *kthread_start_capture; wait_queue_head_t start_wait;