[PATCH] drm/amdgpu: Don't flush HDP on A+A

Eric Huang jinhuieric.huang at amd.com
Tue May 25 17:56:32 UTC 2021


With XGMI connection flushing HDP on PCIe is unnecessary,
it is also to optimize memory allocation latency.

Signed-off-by: Eric Huang <jinhuieric.huang at amd.com>

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
index ac45d9c7a4e9..aefb3d2927d5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
@@ -108,6 +108,8 @@ static int amdgpu_vm_cpu_update(struct 
amdgpu_vm_update_params *p,
  static int amdgpu_vm_cpu_commit(struct amdgpu_vm_update_params *p,
                                 struct dma_fence **fence)
  {
+       if (p->adev->gmc.xgmi.connected_to_cpu)
+               return 0;
         /* Flush HDP */
         mb();
         amdgpu_asic_flush_hdp(p->adev, NULL);


More information about the amd-gfx mailing list