Lines Matching refs:host
34 host1x_syncpt_base_request(struct host1x *host) in host1x_syncpt_base_request() argument
36 struct host1x_syncpt_base *bases = host->bases; in host1x_syncpt_base_request()
39 for (i = 0; i < host->info->nb_bases; i++) in host1x_syncpt_base_request()
43 if (i >= host->info->nb_bases) in host1x_syncpt_base_request()
56 static struct host1x_syncpt *host1x_syncpt_alloc(struct host1x *host, in host1x_syncpt_alloc() argument
61 struct host1x_syncpt *sp = host->syncpt; in host1x_syncpt_alloc()
64 for (i = 0; i < host->info->nb_pts && sp->name; i++, sp++) in host1x_syncpt_alloc()
67 if (i >= host->info->nb_pts) in host1x_syncpt_alloc()
71 sp->base = host1x_syncpt_base_request(host); in host1x_syncpt_alloc()
110 void host1x_syncpt_restore(struct host1x *host) in host1x_syncpt_restore() argument
112 struct host1x_syncpt *sp_base = host->syncpt; in host1x_syncpt_restore()
115 for (i = 0; i < host1x_syncpt_nb_pts(host); i++) in host1x_syncpt_restore()
116 host1x_hw_syncpt_restore(host, sp_base + i); in host1x_syncpt_restore()
117 for (i = 0; i < host1x_syncpt_nb_bases(host); i++) in host1x_syncpt_restore()
118 host1x_hw_syncpt_restore_wait_base(host, sp_base + i); in host1x_syncpt_restore()
126 void host1x_syncpt_save(struct host1x *host) in host1x_syncpt_save() argument
128 struct host1x_syncpt *sp_base = host->syncpt; in host1x_syncpt_save()
131 for (i = 0; i < host1x_syncpt_nb_pts(host); i++) { in host1x_syncpt_save()
133 host1x_hw_syncpt_load(host, sp_base + i); in host1x_syncpt_save()
138 for (i = 0; i < host1x_syncpt_nb_bases(host); i++) in host1x_syncpt_save()
139 host1x_hw_syncpt_load_wait_base(host, sp_base + i); in host1x_syncpt_save()
149 val = host1x_hw_syncpt_load(sp->host, sp); in host1x_syncpt_load()
161 host1x_hw_syncpt_load_wait_base(sp->host, sp); in host1x_syncpt_load_wait_base()
171 return host1x_hw_syncpt_cpu_incr(sp->host, sp); in host1x_syncpt_incr()
181 host1x_hw_syncpt_load(sp->host, sp); in syncpt_load_min_is_expired()
208 val = host1x_hw_syncpt_load(sp->host, sp); in host1x_syncpt_wait()
228 err = host1x_intr_add_action(sp->host, sp->id, thresh, in host1x_syncpt_wait()
257 dev_warn(sp->host->dev, in host1x_syncpt_wait()
262 host1x_debug_dump_syncpts(sp->host); in host1x_syncpt_wait()
264 host1x_debug_dump(sp->host); in host1x_syncpt_wait()
268 host1x_intr_put_ref(sp->host, sp->id, ref); in host1x_syncpt_wait()
337 return host1x_hw_syncpt_patch_wait(sp->host, sp, patch_addr); in host1x_syncpt_patch_wait()
340 int host1x_syncpt_init(struct host1x *host) in host1x_syncpt_init() argument
346 syncpt = devm_kzalloc(host->dev, sizeof(*syncpt) * host->info->nb_pts, in host1x_syncpt_init()
351 bases = devm_kzalloc(host->dev, sizeof(*bases) * host->info->nb_bases, in host1x_syncpt_init()
356 for (i = 0; i < host->info->nb_pts; i++) { in host1x_syncpt_init()
358 syncpt[i].host = host; in host1x_syncpt_init()
361 for (i = 0; i < host->info->nb_bases; i++) in host1x_syncpt_init()
364 host->syncpt = syncpt; in host1x_syncpt_init()
365 host->bases = bases; in host1x_syncpt_init()
367 host1x_syncpt_restore(host); in host1x_syncpt_init()
370 host->nop_sp = host1x_syncpt_alloc(host, NULL, 0); in host1x_syncpt_init()
371 if (!host->nop_sp) in host1x_syncpt_init()
380 struct host1x *host = dev_get_drvdata(dev->parent); in host1x_syncpt_request() local
381 return host1x_syncpt_alloc(host, dev, flags); in host1x_syncpt_request()
399 void host1x_syncpt_deinit(struct host1x *host) in host1x_syncpt_deinit() argument
402 struct host1x_syncpt *sp = host->syncpt; in host1x_syncpt_deinit()
403 for (i = 0; i < host->info->nb_pts; i++, sp++) in host1x_syncpt_deinit()
434 int host1x_syncpt_nb_pts(struct host1x *host) in host1x_syncpt_nb_pts() argument
436 return host->info->nb_pts; in host1x_syncpt_nb_pts()
439 int host1x_syncpt_nb_bases(struct host1x *host) in host1x_syncpt_nb_bases() argument
441 return host->info->nb_bases; in host1x_syncpt_nb_bases()
444 int host1x_syncpt_nb_mlocks(struct host1x *host) in host1x_syncpt_nb_mlocks() argument
446 return host->info->nb_mlocks; in host1x_syncpt_nb_mlocks()
449 struct host1x_syncpt *host1x_syncpt_get(struct host1x *host, u32 id) in host1x_syncpt_get() argument
451 if (host->info->nb_pts < id) in host1x_syncpt_get()
453 return host->syncpt + id; in host1x_syncpt_get()