drm/amdgpu: Print once if RAS unsupported
Subsystems (2)
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8 -8
@@ -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
Signature · 1 line
2.35.0.3.gb23dac905b
Deucher, Alexander
maintainer[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 <[email protected]>
Sent: Thursday, February 3, 2022 5:14 PM
To: [email protected] <[email protected]>
Cc: Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>
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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8 -8
@@ -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
PATCH 1/1 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8 -8
@@ -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
Signature · 1 line
2.35.0.3.gb23dac905b
Quoted 9 lines · Luben Tuikov
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.
Quoted 7 lines
Cc Alex Deucher <[email protected]>Cc Hawking Zhang <[email protected]>Cc John Clements <[email protected]>Cc Tao Zhou <[email protected]>Cc yipechai <[email protected]>Fixes e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified ras block data and ops")Signed-off-by Luben Tuikov <[email protected]>
Quoted 57 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +8
-8@@ -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
[AMD Official Use Only]
Quoted 89 lines
-----Original Message-----
From: Tuikov, Luben <[email protected]>
Sent: Friday, February 4, 2022 7:13 AM
To: [email protected]
Cc: Tuikov, Luben <[email protected]>; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>; Chai, Thomas <[email protected]>
Subject: [PATCH v1] drm/amdgpu: Print once if RAS unsupportedMESA 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 <[email protected]>Cc Hawking Zhang <[email protected]>Cc John Clements <[email protected]>Cc Tao Zhou <[email protected]>Cc yipechai <[email protected]>Fixes e93ea3d0cf434b ("drm/amdgpu: Modify gfx block to fit for the unified rasblock data and ops")
Signed-off-by Luben Tuikov <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-2@@ -952,8 +952,8 @@ int amdgpu_ras_query_error_status(structamdgpu_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));drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +6
-6return -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