[Intel-gfx] [PATCH 1/2] drm/print: Add drm_dbg_ratelimited

Matthew Auld matthew.william.auld at gmail.com
Thu Nov 17 11:43:05 UTC 2022


On Thu, 13 Oct 2022 at 09:40, Nirmoy Das <nirmoy.das at intel.com> wrote:
>
> Add a function for ratelimitted debug print.
>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Maxime Ripard <mripard at kernel.org>
> Cc: Thomas Zimmermann <tzimmermann at suse.de>
> Cc: David Airlie <airlied at gmail.com>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>

> ---
>  include/drm/drm_print.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
> index 22fabdeed297..1e2e26378570 100644
> --- a/include/drm/drm_print.h
> +++ b/include/drm/drm_print.h
> @@ -562,6 +562,9 @@ void __drm_err(const char *format, ...);
>                 drm_dev_printk(drm_ ? drm_->dev : NULL, KERN_DEBUG, fmt, ## __VA_ARGS__);       \
>  })
>
> +#define drm_dbg_ratelimited(drm, fmt, ...) \
> +       __DRM_DEFINE_DBG_RATELIMITED(DRIVER, drm, fmt, ## __VA_ARGS__)
> +
>  #define drm_dbg_kms_ratelimited(drm, fmt, ...) \
>         __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
>
> --
> 2.37.3
>


More information about the dri-devel mailing list