summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2019-08-31 14:27:13 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-09-13 17:36:29 -0500
commit39857252e5e50edd90bff444ca0e3375aed68a94 (patch)
tree18fe8fb7d6e82e7e323ff6e479b17973a9b984aa /drivers
parent8bf2485aec63b9a9cc81ad795e1bb7fda19bf33c (diff)
downloadlinux-39857252e5e50edd90bff444ca0e3375aed68a94.tar.bz2
drm/amdgpu: only apply gds clearing workaround when ras is supported
gds clearing workaround should only be applied on asics that support gfx ras 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')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 1bd2f56186f2..6065f363fa85 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4205,6 +4205,10 @@ static int gfx_v9_0_do_edc_gds_workarounds(struct amdgpu_device *adev)
struct amdgpu_ring *ring = &adev->gfx.compute_ring[0];
int i, r;
+ /* only support when RAS is enabled */
+ if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
+ return 0;
+
r = amdgpu_ring_alloc(ring, 7);
if (r) {
DRM_ERROR("amdgpu: GDS workarounds failed to lock ring %s (%d).\n",