Lines Matching refs:job
343 amdxdna_arg_bos_put(struct amdxdna_sched_job *job)
347 for (i = 0; i < job->bo_cnt; i++) {
348 if (!job->bos[i])
350 drm_gem_object_put(job->bos[i]);
356 struct amdxdna_sched_job *job,
362 job->bo_cnt = bo_cnt;
363 for (i = 0; i < job->bo_cnt; i++) {
376 job->bos[i] = gobj;
389 job->bos[i] = gobj;
395 amdxdna_arg_bos_put(job);
399 void amdxdna_sched_job_cleanup(struct amdxdna_sched_job *job)
401 trace_amdxdna_debug_point(job->hwctx->name, job->seq, "job release");
402 amdxdna_arg_bos_put(job);
403 amdxdna_gem_put_obj(job->cmd_bo);
411 struct amdxdna_sched_job *job;
416 job = kzalloc(struct_size(job, bos, arg_bo_cnt), GFP_KERNEL);
417 if (!job)
421 job->cmd_bo = amdxdna_gem_get_obj(client, cmd_bo_hdl, AMDXDNA_BO_CMD);
422 if (!job->cmd_bo) {
428 job->cmd_bo = NULL;
431 ret = amdxdna_arg_bos_lookup(client, job, arg_bo_hdls, arg_bo_cnt);
452 job->hwctx = hwctx;
453 job->mm = current->mm;
455 job->fence = amdxdna_fence_create(hwctx);
456 if (!job->fence) {
461 kref_init(&job->refcnt);
463 ret = xdna->dev_info->ops->cmd_submit(hwctx, job, seq);
474 trace_amdxdna_debug_point(hwctx->name, *seq, "job pushed");
479 dma_fence_put(job->fence);
482 amdxdna_arg_bos_put(job);
484 amdxdna_gem_put_obj(job->cmd_bo);
486 kfree(job);