Skip to contentSkip to conversation

drm/amdgpu: Limit the error info print rate

PATCH New Emily.Deng 1 participant 1 message Aug 12, 2020

Subsystems (2)
lore
Share & tools
lore

Emily.Deng

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Limit the error info print rate

From: jqdeng <[email protected]>

Use function printk_ratelimit to limit the print rate.

Change-Id Ief05debe30d975cbcf88e473c9f486d70b5a202c
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +2 -1
index a94b3f862fc2..727b909b4b9e 100644
@@ -1296,7 +1296,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;
 	}
 
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx