KIQ handles scheduling on GC 9 so it can get delayed if
there are a lot of queues active.

KIQ was used to avoid disallowing GFXOFF, but since the
KIQ will wake GFX anyway, just disallow it when we
flush and use MMIO on vega20 and older.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 23de2caf13646..a91d0ddb6e729 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -2038,7 +2038,8 @@ static int gmc_v9_0_sw_init(struct amdgpu_ip_block 
*ip_block)
                amdgpu_gmc_sysfs_init(adev);
 
        adev->gmc.use_mmio_for_tlb_flush =
-               !(amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev));
+               !amdgpu_sriov_runtime(adev) &&
+               (amdgpu_ip_version(adev, GC_HWIP, 0) <= IP_VERSION(9, 4, 0));
 
        return 0;
 }
-- 
2.55.0

Reply via email to