aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorChunming Zhou <David1.Zhou@amd.com>2017-05-09 01:39:40 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-05-10 13:23:53 -0400
commit30514decb27d45b98599612cb5d3e6a20ba733a5 (patch)
tree66ca957c94c8091b9bc11385046adfa26f4f18f8 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parentcb3696fdeca24d3a347a5225d934ce50c6edccba (diff)
drm/amdgpu: fix dependency issue
The problem is that executing the jobs in the right order doesn't give you the right result because consecutive jobs executed on the same engine are pipelined. In other words job B does it buffer read before job A has written it's result. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 2d11ac8d1aa9..6e4ae0d983c2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -160,6 +160,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
160 dev_err(adev->dev, "scheduling IB failed (%d).\n", r); 160 dev_err(adev->dev, "scheduling IB failed (%d).\n", r);
161 return r; 161 return r;
162 } 162 }
163 if (ring->funcs->emit_pipeline_sync && job && job->need_pipeline_sync)
164 amdgpu_ring_emit_pipeline_sync(ring);
163 165
164 if (vm) { 166 if (vm) {
165 r = amdgpu_vm_flush(ring, job); 167 r = amdgpu_vm_flush(ring, job);