drm/sched/tests: Use one lock for fence context
authorPhilipp Stanner <phasta@kernel.org>
Tue, 27 May 2025 10:10:30 +0000 (12:10 +0200)
committerPhilipp Stanner <phasta@kernel.org>
Mon, 2 Jun 2025 11:27:34 +0000 (13:27 +0200)
commit80f3c51b2f98295af22678d5d81ebbcb39e968b1
tree244e8787e612a61b0ea2c51d65df36e3714eea7d
parente42a3c203c95cc6362d78aaff3c478695e6719aa
drm/sched/tests: Use one lock for fence context

There is no need for separate locks for single jobs and the entire
scheduler. The dma_fence context can be protected by the scheduler lock,
allowing for removing the jobs' locks. This simplifies things and
reduces the likelyhood of deadlocks etc.

Replace the jobs' locks with the mock scheduler lock.

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250527101029.56491-2-phasta@kernel.org
drivers/gpu/drm/scheduler/tests/mock_scheduler.c
drivers/gpu/drm/scheduler/tests/sched_tests.h