Message ID | 20231129092956.250129-3-paul.elder@ideasonboard.com (mailing list archive) |
---|---|
State | Superseded |
Headers |
Received: from sv.mirrors.kernel.org ([139.178.88.99]) by www.linuxtv.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <linux-media+bounces-1336-patchwork=linuxtv.org@vger.kernel.org>) id 1r8GuD-004Pp1-46 for patchwork@linuxtv.org; Wed, 29 Nov 2023 09:30:57 +0000 Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2FDC4281DB5 for <patchwork@linuxtv.org>; Wed, 29 Nov 2023 09:30:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6083915E88; Wed, 29 Nov 2023 09:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nhfCHa/U" X-Original-To: linux-media@vger.kernel.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4827126A2; Wed, 29 Nov 2023 01:30:23 -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 565F289D; Wed, 29 Nov 2023 10:29:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701250184; bh=x5DGL3arJhhL6cHx1o46byLPKXKRQq29+jIxhF3wWFY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nhfCHa/UZW2Ewa8Uz+2l85e5dnvhDjW2zCDWDhZ/HjrqSnbeQ6CjnYYHM04tp4sSK 9YTW7mvC0UeQM9BEdQkQS1fR+0ofIp5zOkd/UsVTWewly106P5pm23k/kko0/szIeh gO4BvK3sc4SdMKUJjYjvsGWbIHAITa9eb5BA8aB0= From: Paul Elder <paul.elder@ideasonboard.com> 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 <paul.elder@ideasonboard.com>, Dafna Hirschfeld <dafna@fastmail.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Heiko Stuebner <heiko@sntech.de>, linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/3] media: rkisp1: debug: Add register dump for IS Date: Wed, 29 Nov 2023 18:29:55 +0900 Message-Id: <20231129092956.250129-3-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> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: <linux-media.vger.kernel.org> List-Subscribe: <mailto:linux-media+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-media+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-LSpam-Score: -4.8 (----) X-LSpam-Report: No, score=-4.8 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,RCVD_IN_DNSWL_MED=-2.3 autolearn=unavailable autolearn_force=no |
Series |
media: rkisp1: Misc fixes and debug
|
|
Commit Message
Paul Elder
Nov. 29, 2023, 9:29 a.m. UTC
Add register dump for the image stabilizer module to debugfs.
Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
---
.../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
Comments
Hi Paul, thanks for the patch. Am Mittwoch, 29. November 2023, 10:29:55 CET schrieb Paul Elder: > Add register dump for the image stabilizer module to debugfs. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Tested with a 1080p and 720p stream, without offsets. Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> > --- > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index > 71df3dc95e6f..f66b9754472e 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct seq_file > *m, void *p) } > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > +{ > + static const struct rkisp1_debug_register registers[] = { > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), > + { /* Sentinel */ }, > + }; > + struct rkisp1_device *rkisp1 = m->private; > + > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > +} > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > + > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / RKISP1_DEBUG_DATA_COUNT_BINS) > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > &rkisp1_debug_dump_mi_mp_fops); > + > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > + &rkisp1_debug_dump_is_fops); > } > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
Quoting Paul Elder (2023-11-29 09:29:55) > Add register dump for the image stabilizer module to debugfs. > Is the Image Stabilizer on all variants of the ISP? I.e. is it valid register space on the RK3399 implementation? If so then: Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > --- > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > index 71df3dc95e6f..f66b9754472e 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct seq_file *m, void *p) > } > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > +{ > + static const struct rkisp1_debug_register registers[] = { > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), I expect so as you haven't added the register macros in this series so they must already be there ... > + { /* Sentinel */ }, > + }; > + struct rkisp1_device *rkisp1 = m->private; > + > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > +} > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > + > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / RKISP1_DEBUG_DATA_COUNT_BINS) > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > &rkisp1_debug_dump_mi_mp_fops); > + > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > + &rkisp1_debug_dump_is_fops); > } > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1) > -- > 2.39.2 >
On Wed, Nov 29, 2023 at 08:05:42PM +0000, Kieran Bingham wrote: > Quoting Paul Elder (2023-11-29 09:29:55) > > Add register dump for the image stabilizer module to debugfs. > > > > Is the Image Stabilizer on all variants of the ISP? > > I.e. is it valid register space on the RK3399 implementation? Yes, it is. > > If so then: > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > > --- > > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > > 1 file changed, 18 insertions(+) > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > index 71df3dc95e6f..f66b9754472e 100644 > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct seq_file *m, void *p) > > } > > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > > +{ > > + static const struct rkisp1_debug_register registers[] = { > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), > > I expect so as you haven't added the register macros in this series so > they must already be there ... Yep :) Paul > > > > + { /* Sentinel */ }, > > + }; > > + struct rkisp1_device *rkisp1 = m->private; > > + > > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > > +} > > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > > + > > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / RKISP1_DEBUG_DATA_COUNT_BINS) > > > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > > &rkisp1_debug_dump_mi_mp_fops); > > + > > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > > + &rkisp1_debug_dump_is_fops); > > } > > > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1) > > -- > > 2.39.2 > >
Hi Paul, Am Donnerstag, 30. November 2023, 10:47:00 CET schrieb Paul Elder: > On Wed, Nov 29, 2023 at 08:05:42PM +0000, Kieran Bingham wrote: > > Quoting Paul Elder (2023-11-29 09:29:55) > > > > > Add register dump for the image stabilizer module to debugfs. > > > > Is the Image Stabilizer on all variants of the ISP? > > > > I.e. is it valid register space on the RK3399 implementation? > > Yes, it is. Is there some public documentation available how this ISP works? For RK3399 or i.MX8MP. Best regards, Alexander > > > If so then: > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > > > --- > > > > > > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > > > 1 file changed, 18 insertions(+) > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index > > > 71df3dc95e6f..f66b9754472e 100644 > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct > > > seq_file *m, void *p)> > > > > } > > > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > > > > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > > > +{ > > > + static const struct rkisp1_debug_register registers[] = { > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), > > > > I expect so as you haven't added the register macros in this series so > > they must already be there ... > > Yep :) > > > Paul > > > > + { /* Sentinel */ }, > > > + }; > > > + struct rkisp1_device *rkisp1 = m->private; > > > + > > > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > > > +} > > > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > > > + > > > > > > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > > > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / > > > RKISP1_DEBUG_DATA_COUNT_BINS)> > > > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > > > > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > > > > > > &rkisp1_debug_dump_mi_mp_fops); > > > > > > + > > > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > > > + &rkisp1_debug_dump_is_fops); > > > > > > } > > > > > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
Hi Alexander, On Thu, Nov 30, 2023 at 10:54:46AM +0100, Alexander Stein wrote: > Hi Paul, > > Am Donnerstag, 30. November 2023, 10:47:00 CET schrieb Paul Elder: > > On Wed, Nov 29, 2023 at 08:05:42PM +0000, Kieran Bingham wrote: > > > Quoting Paul Elder (2023-11-29 09:29:55) > > > > > > > Add register dump for the image stabilizer module to debugfs. > > > > > > Is the Image Stabilizer on all variants of the ISP? > > > > > > I.e. is it valid register space on the RK3399 implementation? > > > > Yes, it is. > > Is there some public documentation available how this ISP works? For RK3399 or > i.MX8MP. For the ISP there is some public docs into imx8mp reference manual at page 5895 chapter: 13.14 Image Signal Processor (ISP) https://www.nxp.com/webapp/Download?colCode=IMX8MPRM https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-plus-applications-processor:8MPLUSLPD4-EVK This is not the full docs I think but cover some part of the ISP functionality. Hope this help. Regards, Tommaso > > Best regards, > Alexander > > > > > > If so then: > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > > > > --- > > > > > > > > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > > > > 1 file changed, 18 insertions(+) > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index > > > > 71df3dc95e6f..f66b9754472e 100644 > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct > > > > seq_file *m, void *p)> > > > > > } > > > > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > > > > > > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > > > > +{ > > > > + static const struct rkisp1_debug_register registers[] = { > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), > > > > > > I expect so as you haven't added the register macros in this series so > > > they must already be there ... > > > > Yep :) > > > > > > Paul > > > > > > + { /* Sentinel */ }, > > > > + }; > > > > + struct rkisp1_device *rkisp1 = m->private; > > > > + > > > > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > > > > +} > > > > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > > > > + > > > > > > > > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > > > > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / > > > > RKISP1_DEBUG_DATA_COUNT_BINS)> > > > > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > > > > > > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > > > > > > > > &rkisp1_debug_dump_mi_mp_fops); > > > > > > > > + > > > > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > > > > + &rkisp1_debug_dump_is_fops); > > > > > > > > } > > > > > > > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1) > > > -- > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany > Amtsgericht München, HRB 105018 > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider > http://www.tq-group.com/ > > >
On Thu, Nov 30, 2023 at 10:54:46AM +0100, Alexander Stein wrote: > Hi Paul, > > Am Donnerstag, 30. November 2023, 10:47:00 CET schrieb Paul Elder: > > On Wed, Nov 29, 2023 at 08:05:42PM +0000, Kieran Bingham wrote: > > > Quoting Paul Elder (2023-11-29 09:29:55) > > > > > > > Add register dump for the image stabilizer module to debugfs. > > > > > > Is the Image Stabilizer on all variants of the ISP? > > > > > > I.e. is it valid register space on the RK3399 implementation? > > > > Yes, it is. > > Is there some public documentation available how this ISP works? For RK3399 or > i.MX8MP. Not that I'm aware of. I've been told there's some leaked documentation in the RK3288 (without registers), and another one for the RK3399 (with registers)? Paul > > > > > > If so then: > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > > > > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > > > > --- > > > > > > > > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > > > > 1 file changed, 18 insertions(+) > > > > > > > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index > > > > 71df3dc95e6f..f66b9754472e 100644 > > > > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > > > > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct > > > > seq_file *m, void *p)> > > > > > } > > > > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > > > > > > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > > > > +{ > > > > + static const struct rkisp1_debug_register registers[] = { > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > > > > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), > > > > > > I expect so as you haven't added the register macros in this series so > > > they must already be there ... > > > > Yep :) > > > > > > Paul > > > > > > + { /* Sentinel */ }, > > > > + }; > > > > + struct rkisp1_device *rkisp1 = m->private; > > > > + > > > > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > > > > +} > > > > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > > > > + > > > > > > > > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > > > > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / > > > > RKISP1_DEBUG_DATA_COUNT_BINS)> > > > > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > > > > > > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > > > > > > > > &rkisp1_debug_dump_mi_mp_fops); > > > > > > > > + > > > > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > > > > + &rkisp1_debug_dump_is_fops); > > > > > > > > } > > > > > > > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1) > > > -- > TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany > Amtsgericht München, HRB 105018 > Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider > http://www.tq-group.com/ > >
Hi Paul, Thank you for the patch. On Wed, Nov 29, 2023 at 06:29:55PM +0900, Paul Elder wrote: > Add register dump for the image stabilizer module to debugfs. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> > --- > .../platform/rockchip/rkisp1/rkisp1-debug.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > index 71df3dc95e6f..f66b9754472e 100644 > --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c > @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct seq_file *m, void *p) > } > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); > > +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) > +{ > + static const struct rkisp1_debug_register registers[] = { > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), > + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), > + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), As these are ISP registers, how about adding them to the list of ISP registers ? media: rkisp1: debug: Add register dump for IS Add register dump for the ISP image stabilizer module to debugfs. This helps debugging issues related to digital zoom. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index 71df3dc95e6f..d2fbed42164e 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c @@ -92,6 +92,10 @@ static int rkisp1_debug_dump_isp_regs_show(struct seq_file *m, void *p) RKISP1_DEBUG_REG(ISP_FLAGS_SHD), RKISP1_DEBUG_REG(ISP_RIS), RKISP1_DEBUG_REG(ISP_ERR), + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), { /* Sentinel */ }, }; struct rkisp1_device *rkisp1 = m->private; > + { /* Sentinel */ }, > + }; > + struct rkisp1_device *rkisp1 = m->private; > + > + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); > +} > +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); > + > #define RKISP1_DEBUG_DATA_COUNT_BINS 32 > #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / RKISP1_DEBUG_DATA_COUNT_BINS) > > @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, > &rkisp1_debug_dump_mi_mp_fops); > + > + debugfs_create_file("is", 0444, regs_dir, rkisp1, > + &rkisp1_debug_dump_is_fops); > } > > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c index 71df3dc95e6f..f66b9754472e 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c @@ -139,6 +139,21 @@ static int rkisp1_debug_dump_mi_mp_show(struct seq_file *m, void *p) } DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp); +static int rkisp1_debug_dump_is_show(struct seq_file *m, void *p) +{ + static const struct rkisp1_debug_register registers[] = { + RKISP1_DEBUG_SHD_REG(ISP_IS_H_OFFS), + RKISP1_DEBUG_SHD_REG(ISP_IS_V_OFFS), + RKISP1_DEBUG_SHD_REG(ISP_IS_H_SIZE), + RKISP1_DEBUG_SHD_REG(ISP_IS_V_SIZE), + { /* Sentinel */ }, + }; + struct rkisp1_device *rkisp1 = m->private; + + return rkisp1_debug_dump_regs(rkisp1, m, 0, registers); +} +DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_is); + #define RKISP1_DEBUG_DATA_COUNT_BINS 32 #define RKISP1_DEBUG_DATA_COUNT_STEP (4096 / RKISP1_DEBUG_DATA_COUNT_BINS) @@ -235,6 +250,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1) debugfs_create_file("mi_mp", 0444, regs_dir, rkisp1, &rkisp1_debug_dump_mi_mp_fops); + + debugfs_create_file("is", 0444, regs_dir, rkisp1, + &rkisp1_debug_dump_is_fops); } void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)