Lines Matching refs:job
23 #include "job.h"
270 * Start timer that tracks the time spent by the job.
274 struct host1x_job *job)
281 cdma->timeout.client = job->client;
282 cdma->timeout.syncpt = job->syncpt;
283 cdma->timeout.syncpt_val = job->syncpt_end;
287 msecs_to_jiffies(job->timeout));
313 struct host1x_job *job, *n;
319 list_for_each_entry_safe(job, n, &cdma->sync_queue, list) {
320 struct host1x_syncpt *sp = job->syncpt;
323 if (!host1x_syncpt_is_expired(sp, job->syncpt_end) &&
324 !job->cancelled) {
326 if (job->timeout)
327 cdma_start_timer_locked(cdma, job);
337 host1x_job_unpin(job);
340 if (job->num_slots) {
343 host1x_pushbuffer_pop(pb, job->num_slots);
349 list_del(&job->list);
350 host1x_job_put(job);
368 struct host1x_job *job, *next_job = NULL;
385 list_for_each_entry(job, &cdma->sync_queue, list) {
386 if (syncpt_val < job->syncpt_end) {
388 if (!list_is_last(&job->list, &cdma->sync_queue))
389 next_job = list_next_entry(job, list);
394 host1x_job_dump(dev, job);
398 job = NULL;
403 * Increment with CPU the remaining syncpts of a partially executed job.
405 * CDMA will continue execution starting with the next job or will get
413 if (!job)
417 if (job->syncpt_recovery) {
422 job->timeout = 0;
424 syncpt_incrs = job->syncpt_end - syncpt_val;
427 host1x_job_dump(dev, job);
430 host1x_hw_cdma_timeout_cpu_incr(host1x, cdma, job->first_get,
431 syncpt_incrs, job->syncpt_end,
432 job->num_slots);
437 struct host1x_job *failed_job = job;
439 host1x_job_dump(dev, job);
441 host1x_syncpt_set_locked(job->syncpt);
444 list_for_each_entry_continue(job, &cdma->sync_queue, list) {
447 if (job->syncpt != failed_job->syncpt)
450 for (i = 0; i < job->num_slots; i++) {
451 unsigned int slot = (job->first_get/8 + i) %
465 * of the next job. We don't use this for older
470 unsigned int next_job = (job->first_get/8 + job->num_slots)
480 job->cancelled = true;
548 int host1x_cdma_begin(struct host1x_cdma *cdma, struct host1x_job *job)
555 * Check if syncpoint was locked due to previous job timeout.
559 if (job->syncpt->locked) {
564 if (job->timeout) {
584 trace_host1x_cdma_begin(dev_name(job->channel->dev));
662 * Kick off DMA, add job to the sync queue, and a number of slots to be freed
667 struct host1x_job *job)
674 job->first_get = cdma->first_get;
675 job->num_slots = cdma->slots_used;
676 host1x_job_get(job);
677 list_add_tail(&job->list, &cdma->sync_queue);
680 if (job->timeout && idle)
681 cdma_start_timer_locked(cdma, job);
683 trace_host1x_cdma_end(dev_name(job->channel->dev));