[PATCH 3/3] drm/ast: Use per-device logging macros
Thomas Zimmermann
tzimmermann at suse.de
Fri Jun 12 07:12:53 UTC 2020
Hi
Am 12.06.20 um 09:01 schrieb Sam Ravnborg:
> 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 at suse.de>
>>> Acked-by: Sam Ravnborg <sam at 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))
Thanks! I'll fix those.
Best regards
Thomas
>
> 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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200612/6ccd0513/attachment.sig>
More information about the dri-devel
mailing list