diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2023-08-24 16:18:59 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-08-30 15:25:54 -0400 |
commit | ec70578c83eaf52b78488c887bc2d40a4c3bffe2 (patch) | |
tree | fa54d8cb0b4bef1dee74b755fe51f2c909493232 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
parent | e370f8f3897696b29f3ed2a774d22f6cc8b1fb04 (diff) |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 378478cf9c21..e47600a8e88e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -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; |