linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/tve200: Use drm_* variants for logging
@ 2022-09-28  9:31 Khalid Masum
  2022-10-03 18:54 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Khalid Masum @ 2022-09-28  9:31 UTC (permalink / raw)
  To: Linus Walleij, David Airlie, Daniel Vetter, dri-devel, linux-kernel
  Cc: Khalid Masum

We have routines like drm_info/warn/err for logging. Use them instead
of dev_* variants to get drm-formatted log messages.

Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
---
 drivers/gpu/drm/tve200/tve200_display.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/tve200/tve200_display.c b/drivers/gpu/drm/tve200/tve200_display.c
index 771bad881714..d453581b6b18 100644
--- a/drivers/gpu/drm/tve200/tve200_display.c
+++ b/drivers/gpu/drm/tve200/tve200_display.c
@@ -60,7 +60,7 @@ irqreturn_t tve200_irq(int irq, void *data)
 		}
 		writel(val, priv->regs + TVE200_CTRL);
 	} else
-		dev_err(priv->drm->dev, "stray IRQ %08x\n", stat);
+		drm_err(priv->drm, "stray IRQ %08x\n", stat);
 
 	/* Clear the interrupt once done */
 	writel(stat, priv->regs + TVE200_INT_CLR);
@@ -146,7 +146,7 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
 	}
 	if (retries == 5 &&
 	    readl(priv->regs + TVE200_CTRL_4) & TVE200_CTRL_4_RESET) {
-		dev_err(drm->dev, "can't get hardware out of reset\n");
+		drm_err(drm, "can't get hardware out of reset\n");
 		return;
 	}
 
@@ -171,14 +171,14 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
 	if ((mode->hdisplay == 352 && mode->vdisplay == 240) || /* SIF(525) */
 	    (mode->hdisplay == 352 && mode->vdisplay == 288)) { /* CIF(625) */
 		ctrl1 |= TVE200_CTRL_IPRESOL_CIF;
-		dev_info(drm->dev, "CIF mode\n");
+		drm_info(drm, "CIF mode\n");
 	} else if (mode->hdisplay == 640 && mode->vdisplay == 480) {
 		ctrl1 |= TVE200_CTRL_IPRESOL_VGA;
-		dev_info(drm->dev, "VGA mode\n");
+		drm_info(drm, "VGA mode\n");
 	} else if ((mode->hdisplay == 720 && mode->vdisplay == 480) ||
 		   (mode->hdisplay == 720 && mode->vdisplay == 576)) {
 		ctrl1 |= TVE200_CTRL_IPRESOL_D1;
-		dev_info(drm->dev, "D1 mode\n");
+		drm_info(drm, "D1 mode\n");
 	}
 
 	if (format & DRM_FORMAT_BIG_ENDIAN) {
@@ -226,7 +226,7 @@ static void tve200_display_enable(struct drm_simple_display_pipe *pipe,
 		ctrl1 |= TVE200_IPDMOD_YUV420;
 		break;
 	default:
-		dev_err(drm->dev, "Unknown FB format 0x%08x\n",
+		drm_err(drm, "Unknown FB format 0x%08x\n",
 			fb->format->format);
 		break;
 	}
-- 
2.37.3


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

* Re: [PATCH] drm/tve200: Use drm_* variants for logging
  2022-09-28  9:31 [PATCH] drm/tve200: Use drm_* variants for logging Khalid Masum
@ 2022-10-03 18:54 ` Linus Walleij
  2022-10-09  2:15   ` Khalid Masum
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2022-10-03 18:54 UTC (permalink / raw)
  To: Khalid Masum; +Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel

On Wed, Sep 28, 2022 at 11:31 AM Khalid Masum <khalid.masum.92@gmail.com> wrote:

> We have routines like drm_info/warn/err for logging. Use them instead
> of dev_* variants to get drm-formatted log messages.
>
> Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>

So is this the new thing? We've been through:
- DRM_INFO_ETC BIG CAPITAL LETTER MACROS
- Just use dev_info() & friends like everyone else
- Now drm_info() & co

Note I don't wanna bikeshed about this, just tell me there is
consensus now so we know what to do.

Yours,
Linus Walleij

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

* Re: [PATCH] drm/tve200: Use drm_* variants for logging
  2022-10-03 18:54 ` Linus Walleij
@ 2022-10-09  2:15   ` Khalid Masum
  0 siblings, 0 replies; 3+ messages in thread
From: Khalid Masum @ 2022-10-09  2:15 UTC (permalink / raw)
  To: Linus Walleij; +Cc: David Airlie, Daniel Vetter, dri-devel, linux-kernel

On Tue, Oct 4, 2022 at 12:54 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Sep 28, 2022 at 11:31 AM Khalid Masum <khalid.masum.92@gmail.com> wrote:
>
> > We have routines like drm_info/warn/err for logging. Use them instead
> > of dev_* variants to get drm-formatted log messages.
> >
> > Signed-off-by: Khalid Masum <khalid.masum.92@gmail.com>
>
> So is this the new thing? We've been through:
> - DRM_INFO_ETC BIG CAPITAL LETTER MACROS
> - Just use dev_info() & friends like everyone else
> - Now drm_info() & co
>
> Note I don't wanna bikeshed about this, just tell me there is
> consensus now so we know what to do.

Hi,

I was working on a TODO described here:
https://github.com/torvalds/linux/blob/master/Documentation/gpu/todo.rst#convert-logging-to-drm_-functions-with-drm_device-paramater

"Convert logging to drm_* functions with drm_device paramater". I do not
know of any consensus by the way.

>
> Yours,
> Linus Walleij

Thanks,
  -- Khalid Masum

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

end of thread, other threads:[~2022-10-09  2:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28  9:31 [PATCH] drm/tve200: Use drm_* variants for logging Khalid Masum
2022-10-03 18:54 ` Linus Walleij
2022-10-09  2:15   ` Khalid Masum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).