summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2015-08-05 14:07:08 +0300
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 23:51:02 +0300
commit80de5913cf31c86d64547af0715de4822c9b1abe (patch)
tree4c46bff9a98907bdeaa9fb1d48a6b7f9b19f5b6b /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
parent47f38501f11fa45d8a7797f1965448c1e20049d4 (diff)
downloadlinux-80de5913cf31c86d64547af0715de4822c9b1abe.tar.xz
Revert "drm/amdgpu: return new seq_no for amd_sched_push_job"
This reverts commit d1d33da8eb86b8ca41dd9ed95738030df5267b95. Reviewed-by: Christian K?nig <christian.koenig@amd.com> Conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
index 995901b9e428..0fcf020917d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
@@ -121,6 +121,7 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev,
{
int r = 0;
if (amdgpu_enable_scheduler) {
+ uint64_t v_seq;
struct amdgpu_cs_parser *sched_job =
amdgpu_cs_parser_create(adev, owner, &adev->kernel_ctx,
ibs, 1);
@@ -128,12 +129,16 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev,
return -ENOMEM;
}
sched_job->free_job = free_job;
- ibs[num_ibs - 1].sequence = amd_sched_push_job(ring->scheduler,
+ v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].c_entity.last_queued_v_seq);
+ ibs[num_ibs - 1].sequence = v_seq;
+ amd_sched_push_job(ring->scheduler,
&adev->kernel_ctx.rings[ring->idx].c_entity,
sched_job);
r = amd_sched_wait_emit(
&adev->kernel_ctx.rings[ring->idx].c_entity,
- ibs[num_ibs - 1].sequence, false, -1);
+ v_seq,
+ false,
+ -1);
if (r)
WARN(true, "emit timeout\n");
} else