]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amdgpu: only apply gds clearing workaround when ras is supported
authorHawking Zhang <Hawking.Zhang@amd.com>
Sat, 31 Aug 2019 06:27:13 +0000 (14:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 13 Sep 2019 22:36:29 +0000 (17:36 -0500)
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>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index 1bd2f56186f25b9f5abcf06d0b0242aa5b4904c6..6065f363fa857eb4c409c6b6a73fdd33b50edfef 100644 (file)
@@ -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",