mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Drop debug print at boot with DPI enabled.
@ 2017-02-08 20:47 Eric Anholt
  2017-02-09 17:11 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Anholt @ 2017-02-08 20:47 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-kernel, Eric Anholt

Unlike the other encoders in the driver, I've also dropped the debug
dump function.  There's only really one register to this device, and
we have the debugfs reg entry still.

Signed-off-by: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/vc4/vc4_dpi.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
index 1e1f6b8184d0..3f360cf6cf5a 100644
--- a/drivers/gpu/drm/vc4/vc4_dpi.c
+++ b/drivers/gpu/drm/vc4/vc4_dpi.c
@@ -144,17 +144,6 @@ static const struct {
 	DPI_REG(DPI_ID),
 };
 
-static void vc4_dpi_dump_regs(struct vc4_dpi *dpi)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) {
-		DRM_INFO("0x%04x (%s): 0x%08x\n",
-			 dpi_regs[i].reg, dpi_regs[i].name,
-			 DPI_READ(dpi_regs[i].reg));
-	}
-}
-
 #ifdef CONFIG_DEBUG_FS
 int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused)
 {
@@ -416,8 +405,6 @@ static int vc4_dpi_bind(struct device *dev, struct device *master, void *data)
 	if (IS_ERR(dpi->regs))
 		return PTR_ERR(dpi->regs);
 
-	vc4_dpi_dump_regs(dpi);
-
 	if (DPI_READ(DPI_ID) != DPI_ID_VALUE) {
 		dev_err(dev, "Port returned 0x%08x for ID instead of 0x%08x\n",
 			DPI_READ(DPI_ID), DPI_ID_VALUE);
-- 
2.11.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/vc4: Drop debug print at boot with DPI enabled.
  2017-02-08 20:47 [PATCH] drm/vc4: Drop debug print at boot with DPI enabled Eric Anholt
@ 2017-02-09 17:11 ` Daniel Vetter
  2017-02-15 20:56   ` Eric Anholt
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Vetter @ 2017-02-09 17:11 UTC (permalink / raw)
  To: Eric Anholt; +Cc: dri-devel, linux-kernel

On Wed, Feb 08, 2017 at 12:47:01PM -0800, Eric Anholt wrote:
> Unlike the other encoders in the driver, I've also dropped the debug
> dump function.  There's only really one register to this device, and
> we have the debugfs reg entry still.
> 
> Signed-off-by: Eric Anholt <eric@anholt.net>

Yeah, dmesg spew by default isn't cool. Btw if you ever want to have fancy
debug printers, there's drm_printer, which allows you to spam both dmesg
and debugfs with the same code. Rob did that, I recently converted drm_mm,
it's pretty cool.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/vc4/vc4_dpi.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c
> index 1e1f6b8184d0..3f360cf6cf5a 100644
> --- a/drivers/gpu/drm/vc4/vc4_dpi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dpi.c
> @@ -144,17 +144,6 @@ static const struct {
>  	DPI_REG(DPI_ID),
>  };
>  
> -static void vc4_dpi_dump_regs(struct vc4_dpi *dpi)
> -{
> -	int i;
> -
> -	for (i = 0; i < ARRAY_SIZE(dpi_regs); i++) {
> -		DRM_INFO("0x%04x (%s): 0x%08x\n",
> -			 dpi_regs[i].reg, dpi_regs[i].name,
> -			 DPI_READ(dpi_regs[i].reg));
> -	}
> -}
> -
>  #ifdef CONFIG_DEBUG_FS
>  int vc4_dpi_debugfs_regs(struct seq_file *m, void *unused)
>  {
> @@ -416,8 +405,6 @@ static int vc4_dpi_bind(struct device *dev, struct device *master, void *data)
>  	if (IS_ERR(dpi->regs))
>  		return PTR_ERR(dpi->regs);
>  
> -	vc4_dpi_dump_regs(dpi);
> -
>  	if (DPI_READ(DPI_ID) != DPI_ID_VALUE) {
>  		dev_err(dev, "Port returned 0x%08x for ID instead of 0x%08x\n",
>  			DPI_READ(DPI_ID), DPI_ID_VALUE);
> -- 
> 2.11.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/vc4: Drop debug print at boot with DPI enabled.
  2017-02-09 17:11 ` Daniel Vetter
@ 2017-02-15 20:56   ` Eric Anholt
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Anholt @ 2017-02-15 20:56 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1003 bytes --]

Daniel Vetter <daniel@ffwll.ch> writes:

> On Wed, Feb 08, 2017 at 12:47:01PM -0800, Eric Anholt wrote:
>> Unlike the other encoders in the driver, I've also dropped the debug
>> dump function.  There's only really one register to this device, and
>> we have the debugfs reg entry still.
>> 
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>
> Yeah, dmesg spew by default isn't cool. Btw if you ever want to have fancy
> debug printers, there's drm_printer, which allows you to spam both dmesg
> and debugfs with the same code. Rob did that, I recently converted drm_mm,
> it's pretty cool.
>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Merged to -next, thanks.

The drm printer stuff looks really promising!  I'm also interested,
though, in the debugfs_regset32 stuff that lets you just name your regs
in a struct and pass it and your regs base address to the helper for
creating the debugfs entry.  I bet we can mash those two ideas together
into something really nice.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-15 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 20:47 [PATCH] drm/vc4: Drop debug print at boot with DPI enabled Eric Anholt
2017-02-09 17:11 ` Daniel Vetter
2017-02-15 20:56   ` Eric Anholt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®