[PATCH 09/30] drm/amdgpu/gmc12: use MMIO for TLB flushes
Alex Deucher <[email protected]>
| Newsgroups | org.freedesktop.lists.amd-gfx |
|---|---|
| Message-ID | <[email protected]> |
MES has a dedicated pipe for these sort of tasks on GC12 so it shouldn't be an issue. MES is used to avoid disallowing GFXOFF, but since the MES will wake GFX anyway to execute the flush, just disallow it when we flush and use MMIO for consistency with other chips. Signed-off-by: Alex Deucher <[email protected]> --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index 3b1fe15fa1c01..cffc818880d12 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -968,8 +968,18 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block) if (r) return r; - adev->gmc.use_mmio_for_tlb_flush = - !(amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)); + switch (amdgpu_ip_version(adev, GC_HWIP, 0)) { + case IP_VERSION(12, 0, 0): + case IP_VERSION(12, 0, 1): + default: + adev->gmc.use_mmio_for_tlb_flush = + !amdgpu_sriov_runtime(adev); + break; + case IP_VERSION(12, 1, 0): + adev->gmc.use_mmio_for_tlb_flush = + !(amdgpu_sriov_runtime(adev) || !amdgpu_sriov_vf(adev)); + break; + } return 0; } -- 2.55.0