From mboxrd@z Thu Jan 1 00:00:00 1970 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 2F6FCC4167B for ; Thu, 30 Nov 2023 13:54:26 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N7NB1LKwnbcuAoflQJC4O+RjqSKls8XN+hAs3WDPCI0=; b=WxyGRKEkeJN39+ 1foQULkMyoEPCobawlmQRICx0SG17i3iD/FYmSQEUYWF59GVRm/uvujGZWVF3tF0L2LPtxnoDmv53 b4XIkuNaGafK3ukz/5beuMBt5UyUsqSbB2kX7muSE44OeDYLGUOf2H3qqtt/Pz+CtoqYNAy2VlSTi zASjFGrs6ADOkeNL9MyYRQNIGiXIbZgQ4ySt0WxJJL9Q7AhW7sxZAfOJWHm9//9EjD1Yx8l/n+9kV dl9a3qVcv/+jNELYyC12ZwcrsaYCGTdMs+bNsLxFvEsZzp/YRv83SCzwRhbH8kCpNsL4pefsm79hg Mahanx9pH8Md/N4XIEFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8hUN-00B1oQ-35; Thu, 30 Nov 2023 13:53:59 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8hUL-00B1mD-0V; Thu, 30 Nov 2023 13:53:58 +0000 Received: from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi [213.243.189.158]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D8F1655; Thu, 30 Nov 2023 14:53:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701352399; bh=nXRXZ31BrZI5b7Gjgomlhj9LuAT4oxERvzq3b7IxzSQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a1JPu9C++7p6NBJwdtkrlWuFIwEjLdlNBjpWG4hqe0iC1jhjX1kPFxeQFEjZr2BxD 2/9ST/OvNvSTtZVbQOtH5AYI4KPl19tBojU6MXDP6mxBbBzvIUI30o+Vqa4we0/Jbb 66RtDNjNoTaFLWsont/wFY76SjEfQn7CM+axDRDI= Date: Thu, 30 Nov 2023 15:54:01 +0200 From: Laurent Pinchart To: Paul Elder Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com, umang.jain@ideasonboard.com, Dafna Hirschfeld , Mauro Carvalho Chehab , Heiko Stuebner , "moderated list:ARM/Rockchip SoC support" , open list Subject: Re: [PATCH 3/3] media: rkisp1: debug: Count completed frame interrupts Message-ID: <20231130135401.GO8402@pendragon.ideasonboard.com> References: <20231129092956.250129-1-paul.elder@ideasonboard.com> <20231129092956.250129-4-paul.elder@ideasonboard.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231129092956.250129-4-paul.elder@ideasonboard.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_055357_343885_4716CE33 X-CRM114-Status: GOOD ( 22.77 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Paul, Thank you for the patch. On Wed, Nov 29, 2023 at 06:29:56PM +0900, Paul Elder wrote: > 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); I think tt would be nice to consolidate all counters in a single file. I also wonder if we should reset the counters when we start streaming, that would make it easier to interpret the values in userspace. None of these are new issues so they can be addressed on top. Would you be able to write a few short patches ? Reviewed-by: Laurent Pinchart > 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) -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel