diff options
| author | Tvrtko Ursulin <tvrtko.ursulin@igalia.com> | 2026-10-21 10:42:27 +0100 |
|---|---|---|
| committer | Philipp Stanner <phasta@kernel.org> | 2026-11-05 14:35:33 +0100 |
| commit | 75709a35da45bc67f94c9ceb91bf8871fdfe4d9e (patch) | |
| tree | 495cfadfe65f0541fcca8075b673bf1730691fc1 /drivers/gpu | |
| parent | cda6f72545f2372234c72f93fd1be61841295e19 (diff) | |
| download | linux-75709a35da45bc67f94c9ceb91bf8871fdfe4d9e.tar.gz linux-75709a35da45bc67f94c9ceb91bf8871fdfe4d9e.zip | |
drm/sched: Adjust run-queue when changing priority at runtime
Another consequence of the recent revert of
commit 77a6809f1dc3 ("drm/sched: Remove FIFO and RR and simplify to a single run queue")
is that after the revert we need to adjust entity->rq_priority when
runtime priority changes are requested.
Only amdgpu does that so the impact is minimal. Also considering dynamic
priority changes are largely broken there, due currently broken entity
scheduler list handling where the special case of a single scheduler can
never change it's run-queue. And coupled with the fact for the rest a two-
tier approach of drm_sched_entity_set_priority() and
drm_sched_entity_modify_sched() is used, where later directly maps to
different hardware queue priority by replacing the set of schedulers
completely.
Hence the regression is limited to rings which have multiple instances
other than compute and graphics, which would be SDMA only, for which I am
not sure any userspace actually does dynamic priority changes in the first
place.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: 2fa4d8e2c109 ("drm/sched: Add fair scheduling policy")
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <phasta@kernel.org>
Cc: stable@vger.kernel.org # v7.2+
[phasta: fix checkpatch error]
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20261021094227.48034-3-tvrtko.ursulin@igalia.com
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index adaf7764ed33..0206bbad2ce0 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -454,6 +454,8 @@ void drm_sched_entity_set_priority(struct drm_sched_entity *entity, { spin_lock(&entity->lock); entity->priority = priority; + if (drm_sched_policy != DRM_SCHED_POLICY_FAIR) + entity->rq_priority = priority; spin_unlock(&entity->lock); } EXPORT_SYMBOL(drm_sched_entity_set_priority); |
