drm/amdgpu: fix and cleanup amd_sched_entity_push_job

Calling schedule() is probably the worse things we can do.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
This commit is contained in:
Christian König
2015-08-20 16:12:50 +02:00
committed by Alex Deucher
parent 87e0a87dab
commit 6c859274f3
4 changed files with 48 additions and 38 deletions

View File

@@ -857,7 +857,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
job->free_job = amdgpu_cs_free_job;
mutex_lock(&job->job_lock);
r = amd_sched_push_job((struct amd_sched_job *)job);
r = amd_sched_entity_push_job((struct amd_sched_job *)job);
if (r) {
mutex_unlock(&job->job_lock);
amdgpu_cs_free_job(job);

View File

@@ -105,7 +105,7 @@ int amdgpu_sched_ib_submit_kernel_helper(struct amdgpu_device *adev,
mutex_init(&job->job_lock);
job->free_job = free_job;
mutex_lock(&job->job_lock);
r = amd_sched_push_job((struct amd_sched_job *)job);
r = amd_sched_entity_push_job((struct amd_sched_job *)job);
if (r) {
mutex_unlock(&job->job_lock);
kfree(job);