]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu: cleanup scheduler fence get/put dance
authorChristian König <christian.koenig@amd.com>
Fri, 6 Nov 2015 13:09:21 +0000 (14:09 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Nov 2015 16:05:58 +0000 (11:05 -0500)
The code was correct, but getting two references when the ownership
is linearly moved on is a bit awkward and just overhead.

Signed: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

index 67f778f6eedbb041ed12b057fc6dd0732e28a022..8ef9e4415fccb10ec6537968b9996ca7503102ee 100644 (file)
@@ -64,7 +64,6 @@ err:
                job->free_job(job);
 
        mutex_unlock(&job->job_lock);
-       fence_put(&job->base.s_fence->base);
        kfree(job);
        return fence ? &fence->base : NULL;
 }
index b8925fea577cba84ec2be164a717c5879c0a1e56..ccb7c1554f5e12c8f85f6d8454723f07a4603b05 100644 (file)
@@ -285,7 +285,6 @@ int amd_sched_entity_push_job(struct amd_sched_job *sched_job)
        if (!fence)
                return -ENOMEM;
 
-       fence_get(&fence->base);
        sched_job->s_fence = fence;
 
        wait_event(entity->sched->job_scheduled,