Commit bd755d08 authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/amdgpu: remove extra parameters from scheduler callbacks

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarJammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: default avatarChunming Zhou <david1.zhou@amd.com>
parent 88079006
...@@ -27,13 +27,11 @@ ...@@ -27,13 +27,11 @@
#include <drm/drmP.h> #include <drm/drmP.h>
#include "amdgpu.h" #include "amdgpu.h"
static struct fence *amdgpu_sched_run_job(struct amd_gpu_scheduler *sched, static struct fence *amdgpu_sched_run_job(struct amd_sched_job *job)
struct amd_sched_entity *entity,
struct amd_sched_job *job)
{ {
int r = 0;
struct amdgpu_job *sched_job; struct amdgpu_job *sched_job;
struct amdgpu_fence *fence; struct amdgpu_fence *fence;
int r;
if (!job) { if (!job) {
DRM_ERROR("job is null\n"); DRM_ERROR("job is null\n");
...@@ -58,12 +56,11 @@ static struct fence *amdgpu_sched_run_job(struct amd_gpu_scheduler *sched, ...@@ -58,12 +56,11 @@ static struct fence *amdgpu_sched_run_job(struct amd_gpu_scheduler *sched,
err: err:
DRM_ERROR("Run job error\n"); DRM_ERROR("Run job error\n");
mutex_unlock(&sched_job->job_lock); mutex_unlock(&sched_job->job_lock);
sched->ops->process_job(sched, (struct amd_sched_job *)sched_job); job->sched->ops->process_job(job);
return NULL; return NULL;
} }
static void amdgpu_sched_process_job(struct amd_gpu_scheduler *sched, static void amdgpu_sched_process_job(struct amd_sched_job *job)
struct amd_sched_job *job)
{ {
struct amdgpu_job *sched_job; struct amdgpu_job *sched_job;
......
...@@ -289,7 +289,7 @@ static void amd_sched_process_job(struct fence *f, struct fence_cb *cb) ...@@ -289,7 +289,7 @@ static void amd_sched_process_job(struct fence *f, struct fence_cb *cb)
amd_sched_fence_signal(sched_job->s_fence); amd_sched_fence_signal(sched_job->s_fence);
atomic_dec(&sched->hw_rq_count); atomic_dec(&sched->hw_rq_count);
fence_put(&sched_job->s_fence->base); fence_put(&sched_job->s_fence->base);
sched->ops->process_job(sched, sched_job); sched->ops->process_job(sched_job);
wake_up_interruptible(&sched->wait_queue); wake_up_interruptible(&sched->wait_queue);
} }
...@@ -318,7 +318,7 @@ static int amd_sched_main(void *param) ...@@ -318,7 +318,7 @@ static int amd_sched_main(void *param)
continue; continue;
atomic_inc(&sched->hw_rq_count); atomic_inc(&sched->hw_rq_count);
fence = sched->ops->run_job(sched, c_entity, job); fence = sched->ops->run_job(job);
if (fence) { if (fence) {
r = fence_add_callback(fence, &job->cb, r = fence_add_callback(fence, &job->cb,
amd_sched_process_job); amd_sched_process_job);
......
...@@ -90,11 +90,8 @@ static inline struct amd_sched_fence *to_amd_sched_fence(struct fence *f) ...@@ -90,11 +90,8 @@ static inline struct amd_sched_fence *to_amd_sched_fence(struct fence *f)
* these functions should be implemented in driver side * these functions should be implemented in driver side
*/ */
struct amd_sched_backend_ops { struct amd_sched_backend_ops {
struct fence *(*run_job)(struct amd_gpu_scheduler *sched, struct fence *(*run_job)(struct amd_sched_job *job);
struct amd_sched_entity *c_entity, void (*process_job)(struct amd_sched_job *job);
struct amd_sched_job *job);
void (*process_job)(struct amd_gpu_scheduler *sched,
struct amd_sched_job *job);
}; };
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment