Lines Matching full:job

17 #include "../job.h"
50 static void submit_wait(struct host1x_job *job, u32 id, u32 threshold, in submit_wait() argument
53 struct host1x_cdma *cdma = &job->channel->cdma; in submit_wait()
63 if (job->memory_context) in submit_wait()
64 stream_id = job->memory_context->stream_id; in submit_wait()
66 stream_id = job->engine_fallback_streamid; in submit_wait()
79 host1x_cdma_push_wide(&job->channel->cdma, in submit_wait()
80 host1x_opcode_setclass(job->class, 0, 0), in submit_wait()
82 host1x_opcode_setstreamid(job->engine_streamid_offset / 4), in submit_wait()
113 static void submit_gathers(struct host1x_job *job, u32 job_syncpt_base) in submit_gathers() argument
115 struct host1x_cdma *cdma = &job->channel->cdma; in submit_gathers()
117 struct device *dev = job->channel->dev; in submit_gathers()
122 for (i = 0; i < job->num_cmds; i++) { in submit_gathers()
123 struct host1x_job_cmd *cmd = &job->cmds[i]; in submit_gathers()
131 submit_wait(job, cmd->wait.id, threshold, cmd->wait.next_class); in submit_gathers()
163 static inline void synchronize_syncpt_base(struct host1x_job *job) in synchronize_syncpt_base() argument
165 struct host1x_syncpt *sp = job->syncpt; in synchronize_syncpt_base()
172 host1x_cdma_push(&job->channel->cdma, in synchronize_syncpt_base()
214 static void channel_program_cdma(struct host1x_job *job) in channel_program_cdma() argument
216 struct host1x_cdma *cdma = &job->channel->cdma; in channel_program_cdma()
217 struct host1x_syncpt *sp = job->syncpt; in channel_program_cdma()
224 host1x_opcode_acquire_mlock(job->class), in channel_program_cdma()
225 host1x_opcode_setclass(job->class, 0, 0), in channel_program_cdma()
227 host1x_opcode_setstreamid(job->engine_streamid_offset / 4)); in channel_program_cdma()
231 host1x_cdma_push(&job->channel->cdma, in channel_program_cdma()
233 HOST1X_UCLASS_INCR_SYNCPT_INDX_F(job->syncpt->id) | in channel_program_cdma()
235 submit_wait(job, job->syncpt->id, fence, job->class); in channel_program_cdma()
238 job->syncpt_end = host1x_syncpt_incr_max(sp, job->syncpt_incrs); in channel_program_cdma()
239 submit_gathers(job, job->syncpt_end - job->syncpt_incrs); in channel_program_cdma()
243 host1x_cdma_push(&job->channel->cdma, in channel_program_cdma()
245 HOST1X_UCLASS_INCR_SYNCPT_INDX_F(job->syncpt->id) | in channel_program_cdma()
247 submit_wait(job, job->syncpt->id, fence, job->class); in channel_program_cdma()
251 HOST1X_OPCODE_NOP, host1x_opcode_release_mlock(job->class)); in channel_program_cdma()
253 if (job->serialize) { in channel_program_cdma()
256 * previous job to finish before this one can commence. in channel_program_cdma()
261 host1x_class_host_wait_syncpt(job->syncpt->id, in channel_program_cdma()
267 synchronize_syncpt_base(job); in channel_program_cdma()
270 if (job->class) in channel_program_cdma()
272 host1x_opcode_setclass(job->class, 0, 0), in channel_program_cdma()
275 job->syncpt_end = host1x_syncpt_incr_max(sp, job->syncpt_incrs); in channel_program_cdma()
277 submit_gathers(job, job->syncpt_end - job->syncpt_incrs); in channel_program_cdma()
281 static int channel_submit(struct host1x_job *job) in channel_submit() argument
283 struct host1x_channel *ch = job->channel; in channel_submit()
284 struct host1x_syncpt *sp = job->syncpt; in channel_submit()
292 job->num_cmds, job->num_relocs, in channel_submit()
293 job->syncpt->id, job->syncpt_incrs); in channel_submit()
296 prev_max = job->syncpt_end = host1x_syncpt_read_max(sp); in channel_submit()
315 err = host1x_cdma_begin(&ch->cdma, job); in channel_submit()
321 channel_program_cdma(job); in channel_submit()
325 host1x_cdma_end(&ch->cdma, job); in channel_submit()
332 completed_waiter, &job->waiter); in channel_submit()