Re: [PATCH 2/2] drm/amdgpu: Limit the error info print rate

2020-08-18 Thread Nirmoy

Acked-by: Nirmoy Das 

On 8/18/20 3:43 PM, Deng, Emily wrote:

[AMD Official Use Only - Internal Distribution Only]

[AMD Official Use Only - Internal Distribution Only]

Ping ...
What about this patch.


-Original Message-
From: Emily.Deng 
Sent: Tuesday, August 18, 2020 5:42 PM
To: amd-gfx@lists.freedesktop.org
Cc: Deng, Emily 
Subject: [PATCH 2/2] drm/amdgpu: Limit the error info print rate

From: jqdeng 

Use function printk_ratelimit to limit the print rate.

Signed-off-by: jqdeng 
Change-Id: Ief05debe30d975cbcf88e473c9f486d70b5a202c
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index a94b3f862fc2..727b909b4b9e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -1296,7 +1296,8 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void
*data, struct drm_file *filp)

r = amdgpu_cs_parser_init(, 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;
}

--
2.25.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfxdata=02%7C01%7Cnirmoy.das%40amd.com%7C3dced10477a64f725ec908d8437cbcfe%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637333550337050316sdata=acJSHuHMYH7THStjQ1QwjPvUbEnQGlwNL%2FaNDbLDT6M%3Dreserved=0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


RE: [PATCH 2/2] drm/amdgpu: Limit the error info print rate

2020-08-18 Thread Deng, Emily
[AMD Official Use Only - Internal Distribution Only]

Ping ...
What about this patch.

>-Original Message-
>From: Emily.Deng 
>Sent: Tuesday, August 18, 2020 5:42 PM
>To: amd-gfx@lists.freedesktop.org
>Cc: Deng, Emily 
>Subject: [PATCH 2/2] drm/amdgpu: Limit the error info print rate
>
>From: jqdeng 
>
>Use function printk_ratelimit to limit the print rate.
>
>Signed-off-by: jqdeng 
>Change-Id: Ief05debe30d975cbcf88e473c9f486d70b5a202c
>---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>index a94b3f862fc2..727b909b4b9e 100644
>--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
>@@ -1296,7 +1296,8 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void
>*data, struct drm_file *filp)
>
> r = amdgpu_cs_parser_init(, 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;
> }
>
>--
>2.25.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx