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.
121 * drm_sched_rq_select_entity - Select an entity which could provide a job to run
165 * drm_sched_job_done - complete a job
166 * @s_job: pointer to the job which is done
168 * Finish the job's fence and wake up the worker thread.
187 * drm_sched_job_done_cb - the callback for a done job
252 * drm_sched_suspend_timeout - Suspend scheduler job timeout
282 * drm_sched_resume_timeout - Resume scheduler job timeout
316 struct drm_sched_job *job; in drm_sched_job_timedout() local
323 job = list_first_entry_or_null(&sched->pending_list, in drm_sched_job_timedout()
326 if (job) { in drm_sched_job_timedout()
328 * Remove the bad job so it cannot be freed by concurrent in drm_sched_job_timedout()
332 list_del_init(&job->list); in drm_sched_job_timedout()
335 status = job->sched->ops->timedout_job(job); in drm_sched_job_timedout()
338 * Guilty job did complete and hence needs to be manually removed in drm_sched_job_timedout()
342 job->sched->ops->free_job(job); in drm_sched_job_timedout()
359 * @bad: The job guilty of time out
361 * Increment on every hang caused by the 'bad' job. If this exceeds the hang
381 * @bad: job which caused the time out
384 * Note: bad job will not be freed as it might be used later and so it's
396 * Reinsert back the bad job here - now it's safe as in drm_sched_stop()
398 * bad job at this point - we parked (waited for) any in progress in drm_sched_stop()
405 * job extracted. in drm_sched_stop()
410 * Iterate the job list from later to earlier one and either deactive in drm_sched_stop()
423 * remove job from pending_list. in drm_sched_stop()
431 * Wait for job's HW fence callback to finish using s_job in drm_sched_stop()
434 * Job is still alive so fence refcount at least 1 in drm_sched_stop()
439 * We must keep bad job alive for later use during in drm_sched_stop()
441 * that the guilty job must be released. in drm_sched_stop()
524 * @max: job numbers to relaunch
566 * drm_sched_job_init - init a scheduler job
568 * @job: scheduler job to init
570 * @owner: job owner for debugging
577 int drm_sched_job_init(struct drm_sched_job *job, in drm_sched_job_init() argument
589 job->sched = sched; in drm_sched_job_init()
590 job->entity = entity; in drm_sched_job_init()
591 job->s_priority = entity->rq - sched->sched_rq; in drm_sched_job_init()
592 job->s_fence = drm_sched_fence_create(entity, owner); in drm_sched_job_init()
593 if (!job->s_fence) in drm_sched_job_init()
595 job->id = atomic64_inc_return(&sched->job_id_count); in drm_sched_job_init()
597 INIT_LIST_HEAD(&job->list); in drm_sched_job_init()
604 * drm_sched_job_cleanup - clean up scheduler job resources
606 * @job: scheduler job to clean up
608 void drm_sched_job_cleanup(struct drm_sched_job *job) in drm_sched_job_cleanup() argument
610 dma_fence_put(&job->s_fence->finished); in drm_sched_job_cleanup()
611 job->s_fence = NULL; in drm_sched_job_cleanup()
667 * drm_sched_get_cleanup_job - fetch the next finished job to be destroyed
671 * Returns the next finished job from the pending list (if there is one)
677 struct drm_sched_job *job, *next; in drm_sched_get_cleanup_job() local
690 job = list_first_entry_or_null(&sched->pending_list, in drm_sched_get_cleanup_job()
693 if (job && dma_fence_is_signaled(&job->s_fence->finished)) { in drm_sched_get_cleanup_job()
694 /* remove job from pending_list */ in drm_sched_get_cleanup_job()
695 list_del_init(&job->list); in drm_sched_get_cleanup_job()
701 job->s_fence->finished.timestamp; in drm_sched_get_cleanup_job()
704 job = NULL; in drm_sched_get_cleanup_job()
705 /* queue timeout for next job */ in drm_sched_get_cleanup_job()
711 return job; in drm_sched_get_cleanup_job()
796 /* queue timeout for next job */ in drm_sched_main()
848 * @hang_limit: number of times to allow a job to hang before dropping it
943 * @bad: The job guilty of time out