diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2019-12-05 11:38:00 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-12-18 22:09:12 +0100 |
commit | b3ac17667f115e64c67ea6101fc814f47134b530 (patch) | |
tree | 4a5a3dd33058ca452353f3ccf7afd9fd49c71e95 /drivers/gpu/drm/panfrost/panfrost_job.c | |
parent | drm/amdgpu/pm_runtime: update usage count in fence handling (diff) | |
download | linux-b3ac17667f115e64c67ea6101fc814f47134b530.tar.xz linux-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 <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_job.c')
-rw-r--r-- | drivers/gpu/drm/panfrost/panfrost_job.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c index d411eb6c8eb9..a9ed088ebf08 100644 --- a/drivers/gpu/drm/panfrost/panfrost_job.c +++ b/drivers/gpu/drm/panfrost/panfrost_job.c @@ -542,12 +542,14 @@ int panfrost_job_open(struct panfrost_file_priv *panfrost_priv) { struct panfrost_device *pfdev = panfrost_priv->pfdev; struct panfrost_job_slot *js = pfdev->js; - struct drm_sched_rq *rq; + struct drm_gpu_scheduler *sched; int ret, i; for (i = 0; i < NUM_JOB_SLOTS; i++) { - rq = &js->queue[i].sched.sched_rq[DRM_SCHED_PRIORITY_NORMAL]; - ret = drm_sched_entity_init(&panfrost_priv->sched_entity[i], &rq, 1, NULL); + sched = &js->queue[i].sched; + ret = drm_sched_entity_init(&panfrost_priv->sched_entity[i], + DRM_SCHED_PRIORITY_NORMAL, &sched, + 1, NULL); if (WARN_ON(ret)) return ret; } |