Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4445539rdh; Wed, 29 Nov 2023 01:31:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmO4Gb82zB61KuGp2B4h8AOwCi0xdtv9hIZOK4uePmirLezaAzViUIlxdv57+1zhsuVFej X-Received: by 2002:a05:6a21:3291:b0:187:d736:8b7d with SMTP id yt17-20020a056a21329100b00187d7368b7dmr20432628pzb.14.1701250317112; Wed, 29 Nov 2023 01:31:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701250317; cv=none; d=google.com; s=arc-20160816; b=SnynIwdM3AXp8ZO6E2B47LIZrgi2HGhGdShrRWJDZ/xOwRn6ZEjcjnYSVvfzf78VIY 5hU9aM7id0gMt58lLoHnp3ZNyMWd4+7OP43cmUkAbzR4DFN3cjew/cdapItfmY1LJSGt T5UOrDKnC53XlSIL8nZH5wI5Dasdbw8kCP+oUtuVfXTqWSvv6YyZbTF/0HXF94hsb1JD IPB4hQ7IU+MHHtYM7aYpP3J4UygN69wV2BwN1xrQ/DfZlVQuScuZ7nKrsblDP/DRhskD UYg6Q5tKy1B/cT6ZDqIFNHj8jF7mcIpLmE7po9a/Hzw4qbKweWbNSxyyzTQshwNYKCyX exHw== 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=fWOGNCQ4YrMZ3cSPN+4vpg2o+M3uQNdMQdxdqJpIaXA=; fh=sjrW0lfW1FUbL5BQ2TXJmxg1ub0EbXH9xdAY/SMrThg=; b=OZBIh9kSu6hz9goCibC7Q0EvLBq5j1IJgZZ2MWKQjHUWjl5JXxq6b12rKoU+YYgyQq sCzX1pYJC/1hkPArIH+rkMLB1ip2xk4HR6eeTc2c+PV3qUgsFeWz9wWP6lo8CRNYyMwC /qp6ixEFtC1/KZSCBCiINFuP8VCyUILApXfc43/dkJcSDPuu4uIZh7wfgOHXnJLOCOyB SromtdLzD1eofbNlIGgQ2u5lv019wcdFrEcFL6KARoYr7NIBVOqPxPMrl/HyFcHrucUZ yNcoJNVNafnAj5PTNQ7m6bWI5J7DWYkiGchFYoMZrykl6a3TjhjvkhHDCZg59L08CDRV ZK/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SnJUy4FM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ka9-20020a056a00938900b006bd0842622asi13896623pfb.239.2023.11.29.01.31.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 01:31:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=SnJUy4FM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6D1EC806CF6C; Wed, 29 Nov 2023 01:31:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229453AbjK2Jbn (ORCPT + 99 others); Wed, 29 Nov 2023 04:31:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231166AbjK2JbZ (ORCPT ); Wed, 29 Nov 2023 04:31:25 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8DA31BCC; Wed, 29 Nov 2023 01:30:27 -0800 (PST) Received: from pyrite.hamster-moth.ts.net (h175-177-049-135.catv02.itscom.jp [175.177.49.135]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 434AE9DE; Wed, 29 Nov 2023 10:29:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701250189; bh=fjlSyQdMYtU8mW5I8BqFXL1GZm5w0VnY/a4rJLCH7MI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SnJUy4FMVoyYIwSo1aWARUKrsjaOtcpy2nBIR5hOf7pGMzNBBEtgEn+/cMTNiqiwR YzDl5O05Y1Zo5hs/3QgoA7l5QIm1Px+M75jC8dTjsf+mlS3ae9nZw9Y9M3mqUWsGZ3 zrA/7nvYFHza46WuU5Auer9y/nGM4IGljnDztL5A= From: Paul Elder To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com, umang.jain@ideasonboard.com, Paul Elder , Dafna Hirschfeld , Laurent Pinchart , Mauro Carvalho Chehab , Heiko Stuebner , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 3/3] media: rkisp1: debug: Count completed frame interrupts Date: Wed, 29 Nov 2023 18:29:56 +0900 Message-Id: <20231129092956.250129-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231129092956.250129-1-paul.elder@ideasonboard.com> References: <20231129092956.250129-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 01:31:54 -0800 (PST) Add a counter to debugfs to count the number of frame-end interrupts. Signed-off-by: Paul Elder --- drivers/media/platform/rockchip/rkisp1/rkisp1-common.h | 1 + drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c | 2 ++ drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h index 1e7cea1bea5e..be69173958a4 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-common.h @@ -417,6 +417,7 @@ struct rkisp1_debug { unsigned long stats_error; unsigned long stop_timeout[2]; unsigned long frame_drop[2]; + unsigned long complete_frames; }; /* diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index f66b9754472e..1b1edfd3ab6c 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c @@ -232,6 +232,8 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) &debug->frame_drop[RKISP1_MAINPATH]); debugfs_create_ulong("sp_frame_drop", 0444, debug->debugfs_dir, &debug->frame_drop[RKISP1_SELFPATH]); + debugfs_create_ulong("complete_frames", 0444, debug->debugfs_dir, + &debug->complete_frames); debugfs_create_file("input_status", 0444, debug->debugfs_dir, rkisp1, &rkisp1_debug_input_status_fops); diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c index 64a956b9f2d0..06cdb4edf19c 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c @@ -991,6 +991,8 @@ irqreturn_t rkisp1_isp_isr(int irq, void *ctx) if (status & RKISP1_CIF_ISP_FRAME) { u32 isp_ris; + rkisp1->debug.complete_frames++; + /* New frame from the sensor received */ isp_ris = rkisp1_read(rkisp1, RKISP1_CIF_ISP_RIS); if (isp_ris & RKISP1_STATS_MEAS_MASK) -- 2.39.2