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 33C88C4167B for ; Thu, 7 Dec 2023 14:29:12 +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=WgK+Z8aVKIgrV3tUmIbQRRJDQXb1v6mjovz0/HUC16k=; b=oMTN5zDzOcrXPG YI95NRUN7FyNcXE0OeUptuDxdsM5ZbLVGe6gr0ad2GRyxKhmMoQnvhWxbqvkUo0L5SbdJeVSZ2PCo 8RBKiMC4kUqSsQsSSn3ogdbygVE02Q/3wmOlT+ksWvlKqGL6XxPa6kr1BFfa/b4nOBMukph9476bA E/CSQhaOxI7v8XgK1oWxENihqzMijgdplf6JRJZLKV3dg1WOQCinV19CjKdS5IUmoCtpiKE0I6jc3 r4lem25YLE7T3tlCDSOa7ZT8dYKXIKbIbk2jFtCFpblLCmqCykb8M1o3bT7wQ6gODNTxFEkzSx/yp U5coTMNJov2lDSEuqUYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBFMp-00D1R6-1s; Thu, 07 Dec 2023 14:28:43 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBFMm-00D1QX-2Q for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 14:28:42 +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 9DB43669; Thu, 7 Dec 2023 15:27:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701959277; bh=dcX7bDQC/6RCpMGhY3KxDjeXROtIYAW9NdwtD+MMjR4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=u4/ibhOQhCt6MFao+N0/PRVCtAuPwsYIx9TuWVO0yBTnyU4GY7+HmVQZHrrn1M/QF cO56IQjl6sBzWmL7/BcjLU68Pe8G4h5NKg53To3iPNrkGP/7qgBOhL5jxkzRqCz1ZU LorKCoHGIv1Si/A2BiH8ofxs4Nx/4T1Ne9uGC4Mo= Date: Thu, 7 Dec 2023 16:28:45 +0200 From: Laurent Pinchart To: Alexander Stein Cc: Mauro Carvalho Chehab , Shawn Guo , Sascha Hauer , Fabio Estevam , Pengutronix Kernel Team , NXP Linux Team , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2 1/1] media: nxp: imx8-isi-debug: Add missing 36-Bit DMA registers to debugfs output Message-ID: <20231207142845.GB15521@pendragon.ideasonboard.com> References: <20231207110918.1338524-1-alexander.stein@ew.tq-group.com> <20231207135539.GJ9675@pendragon.ideasonboard.com> <10383921.nUPlyArG6x@steina-w> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <10383921.nUPlyArG6x@steina-w> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231207_062840_937328_1D916497 X-CRM114-Status: GOOD ( 27.80 ) 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 Alexander, On Thu, Dec 07, 2023 at 03:15:10PM +0100, Alexander Stein wrote: > Am Donnerstag, 7. Dezember 2023, 14:55:39 CET schrieb Laurent Pinchart: > > On Thu, Dec 07, 2023 at 12:09:18PM +0100, Alexander Stein wrote: > > > The extended address registers are missing in the debug output register > > > list. These are only available on 36-Bit DMA platforms. Due to the > > > prolonged name, the output width has to be adjusted as well. > > > > > > Signed-off-by: Alexander Stein > > > --- > > > Changes in v2: > > > * Split register set into regular and 36-Bit DMA only > > > * Adjust output width to address longer register names > > > > > > Currently only tested on TQMa8MPxL (imx8mp-tqma8mpql-mba8mpxl.dts) > > > > > > .../platform/nxp/imx8-isi/imx8-isi-debug.c | 28 +++++++++++++++++-- > > > 1 file changed, 25 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-debug.c > > > b/drivers/media/platform/nxp/imx8-isi/imx8-isi-debug.c index > > > 6709ab7ea1f3..398864b5e506 100644 > > > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-debug.c > > > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-debug.c > > > @@ -22,10 +22,11 @@ static inline u32 mxc_isi_read(struct mxc_isi_pipe > > > *pipe, u32 reg)> > > > static int mxc_isi_debug_dump_regs_show(struct seq_file *m, void *p) > > > { > > > #define MXC_ISI_DEBUG_REG(name) { name, #name } > > > > > > - static const struct { > > > + struct debug_regs { > > > > > > u32 offset; > > > const char * const name; > > > > > > - } registers[] = { > > > + }; > > > + static const struct debug_regs registers[] = { > > > > > > MXC_ISI_DEBUG_REG(CHNL_CTRL), > > > MXC_ISI_DEBUG_REG(CHNL_IMG_CTRL), > > > MXC_ISI_DEBUG_REG(CHNL_OUT_BUF_CTRL), > > > > > > @@ -67,6 +68,16 @@ static int mxc_isi_debug_dump_regs_show(struct seq_file > > > *m, void *p)> > > > MXC_ISI_DEBUG_REG(CHNL_SCL_IMG_CFG), > > > MXC_ISI_DEBUG_REG(CHNL_FLOW_CTRL), > > > > > > }; > > > > > > + /* There registers contain the upper 4Bits of 36-Bit DMA addresses */ > > > > s/There/These/ > > > > > + static const struct debug_regs registers_36bit_dma[] = { > > > + MXC_ISI_DEBUG_REG(CHNL_Y_BUF1_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_U_BUF1_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_V_BUF1_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_Y_BUF2_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_U_BUF2_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_V_BUF2_XTND_ADDR), > > > + MXC_ISI_DEBUG_REG(CHNL_IN_BUF_XTND_ADDR), > > > + }; > > > > > > struct mxc_isi_pipe *pipe = m->private; > > > unsigned int i; > > > > > > @@ -77,10 +88,21 @@ static int mxc_isi_debug_dump_regs_show(struct > > > seq_file *m, void *p)> > > > seq_printf(m, "--- ISI pipe %u registers ---\n", pipe->id); > > > > > > for (i = 0; i < ARRAY_SIZE(registers); ++i) > > > > > > - seq_printf(m, "%20s[0x%02x]: 0x%08x\n", > > > + seq_printf(m, "%21s[0x%02x]: 0x%08x\n", > > > > > > registers[i].name, registers[i].offset, > > > mxc_isi_read(pipe, registers[i].offset)); > > > > > > + if (pipe->isi->pdata->has_36bit_dma) { > > > + for (i = 0; i < ARRAY_SIZE(registers_36bit_dma); ++i) { > > > + const struct debug_regs *reg = aregisters_36bit_dma[i]; > > > + > > > + seq_printf(m, "%21s[0x%02x]: 0x%08x\n", > > > + reg->name, > > > + reg->offset, > > > + mxc_isi_read(pipe, reg->offset)); > > > > Lines should be aligned under the "m" of the first line. > > > > I'll fix these small issues when applying, no need to send a v3. > > > > Reviewed-by: Laurent Pinchart > > For the records: Also tested on TQMa8MxNL (imx8mn-tqma8mqnl-mba8mx.dts). As > expected it prints only the same registers as before. Thank you. Can I add Tested-by: Alexander Stein # on imx8mn ? > > > + } > > > + } > > > + > > > > > > pm_runtime_put(pipe->isi->dev); > > > > > > return 0; -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel