diff options
| author | Nirmoy Das <[email protected]> | 2019-12-05 10:38:00 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2019-12-18 21:09:12 +0000 |
| commit | b3ac17667f115e64c67ea6101fc814f47134b530 (patch) | |
| tree | 4a5a3dd33058ca452353f3ccf7afd9fd49c71e95 /drivers/gpu/drm/lima/lima_sched.c | |
| parent | drm/amdgpu/pm_runtime: update usage count in fence handling (diff) | |
| download | kernel-b3ac17667f115e64c67ea6101fc814f47134b530.tar.gz kernel-b3ac17667f115e64c67ea6101fc814f47134b530.zip | |
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 <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/lima/lima_sched.c')
| -rw-r--r-- | drivers/gpu/drm/lima/lima_sched.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c index f522c5f99729..fc8362e4149b 100644 --- a/drivers/gpu/drm/lima/lima_sched.c +++ b/drivers/gpu/drm/lima/lima_sched.c @@ -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, |
