• Home
  • Raw
  • Download

Lines Matching full:exec

210 v3d_attach_object_fences(struct v3d_exec_info *exec)  in v3d_attach_object_fences()  argument
212 struct dma_fence *out_fence = &exec->render.base.s_fence->finished; in v3d_attach_object_fences()
216 for (i = 0; i < exec->bo_count; i++) { in v3d_attach_object_fences()
217 bo = to_v3d_bo(&exec->bo[i]->base); in v3d_attach_object_fences()
226 struct v3d_exec_info *exec, in v3d_unlock_bo_reservations() argument
231 for (i = 0; i < exec->bo_count; i++) { in v3d_unlock_bo_reservations()
232 struct v3d_bo *bo = to_v3d_bo(&exec->bo[i]->base); in v3d_unlock_bo_reservations()
244 * (all of which are on exec->unref_list). They're entirely private
249 struct v3d_exec_info *exec, in v3d_lock_bo_reservations() argument
260 bo = to_v3d_bo(&exec->bo[contended_lock]->base); in v3d_lock_bo_reservations()
269 for (i = 0; i < exec->bo_count; i++) { in v3d_lock_bo_reservations()
273 bo = to_v3d_bo(&exec->bo[i]->base); in v3d_lock_bo_reservations()
280 bo = to_v3d_bo(&exec->bo[j]->base); in v3d_lock_bo_reservations()
285 bo = to_v3d_bo(&exec->bo[contended_lock]->base); in v3d_lock_bo_reservations()
305 for (i = 0; i < exec->bo_count; i++) { in v3d_lock_bo_reservations()
306 bo = to_v3d_bo(&exec->bo[i]->base); in v3d_lock_bo_reservations()
310 v3d_unlock_bo_reservations(dev, exec, acquire_ctx); in v3d_lock_bo_reservations()
319 * v3d_cl_lookup_bos() - Sets up exec->bo[] with the GEM objects
323 * @exec: V3D job being set up
336 struct v3d_exec_info *exec) in v3d_cl_lookup_bos() argument
342 exec->bo_count = args->bo_handle_count; in v3d_cl_lookup_bos()
344 if (!exec->bo_count) { in v3d_cl_lookup_bos()
352 exec->bo = kvmalloc_array(exec->bo_count, in v3d_cl_lookup_bos()
355 if (!exec->bo) { in v3d_cl_lookup_bos()
360 handles = kvmalloc_array(exec->bo_count, sizeof(u32), GFP_KERNEL); in v3d_cl_lookup_bos()
369 exec->bo_count * sizeof(u32))) { in v3d_cl_lookup_bos()
376 for (i = 0; i < exec->bo_count; i++) { in v3d_cl_lookup_bos()
387 exec->bo[i] = to_v3d_bo(bo); in v3d_cl_lookup_bos()
399 struct v3d_exec_info *exec = container_of(ref, struct v3d_exec_info, in v3d_exec_cleanup() local
401 struct v3d_dev *v3d = exec->v3d; in v3d_exec_cleanup()
405 dma_fence_put(exec->bin.in_fence); in v3d_exec_cleanup()
406 dma_fence_put(exec->render.in_fence); in v3d_exec_cleanup()
408 dma_fence_put(exec->bin.done_fence); in v3d_exec_cleanup()
409 dma_fence_put(exec->render.done_fence); in v3d_exec_cleanup()
411 dma_fence_put(exec->bin_done_fence); in v3d_exec_cleanup()
413 for (i = 0; i < exec->bo_count; i++) in v3d_exec_cleanup()
414 drm_gem_object_put_unlocked(&exec->bo[i]->base); in v3d_exec_cleanup()
415 kvfree(exec->bo); in v3d_exec_cleanup()
417 list_for_each_entry_safe(bo, save, &exec->unref_list, unref_head) { in v3d_exec_cleanup()
424 kfree(exec); in v3d_exec_cleanup()
427 void v3d_exec_put(struct v3d_exec_info *exec) in v3d_exec_put() argument
429 kref_put(&exec->refcount, v3d_exec_cleanup); in v3d_exec_put()
501 struct v3d_exec_info *exec; in v3d_submit_cl_ioctl() local
511 exec = kcalloc(1, sizeof(*exec), GFP_KERNEL); in v3d_submit_cl_ioctl()
512 if (!exec) in v3d_submit_cl_ioctl()
517 kfree(exec); in v3d_submit_cl_ioctl()
521 kref_init(&exec->refcount); in v3d_submit_cl_ioctl()
524 &exec->bin.in_fence); in v3d_submit_cl_ioctl()
529 &exec->render.in_fence); in v3d_submit_cl_ioctl()
533 exec->qma = args->qma; in v3d_submit_cl_ioctl()
534 exec->qms = args->qms; in v3d_submit_cl_ioctl()
535 exec->qts = args->qts; in v3d_submit_cl_ioctl()
536 exec->bin.exec = exec; in v3d_submit_cl_ioctl()
537 exec->bin.start = args->bcl_start; in v3d_submit_cl_ioctl()
538 exec->bin.end = args->bcl_end; in v3d_submit_cl_ioctl()
539 exec->render.exec = exec; in v3d_submit_cl_ioctl()
540 exec->render.start = args->rcl_start; in v3d_submit_cl_ioctl()
541 exec->render.end = args->rcl_end; in v3d_submit_cl_ioctl()
542 exec->v3d = v3d; in v3d_submit_cl_ioctl()
543 INIT_LIST_HEAD(&exec->unref_list); in v3d_submit_cl_ioctl()
545 ret = v3d_cl_lookup_bos(dev, file_priv, args, exec); in v3d_submit_cl_ioctl()
549 ret = v3d_lock_bo_reservations(dev, exec, &acquire_ctx); in v3d_submit_cl_ioctl()
554 if (exec->bin.start != exec->bin.end) { in v3d_submit_cl_ioctl()
555 ret = drm_sched_job_init(&exec->bin.base, in v3d_submit_cl_ioctl()
561 exec->bin_done_fence = in v3d_submit_cl_ioctl()
562 dma_fence_get(&exec->bin.base.s_fence->finished); in v3d_submit_cl_ioctl()
564 kref_get(&exec->refcount); /* put by scheduler job completion */ in v3d_submit_cl_ioctl()
565 drm_sched_entity_push_job(&exec->bin.base, in v3d_submit_cl_ioctl()
569 ret = drm_sched_job_init(&exec->render.base, in v3d_submit_cl_ioctl()
575 kref_get(&exec->refcount); /* put by scheduler job completion */ in v3d_submit_cl_ioctl()
576 drm_sched_entity_push_job(&exec->render.base, in v3d_submit_cl_ioctl()
580 v3d_attach_object_fences(exec); in v3d_submit_cl_ioctl()
582 v3d_unlock_bo_reservations(dev, exec, &acquire_ctx); in v3d_submit_cl_ioctl()
588 &exec->render.base.s_fence->finished); in v3d_submit_cl_ioctl()
592 v3d_exec_put(exec); in v3d_submit_cl_ioctl()
598 v3d_unlock_bo_reservations(dev, exec, &acquire_ctx); in v3d_submit_cl_ioctl()
600 v3d_exec_put(exec); in v3d_submit_cl_ioctl()
658 /* Waiting for exec to finish would need to be done before in v3d_gem_destroy()