diff mbox series

[1/2] drm/print: Add drm_dbg_ratelimited

Message ID 20221013084007.19843-1-nirmoy.das@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/print: Add drm_dbg_ratelimited | expand

Commit Message

Nirmoy Das Oct. 13, 2022, 8:40 a.m. UTC
Add a function for ratelimitted debug print.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: David Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 include/drm/drm_print.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Matthew Auld Nov. 17, 2022, 11:43 a.m. UTC | #1
On Thu, 13 Oct 2022 at 09:40, Nirmoy Das <nirmoy.das@intel.com> wrote:
>
> Add a function for ratelimitted debug print.
>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: David Airlie <airlied@gmail.com>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@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
>
diff mbox series

Patch

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__)