aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
diff options
context:
space:
mode:
authorChunming Zhou <[email protected]>2015-07-30 09:59:43 +0000
committerAlex Deucher <[email protected]>2015-08-17 20:50:43 +0000
commitd1ff9086c1b8e67390161599006a34056b437a72 (patch)
treeaaaf8b04c136fb05fd9d863f501450974ac5cfcf /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
parentdrm/amdgpu: wait forever for wait emit (diff)
downloadkernel-d1ff9086c1b8e67390161599006a34056b437a72.tar.gz
kernel-d1ff9086c1b8e67390161599006a34056b437a72.zip
drm/amdgpu: fix seq in ctx_add_fence
if enabling scheduler, then the queued seq is assigned when pushing job before emitting job. Signed-off-by: Chunming Zhou <[email protected]> Reviewed-by: Christian K?nig <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 42d6298eb9d7..eed409c59492 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -143,6 +143,7 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
struct amdgpu_ring *ring;
struct amdgpu_ctx *ctx, *old_ctx;
struct amdgpu_vm *vm;
+ uint64_t sequence;
unsigned i;
int r = 0;
@@ -215,9 +216,12 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs,
return r;
}
+ sequence = amdgpu_enable_scheduler ? ib->sequence : 0;
+
if (ib->ctx)
ib->sequence = amdgpu_ctx_add_fence(ib->ctx, ring,
- &ib->fence->base);
+ &ib->fence->base,
+ sequence);
/* wrap the last IB with fence */
if (ib->user) {