Lines Matching full:job
32 * backend operations to the scheduler like submitting a job to hardware run queue,
33 * returning the dependencies of a job etc.
122 * drm_sched_rq_select_entity - Select an entity which could provide a job to run
219 * drm_sched_suspend_timeout - Suspend scheduler job timeout
249 * drm_sched_resume_timeout - Resume scheduler job timeout
283 struct drm_sched_job *job; in drm_sched_job_timedout() local
289 job = list_first_entry_or_null(&sched->ring_mirror_list, in drm_sched_job_timedout()
292 if (job) { in drm_sched_job_timedout()
294 * Remove the bad job so it cannot be freed by concurrent in drm_sched_job_timedout()
298 list_del_init(&job->node); in drm_sched_job_timedout()
301 job->sched->ops->timedout_job(job); in drm_sched_job_timedout()
304 * Guilty job did complete and hence needs to be manually removed in drm_sched_job_timedout()
308 job->sched->ops->free_job(job); in drm_sched_job_timedout()
323 * @bad: The job guilty of time out
325 * Increment on every hang caused by the 'bad' job. If this exceeds the hang
369 * @bad: job which caused the time out
372 * Note: bad job will not be freed as it might be used later and so it's
384 * Reinsert back the bad job here - now it's safe as in drm_sched_stop()
386 * bad job at this point - we parked (waited for) any in progress in drm_sched_stop()
393 * job extracted. in drm_sched_stop()
398 * Iterate the job list from later to earlier one and either deactive in drm_sched_stop()
410 * remove job from ring_mirror_list. in drm_sched_stop()
418 * Wait for job's HW fence callback to finish using s_job in drm_sched_stop()
421 * Job is still alive so fence refcount at least 1 in drm_sched_stop()
426 * We must keep bad job alive for later use during in drm_sched_stop()
428 * that the guilty job must be released. in drm_sched_stop()
496 * drm_sched_resubmit_jobs - helper to relunch job from mirror ring list
537 * drm_sched_job_init - init a scheduler job
539 * @job: scheduler job to init
541 * @owner: job owner for debugging
548 int drm_sched_job_init(struct drm_sched_job *job, in drm_sched_job_init() argument
560 job->sched = sched; in drm_sched_job_init()
561 job->entity = entity; in drm_sched_job_init()
562 job->s_priority = entity->rq - sched->sched_rq; in drm_sched_job_init()
563 job->s_fence = drm_sched_fence_create(entity, owner); in drm_sched_job_init()
564 if (!job->s_fence) in drm_sched_job_init()
566 job->id = atomic64_inc_return(&sched->job_id_count); in drm_sched_job_init()
568 INIT_LIST_HEAD(&job->node); in drm_sched_job_init()
575 * drm_sched_job_cleanup - clean up scheduler job resources
577 * @job: scheduler job to clean up
579 void drm_sched_job_cleanup(struct drm_sched_job *job) in drm_sched_job_cleanup() argument
581 dma_fence_put(&job->s_fence->finished); in drm_sched_job_cleanup()
582 job->s_fence = NULL; in drm_sched_job_cleanup()
638 * drm_sched_process_job - process a job
643 * Called after job has finished execution.
663 * drm_sched_get_cleanup_job - fetch the next finished job to be destroyed
667 * Returns the next finished job from the mirror list (if there is one)
673 struct drm_sched_job *job; in drm_sched_get_cleanup_job() local
686 job = list_first_entry_or_null(&sched->ring_mirror_list, in drm_sched_get_cleanup_job()
689 if (job && dma_fence_is_signaled(&job->s_fence->finished)) { in drm_sched_get_cleanup_job()
690 /* remove job from ring_mirror_list */ in drm_sched_get_cleanup_job()
691 list_del_init(&job->node); in drm_sched_get_cleanup_job()
693 job = NULL; in drm_sched_get_cleanup_job()
694 /* queue timeout for next job */ in drm_sched_get_cleanup_job()
700 return job; in drm_sched_get_cleanup_job()
785 /* queue timeout for next job */ in drm_sched_main()
836 * @hang_limit: number of times to allow a job to hang before dropping it