mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
drm/sched: Add new test for DRM_GPU_SCHED_STAT_NO_HANG
Add a test to submit a single job against a scheduler with the timeout configured and verify that if the job is still running, the timeout handler will skip the reset and allow the job to complete. Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Reviewed-by: Philipp Stanner <phasta@kernel.org> Link: https://lore.kernel.org/r/20250714-sched-skip-reset-v6-4-5c5ba4f55039@igalia.com Signed-off-by: Maíra Canal <mcanal@igalia.com>
This commit is contained in:
@@ -218,6 +218,11 @@ mock_sched_timedout_job(struct drm_sched_job *sched_job)
|
||||
struct drm_mock_sched_job *job = drm_sched_job_to_mock_job(sched_job);
|
||||
unsigned long flags;
|
||||
|
||||
if (job->flags & DRM_MOCK_SCHED_JOB_DONT_RESET) {
|
||||
job->flags &= ~DRM_MOCK_SCHED_JOB_DONT_RESET;
|
||||
return DRM_GPU_SCHED_STAT_NO_HANG;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&sched->lock, flags);
|
||||
if (!dma_fence_is_signaled_locked(&job->hw_fence)) {
|
||||
list_del(&job->link);
|
||||
|
||||
Reference in New Issue
Block a user