Lines Matching full:job
218 * hl_hw_queue_send_cb_no_cmpl - send a single CB (not a JOB) without completion
261 * ext_queue_schedule_job - submit a JOB to an external queue
263 * @job: pointer to the job that needs to be submitted to the queue
268 static void ext_queue_schedule_job(struct hl_cs_job *job) in ext_queue_schedule_job() argument
270 struct hl_device *hdev = job->cs->ctx->hdev; in ext_queue_schedule_job()
271 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id]; in ext_queue_schedule_job()
281 * Update the JOB ID inside the BD CTL so the device would know what in ext_queue_schedule_job()
286 cb = job->patched_cb; in ext_queue_schedule_job()
287 len = job->job_cb_size; in ext_queue_schedule_job()
291 if (!cs_needs_completion(job->cs)) in ext_queue_schedule_job()
314 job->contains_dma_pkt); in ext_queue_schedule_job()
316 q->shadow_queue[hl_pi_2_offset(q->pi)] = job; in ext_queue_schedule_job()
325 * int_queue_schedule_job - submit a JOB to an internal queue
327 * @job: pointer to the job that needs to be submitted to the queue
332 static void int_queue_schedule_job(struct hl_cs_job *job) in int_queue_schedule_job() argument
334 struct hl_device *hdev = job->cs->ctx->hdev; in int_queue_schedule_job()
335 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id]; in int_queue_schedule_job()
340 bd.len = cpu_to_le32(job->job_cb_size); in int_queue_schedule_job()
342 if (job->is_kernel_allocated_cb) in int_queue_schedule_job()
346 bd.ptr = cpu_to_le64(job->user_cb->bus_address); in int_queue_schedule_job()
348 bd.ptr = cpu_to_le64((u64) (uintptr_t) job->user_cb); in int_queue_schedule_job()
361 * hw_queue_schedule_job - submit a JOB to a H/W queue
363 * @job: pointer to the job that needs to be submitted to the queue
368 static void hw_queue_schedule_job(struct hl_cs_job *job) in hw_queue_schedule_job() argument
370 struct hl_device *hdev = job->cs->ctx->hdev; in hw_queue_schedule_job()
371 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id]; in hw_queue_schedule_job()
381 offset = job->cs->sequence & (hdev->asic_prop.max_pending_cs - 1); in hw_queue_schedule_job()
385 len = job->job_cb_size; in hw_queue_schedule_job()
393 if (job->patched_cb) in hw_queue_schedule_job()
394 ptr = job->patched_cb->bus_address; in hw_queue_schedule_job()
395 else if (job->is_kernel_allocated_cb) in hw_queue_schedule_job()
396 ptr = job->user_cb->bus_address; in hw_queue_schedule_job()
398 ptr = (u64) (uintptr_t) job->user_cb; in hw_queue_schedule_job()
404 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl) in init_signal_cs() argument
411 q_idx = job->hw_queue_id; in init_signal_cs()
426 hdev->asic_funcs->gen_signal_cb(hdev, job->patched_cb, in init_signal_cs()
436 struct hl_cs *cs, struct hl_cs_job *job, in hl_hw_queue_encaps_sig_set_sob_info() argument
453 if (job->encaps_sig_wait_offset) in hl_hw_queue_encaps_sig_set_sob_info()
454 offset = job->encaps_sig_wait_offset - 1; in hl_hw_queue_encaps_sig_set_sob_info()
460 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl) in init_wait_cs() argument
467 q_idx = job->hw_queue_id; in init_wait_cs()
479 hl_hw_queue_encaps_sig_set_sob_info(hdev, cs, job, cs_cmpl); in init_wait_cs()
485 job->encaps_sig_wait_offset); in init_wait_cs()
520 wait_prop.data = (void *) job->patched_cb; in init_wait_cs()
547 struct hl_cs_job *job; in init_signal_wait_cs() local
552 /* There is only one job in a signal/wait CS */ in init_signal_wait_cs()
553 job = list_first_entry(&cs->job_list, struct hl_cs_job, in init_signal_wait_cs()
557 rc = init_signal_cs(hdev, job, cs_cmpl); in init_signal_wait_cs()
559 rc = init_wait_cs(hdev, cs, job, cs_cmpl); in init_signal_wait_cs()
627 struct hl_cs_job *job, *tmp; in hl_hw_queue_schedule_cs() local
747 list_for_each_entry_safe(job, tmp, &cs->job_list, cs_node) in hl_hw_queue_schedule_cs()
748 switch (job->queue_type) { in hl_hw_queue_schedule_cs()
750 ext_queue_schedule_job(job); in hl_hw_queue_schedule_cs()
753 int_queue_schedule_job(job); in hl_hw_queue_schedule_cs()
756 hw_queue_schedule_job(job); in hl_hw_queue_schedule_cs()
1048 * user context. It also means that if a job was submitted by in queue_fini()
1049 * the kernel driver (e.g. context creation), the job itself was in queue_fini()