[RFC PATCH 3/4] drm: fixup DRM_DEBUG_KMS_RATELIMITED merge punt
Jim Cromie
jim.cromie at gmail.com
Sun May 30 19:21:45 UTC 2021
HEAD~2 punted on merging DRM_DEBUG_KMS_RATELIMITED; clean that up now,
removing the extra macro indirections which support !KMS cases, since
only _KMS_RATELIMITED is used. They can be re-added once needed.
conflict was here:
c5261e93758a drm/print: Fixup DRM_DEBUG_KMS_RATELIMITED()
Signed-off-by: Jim Cromie <jim.cromie at gmail.com>
---
include/drm/drm_print.h | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h
index 616fe5e83b50..9812bf11c1e9 100644
--- a/include/drm/drm_print.h
+++ b/include/drm/drm_print.h
@@ -571,20 +571,15 @@ void __drm_err(const char *format, ...);
#define DRM_DEBUG_DP(fmt, ...) \
__drm_dbg(cDRM_UT_DP, fmt, ## __VA_ARGS__)
-#define __DRM_DEFINE_DBG_RATELIMITED(category, drm, fmt, ...) \
-({ \
- static DEFINE_RATELIMIT_STATE(rs_, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);\
- const struct drm_device *drm_ = (drm); \
- \
- if (drm_debug_enabled(DRM_UT_ ## category) && __ratelimit(&rs_)) \
- drm_dev_dbg(NULL, cDRM_UT_KMS, fmt, ##__VA_ARGS__); \
+#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) \
+({ \
+ static DEFINE_RATELIMIT_STATE(rs_, DEFAULT_RATELIMIT_INTERVAL, \
+ DEFAULT_RATELIMIT_BURST); \
+ \
+ if (drm_debug_enabled(DRM_UT_KMS) && __ratelimit(&rs_)) \
+ __drm_dbg(cDRM_UT_KMS, fmt, ##__VA_ARGS__); \
})
-#define drm_dbg_kms_ratelimited(drm, fmt, ...) \
- __DRM_DEFINE_DBG_RATELIMITED(KMS, drm, fmt, ## __VA_ARGS__)
-
-#define DRM_DEBUG_KMS_RATELIMITED(fmt, ...) drm_dbg_kms_ratelimited(NULL, fmt, ## __VA_ARGS__)
-
/*
* struct drm_device based WARNs
*
--
2.31.1
More information about the dri-devel
mailing list