Re: [PATCH v2 46/55] media: rkisp1: debug: Add dump file in debugfs for MI buffer registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dafna,

On Mon, Jul 11, 2022 at 05:51:07AM +0300, Dafna Hirschfeld wrote:
> On 01.07.2022 02:07, Laurent Pinchart wrote:
> >From: Paul Elder <paul.elder@xxxxxxxxxxxxxxxx>
> >
> >Add a register dump file in debugfs for some of the buffer-related
> >registers in MI, for the base address, the size, and the offset. Also
> >dump the appropriate shadow registers.
> >
> >Signed-off-by: Paul Elder <paul.elder@xxxxxxxxxxxxxxxx>
> >---
> > .../platform/rockchip/rkisp1/rkisp1-debug.c   | 21 +++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> >diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
> >index e76dc2b164b6..1a59c00fabdd 100644
> >--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
> >+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-debug.c
> >@@ -121,6 +121,24 @@ static int rkisp1_debug_dump_rsz_regs_show(struct seq_file *m, void *p)
> > }
> > DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_rsz_regs);
> >
> >+static int rkisp1_debug_dump_mi_mp_y_offs_cnt_show(struct seq_file *m, void *p)
> >+{
> >+	static const struct rkisp1_debug_register registers[] = {
> >+		RKISP1_DEBUG_REG(MI_MP_Y_BASE_AD_INIT),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_BASE_AD_INIT2),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_BASE_AD_SHD),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_SIZE_INIT),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_SIZE_INIT),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_SIZE_SHD),
> >+		RKISP1_DEBUG_REG(MI_MP_Y_OFFS_CNT_SHD),
> >+		{ /* Sentinel */ },
> >+	};
> >+	struct rkisp1_device *rkisp1 = m->private;
> >+
> >+	return rkisp1_debug_dump_regs(rkisp1, m, 0, registers);
> >+}
> >+DEFINE_SHOW_ATTRIBUTE(rkisp1_debug_dump_mi_mp_y_offs_cnt);
> >+
> > #define RKISP1_DEBUG_DATA_COUNT_BINS	32
> > #define RKISP1_DEBUG_DATA_COUNT_STEP	(4096 / RKISP1_DEBUG_DATA_COUNT_BINS)
> >
> >@@ -214,6 +232,9 @@ void rkisp1_debug_init(struct rkisp1_device *rkisp1)
> > 	debugfs_create_file("srsz", 0444, regs_dir,
> > 			    &rkisp1->resizer_devs[RKISP1_SELFPATH],
> > 			    &rkisp1_debug_dump_rsz_regs_fops);
> >+
> >+	debugfs_create_file("mi_mp_y_bufs", 0444, regs_dir, rkisp1,
> >+			    &rkisp1_debug_dump_mi_mp_y_offs_cnt_fops);
> 
> You didn't change the file name as Laurent suggested

I've fixed that locally, will be included in v3.

> > }
> >
> > void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux