Lines Matching refs:job

41 drm_tegra_job_add_command(struct drm_tegra_job *job, uint32_t type,
47 size = (job->num_commands + 1) * sizeof(*commands);
49 commands = realloc(job->commands, size);
53 command = &commands[job->num_commands];
58 job->commands = commands;
59 job->num_commands++;
68 struct drm_tegra_job *job;
70 job = calloc(1, sizeof(*job));
71 if (!job)
74 job->page_size = sysconf(_SC_PAGESIZE);
75 job->channel = channel;
77 *jobp = job;
82 drm_public int drm_tegra_job_free(struct drm_tegra_job *job)
84 if (!job)
87 if (job->pushbuf)
88 drm_tegra_pushbuf_free(job->pushbuf);
90 if (job->commands)
91 free(job->commands);
93 if (job->buffers)
94 free(job->buffers);
96 free(job);
102 drm_tegra_job_get_pushbuf(struct drm_tegra_job *job,
107 if (!job->pushbuf) {
112 pushbuf->job = job;
114 pushbuf->start = calloc(1, job->page_size);
120 pushbuf->end = pushbuf->start + job->page_size / 4;
123 job->pushbuf = pushbuf;
126 *pushbufp = job->pushbuf;
132 drm_tegra_job_submit(struct drm_tegra_job *job, struct drm_tegra_fence *fence)
134 struct drm_tegra_channel *channel = job->channel;
141 args.num_bufs = job->num_buffers;
142 args.num_cmds = job->num_commands;
143 args.gather_data_words = job->pushbuf->ptr - job->pushbuf->start;
144 args.syncpt.id = job->syncpt.id;
145 args.syncpt.increments = job->syncpt.increments;
147 args.bufs_ptr = (uintptr_t)job->buffers;
148 args.cmds_ptr = (uintptr_t)job->commands;
149 args.gather_data_ptr = (uintptr_t)job->pushbuf->start;
155 job->syncpt.fence = args.syncpt.value;
159 fence->syncpt = job->syncpt.id;
160 fence->value = job->syncpt.fence;
167 drm_tegra_job_wait(struct drm_tegra_job *job, unsigned long timeout)
169 struct drm_tegra_channel *channel = job->channel;
179 args.id = job->syncpt.id;
180 args.threshold = job->syncpt.fence;