Lines Matching defs:job

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)
270 struct hl_device *hdev = job->cs->ctx->hdev;
271 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
286 cb = job->patched_cb;
287 len = job->job_cb_size;
291 if (!cs_needs_completion(job->cs))
311 job->user_cb_size,
315 job->contains_dma_pkt);
317 q->shadow_queue[hl_pi_2_offset(q->pi)] = job;
328 * @job: pointer to the job that needs to be submitted to the queue
333 static void int_queue_schedule_job(struct hl_cs_job *job)
335 struct hl_device *hdev = job->cs->ctx->hdev;
336 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
341 bd.len = cpu_to_le32(job->job_cb_size);
343 if (job->is_kernel_allocated_cb)
347 bd.ptr = cpu_to_le64(job->user_cb->bus_address);
349 bd.ptr = cpu_to_le64((u64) (uintptr_t) job->user_cb);
364 * @job: pointer to the job that needs to be submitted to the queue
369 static void hw_queue_schedule_job(struct hl_cs_job *job)
371 struct hl_device *hdev = job->cs->ctx->hdev;
372 struct hl_hw_queue *q = &hdev->kernel_queues[job->hw_queue_id];
382 offset = job->cs->sequence & (hdev->asic_prop.max_pending_cs - 1);
386 len = job->job_cb_size;
394 if (job->patched_cb)
395 ptr = job->patched_cb->bus_address;
396 else if (job->is_kernel_allocated_cb)
397 ptr = job->user_cb->bus_address;
399 ptr = (u64) (uintptr_t) job->user_cb;
405 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl)
412 q_idx = job->hw_queue_id;
427 hdev->asic_funcs->gen_signal_cb(hdev, job->patched_cb,
433 job->cs->sob_addr_offset = hw_sob->sob_addr;
434 job->cs->initial_sob_count = prop->next_sob_val - 1;
440 struct hl_cs *cs, struct hl_cs_job *job,
457 if (job->encaps_sig_wait_offset)
458 offset = job->encaps_sig_wait_offset - 1;
464 struct hl_cs_job *job, struct hl_cs_compl *cs_cmpl)
471 q_idx = job->hw_queue_id;
483 hl_hw_queue_encaps_sig_set_sob_info(hdev, cs, job, cs_cmpl);
489 job->encaps_sig_wait_offset);
524 wait_prop.data = (void *) job->patched_cb;
551 struct hl_cs_job *job;
556 /* There is only one job in a signal/wait CS */
557 job = list_first_entry(&cs->job_list, struct hl_cs_job,
561 rc = init_signal_cs(hdev, job, cs_cmpl);
563 rc = init_wait_cs(hdev, cs, job, cs_cmpl);
631 struct hl_cs_job *job, *tmp;
761 list_for_each_entry_safe(job, tmp, &cs->job_list, cs_node)
762 switch (job->queue_type) {
764 ext_queue_schedule_job(job);
767 int_queue_schedule_job(job);
770 hw_queue_schedule_job(job);
1050 * user context. It also means that if a job was submitted by
1051 * the kernel driver (e.g. context creation), the job itself was