• Home
  • Raw
  • Download

Lines Matching refs:job

252 v3d_lock_bo_reservations(struct v3d_job *job,  in v3d_lock_bo_reservations()  argument
257 ret = drm_gem_lock_reservations(job->bo, job->bo_count, acquire_ctx); in v3d_lock_bo_reservations()
261 for (i = 0; i < job->bo_count; i++) { in v3d_lock_bo_reservations()
262 ret = dma_resv_reserve_fences(job->bo[i]->resv, 1); in v3d_lock_bo_reservations()
266 ret = drm_sched_job_add_implicit_dependencies(&job->base, in v3d_lock_bo_reservations()
267 job->bo[i], true); in v3d_lock_bo_reservations()
275 drm_gem_unlock_reservations(job->bo, job->bo_count, acquire_ctx); in v3d_lock_bo_reservations()
298 struct v3d_job *job, in v3d_lookup_bos() argument
302 job->bo_count = bo_count; in v3d_lookup_bos()
304 if (!job->bo_count) { in v3d_lookup_bos()
314 job->bo_count, &job->bo); in v3d_lookup_bos()
320 struct v3d_job *job = container_of(ref, struct v3d_job, refcount); in v3d_job_free() local
323 if (job->bo) { in v3d_job_free()
324 for (i = 0; i < job->bo_count; i++) in v3d_job_free()
325 drm_gem_object_put(job->bo[i]); in v3d_job_free()
326 kvfree(job->bo); in v3d_job_free()
329 dma_fence_put(job->irq_fence); in v3d_job_free()
330 dma_fence_put(job->done_fence); in v3d_job_free()
332 if (job->perfmon) in v3d_job_free()
333 v3d_perfmon_put(job->perfmon); in v3d_job_free()
335 kfree(job); in v3d_job_free()
341 struct v3d_render_job *job = container_of(ref, struct v3d_render_job, in v3d_render_job_free() local
345 list_for_each_entry_safe(bo, save, &job->unref_list, unref_head) { in v3d_render_job_free()
352 void v3d_job_cleanup(struct v3d_job *job) in v3d_job_cleanup() argument
354 if (!job) in v3d_job_cleanup()
357 drm_sched_job_cleanup(&job->base); in v3d_job_cleanup()
358 v3d_job_put(job); in v3d_job_cleanup()
361 void v3d_job_put(struct v3d_job *job) in v3d_job_put() argument
363 kref_put(&job->refcount, job->free); in v3d_job_put()
405 struct v3d_job *job; in v3d_job_init() local
415 job = *container; in v3d_job_init()
416 job->v3d = v3d; in v3d_job_init()
417 job->free = free; in v3d_job_init()
419 ret = drm_sched_job_init(&job->base, &v3d_priv->sched_entity[queue], in v3d_job_init()
436 ret = drm_sched_job_add_syncobj_dependency(&job->base, file_priv, in.handle, 0); in v3d_job_init()
444 ret = drm_sched_job_add_syncobj_dependency(&job->base, file_priv, in_sync, 0); in v3d_job_init()
451 kref_init(&job->refcount); in v3d_job_init()
456 drm_sched_job_cleanup(&job->base); in v3d_job_init()
465 v3d_push_job(struct v3d_job *job) in v3d_push_job() argument
467 drm_sched_job_arm(&job->base); in v3d_push_job()
469 job->done_fence = dma_fence_get(&job->base.s_fence->finished); in v3d_push_job()
472 kref_get(&job->refcount); in v3d_push_job()
474 drm_sched_entity_push_job(&job->base); in v3d_push_job()
479 struct v3d_job *job, in v3d_attach_fences_and_unlock_reservation() argument
489 for (i = 0; i < job->bo_count; i++) { in v3d_attach_fences_and_unlock_reservation()
491 dma_resv_add_fence(job->bo[i]->resv, job->done_fence, in v3d_attach_fences_and_unlock_reservation()
495 drm_gem_unlock_reservations(job->bo, job->bo_count, acquire_ctx); in v3d_attach_fences_and_unlock_reservation()
821 struct v3d_tfu_job *job = NULL; in v3d_submit_tfu_ioctl() local
840 ret = v3d_job_init(v3d, file_priv, (void *)&job, sizeof(*job), in v3d_submit_tfu_ioctl()
845 job->base.bo = kcalloc(ARRAY_SIZE(args->bo_handles), in v3d_submit_tfu_ioctl()
846 sizeof(*job->base.bo), GFP_KERNEL); in v3d_submit_tfu_ioctl()
847 if (!job->base.bo) { in v3d_submit_tfu_ioctl()
852 job->args = *args; in v3d_submit_tfu_ioctl()
854 for (job->base.bo_count = 0; in v3d_submit_tfu_ioctl()
855 job->base.bo_count < ARRAY_SIZE(args->bo_handles); in v3d_submit_tfu_ioctl()
856 job->base.bo_count++) { in v3d_submit_tfu_ioctl()
859 if (!args->bo_handles[job->base.bo_count]) in v3d_submit_tfu_ioctl()
862 bo = drm_gem_object_lookup(file_priv, args->bo_handles[job->base.bo_count]); in v3d_submit_tfu_ioctl()
865 job->base.bo_count, in v3d_submit_tfu_ioctl()
866 args->bo_handles[job->base.bo_count]); in v3d_submit_tfu_ioctl()
870 job->base.bo[job->base.bo_count] = bo; in v3d_submit_tfu_ioctl()
873 ret = v3d_lock_bo_reservations(&job->base, &acquire_ctx); in v3d_submit_tfu_ioctl()
878 v3d_push_job(&job->base); in v3d_submit_tfu_ioctl()
882 &job->base, &acquire_ctx, in v3d_submit_tfu_ioctl()
885 job->base.done_fence); in v3d_submit_tfu_ioctl()
887 v3d_job_put(&job->base); in v3d_submit_tfu_ioctl()
892 v3d_job_cleanup((void *)job); in v3d_submit_tfu_ioctl()
915 struct v3d_csd_job *job = NULL; in v3d_submit_csd_ioctl() local
943 ret = v3d_job_init(v3d, file_priv, (void *)&job, sizeof(*job), in v3d_submit_csd_ioctl()
953 job->args = *args; in v3d_submit_csd_ioctl()
965 job->base.perfmon = v3d_perfmon_find(v3d_priv, in v3d_submit_csd_ioctl()
967 if (!job->base.perfmon) { in v3d_submit_csd_ioctl()
974 v3d_push_job(&job->base); in v3d_submit_csd_ioctl()
977 dma_fence_get(job->base.done_fence)); in v3d_submit_csd_ioctl()
991 v3d_job_put(&job->base); in v3d_submit_csd_ioctl()
1002 v3d_job_cleanup((void *)job); in v3d_submit_csd_ioctl()