@@ -647,14 +653,28 @@ static void drm_sched_cleanup_jobs(struct drm_gpu_scheduler *sched) { unsigned long flags; + /* * Don't destroy jobs while the timeout worker is running OR thread * is being parked and hence assumed to not touch ring_mirror_list */ if ((sched->timeout != MAX_SCHEDULE_TIMEOUT && - !cancel_delayed_work(&sched->work_tdr)) || - __kthread_should_park(sched->thread)) { + return; + + } + + if (work_busy(&sched->work_tdr.work)) { + DRM_ERROR("DRM_ERROR work_busy - returning"); return; + }