drm/amdgpu: remove sched_lock
authorChristian König <christian.koenig@amd.com>
Thu, 20 Aug 2015 15:09:54 +0000 (17:09 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Aug 2015 14:46:46 +0000 (10:46 -0400)
It isn't protecting anything.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
drivers/gpu/drm/amd/scheduler/gpu_scheduler.h

index 2ab63d2238911bfb9ba5f4a6557806e1ceb33a8e..b13642f1e00b866cd36f3687083a9eb5a9a43320 100644 (file)
@@ -302,7 +302,6 @@ static int amd_sched_main(void *param)
                        continue;
                atomic_inc(&sched->hw_rq_count);
 
-               mutex_lock(&sched->sched_lock);
                fence = sched->ops->run_job(sched, c_entity, job);
                if (fence) {
                        r = fence_add_callback(fence, &job->cb,
@@ -313,7 +312,6 @@ static int amd_sched_main(void *param)
                                DRM_ERROR("fence add callback failed (%d)\n", r);
                        fence_put(fence);
                }
-               mutex_unlock(&sched->sched_lock);
 
                if (c_entity->need_wakeup) {
                        c_entity->need_wakeup = false;
@@ -356,7 +354,6 @@ struct amd_gpu_scheduler *amd_sched_create(void *device,
        sched->preemption = preemption;
        sched->hw_submission_limit = hw_submission;
        snprintf(name, sizeof(name), "gpu_sched[%d]", ring);
-       mutex_init(&sched->sched_lock);
        amd_sched_rq_init(&sched->sched_rq);
        amd_sched_rq_init(&sched->kernel_rq);
 
index 5913c5cd1c485cd9f945735484547f91a463b8fa..123b8f15d3fbca8d0c0f91cec7cc21fe7c876a10 100644 (file)
@@ -114,7 +114,6 @@ struct amd_gpu_scheduler {
        uint32_t                        granularity; /* in ms unit */
        uint32_t                        preemption;
        wait_queue_head_t               wait_queue;
-       struct mutex                    sched_lock;
        uint32_t                        hw_submission_limit;
 };