All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: airlied@redhat.com, chen@aspeedtech.com, kraxel@redhat.com,
	dri-devel@lists.freedesktop.org, emil.velikov@collabora.com
Subject: Re: [PATCH 3/3] drm/ast: Use per-device logging macros
Date: Fri, 12 Jun 2020 09:01:37 +0200	[thread overview]
Message-ID: <20200612070137.GA172811@ravnborg.org> (raw)
In-Reply-To: <59164816-57b4-0279-56e9-a49a333ce839@suse.de>

Hi Thomas

On Fri, Jun 12, 2020 at 08:28:40AM +0200, Thomas Zimmermann wrote:
> Hi Sam
> 
> Am 11.06.20 um 21:24 schrieb Sam Ravnborg:
> > Hi Thomas.
> > On Thu, Jun 11, 2020 at 10:28:09AM +0200, Thomas Zimmermann wrote:
> >> Converts the ast driver to drm_info() and drm_err(). No functional
> >> changes are made.
> >>
> >> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > Acked-by: Sam Ravnborg <sam@ravnborg.org>
> > 
> > I hope you will later follow-up with a patch that introduces drm_WARN_*.
> 
> I only found DRM_INFO and DRM_ERROR calls. Did I miss any other warning
> macros?

The following:
ast_mode.c:     if (WARN_ON_ONCE(gpu_addr < 0))
ast_mode.c:     if (WARN_ON_ONCE(fb->width > AST_MAX_HWC_WIDTH) ||
ast_mode.c:         WARN_ON_ONCE(fb->height > AST_MAX_HWC_HEIGHT))
ast_mode.c:             if (WARN_ON_ONCE(off < 0))
ast_mode.c:     if (WARN_ON(!crtc->state))

can benefit from:

/*
 * struct drm_device based WARNs
 *
 * drm_WARN*() acts like WARN*(), but with the key difference of
 * using device specific information so that we know from which device
 * warning is originating from.
 *
 * Prefer drm_device based drm_WARN* over regular WARN*
 */

...

#define drm_WARN_ON(drm, x)                                             \
        drm_WARN((drm), (x), "%s",                                      \
                 "drm_WARN_ON(" __stringify(x) ")")

#define drm_WARN_ON_ONCE(drm, x)                                        \
        drm_WARN_ONCE((drm), (x), "%s",                                 \
                      "drm_WARN_ON_ONCE(" __stringify(x) ")")


Also from drm/drm_print.h

	Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-06-12  7:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11  8:28 [PATCH 0/3] ast cleanups Thomas Zimmermann
2020-06-11  8:28 ` [PATCH 1/3] drm/ast: Remove unused code paths for AST 1180 Thomas Zimmermann
2020-06-11 17:24   ` Daniel Vetter
2020-06-15 23:21   ` Emil Velikov
2020-06-17  7:13     ` Thomas Zimmermann
2020-06-11  8:28 ` [PATCH 2/3] drm/ast: Upcast from DRM device to ast structure via to_ast_private() Thomas Zimmermann
2020-06-11 17:32   ` Daniel Vetter
2020-06-12  6:31     ` Thomas Zimmermann
2020-06-11 19:23   ` Sam Ravnborg
2020-06-12  6:30     ` Thomas Zimmermann
2020-06-12  6:57       ` Daniel Vetter
2020-06-11  8:28 ` [PATCH 3/3] drm/ast: Use per-device logging macros Thomas Zimmermann
2020-06-11 17:33   ` Daniel Vetter
2020-06-11 19:24   ` Sam Ravnborg
2020-06-12  6:28     ` Thomas Zimmermann
2020-06-12  7:01       ` Sam Ravnborg [this message]
2020-06-12  7:12         ` Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200612070137.GA172811@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=airlied@redhat.com \
    --cc=chen@aspeedtech.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=kraxel@redhat.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.