drm/amdgpu: Allow issue disable gfx ras cmd to firmware

Disable gfx ras command is needed in some use cases

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Hawking Zhang
2023-08-24 16:18:59 +08:00
committed by Alex Deucher
parent e370f8f389
commit ec70578c83

View File

@@ -769,9 +769,10 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
if (!con)
return -EINVAL;
/* Do not enable ras feature if it is not allowed */
if (enable &&
head->block != AMDGPU_RAS_BLOCK__GFX &&
/* For non-gfx ip, do not enable ras feature if it is not allowed */
/* For gfx ip, regardless of feature support status, */
/* Force issue enable or disable ras feature commands */
if (head->block != AMDGPU_RAS_BLOCK__GFX &&
!amdgpu_ras_is_feature_allowed(adev, head))
goto out;