[PATCH 1/2] drm/amdgpu: Add a filter condition to restrict the SW ras function to be registered only by asics whose hardware supports the ras function
yipechai
YiPeng.Chai at amd.com
Wed Jan 12 07:48:01 UTC 2022
Add a filter condition to restrict the SW ras function to be registered only by asics whose hardware supports the ras function.
Signed-off-by: yipechai <YiPeng.Chai at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index b1bedfd4febc..62be0b4909b3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -2754,7 +2754,7 @@ int amdgpu_ras_reset_gpu(struct amdgpu_device *adev)
int amdgpu_ras_register_ras_block(struct amdgpu_device *adev,
struct amdgpu_ras_block_object* ras_block_obj)
{
- if (!adev || !ras_block_obj)
+ if (!adev || !amdgpu_ras_asic_supported(adev) || !ras_block_obj)
return -EINVAL;
INIT_LIST_HEAD(&ras_block_obj->node);
--
2.25.1
More information about the amd-gfx
mailing list