Lines Matching full:job

312 int drm_writeback_prepare_job(struct drm_writeback_job *job)  in drm_writeback_prepare_job()  argument
314 struct drm_writeback_connector *connector = job->connector; in drm_writeback_prepare_job()
320 ret = funcs->prepare_writeback_job(connector, job); in drm_writeback_prepare_job()
325 job->prepared = true; in drm_writeback_prepare_job()
331 * drm_writeback_queue_job - Queue a writeback job for later signalling
332 * @wb_connector: The writeback connector to queue a job on
333 * @conn_state: The connector state containing the job to queue
335 * This function adds the job contained in @conn_state to the job_queue for a
336 * writeback connector. It takes ownership of the writeback job and sets the
337 * @conn_state->writeback_job to NULL, and so no access to the job may be
352 struct drm_writeback_job *job; in drm_writeback_queue_job() local
355 job = conn_state->writeback_job; in drm_writeback_queue_job()
359 list_add_tail(&job->list_entry, &wb_connector->job_queue); in drm_writeback_queue_job()
364 void drm_writeback_cleanup_job(struct drm_writeback_job *job) in drm_writeback_cleanup_job() argument
366 struct drm_writeback_connector *connector = job->connector; in drm_writeback_cleanup_job()
370 if (job->prepared && funcs->cleanup_writeback_job) in drm_writeback_cleanup_job()
371 funcs->cleanup_writeback_job(connector, job); in drm_writeback_cleanup_job()
373 if (job->fb) in drm_writeback_cleanup_job()
374 drm_framebuffer_put(job->fb); in drm_writeback_cleanup_job()
376 if (job->out_fence) in drm_writeback_cleanup_job()
377 dma_fence_put(job->out_fence); in drm_writeback_cleanup_job()
379 kfree(job); in drm_writeback_cleanup_job()
384 * @cleanup_work: deferred cleanup of a writeback job
386 * The job cannot be cleaned up directly in drm_writeback_signal_completion,
392 struct drm_writeback_job *job = container_of(work, in cleanup_work() local
396 drm_writeback_cleanup_job(job); in cleanup_work()
400 * drm_writeback_signal_completion - Signal the completion of a writeback job
401 * @wb_connector: The writeback connector whose job is complete
405 * writeback job. It should be called as soon as possible after the hardware
420 struct drm_writeback_job *job; in drm_writeback_signal_completion() local
424 job = list_first_entry_or_null(&wb_connector->job_queue, in drm_writeback_signal_completion()
427 if (job) in drm_writeback_signal_completion()
428 list_del(&job->list_entry); in drm_writeback_signal_completion()
432 if (WARN_ON(!job)) in drm_writeback_signal_completion()
435 out_fence = job->out_fence; in drm_writeback_signal_completion()
441 job->out_fence = NULL; in drm_writeback_signal_completion()
444 INIT_WORK(&job->cleanup_work, cleanup_work); in drm_writeback_signal_completion()
445 queue_work(system_long_wq, &job->cleanup_work); in drm_writeback_signal_completion()