aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-07-07 11:24:49 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:50:14 -0400
commit21c16bf634e62cf9673946f509b469e7f0953ecf (patch)
tree91595b4cd4064a7867bbdd32cb37fc090c7ec37d /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parent91e1a5207edec9e4f888e44478a9a254186e0ba8 (diff)
drm/amdgpu: add user fence context map v2
This is a prerequisite for the GPU scheduler to make the order of submission independent from the order of execution. v2: properly implement the locking Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 2722815eddbb..95d533422a5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -219,8 +219,10 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
219 /* wrap the last IB with fence */ 219 /* wrap the last IB with fence */
220 if (ib->user) { 220 if (ib->user) {
221 uint64_t addr = amdgpu_bo_gpu_offset(ib->user->bo); 221 uint64_t addr = amdgpu_bo_gpu_offset(ib->user->bo);
222 ib->user->sequence = amdgpu_ctx_add_fence(ib->ctx, ring,
223 &ib->fence->base);
222 addr += ib->user->offset; 224 addr += ib->user->offset;
223 amdgpu_ring_emit_fence(ring, addr, ib->fence->seq, 225 amdgpu_ring_emit_fence(ring, addr, ib->user->sequence,
224 AMDGPU_FENCE_FLAG_64BIT); 226 AMDGPU_FENCE_FLAG_64BIT);
225 } 227 }
226 228