[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20231201140433.2126011-4-paul.elder@ideasonboard.com>
Date: Fri, 1 Dec 2023 23:04:32 +0900
From: Paul Elder <paul.elder@...asonboard.com>
To: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org
Cc: laurent.pinchart@...asonboard.com, kieran.bingham@...asonboard.com,
tomi.valkeinen@...asonboard.com, umang.jain@...asonboard.com,
Paul Elder <paul.elder@...asonboard.com>,
Alexander Stein <alexander.stein@...tq-group.com>,
Dafna Hirschfeld <dafna@...tmail.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Heiko Stuebner <heiko@...ech.de>,
linux-arm-kernel@...ts.infradead.org (moderated list:ARM/Rockchip SoC
support), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v2 3/4] media: rkisp1: debug: Count completed frame interrupts
Add a counter to debugfs to count the number of frame-end interrupts.
Signed-off-by: Paul Elder <paul.elder@...asonboard.com>
Reviewed-by: Alexander Stein <alexander.stein@...tq-group.com>
Reviewed-by: Kieran Bingham <kieran.bingham@...asonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
---
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 d2fbed42164e..79cda589d935 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
@@ -221,6 +221,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 88ca8b2283b7..bd3acd926410 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
@@ -989,6 +989,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
Powered by blists - more mailing lists