diff options
author | Christian König <christian.koenig@amd.com> | 2015-08-04 18:51:05 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 23:51:02 +0300 |
commit | 47f38501f11fa45d8a7797f1965448c1e20049d4 (patch) | |
tree | 67bba28445392c7584477178fce996a412e72dc3 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
parent | 0e89d0c16b9446a094215e71734e583c438bf83d (diff) | |
download | linux-47f38501f11fa45d8a7797f1965448c1e20049d4.tar.xz |
drm/amdgpu: cleanup amdgpu_ctx inti/fini v2
Cleanup the kernel context handling.
v2: rebased
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index ab9c65a245ba..78713ae3b158 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -372,16 +372,16 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, - adev->kernel_ctx, ib, 1); + &adev->kernel_ctx, ib, 1); if(!sched_job) goto error_free; 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, - &adev->kernel_ctx->rings[ring->idx].c_entity, + &adev->kernel_ctx.rings[ring->idx].c_entity, sched_job); - r = amd_sched_wait_emit(&adev->kernel_ctx->rings[ring->idx].c_entity, + r = amd_sched_wait_emit(&adev->kernel_ctx.rings[ring->idx].c_entity, ib->sequence, false, -1); if (r) DRM_ERROR("emit timeout\n"); @@ -517,7 +517,7 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, - adev->kernel_ctx, + &adev->kernel_ctx, ib, 1); if(!sched_job) goto error_free; @@ -525,9 +525,9 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, sched_job->run_job = amdgpu_vm_run_job; sched_job->free_job = amdgpu_vm_free_job; ib->sequence = amd_sched_push_job(ring->scheduler, - &adev->kernel_ctx->rings[ring->idx].c_entity, + &adev->kernel_ctx.rings[ring->idx].c_entity, sched_job); - r = amd_sched_wait_emit(&adev->kernel_ctx->rings[ring->idx].c_entity, + r = amd_sched_wait_emit(&adev->kernel_ctx.rings[ring->idx].c_entity, ib->sequence, false, -1); if (r) DRM_ERROR("emit timeout\n"); @@ -863,7 +863,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, if (amdgpu_enable_scheduler) { int r; sched_job = amdgpu_cs_parser_create(adev, AMDGPU_FENCE_OWNER_VM, - adev->kernel_ctx, ib, 1); + &adev->kernel_ctx, ib, 1); if(!sched_job) goto error_free; sched_job->job_param.vm_mapping.vm = vm; @@ -873,9 +873,9 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev, 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, - &adev->kernel_ctx->rings[ring->idx].c_entity, + &adev->kernel_ctx.rings[ring->idx].c_entity, sched_job); - r = amd_sched_wait_emit(&adev->kernel_ctx->rings[ring->idx].c_entity, + r = amd_sched_wait_emit(&adev->kernel_ctx.rings[ring->idx].c_entity, ib->sequence, false, -1); if (r) DRM_ERROR("emit timeout\n"); |