summaryrefslogtreecommitdiffstats
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 17:24:49 +0200
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)
downloadop-kernel-dev-21c16bf634e62cf9673946f509b469e7f0953ecf.zip
op-kernel-dev-21c16bf634e62cf9673946f509b469e7f0953ecf.tar.gz
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 2722815..95d5334 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,
/* wrap the last IB with fence */
if (ib->user) {
uint64_t addr = amdgpu_bo_gpu_offset(ib->user->bo);
+ ib->user->sequence = amdgpu_ctx_add_fence(ib->ctx, ring,
+ &ib->fence->base);
addr += ib->user->offset;
- amdgpu_ring_emit_fence(ring, addr, ib->fence->seq,
+ amdgpu_ring_emit_fence(ring, addr, ib->user->sequence,
AMDGPU_FENCE_FLAG_64BIT);
}
OpenPOWER on IntegriCloud