drm/powerplay: Ratelimit PP_ASSERT warnings
In certain situations the message could be reported dozens-to-hundreds of times, based on how often the function is called. E.g. If MCLK DPM, any calls to get/set MCLK will result in a failure message, potentially flooding dmesg. Ratelimit the warnings to avoid this flood. Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:

committed by
Alex Deucher

parent
79275af61e
commit
00151afc6f
@@ -37,7 +37,7 @@
|
||||
#define PP_ASSERT_WITH_CODE(cond, msg, code) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
pr_warn("%s\n", msg); \
|
||||
pr_warn_ratelimited("%s\n", msg); \
|
||||
code; \
|
||||
} \
|
||||
} while (0)
|
||||
@@ -45,7 +45,7 @@
|
||||
#define PP_ASSERT(cond, msg) \
|
||||
do { \
|
||||
if (!(cond)) { \
|
||||
pr_warn("%s\n", msg); \
|
||||
pr_warn_ratelimited("%s\n", msg); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
Reference in New Issue
Block a user