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 0A0C5C4167B for ; Thu, 7 Dec 2023 13:56:08 +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=M3PYkk8HF9XDq4ETk21k0+6fBfyyDayUbY9cHHttFCw=; b=mrDcmeoXMQDGJx ZzmlgPewjHILZwBl3DT+qsl0mhBPpJJVx9uXERWjw6v8hfQ6YuKcT3dx3l4jWjyWCFsz4A/Gvs/2K ZvyQHvpQjASlMK12dSNq9XoWvFi+J0G+KikzdLYEtxieUpVCpt9ZZPBQWhUp5Rsve5b8oKjhot6yh 34WXAbYtoivcOvtRkRe04zSxv+8EVYmVVltt2P5lwcTMvWMN3gsEr3dbrY6+uVfJTTXcX4xe6zIqD 9eCIAKf7vOFKUUANZ/SHBxG9jOxaXl7G9khTmxAsqp0rEpWb4eab3L41lS4OmRtmBXNGrOqLToHw+ g3wLjoPy/+leO1ITIUiQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rBEqq-00CxHu-21; Thu, 07 Dec 2023 13:55:40 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rBEqm-00CxEG-18 for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 13:55:38 +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 68257552; Thu, 7 Dec 2023 14:54:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1701957292; bh=OFpJzwelwgBs/XgEh6SwRpEDvhXjJ+wofaBgDTj7akI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FkjPM1wrVoT1eWhZROkheCiaHOTGg52RtGSeWhVEz+mqY/WfzPMmFyAsT8UysinlH aXUm8iheXBz8APwZN3m7FEKil7xFad5STYx0KYmEEr6n0vXqo5FSGxyP8MyltTYUDo Jnq1DdXXwR06he3Hhs7SpWoQsbrRozdnsSaU3Mxw= Date: Thu, 7 Dec 2023 15:55:39 +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: <20231207135539.GJ9675@pendragon.ideasonboard.com> References: <20231207110918.1338524-1-alexander.stein@ew.tq-group.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231207110918.1338524-1-alexander.stein@ew.tq-group.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231207_055536_528416_95E6035D X-CRM114-Status: GOOD ( 23.71 ) 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, Thank you for the patch. 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 = ®isters_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 > + } > + } > + > 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