aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2016-04-27 06:07:41 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-05-11 12:31:16 -0400
commitfe707664879b15b9caafd3b9f0f9897aa26a7edd (patch)
treea3a51520004a57177942dbc50d2469981794a036 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parentc5637837ba5d5b5e962e73f5a1a7c5456fa85a68 (diff)
drm/amdgpu: add pipeline sync for compute job
hardware ring is async processed, the job is executed in parallel. In some case, this will result vm fault, like jobs with different vmids. This works around a CPC hw issue which will eventually be fixed in fw. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 692d0d02b644..62ce7253e917 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -300,7 +300,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring,
300 int r; 300 int r;
301 301
302 if (ring->funcs->emit_pipeline_sync && ( 302 if (ring->funcs->emit_pipeline_sync && (
303 pd_addr != AMDGPU_VM_NO_FLUSH || gds_switch_needed)) 303 pd_addr != AMDGPU_VM_NO_FLUSH || gds_switch_needed ||
304 ring->type == AMDGPU_RING_TYPE_COMPUTE))
304 amdgpu_ring_emit_pipeline_sync(ring); 305 amdgpu_ring_emit_pipeline_sync(ring);
305 306
306 if (ring->funcs->emit_vm_flush && 307 if (ring->funcs->emit_vm_flush &&