Re: [PATCH 3/3] drm/ast: Use per-device logging macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
>>> Acked-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
>>>
>>> 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@xxxxxxxxxxxxxxxxxxxxx
> 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

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux