aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjqdeng <Emily.Deng@amd.com>2020-07-30 14:48:40 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-08-18 18:22:10 -0400
commit8e1d88f948f33f2e34dbf13c3e9fc4228f1331af (patch)
tree35cf8ad4a8a59ce9b2fbc2796a114e836044fe65
parent9a1cddd6374fb1eb166f40f10d5411e3699066d4 (diff)
downloadlinux-8e1d88f948f33f2e34dbf13c3e9fc4228f1331af.tar.gz
drm/amdgpu: Limit the error info print rate
Use function printk_ratelimit to limit the print rate. Signed-off-by: jqdeng <Emily.Deng@amd.com> Acked-by: Nirmoy Das <nirmoy.das@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index 10c0779aba73..e84a6e0bc784 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1305,7 +1305,8 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
r = amdgpu_cs_parser_init(&parser, data);
if (r) {
- DRM_ERROR("Failed to initialize parser %d!\n", r);
+ if (printk_ratelimit())
+ DRM_ERROR("Failed to initialize parser %d!\n", r);
goto out;
}