[2/2] drm/amdgpu: For bare metal, use kiq to do invalidate tlb

Submitted by Deng, Emily on Aug. 15, 2018, 12:54 p.m.

Details

Message ID 1534337675-25039-2-git-send-email-Emily.Deng@amd.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deng, Emily Aug. 15, 2018, 12:54 p.m.
Remove the amdgpu_sriov_vf checking.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index e010166..1257bac 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4362,7 +4362,7 @@  static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
 
 	fw_version_ok = (adev->asic_type == CHIP_VEGA10) ? fw_version_ok : false;
 
-	if (amdgpu_sriov_vf(adev) && fw_version_ok)
+	if (fw_version_ok)
 		gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1,
 				      ref, mask, 0x20);
 	else
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 9726c7e..6d821ee 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -393,11 +393,9 @@  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);
 
-		if (amdgpu_sriov_vf(adev)) {
-			r = amdgpu_kiq_reg_write_reg_wait(adev, hub, eng, tmp, vmid);
-			if (!r)
-				continue;
-		}
+		r = amdgpu_kiq_reg_write_reg_wait(adev, hub, eng, tmp, vmid);
+		if (!r)
+			continue;
 
 		WREG32_NO_KIQ(hub->vm_inv_eng0_req + eng, tmp);