summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2015-07-30 12:59:43 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 23:50:43 +0300
commitd1ff9086c1b8e67390161599006a34056b437a72 (patch)
treeaaaf8b04c136fb05fd9d863f501450974ac5cfcf /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
parent51b9db27d07869cf565ba135e97e2ed5f858612e (diff)
downloadlinux-d1ff9086c1b8e67390161599006a34056b437a72.tar.xz
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index 46ec915c9344..b913c22dd6b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
@@ -62,7 +62,7 @@ static void amdgpu_sched_run_job(struct amd_gpu_scheduler *sched,
goto err;
}
atomic64_set(&c_entity->last_emitted_v_seq,
- sched_job->uf.sequence);
+ sched_job->ibs[sched_job->num_ibs - 1].sequence);
wake_up_all(&c_entity->wait_emit);
mutex_unlock(&sched_job->job_lock);
@@ -93,7 +93,7 @@ static void amdgpu_sched_process_job(struct amd_gpu_scheduler *sched, void *job)
if (sched_job->ctx) {
c_entity = &sched_job->ctx->rings[ring->idx].c_entity;
atomic64_set(&c_entity->last_signaled_v_seq,
- sched_job->uf.sequence);
+ sched_job->ibs[sched_job->num_ibs - 1].sequence);
}
/* wake up users waiting for time stamp */