From patchwork Fri Dec 1 14:04:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13475886 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 C6700C4167B for ; Fri, 1 Dec 2023 14:05:36 +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=WFKBrNuYi109WAzYGyK4Ca6oC4FgL2OovRQ+xDniYc4=; b=dITqdXNllhuW2J 9NhIuFOzA1+8tdFj64ZB4LtA+UK3f6a5ybORhAD20pAkZJDcTFon6AdKLMRjSSmla4XNW8TV7gpg9 iIsJZ3HLCPsdNFwMsUz/q1r7oYPsn9s+or0uUNfaOij0M/FR0e5HGPcat1Y4QW+l1iChdQWv2lbjL ltZX1WlrTvGNtS/uL9KoDeBYmCl53dxiVEoV+U8Z+3pvvgHC/TWCtzbRSwRiPLw8ZJkraEsnY22Cm moltOTR1AzcGPyfFLrqHob7f+3pDnmfEWuNSBGzk9TJ2yDmutiazxy7sufMLuiuORvLpV8LTH+0lU ifZdAVKhGU8ZY6ZC0eWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r948i-00DtHR-1W; Fri, 01 Dec 2023 14:05:08 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r948f-00DtFR-1g; Fri, 01 Dec 2023 14:05:06 +0000 Received: from pyrite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D4D64FAD; Fri, 1 Dec 2023 15:04:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701439467; bh=MFcStENnnolCSllpVqU3n3QSpfDjGV2JE1o/1bWj2kw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qa1SZLwHWB9/IALx/ETlJuQtmJcmv5BtbnooiP5QzYVp2ZvlKKBZCcfPb68UruJXw ivdpwxsKhv0P/FQovfBYBo5c0pAAqsN+bsLefogBotizdxhN02TTJzA/bL4c4GqbGu nU6qoldIDPqXTwj+U8f2MxesCQRgs4fsohKGDDy0= From: Paul Elder To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org Cc: laurent.pinchart@ideasonboard.com, kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com, umang.jain@ideasonboard.com, Paul Elder , Alexander Stein , Dafna Hirschfeld , 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 v2 3/4] media: rkisp1: debug: Count completed frame interrupts Date: Fri, 1 Dec 2023 23:04:32 +0900 Message-Id: <20231201140433.2126011-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231201140433.2126011-1-paul.elder@ideasonboard.com> References: <20231201140433.2126011-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231201_060505_694685_86A7C901 X-CRM114-Status: GOOD ( 11.10 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a counter to debugfs to count the number of frame-end interrupts. Signed-off-by: Paul Elder Reviewed-by: Alexander Stein Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- 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)