drm/sched: Lock drm_sched_entity_is_idle()

drm_sched_entity_is_idle() contains a badly documented memory barrier
and an invalid lockless access to entity->stopped. Moreover, it also
accesses entity->list which is at all other places protected by
entity->lock.

This function is in no way performance critical, so it is safer, more
readable and more maintainable to take the spinlock.

Add locking to drm_sched_entity_is_idle().

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patch.msgid.link/20260813094539.2407911-2-phasta@kernel.org
This commit is contained in:
Philipp Stanner 2026-08-13 11:45:40 +02:00
commit 0e118b936d