[PATCH 01/10] drm/sched: move calling drm_sched_entity_select_rq
Andrey Grodzovsky
andrey.grodzovsky at amd.com
Thu Jul 14 15:43:24 UTC 2022
Can you please remind me of the use case that requires this ? I browsed
through
related mails in the past but haven't found when is that needed. For amdgpu
drm_sched_job_init and drm_sched_job_arm are called together and amdgpu
is the only one who supports modifying entity priority on the fly as far
as i see.
Andrey
On 2022-07-14 06:38, Christian König wrote:
> 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 at amd.com>
> CC: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
> CC: dri-devel at lists.freedesktop.org
> ---
> drivers/gpu/drm/scheduler/sched_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 68317d3a7a27..e0ab14e0fb6b 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -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;
More information about the dri-devel
mailing list