drm/sched/tests: Make timedout_job callback a better role model
authorPhilipp Stanner <phasta@kernel.org>
Thu, 5 Jun 2025 13:41:55 +0000 (15:41 +0200)
committerPhilipp Stanner <phasta@kernel.org>
Mon, 30 Jun 2025 15:37:51 +0000 (17:37 +0200)
commit8285af82219639e08c655a4c957c50605b8acf85
tree74ba8b5776864084a7e65d4f3833572a3fb1a5b2
parentbdad4aa48c15cacd63e94242ea99682e1b5be4d0
drm/sched/tests: Make timedout_job callback a better role model

Since the drm_mock_scheduler does not have real users in userspace, nor
does it have real hardware or firmware rings, it's not necessary to
signal timedout fences nor free jobs - from a functional standpoint.
Still, the dma_fence framework establishes the hard rule that all fences
must always get signaled.

The unit tests, moreover, should as much as possible represent the
intended usage of the scheduler API.

Furthermore, this later enables simplifying the mock scheduler's
teardown code path.

Make sure timed out hardware fences get signaled with the appropriate
error code.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250605134154.191764-2-phasta@kernel.org
drivers/gpu/drm/scheduler/tests/mock_scheduler.c