summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc
diff options
context:
space:
mode:
authorKent Russell <kent.russell@amd.com>2020-02-12 09:33:13 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-02-12 16:04:31 -0500
commit00151afc6ff94bf38bf66dbdf377b26a94aaa8e6 (patch)
treec0f1673c208b784f31690d2933208eeab1250fb8 /drivers/gpu/drm/amd/powerplay/inc
parent79275af61eb2bef8d5ca0fc39b4ff7dc416b21cf (diff)
downloadlinux-00151afc6ff94bf38bf66dbdf377b26a94aaa8e6.tar.bz2
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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/pp_debug.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
index 822cd8b5bf90..cea65093b6ad 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/pp_debug.h
@@ -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)