Skip to contentSkip to conversation

drm/amdgpu: Remove unnecessary register program in SRIOV

PATCH In review Peng Ju Zhou 2 participants 2 messages Nov 1, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Remove unnecessary register program in SRIOV

Remove unnecessary register program in SRIOV

---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c +3 -0
index ff738e9725ee..6aa02d835ecb 100644
@@ -395,6 +395,9 @@ static void gfxhub_v2_1_gart_disable(struct amdgpu_device *adev)
 			    ENABLE_ADVANCED_DRIVER_MODEL, 0);
 	WREG32_SOC15(GC, 0, mmGCMC_VM_MX_L1_TLB_CNTL, tmp);
 
+	if (amdgpu_sriov_vf(adev))
+		return;
+
 	/* Setup L2 cache */
 	WREG32_FIELD15(GC, 0, GCVM_L2_CNTL, ENABLE_L2_CACHE, 0);
 	WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL3, 0);
Signature · 1 line
2.33.1
maintainer Acked-by on v1 1/1
#1 lore raw

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Peng Ju Zhou <[email protected]>
Sent: Monday, October 31, 2022 9:45 PM
To: [email protected] <[email protected]>
Subject: [PATCH] drm/amdgpu: Remove unnecessary register program in SRIOV

Remove unnecessary register program in SRIOV

---
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c +3 -0
index ff738e9725ee..6aa02d835ecb 100644
@@ -395,6 +395,9 @@ static void gfxhub_v2_1_gart_disable(struct amdgpu_device *adev)
                             ENABLE_ADVANCED_DRIVER_MODEL, 0);
         WREG32_SOC15(GC, 0, mmGCMC_VM_MX_L1_TLB_CNTL, tmp);
 
+       if (amdgpu_sriov_vf(adev))
+               return;
+
         /* Setup L2 cache */
         WREG32_FIELD15(GC, 0, GCVM_L2_CNTL, ENABLE_L2_CACHE, 0);
         WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL3, 0);

--
2.33.1