Lines Matching defs:job

274  * @job: pointer to the job that needs to be submitted to the queue
279 static void ext_queue_schedule_job(struct hl_cs_job *job)
281 struct hl_device *hdev = job->cs->ctx->hdev;
282 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
297 cb = job->patched_cb;
298 len = job->job_cb_size;
302 if (!cs_needs_completion(job->cs))
322 job->user_cb_size,
326 job->contains_dma_pkt);
328 q->shadow_queue[hl_pi_2_offset(q->pi)] = job;
339 * @job: pointer to the job that needs to be submitted to the queue
344 static void int_queue_schedule_job(struct hl_cs_job *job)
346 struct hl_device *hdev = job->cs->ctx->hdev;
347 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
352 bd.len = cpu_to_le32(job->job_cb_size);
354 if (job->is_kernel_allocated_cb)
358 bd.ptr = cpu_to_le64(job->user_cb->bus_address);
360 bd.ptr = cpu_to_le64((u64) (uintptr_t) job->user_cb);
375 * @job: pointer to the job that needs to be submitted to the queue
380 static void hw_queue_schedule_job(struct hl_cs_job *job)
382 struct hl_device *hdev = job->cs->ctx->hdev;
383 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
393 offset = job->cs->sequence & (hdev->asic_prop.max_pending_cs - 1);
397 len = job->job_cb_size;
405 if (job->patched_cb)
406 ptr = job->patched_cb->bus_address;
407 else if (job->is_kernel_allocated_cb)
408 ptr = job->user_cb->bus_address;
410 ptr = (u64) (uintptr_t) job->user_cb;
416 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl)
423 q_idx = job->hw_queue_id;
438 hdev->asic_funcs->gen_signal_cb(hdev, job->patched_cb,
444 job->cs->sob_addr_offset = hw_sob->sob_addr;
445 job->cs->initial_sob_count = prop->next_sob_val - 1;
451 struct hl_cs *cs, struct hl_cs_job *job,
468 if (job->encaps_sig_wait_offset)
469 offset = job->encaps_sig_wait_offset - 1;
475 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl)
482 q_idx = job->hw_queue_id;
494 hl_hw_queue_encaps_sig_set_sob_info(hdev, cs, job, cs_cmpl);
500 job->encaps_sig_wait_offset);
535 wait_prop.data = (void *) job->patched_cb;
562 struct hl_cs_job *job;
567 /* There is only one job in a signal/wait CS */
568 job = list_first_entry(&cs->job_list, struct hl_cs_job,
572 rc = init_signal_cs(hdev, job, cs_cmpl);
574 rc = init_wait_cs(hdev, cs, job, cs_cmpl);
642 struct hl_cs_job *job, *tmp;
772 list_for_each_entry_safe(job, tmp, &cs->job_list, cs_node)
773 switch (job->queue_type) {
775 ext_queue_schedule_job(job);
778 int_queue_schedule_job(job);
781 hw_queue_schedule_job(job);
1061 * user context. It also means that if a job was submitted by
1062 * the kernel driver (e.g. context creation), the job itself was