mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
drm/scheduler: rename dependency callback into prepare_job
This now matches much better what this is doing. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Luben Tuikov <luben.tuikov@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221014084641.128280-14-christian.koenig@amd.com
This commit is contained in:
@@ -238,7 +238,7 @@ int amdgpu_job_submit_direct(struct amdgpu_job *job, struct amdgpu_ring *ring,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct dma_fence *
|
static struct dma_fence *
|
||||||
amdgpu_job_dependency(struct drm_sched_job *sched_job,
|
amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
|
||||||
struct drm_sched_entity *s_entity)
|
struct drm_sched_entity *s_entity)
|
||||||
{
|
{
|
||||||
struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->rq->sched);
|
struct amdgpu_ring *ring = to_amdgpu_ring(s_entity->rq->sched);
|
||||||
@@ -327,7 +327,7 @@ void amdgpu_job_stop_all_jobs_on_sched(struct drm_gpu_scheduler *sched)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const struct drm_sched_backend_ops amdgpu_sched_ops = {
|
const struct drm_sched_backend_ops amdgpu_sched_ops = {
|
||||||
.dependency = amdgpu_job_dependency,
|
.prepare_job = amdgpu_job_prepare_job,
|
||||||
.run_job = amdgpu_job_run,
|
.run_job = amdgpu_job_run,
|
||||||
.timedout_job = amdgpu_job_timedout,
|
.timedout_job = amdgpu_job_timedout,
|
||||||
.free_job = amdgpu_job_free_cb
|
.free_job = amdgpu_job_free_cb
|
||||||
|
|||||||
@@ -396,8 +396,8 @@ drm_sched_job_dependency(struct drm_sched_job *job,
|
|||||||
if (!xa_empty(&job->dependencies))
|
if (!xa_empty(&job->dependencies))
|
||||||
return xa_erase(&job->dependencies, job->last_dependency++);
|
return xa_erase(&job->dependencies, job->last_dependency++);
|
||||||
|
|
||||||
if (job->sched->ops->dependency)
|
if (job->sched->ops->prepare_job)
|
||||||
return job->sched->ops->dependency(job, entity);
|
return job->sched->ops->prepare_job(job, entity);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,17 +368,16 @@ enum drm_gpu_sched_stat {
|
|||||||
*/
|
*/
|
||||||
struct drm_sched_backend_ops {
|
struct drm_sched_backend_ops {
|
||||||
/**
|
/**
|
||||||
* @dependency:
|
* @prepare_job:
|
||||||
*
|
*
|
||||||
* Called when the scheduler is considering scheduling this job next, to
|
* Called when the scheduler is considering scheduling this job next, to
|
||||||
* get another struct dma_fence for this job to block on. Once it
|
* get another struct dma_fence for this job to block on. Once it
|
||||||
* returns NULL, run_job() may be called.
|
* returns NULL, run_job() may be called.
|
||||||
*
|
*
|
||||||
* If a driver exclusively uses drm_sched_job_add_dependency() and
|
* Can be NULL if no additional preparation to the dependencies are
|
||||||
* drm_sched_job_add_implicit_dependencies() this can be ommitted and
|
* necessary. Skipped when jobs are killed instead of run.
|
||||||
* left as NULL.
|
|
||||||
*/
|
*/
|
||||||
struct dma_fence *(*dependency)(struct drm_sched_job *sched_job,
|
struct dma_fence *(*prepare_job)(struct drm_sched_job *sched_job,
|
||||||
struct drm_sched_entity *s_entity);
|
struct drm_sched_entity *s_entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user