Lines Matching defs:job

971 	struct nouveau_uvmm_bind_job *job =
974 nouveau_job_free(&job->base);
975 kfree(job);
979 nouveau_uvmm_bind_job_get(struct nouveau_uvmm_bind_job *job)
981 kref_get(&job->kref);
985 nouveau_uvmm_bind_job_put(struct nouveau_uvmm_bind_job *job)
987 kref_put(&job->kref, nouveau_uvmm_bind_job_free);
991 bind_validate_op(struct nouveau_job *job,
994 struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(job->cli);
1012 bind_validate_map_sparse(struct nouveau_job *job, u64 addr, u64 range)
1015 struct nouveau_sched_entity *entity = job->entity;
1020 spin_lock(&entity->job.list.lock);
1021 list_for_each_entry(bind_job, &entity->job.list.head, entry) {
1029 spin_unlock(&entity->job.list.lock);
1037 spin_unlock(&entity->job.list.lock);
1041 bind_validate_map_common(struct nouveau_job *job, u64 addr, u64 range,
1044 struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(job->cli);
1057 /* Generally, job submits are serialized, hence only
1085 bind_validate_region(struct nouveau_job *job)
1087 struct nouveau_uvmm_bind_job *bind_job = to_uvmm_bind_job(job);
1099 bind_validate_map_sparse(job, op_addr, op_range);
1102 ret = bind_validate_map_common(job, op_addr, op_range,
1142 nouveau_uvmm_bind_job_submit(struct nouveau_job *job)
1144 struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(job->cli);
1145 struct nouveau_uvmm_bind_job *bind_job = to_uvmm_bind_job(job);
1146 struct nouveau_sched_entity *entity = job->entity;
1147 struct drm_exec *exec = &job->exec;
1153 op->gem.obj = drm_gem_object_lookup(job->file_priv,
1159 ret = bind_validate_op(job, op);
1169 ret = bind_validate_region(job);
1346 * won't be any concurrent (in)validations during job execution, hence
1375 spin_lock(&entity->job.list.lock);
1376 list_add(&bind_job->entry, &entity->job.list.head);
1377 spin_unlock(&entity->job.list.lock);
1418 nouveau_uvmm_bind_job_armed_submit(struct nouveau_job *job)
1420 struct drm_exec *exec = &job->exec;
1425 dma_resv_add_fence(obj->resv, job->done_fence, job->resv_usage);
1431 nouveau_uvmm_bind_job_run(struct nouveau_job *job)
1433 struct nouveau_uvmm_bind_job *bind_job = to_uvmm_bind_job(job);
1434 struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(job->cli);
1460 NV_PRINTK(err, job->cli, "bind job failed: %d\n", ret);
1469 struct nouveau_job *job = &bind_job->base;
1470 struct nouveau_uvmm *uvmm = nouveau_cli_uvmm(job->cli);
1471 struct nouveau_sched_entity *entity = job->entity;
1518 spin_lock(&entity->job.list.lock);
1520 spin_unlock(&entity->job.list.lock);
1523 wake_up(&entity->job.wq);
1525 /* Remove and free ops after removing the bind job from the job list to
1537 nouveau_uvmm_bind_job_free_qwork(struct nouveau_job *job)
1539 struct nouveau_uvmm_bind_job *bind_job = to_uvmm_bind_job(job);
1540 struct nouveau_sched_entity *entity = job->entity;
1600 struct nouveau_uvmm_bind_job *job;
1605 ret = nouveau_uvmm_bind_job_alloc(&job);
1609 INIT_LIST_HEAD(&job->ops);
1610 INIT_LIST_HEAD(&job->entry);
1617 list_add_tail(&op->entry, &job->ops);
1620 init_completion(&job->complete);
1621 INIT_WORK(&job->work, nouveau_uvmm_bind_job_free_work_fn);
1636 ret = nouveau_job_init(&job->base, &args);
1640 *pjob = job;
1644 bind_job_ops_free(&job->ops);
1645 kfree(job);
1666 struct nouveau_uvmm_bind_job *job;
1669 ret = nouveau_uvmm_bind_job_init(&job, args);
1673 ret = nouveau_job_submit(&job->base);
1680 nouveau_job_fini(&job->base);
1877 wait_event(entity->job.wq, list_empty(&entity->job.list.head));