aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-01-19 08:17:40 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-02-19 14:18:20 -0500
commit698825653fdf1a696e1b9458ed9fc4aa2c6587d4 (patch)
tree4ddb3d0444c4c0ae531dfff131e40ad8c2b02768 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent3c9d1fde7f63b6f7f30e9a5366fbc2fe249e0b74 (diff)
drm/amdgpu: add optional ring to *_hdp callbacks
This adds an optional ring to the invalidate_hdp and flush_hdp callbacks. If the ring isn't specified or the emit_wreg function not available the HDP operation will be done with the CPU otherwise by writing on the ring. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 2dca47ad4f09..0df52cb1765b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -854,7 +854,7 @@ restart:
854 if (vm->use_cpu_for_update) { 854 if (vm->use_cpu_for_update) {
855 /* Flush HDP */ 855 /* Flush HDP */
856 mb(); 856 mb();
857 amdgpu_asic_flush_hdp(adev); 857 amdgpu_asic_flush_hdp(adev, NULL);
858 } else if (params.ib->length_dw == 0) { 858 } else if (params.ib->length_dw == 0) {
859 amdgpu_job_free(job); 859 amdgpu_job_free(job);
860 } else { 860 } else {
@@ -1436,7 +1436,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
1436 if (vm->use_cpu_for_update) { 1436 if (vm->use_cpu_for_update) {
1437 /* Flush HDP */ 1437 /* Flush HDP */
1438 mb(); 1438 mb();
1439 amdgpu_asic_flush_hdp(adev); 1439 amdgpu_asic_flush_hdp(adev, NULL);
1440 } 1440 }
1441 1441
1442 spin_lock(&vm->status_lock); 1442 spin_lock(&vm->status_lock);