diff options
author | Christian König <christian.koenig@amd.com> | 2015-08-05 18:33:21 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:51:05 -0400 |
commit | 91404fb20825418fd9ab8e6533bc336e1ffc748e (patch) | |
tree | dc16e974fdfac848cee65f1f9ce4e6c2e7c2e0d7 /drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | |
parent | 4cd7f42cf8f57512b13a13bb7dcbeabb644f5264 (diff) | |
download | talos-obmc-linux-91404fb20825418fd9ab8e6533bc336e1ffc748e.tar.gz talos-obmc-linux-91404fb20825418fd9ab8e6533bc336e1ffc748e.zip |
drm/amdgpu: merge amd_sched_entity and amd_context_entity v2
Avoiding a couple of casts.
v2: rename c_entity to entity as well
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c index 71a4a7e4b1ae..787b93db6796 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c @@ -28,7 +28,7 @@ #include "amdgpu.h" static int amdgpu_sched_prepare_job(struct amd_gpu_scheduler *sched, - struct amd_context_entity *c_entity, + struct amd_sched_entity *entity, void *job) { int r = 0; @@ -51,7 +51,7 @@ static void amdgpu_fence_sched_cb(struct fence *f, struct fence_cb *cb) } static void amdgpu_sched_run_job(struct amd_gpu_scheduler *sched, - struct amd_context_entity *c_entity, + struct amd_sched_entity *entity, struct amd_sched_job *job) { int r = 0; @@ -83,7 +83,7 @@ static void amdgpu_sched_run_job(struct amd_gpu_scheduler *sched, goto err; } - amd_sched_emit(c_entity, sched_job->ibs[sched_job->num_ibs - 1].sequence); + amd_sched_emit(entity, sched_job->ibs[sched_job->num_ibs - 1].sequence); mutex_unlock(&sched_job->job_lock); return; @@ -136,13 +136,13 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev, return -ENOMEM; } sched_job->free_job = free_job; - v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].c_entity.last_queued_v_seq); + v_seq = atomic64_inc_return(&adev->kernel_ctx.rings[ring->idx].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, + &adev->kernel_ctx.rings[ring->idx].entity, sched_job); r = amd_sched_wait_emit( - &adev->kernel_ctx.rings[ring->idx].c_entity, + &adev->kernel_ctx.rings[ring->idx].entity, v_seq, false, -1); |