]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Revert "drm/amdgpu: use GMC v9 KIQ workaround only for the GFXHUB" (v2)
authorChengming Gui <Jack.Gui@amd.com>
Fri, 16 Nov 2018 06:54:39 +0000 (14:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Nov 2018 20:33:24 +0000 (15:33 -0500)
With GFXOFF enabled, this patch will cause PCO amdgpu_test failed,
but GFXOFF is necessary for PCO, so revert the patch.

This reverts commit b83761bb0b09ec11c924afe9d88e458cb16a0372.

v2: add a comment for future reference (Alex)

Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 811231e4ec53a68bb322a99b86859e8417cdc9ca..3a4e5d8d5162dd0e4d404ad6cb9bcba36ae68733 100644 (file)
@@ -338,9 +338,12 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev,
                struct amdgpu_vmhub *hub = &adev->vmhub[i];
                u32 tmp = gmc_v9_0_get_invalidate_req(vmid, flush_type);
 
-               if (i == AMDGPU_GFXHUB && !adev->in_gpu_reset &&
-                   adev->gfx.kiq.ring.sched.ready &&
-                   (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev))) {
+               /* This is necessary for a HW workaround under SRIOV as well
+                * as GFXOFF under bare metal
+                */
+               if (adev->gfx.kiq.ring.sched.ready &&
+                   (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)) &&
+                   !adev->in_gpu_reset) {
                        uint32_t req = hub->vm_inv_eng0_req + eng;
                        uint32_t ack = hub->vm_inv_eng0_ack + eng;