All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Print once if RAS unsupported
@ 2022-02-03 22:14 Luben Tuikov
  2022-02-03 22:18 ` Deucher, Alexander
  0 siblings, 1 reply; 5+ messages in thread
From: Luben Tuikov @ 2022-02-03 22:14 UTC (permalink / raw)
  To: amd-gfx
  Cc: Tao Zhou, yipechai, Luben Tuikov, Alex Deucher, John Clements,
	Hawking Zhang

MESA polls for errors every 2-3 seconds. Printing with dev_info() causes
the dmesg log to fill up with the same message, e.g,

[18028.206676] amdgpu 0000:0b:00.0: amdgpu: df doesn't config ras function.

Make it dev_info_once(), as it isn't something correctible during boot, so
printing just once is sufficient. Also sanitize the message.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Tao Zhou <tao.zhou1@amd.com>
Cc: yipechai <YiPeng.Chai@amd.com>
Fixes: e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras block data and ops")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 9d7c778c1a2d8e..cddbfbb1d6447a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
 	} else {
 		block_obj = amdgpu_ras_get_ras_block(adev, info->head.block, 0);
 		if (!block_obj || !block_obj->hw_ops)   {
-			dev_info(adev->dev, "%s doesn't config ras function.\n",
-					get_ras_block_str(&info->head));
+			dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+				      get_ras_block_str(&info->head));
 			return -EINVAL;
 		}
 
@@ -1028,8 +1028,8 @@ int amdgpu_ras_reset_error_status(struct amdgpu_device *adev,
 		return -EINVAL;
 
 	if (!block_obj || !block_obj->hw_ops)   {
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-				ras_block_str(block));
+		dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+			      ras_block_str(block));
 		return -EINVAL;
 	}
 
@@ -1066,8 +1066,8 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
 		return -EINVAL;
 
 	if (!block_obj || !block_obj->hw_ops)	{
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-					get_ras_block_str(&info->head));
+		dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+			      get_ras_block_str(&info->head));
 		return -EINVAL;
 	}
 
@@ -1717,8 +1717,8 @@ static void amdgpu_ras_error_status_query(struct amdgpu_device *adev,
 					info->head.sub_block_index);
 
 	if (!block_obj || !block_obj->hw_ops) {
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-			get_ras_block_str(&info->head));
+		dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+			      get_ras_block_str(&info->head));
 		return;
 	}
 

base-commit: cf33ae90884f254d683436fc2538b99dc4932447
-- 
2.35.0.3.gb23dac905b


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/amdgpu: Print once if RAS unsupported
  2022-02-03 22:14 [PATCH] drm/amdgpu: Print once if RAS unsupported Luben Tuikov
@ 2022-02-03 22:18 ` Deucher, Alexander
  2022-02-03 23:13   ` [PATCH v1] " Luben Tuikov
  0 siblings, 1 reply; 5+ messages in thread
From: Deucher, Alexander @ 2022-02-03 22:18 UTC (permalink / raw)
  To: Tuikov, Luben, amd-gfx
  Cc: Chai, Thomas, Zhou1, Tao, Clements, John, Zhang, Hawking

[-- Attachment #1: Type: text/plain, Size: 3941 bytes --]

[AMD Official Use Only]

We can probably just make these dev_dbg().  The vast majority of cards are non-RAS.  No need to print this at all in most cases.

Alex

________________________________
From: Tuikov, Luben <Luben.Tuikov@amd.com>
Sent: Thursday, February 3, 2022 5:14 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Clements, John <John.Clements@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>
Subject: [PATCH] drm/amdgpu: Print once if RAS unsupported

MESA polls for errors every 2-3 seconds. Printing with dev_info() causes
the dmesg log to fill up with the same message, e.g,

[18028.206676] amdgpu 0000:0b:00.0: amdgpu: df doesn't config ras function.

Make it dev_info_once(), as it isn't something correctible during boot, so
printing just once is sufficient. Also sanitize the message.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Tao Zhou <tao.zhou1@amd.com>
Cc: yipechai <YiPeng.Chai@amd.com>
Fixes: e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras block data and ops")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 9d7c778c1a2d8e..cddbfbb1d6447a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
         } else {
                 block_obj = amdgpu_ras_get_ras_block(adev, info->head.block, 0);
                 if (!block_obj || !block_obj->hw_ops)   {
-                       dev_info(adev->dev, "%s doesn't config ras function.\n",
-                                       get_ras_block_str(&info->head));
+                       dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+                                     get_ras_block_str(&info->head));
                         return -EINVAL;
                 }

@@ -1028,8 +1028,8 @@ int amdgpu_ras_reset_error_status(struct amdgpu_device *adev,
                 return -EINVAL;

         if (!block_obj || !block_obj->hw_ops)   {
-               dev_info(adev->dev, "%s doesn't config ras function.\n",
-                               ras_block_str(block));
+               dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+                             ras_block_str(block));
                 return -EINVAL;
         }

@@ -1066,8 +1066,8 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
                 return -EINVAL;

         if (!block_obj || !block_obj->hw_ops)   {
-               dev_info(adev->dev, "%s doesn't config ras function.\n",
-                                       get_ras_block_str(&info->head));
+               dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+                             get_ras_block_str(&info->head));
                 return -EINVAL;
         }

@@ -1717,8 +1717,8 @@ static void amdgpu_ras_error_status_query(struct amdgpu_device *adev,
                                         info->head.sub_block_index);

         if (!block_obj || !block_obj->hw_ops) {
-               dev_info(adev->dev, "%s doesn't config ras function.\n",
-                       get_ras_block_str(&info->head));
+               dev_info_once(adev->dev, "%s doesn't config RAS function\n",
+                             get_ras_block_str(&info->head));
                 return;
         }


base-commit: cf33ae90884f254d683436fc2538b99dc4932447
--
2.35.0.3.gb23dac905b


[-- Attachment #2: Type: text/html, Size: 8864 bytes --]

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v1] drm/amdgpu: Print once if RAS unsupported
  2022-02-03 22:18 ` Deucher, Alexander
@ 2022-02-03 23:13   ` Luben Tuikov
  2022-02-03 23:16     ` Alex Deucher
  2022-02-07  4:03     ` Zhou1, Tao
  0 siblings, 2 replies; 5+ messages in thread
From: Luben Tuikov @ 2022-02-03 23:13 UTC (permalink / raw)
  To: amd-gfx
  Cc: Tao Zhou, yipechai, Luben Tuikov, Alex Deucher, John Clements,
	Hawking Zhang

MESA polls for errors every 2-3 seconds. Printing with dev_info() causes
the dmesg log to fill up with the same message, e.g,

[18028.206676] amdgpu 0000:0b:00.0: amdgpu: df doesn't config ras function.

Make it dev_dbg_once(), as it isn't something correctible during boot or
thereafter, so printing just once is sufficient. Also sanitize the message.

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Tao Zhou <tao.zhou1@amd.com>
Cc: yipechai <YiPeng.Chai@amd.com>
Fixes: e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras block data and ops")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 9d7c778c1a2d8e..e440a5268acecf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
 	} else {
 		block_obj = amdgpu_ras_get_ras_block(adev, info->head.block, 0);
 		if (!block_obj || !block_obj->hw_ops)   {
-			dev_info(adev->dev, "%s doesn't config ras function.\n",
-					get_ras_block_str(&info->head));
+			dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
+				     get_ras_block_str(&info->head));
 			return -EINVAL;
 		}
 
@@ -1028,8 +1028,8 @@ int amdgpu_ras_reset_error_status(struct amdgpu_device *adev,
 		return -EINVAL;
 
 	if (!block_obj || !block_obj->hw_ops)   {
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-				ras_block_str(block));
+		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
+			     ras_block_str(block));
 		return -EINVAL;
 	}
 
@@ -1066,8 +1066,8 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
 		return -EINVAL;
 
 	if (!block_obj || !block_obj->hw_ops)	{
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-					get_ras_block_str(&info->head));
+		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
+			     get_ras_block_str(&info->head));
 		return -EINVAL;
 	}
 
@@ -1717,8 +1717,8 @@ static void amdgpu_ras_error_status_query(struct amdgpu_device *adev,
 					info->head.sub_block_index);
 
 	if (!block_obj || !block_obj->hw_ops) {
-		dev_info(adev->dev, "%s doesn't config ras function.\n",
-			get_ras_block_str(&info->head));
+		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
+			     get_ras_block_str(&info->head));
 		return;
 	}
 

base-commit: cf33ae90884f254d683436fc2538b99dc4932447
-- 
2.35.0.3.gb23dac905b


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v1] drm/amdgpu: Print once if RAS unsupported
  2022-02-03 23:13   ` [PATCH v1] " Luben Tuikov
@ 2022-02-03 23:16     ` Alex Deucher
  2022-02-07  4:03     ` Zhou1, Tao
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2022-02-03 23:16 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Tao Zhou, amd-gfx list, yipechai, Alex Deucher, John Clements,
	Hawking Zhang

On Thu, Feb 3, 2022 at 6:14 PM Luben Tuikov <luben.tuikov@amd.com> wrote:
>
> MESA polls for errors every 2-3 seconds. Printing with dev_info() causes
> the dmesg log to fill up with the same message, e.g,
>
> [18028.206676] amdgpu 0000:0b:00.0: amdgpu: df doesn't config ras function.
>
> Make it dev_dbg_once(), as it isn't something correctible during boot or
> thereafter, so printing just once is sufficient. Also sanitize the message.
>
> Cc: Alex Deucher <Alexander.Deucher@amd.com>
> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> Cc: John Clements <john.clements@amd.com>
> Cc: Tao Zhou <tao.zhou1@amd.com>
> Cc: yipechai <YiPeng.Chai@amd.com>
> Fixes: e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras block data and ops")
> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 9d7c778c1a2d8e..e440a5268acecf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
>         } else {
>                 block_obj = amdgpu_ras_get_ras_block(adev, info->head.block, 0);
>                 if (!block_obj || !block_obj->hw_ops)   {
> -                       dev_info(adev->dev, "%s doesn't config ras function.\n",
> -                                       get_ras_block_str(&info->head));
> +                       dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +                                    get_ras_block_str(&info->head));
>                         return -EINVAL;
>                 }
>
> @@ -1028,8 +1028,8 @@ int amdgpu_ras_reset_error_status(struct amdgpu_device *adev,
>                 return -EINVAL;
>
>         if (!block_obj || !block_obj->hw_ops)   {
> -               dev_info(adev->dev, "%s doesn't config ras function.\n",
> -                               ras_block_str(block));
> +               dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +                            ras_block_str(block));
>                 return -EINVAL;
>         }
>
> @@ -1066,8 +1066,8 @@ int amdgpu_ras_error_inject(struct amdgpu_device *adev,
>                 return -EINVAL;
>
>         if (!block_obj || !block_obj->hw_ops)   {
> -               dev_info(adev->dev, "%s doesn't config ras function.\n",
> -                                       get_ras_block_str(&info->head));
> +               dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +                            get_ras_block_str(&info->head));
>                 return -EINVAL;
>         }
>
> @@ -1717,8 +1717,8 @@ static void amdgpu_ras_error_status_query(struct amdgpu_device *adev,
>                                         info->head.sub_block_index);
>
>         if (!block_obj || !block_obj->hw_ops) {
> -               dev_info(adev->dev, "%s doesn't config ras function.\n",
> -                       get_ras_block_str(&info->head));
> +               dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +                            get_ras_block_str(&info->head));
>                 return;
>         }
>
>
> base-commit: cf33ae90884f254d683436fc2538b99dc4932447
> --
> 2.35.0.3.gb23dac905b
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH v1] drm/amdgpu: Print once if RAS unsupported
  2022-02-03 23:13   ` [PATCH v1] " Luben Tuikov
  2022-02-03 23:16     ` Alex Deucher
@ 2022-02-07  4:03     ` Zhou1, Tao
  1 sibling, 0 replies; 5+ messages in thread
From: Zhou1, Tao @ 2022-02-07  4:03 UTC (permalink / raw)
  To: Tuikov, Luben, amd-gfx
  Cc: Deucher, Alexander, Chai, Thomas, Clements, John, Zhang, Hawking

[AMD Official Use Only]

Reviewed-by: Tao Zhou <tao.zhou1@amd.com>

> -----Original Message-----
> From: Tuikov, Luben <Luben.Tuikov@amd.com>
> Sent: Friday, February 4, 2022 7:13 AM
> To: amd-gfx@lists.freedesktop.org
> Cc: Tuikov, Luben <Luben.Tuikov@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>;
> Clements, John <John.Clements@amd.com>; Zhou1, Tao
> <Tao.Zhou1@amd.com>; Chai, Thomas <YiPeng.Chai@amd.com>
> Subject: [PATCH v1] drm/amdgpu: Print once if RAS unsupported
> 
> MESA polls for errors every 2-3 seconds. Printing with dev_info() causes the
> dmesg log to fill up with the same message, e.g,
> 
> [18028.206676] amdgpu 0000:0b:00.0: amdgpu: df doesn't config ras function.
> 
> Make it dev_dbg_once(), as it isn't something correctible during boot or
> thereafter, so printing just once is sufficient. Also sanitize the message.
> 
> Cc: Alex Deucher <Alexander.Deucher@amd.com>
> Cc: Hawking Zhang <Hawking.Zhang@amd.com>
> Cc: John Clements <john.clements@amd.com>
> Cc: Tao Zhou <tao.zhou1@amd.com>
> Cc: yipechai <YiPeng.Chai@amd.com>
> Fixes: e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras
> block data and ops")
> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 9d7c778c1a2d8e..e440a5268acecf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(struct
> amdgpu_device *adev,
>  	} else {
>  		block_obj = amdgpu_ras_get_ras_block(adev, info->head.block,
> 0);
>  		if (!block_obj || !block_obj->hw_ops)   {
> -			dev_info(adev->dev, "%s doesn't config ras function.\n",
> -					get_ras_block_str(&info->head));
> +			dev_dbg_once(adev->dev, "%s doesn't config RAS
> function\n",
> +				     get_ras_block_str(&info->head));
>  			return -EINVAL;
>  		}
> 
> @@ -1028,8 +1028,8 @@ int amdgpu_ras_reset_error_status(struct
> amdgpu_device *adev,
>  		return -EINVAL;
> 
>  	if (!block_obj || !block_obj->hw_ops)   {
> -		dev_info(adev->dev, "%s doesn't config ras function.\n",
> -				ras_block_str(block));
> +		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +			     ras_block_str(block));
>  		return -EINVAL;
>  	}
> 
> @@ -1066,8 +1066,8 @@ int amdgpu_ras_error_inject(struct amdgpu_device
> *adev,
>  		return -EINVAL;
> 
>  	if (!block_obj || !block_obj->hw_ops)	{
> -		dev_info(adev->dev, "%s doesn't config ras function.\n",
> -					get_ras_block_str(&info->head));
> +		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +			     get_ras_block_str(&info->head));
>  		return -EINVAL;
>  	}
> 
> @@ -1717,8 +1717,8 @@ static void amdgpu_ras_error_status_query(struct
> amdgpu_device *adev,
>  					info->head.sub_block_index);
> 
>  	if (!block_obj || !block_obj->hw_ops) {
> -		dev_info(adev->dev, "%s doesn't config ras function.\n",
> -			get_ras_block_str(&info->head));
> +		dev_dbg_once(adev->dev, "%s doesn't config RAS function\n",
> +			     get_ras_block_str(&info->head));
>  		return;
>  	}
> 
> 
> base-commit: cf33ae90884f254d683436fc2538b99dc4932447
> --
> 2.35.0.3.gb23dac905b

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-07  4:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-03 22:14 [PATCH] drm/amdgpu: Print once if RAS unsupported Luben Tuikov
2022-02-03 22:18 ` Deucher, Alexander
2022-02-03 23:13   ` [PATCH v1] " Luben Tuikov
2022-02-03 23:16     ` Alex Deucher
2022-02-07  4:03     ` Zhou1, Tao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.