Skip to contentSkip to conversation

drm/amdgpu/gmc6: use amdgpu_asic_flush_hdp for gart tlb invalidations

PATCH In review Alex Deucher 2 participants 5 messages Jan 5, 2018 1 message not in the archive

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

PATCH 1/4 drm/amdgpu/gmc6: use amdgpu_asic_flush_hdp for gart tlb invalidations

Use the callback rather than open coding it.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
index 8e28270d1ea9..e47a1ba57aae 100644
@@ -359,7 +359,7 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
 static void gmc_v6_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,
 					uint32_t vmid)
 {
-	WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0);
+	amdgpu_asic_flush_hdp(adev);
 
 	WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid);
 }
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#2 lore raw

PATCH 2/4 drm/amdgpu/gmc7: use amdgpu_asic_flush_hdp for gart tlb invalidations

In reply to a message not in the archive

Use the callback rather than open coding it.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -1
index 86e9d682c59e..9db2e88b091a 100644
@@ -432,7 +432,7 @@ static void gmc_v7_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,
 					uint32_t vmid)
 {
 	/* flush hdp cache */
-	WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0);
+	amdgpu_asic_flush_hdp(adev);
 
 	/* bits 0-15 are the VM contexts0-15 */
 	WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid);
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw

PATCH 3/4 drm/amdgpu/gmc8: use amdgpu_asic_flush_hdp for gart tlb invalidations

In reply to a message not in the archive

Use the callback rather than open coding it.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +1 -1
index 9a813d834f1a..d197e4dd9bbc 100644
@@ -607,7 +607,7 @@ static void gmc_v8_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,
 					uint32_t vmid)
 {
 	/* flush hdp cache */
-	WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0);
+	amdgpu_asic_flush_hdp(adev);
 
 	/* bits 0-15 are the VM contexts0-15 */
 	WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid);
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#4 lore raw

PATCH 4/4 drm/amdgpu/gmc9: use amdgpu_asic_flush_hdp for gart tlb invalidations

In reply to a message not in the archive

Use the callback rather than open coding it.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +1 -1
index eb8b1bb66389..72e82e05bb3e 100644
@@ -330,7 +330,7 @@ static void gmc_v9_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,
 	unsigned i, j;
 
 	/* flush hdp cache */
-	adev->nbio_funcs->hdp_flush(adev);
+	amdgpu_asic_flush_hdp(adev);
 
 	spin_lock(&adev->mc.invalidate_lock);
 
Signature · 6 lines
2.13.6

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#5 lore raw
In reply to a message not in the archive

Am 05.01.2018 um 05:30 schrieb Alex Deucher:

Quoted 3 lines

Use the callback rather than open coding it.

I would rather prefer if the caller of flush_gpu_tlb calls amdgpu_asic_flush_hdp().

IIRC we have exactly one which calls this and the other one actually wants to call amdgpu_asic_flush_hdp() only.

Regards,
Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +0 -0
index 8e28270d1ea9..e47a1ba57aae 100644

drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c static int gmc_v6_0_mc_init(struct amdgpu_device *adev) · line 365

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +1 -1
@@ -359,7 +359,7 @@ static int gmc_v6_0_mc_init(struct amdgpu_device *adev)
  static void gmc_v6_0_gart_flush_gpu_tlb(struct amdgpu_device *adev,
  					uint32_t vmid)
  {
-	WREG32(mmHDP_MEM_COHERENCY_FLUSH_CNTL, 0);
+	amdgpu_asic_flush_hdp(adev);
 
  	WREG32(mmVM_INVALIDATE_REQUEST, 1 << vmid);
  }

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx