diff options
author | Chunming Zhou <david1.zhou@amd.com> | 2015-08-05 19:07:08 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:51:02 -0400 |
commit | 80de5913cf31c86d64547af0715de4822c9b1abe (patch) | |
tree | 4c46bff9a98907bdeaa9fb1d48a6b7f9b19f5b6b /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 47f38501f11fa45d8a7797f1965448c1e20049d4 (diff) | |
download | linux-80de5913cf31c86d64547af0715de4822c9b1abe.tar.bz2 |
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_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 78713ae3b158..9d5043c42fc5 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -371,6 +371,7 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; + uint64_t v_seq; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, &adev->kernel_ctx, ib, 1); if(!sched_job) @@ -378,11 +379,15 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, sched_job->job_param.vm.bo = bo; sched_job->run_job = amdgpu_vm_run_job; sched_job->free_job = amdgpu_vm_free_job; - ib->sequence = amd_sched_push_job(ring->scheduler, + v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].c_entity.last_queued_v_seq); + ib->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, - ib->sequence, false, -1); + v_seq, + false, + -1); if (r) DRM_ERROR("emit timeout\n"); @@ -516,6 +521,7 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; + uint64_t v_seq; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, &adev->kernel_ctx, ib, 1); @@ -524,11 +530,15 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, sched_job->job_param.vm.bo = pd; sched_job->run_job = amdgpu_vm_run_job; sched_job->free_job = amdgpu_vm_free_job; - ib->sequence = amd_sched_push_job(ring->scheduler, + v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].c_entity.last_queued_v_seq); + ib->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, - ib->sequence, false, -1); + v_seq, + false, + -1); if (r) DRM_ERROR("emit timeout\n"); } else { @@ -862,6 +872,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; + uint64_t v_seq; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, &adev->kernel_ctx, ib, 1); if(!sched_job) @@ -872,11 +883,15 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, sched_job->job_param.vm_mapping.fence = fence; sched_job->run_job = amdgpu_vm_bo_update_mapping_run_job; sched_job->free_job = amdgpu_vm_free_job; - ib->sequence = amd_sched_push_job(ring->scheduler, + v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].c_entity.last_queued_v_seq); + ib->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, - ib->sequence, false, -1); + v_seq, + false, + -1); if (r) DRM_ERROR("emit timeout\n"); } else { |