mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
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 <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
51b9db27d0
commit
d1ff9086c1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user