From: Likun Gao <[email protected]>

Skip for gfxhub tlb flush for gc v12_1 if gfx is not poweron.

Signed-off-by: Likun Gao <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c
index bef28aedfb93b..3c6b6c6f0cfc6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_1.c
@@ -319,6 +319,10 @@ static void gmc_v12_1_flush_gpu_tlb(struct amdgpu_device 
*adev, uint32_t vmid,
 {
        u32 inst;
 
+       if (AMDGPU_IS_GFXHUB(vmhub) &&
+           !adev->gfx.is_poweron)
+               return;
+
        if (vmhub >= AMDGPU_MMHUB0(0))
                inst = 0;
        else
-- 
2.52.0

Reply via email to