Lines Matching refs:job
274 struct host1x_job *job) in cdma_start_timer_locked() argument
281 cdma->timeout.client = job->client; in cdma_start_timer_locked()
282 cdma->timeout.syncpt = job->syncpt; in cdma_start_timer_locked()
283 cdma->timeout.syncpt_val = job->syncpt_end; in cdma_start_timer_locked()
287 msecs_to_jiffies(job->timeout)); in cdma_start_timer_locked()
313 struct host1x_job *job, *n; in update_cdma_locked() local
319 list_for_each_entry_safe(job, n, &cdma->sync_queue, list) { in update_cdma_locked()
320 struct host1x_syncpt *sp = job->syncpt; in update_cdma_locked()
323 if (!host1x_syncpt_is_expired(sp, job->syncpt_end) && in update_cdma_locked()
324 !job->cancelled) { in update_cdma_locked()
326 if (job->timeout) in update_cdma_locked()
327 cdma_start_timer_locked(cdma, job); in update_cdma_locked()
337 host1x_job_unpin(job); in update_cdma_locked()
340 if (job->num_slots) { in update_cdma_locked()
343 host1x_pushbuffer_pop(pb, job->num_slots); in update_cdma_locked()
349 list_del(&job->list); in update_cdma_locked()
350 host1x_job_put(job); in update_cdma_locked()
368 struct host1x_job *job, *next_job = NULL; in host1x_cdma_update_sync_queue() local
385 list_for_each_entry(job, &cdma->sync_queue, list) { in host1x_cdma_update_sync_queue()
386 if (syncpt_val < job->syncpt_end) { in host1x_cdma_update_sync_queue()
388 if (!list_is_last(&job->list, &cdma->sync_queue)) in host1x_cdma_update_sync_queue()
389 next_job = list_next_entry(job, list); in host1x_cdma_update_sync_queue()
394 host1x_job_dump(dev, job); in host1x_cdma_update_sync_queue()
398 job = NULL; in host1x_cdma_update_sync_queue()
413 if (!job) in host1x_cdma_update_sync_queue()
417 if (job->syncpt_recovery) { in host1x_cdma_update_sync_queue()
422 job->timeout = 0; in host1x_cdma_update_sync_queue()
424 syncpt_incrs = job->syncpt_end - syncpt_val; in host1x_cdma_update_sync_queue()
427 host1x_job_dump(dev, job); in host1x_cdma_update_sync_queue()
430 host1x_hw_cdma_timeout_cpu_incr(host1x, cdma, job->first_get, in host1x_cdma_update_sync_queue()
431 syncpt_incrs, job->syncpt_end, in host1x_cdma_update_sync_queue()
432 job->num_slots); in host1x_cdma_update_sync_queue()
437 struct host1x_job *failed_job = job; in host1x_cdma_update_sync_queue()
439 host1x_job_dump(dev, job); in host1x_cdma_update_sync_queue()
441 host1x_syncpt_set_locked(job->syncpt); in host1x_cdma_update_sync_queue()
444 list_for_each_entry_continue(job, &cdma->sync_queue, list) { in host1x_cdma_update_sync_queue()
447 if (job->syncpt != failed_job->syncpt) in host1x_cdma_update_sync_queue()
450 for (i = 0; i < job->num_slots; i++) { in host1x_cdma_update_sync_queue()
451 unsigned int slot = (job->first_get/8 + i) % in host1x_cdma_update_sync_queue()
470 unsigned int next_job = (job->first_get/8 + job->num_slots) in host1x_cdma_update_sync_queue()
480 job->cancelled = true; in host1x_cdma_update_sync_queue()
548 int host1x_cdma_begin(struct host1x_cdma *cdma, struct host1x_job *job) in host1x_cdma_begin() argument
559 if (job->syncpt->locked) { in host1x_cdma_begin()
564 if (job->timeout) { in host1x_cdma_begin()
584 trace_host1x_cdma_begin(dev_name(job->channel->dev)); in host1x_cdma_begin()
667 struct host1x_job *job) in host1x_cdma_end() argument
674 job->first_get = cdma->first_get; in host1x_cdma_end()
675 job->num_slots = cdma->slots_used; in host1x_cdma_end()
676 host1x_job_get(job); in host1x_cdma_end()
677 list_add_tail(&job->list, &cdma->sync_queue); in host1x_cdma_end()
680 if (job->timeout && idle) in host1x_cdma_end()
681 cdma_start_timer_locked(cdma, job); in host1x_cdma_end()
683 trace_host1x_cdma_end(dev_name(job->channel->dev)); in host1x_cdma_end()