]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: Use the correct flush_type in flush_gpu_tlb_pasid
authorFelix Kuehling <Felix.Kuehling@amd.com>
Sat, 18 Jan 2020 01:08:42 +0000 (20:08 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Jan 2020 21:46:44 +0000 (16:46 -0500)
The flush_type was incorrectly hard-coded to 0 when calling falling back
to MMIO-based invalidation in flush_gpu_tlb_pasid.

Fixes: ebc3e0b58e01 ("drm/amdgpu: export function to flush TLB via pasid")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Oak Zeng <Oak.Zeng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 67318b75f5b87773a8de4035eddeda6d6a3e2359..9775eca6fe434e044d21741eb5123ca16f2ec340 100644 (file)
@@ -443,10 +443,10 @@ static int gmc_v10_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
                        if (all_hub) {
                                for (i = 0; i < adev->num_vmhubs; i++)
                                        gmc_v10_0_flush_gpu_tlb(adev, vmid,
-                                                       i, 0);
+                                                       i, flush_type);
                        } else {
                                gmc_v10_0_flush_gpu_tlb(adev, vmid,
-                                               AMDGPU_GFXHUB_0, 0);
+                                               AMDGPU_GFXHUB_0, flush_type);
                        }
                        break;
                }
index 6d95de1413c430ac6668ac76d148991af776286f..90216abf14a4c356732a7950284d835f19fbc9de 100644 (file)
@@ -602,10 +602,10 @@ static int gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,
                        if (all_hub) {
                                for (i = 0; i < adev->num_vmhubs; i++)
                                        gmc_v9_0_flush_gpu_tlb(adev, vmid,
-                                                       i, 0);
+                                                       i, flush_type);
                        } else {
                                gmc_v9_0_flush_gpu_tlb(adev, vmid,
-                                               AMDGPU_GFXHUB_0, 0);
+                                               AMDGPU_GFXHUB_0, flush_type);
                        }
                        break;
                }