drm/scheduler: rework entity creation
Entity currently keeps a copy of run_queue list and modify it in drm_sched_entity_set_priority(). Entities shouldn't modify run_queue list. Use drm_gpu_scheduler list instead of drm_sched_rq list in drm_sched_entity struct. In this way we can select a runqueue based on entity/ctx's priority for a drm scheduler. Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -159,9 +159,10 @@ int lima_sched_context_init(struct lima_sched_pipe *pipe,
|
||||
struct lima_sched_context *context,
|
||||
atomic_t *guilty)
|
||||
{
|
||||
struct drm_sched_rq *rq = pipe->base.sched_rq + DRM_SCHED_PRIORITY_NORMAL;
|
||||
struct drm_gpu_scheduler *sched = &pipe->base;
|
||||
|
||||
return drm_sched_entity_init(&context->base, &rq, 1, guilty);
|
||||
return drm_sched_entity_init(&context->base, DRM_SCHED_PRIORITY_NORMAL,
|
||||
&sched, 1, guilty);
|
||||
}
|
||||
|
||||
void lima_sched_context_fini(struct lima_sched_pipe *pipe,
|
||||
|
Reference in New Issue
Block a user