Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp321092rdb; Thu, 30 Nov 2023 05:55:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3dmN2QyPa/GmLipGL+hF4KQiI0VnG0MASyL/WE4d313DtivI5uheLaUidplKK973XHLlg X-Received: by 2002:a05:6808:d52:b0:3b8:63aa:826f with SMTP id w18-20020a0568080d5200b003b863aa826fmr21550139oik.25.1701352511481; Thu, 30 Nov 2023 05:55:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701352511; cv=none; d=google.com; s=arc-20160816; b=TmMnmC3wZUzt+BUqGRZSbmmC1NO72AW5t0W0pYaQxu6wSN0y7SKpGOSvCdcb9ywozd Lz/yyLBexdnnLVSiodi0ctdY0ywmPy9QhxSeP64AjL6yrJMky1ajXGLinEUkycvhHqKc mY1H2qLTa3kUj3VuY9Jgie5PK0Mz6/Lqtn/YcRDqkbsqiIWmZBSwK7p4B2EEOsZgrGSA wY/OXTo0HhWLDzO9Nm4Wutmd8ZQbIco/pOWJhSIXUd5oQ7q9LUs2xhW4GPhaE3lzHoMN GmyX2Rxbc278/suxNXImn/kcApxEWm7LIXLG4QvDJKzcnzfAzQaTSrbz7DhQ/ilZ5rDF npcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bwUvN0BkkHmplv2p0MUwtJYC2xG54jqY5tbT4v77HzU=; fh=MsXDUBZwE5M8dRwdG2MRmeGbcFBjPX7Zap5bscPUCRM=; b=A7LD+LvetRY9EavCb/CjPlud1k5a3HXKp39akXlxFfbn3Xqfs74HjzhWEWD/n+6FGr +wRGbD7z+vxxiiTOetEtFYmLfrpFbx4Kf9v9+Qf6pDPwEzJoaTHihubB0zM+fBvBXa5m WPEiQdiuZDvN6DsJt9IpzAYz0AgLmjhi1DWfW1234ZdMP63IoxBLCanrZuL8SRKGbQ1z KVZVGg3rLFQDjUdqUU+Y4qN6phBrXMINxdKWqbhSuRb6j6BUSHrQ1/IMCPu8dOx//okN t+Sbhb3eExvDKwM3QzE2bmOgvdmXIaafmkf4qwTRg3WfzXE1pNI5k+q6JHmmGlMvKJqN H8yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=a1JPu9C+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id k64-20020a632443000000b005893b7094easi1348796pgk.554.2023.11.30.05.55.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 05:55:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=a1JPu9C+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id DA74A82A7E34; Thu, 30 Nov 2023 05:55:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345995AbjK3Nyf (ORCPT + 99 others); Thu, 30 Nov 2023 08:54:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345901AbjK3NyI (ORCPT ); Thu, 30 Nov 2023 08:54:08 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 429D41FDB; Thu, 30 Nov 2023 05:53:58 -0800 (PST) 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-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231129092956.250129-4-paul.elder@ideasonboard.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 05:55:06 -0800 (PST) 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