Lines Matching defs:job

121  * panfrost_lookup_bos() - Sets up job->bo[] with the GEM objects
122 * referenced by the job.
126 * @job: job being set up
128 * Resolve handles from userspace to BOs and attach them to job.
137 struct panfrost_job *job)
144 job->bo_count = args->bo_handle_count;
146 if (!job->bo_count)
149 job->implicit_fences = kvmalloc_array(job->bo_count,
152 if (!job->implicit_fences)
157 job->bo_count, &job->bos);
161 job->mappings = kvmalloc_array(job->bo_count,
164 if (!job->mappings)
167 for (i = 0; i < job->bo_count; i++) {
170 bo = to_panfrost_bo(job->bos[i]);
178 job->mappings[i] = mapping;
185 * panfrost_copy_in_sync() - Sets up job->in_fences[] with the sync objects
186 * referenced by the job.
190 * @job: job being set up
192 * Resolve syncobjs from userspace to fences and attach them to job.
201 struct panfrost_job *job)
207 job->in_fence_count = args->in_sync_count;
209 if (!job->in_fence_count)
212 job->in_fences = kvmalloc_array(job->in_fence_count,
215 if (!job->in_fences) {
216 DRM_DEBUG("Failed to allocate job in fences\n");
220 handles = kvmalloc_array(job->in_fence_count, sizeof(u32), GFP_KERNEL);
229 job->in_fence_count * sizeof(u32))) {
235 for (i = 0; i < job->in_fence_count; i++) {
237 &job->in_fences[i]);
253 struct panfrost_job *job;
268 job = kzalloc(sizeof(*job), GFP_KERNEL);
269 if (!job) {
274 kref_init(&job->refcount);
276 job->pfdev = pfdev;
277 job->jc = args->jc;
278 job->requirements = args->requirements;
279 job->flush_id = panfrost_gpu_get_latest_flush_id(pfdev);
280 job->file_priv = file->driver_priv;
282 ret = panfrost_copy_in_sync(dev, file, args, job);
286 ret = panfrost_lookup_bos(dev, file, args, job);
290 ret = panfrost_job_push(job);
294 /* Update the return sync object for the job */
296 drm_syncobj_replace_fence(sync_out, job->render_done_fence);
299 panfrost_job_put(job);