]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/sched: move calling drm_sched_entity_select_rq
authorChristian König <christian.koenig@amd.com>
Wed, 13 Jul 2022 16:14:52 +0000 (18:14 +0200)
committerChristian König <christian.koenig@amd.com>
Tue, 19 Jul 2022 15:22:25 +0000 (17:22 +0200)
We already discussed that the call to drm_sched_entity_select_rq() needs
to move to drm_sched_job_arm() to be able to set a new scheduler list
between _init() and _arm(). This was just not applied for some reason.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220714103902.7084-2-christian.koenig@amd.com
drivers/gpu/drm/scheduler/sched_main.c

index 68317d3a7a27707dee2bbf26ff26adda0a13dbc9..e0ab14e0fb6b2ddc5e8cb79bc0f3eb85eb9a7ae6 100644 (file)
@@ -592,7 +592,6 @@ int drm_sched_job_init(struct drm_sched_job *job,
                       struct drm_sched_entity *entity,
                       void *owner)
 {
-       drm_sched_entity_select_rq(entity);
        if (!entity->rq)
                return -ENOENT;
 
@@ -628,7 +627,7 @@ void drm_sched_job_arm(struct drm_sched_job *job)
        struct drm_sched_entity *entity = job->entity;
 
        BUG_ON(!entity);
-
+       drm_sched_entity_select_rq(entity);
        sched = entity->rq->sched;
 
        job->sched = sched;