drm/amdgpu: don't use kiq to flush gpu tlb if mes enabled
authorJack Xiao <Jack.Xiao@amd.com>
Thu, 31 Mar 2022 18:17:50 +0000 (14:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:43:49 +0000 (10:43 -0400)
If MES is enabled, don't use kiq to flush gpu tlb,
for it would result in conflicting with mes fw.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

index 9b4a035a5bf1e036d3b7ba28ad1fc8a61f24c316..b8c79789e1e49457736039f001df892566a7342c 100644 (file)
@@ -328,7 +328,7 @@ static void gmc_v10_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,
        /* For SRIOV run time, driver shouldn't access the register through MMIO
         * Directly use kiq to do the vm invalidation instead
         */
-       if (adev->gfx.kiq.ring.sched.ready &&
+       if (adev->gfx.kiq.ring.sched.ready && !adev->enable_mes &&
            (amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)) &&
            down_read_trylock(&adev->reset_domain->sem)) {
                struct amdgpu_vmhub *hub = &adev->vmhub[vmhub];