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
This commit is contained in:
Philipp Stanner
2025-05-27 12:10:30 +02:00
parent e42a3c203c
commit 80f3c51b2f
2 changed files with 2 additions and 4 deletions

View File

@@ -106,7 +106,6 @@ struct drm_mock_sched_job {
unsigned int duration_us;
ktime_t finish_at;
spinlock_t lock;
struct dma_fence hw_fence;
struct kunit *test;