dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com,
	karol.wachowski@linux.intel.com, lizhi.hou@amd.com,
	andrzej.kacprowski@linux.intel.com,
	Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Subject: [PATCH RESEND 1/2] drm/print: add drm_warn_ratelimited logging macro
Date: Thu, 20 Aug 2026 12:48:10 +0200	[thread overview]
Message-ID: <20260820104811.803146-2-dawid.osuchowski@linux.intel.com> (raw)
In-Reply-To: <20260820104811.803146-1-dawid.osuchowski@linux.intel.com>

Add a drm_warn_ratelimited() macro to complement the existing
drm_err_ratelimited(), providing rate-limited logging at warning level
for drivers that need it.

Signed-off-by: Dawid Osuchowski <dawid.osuchowski@linux.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 2adc5ac688e1..0805903c093b 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -644,6 +644,9 @@ static inline struct device *__drm_to_dev(const struct drm_device *drm)
 #define drm_err_ratelimited(drm, fmt, ...)				\
 	__drm_printk((drm), err, _ratelimited, "*ERROR* " fmt, ##__VA_ARGS__)
 
+#define drm_warn_ratelimited(drm, fmt, ...)				\
+	__drm_printk((drm), warn, _ratelimited, fmt, ##__VA_ARGS__)
+
 
 #define drm_dbg_core(drm, fmt, ...)					\
 	drm_dev_dbg(__drm_to_dev(drm), DRM_UT_CORE, fmt, ##__VA_ARGS__)
-- 
2.43.0


  reply	other threads:[~2026-08-20 10:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 10:48 [PATCH RESEND 0/2] drm: add drm_warn_ratelimited() and convert ivpu to use it Dawid Osuchowski
2026-08-20 10:48 ` Dawid Osuchowski [this message]
2026-08-20 10:57   ` [PATCH RESEND 1/2] drm/print: add drm_warn_ratelimited logging macro Wachowski, Karol
2026-08-20 10:48 ` [PATCH RESEND 2/2] accel/ivpu: Use drm_warn_ratelimited macro Dawid Osuchowski
2026-08-20 10:57   ` Wachowski, Karol

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=20260820104811.803146-2-dawid.osuchowski@linux.intel.com \
    --to=dawid.osuchowski@linux.intel.com \
    --cc=andrzej.kacprowski@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=karol.wachowski@linux.intel.com \
    --cc=lizhi.hou@amd.com \
    --cc=oded.gabbay@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox