On 20-Aug-26 12:48, Dawid Osuchowski wrote:
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 <[email protected]>
---
  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__)

Reviewed-by: Karol Wachowski <[email protected]>

Reply via email to