• Home
  • Raw
  • Download

Lines Matching refs:sp

49 	struct host1x_syncpt *sp = host->syncpt;  in host1x_syncpt_alloc()  local
55 for (i = 0; i < host->info->nb_pts && sp->name; i++, sp++) in host1x_syncpt_alloc()
62 sp->base = host1x_syncpt_base_request(host); in host1x_syncpt_alloc()
63 if (!sp->base) in host1x_syncpt_alloc()
67 name = kasprintf(GFP_KERNEL, "%02u-%s", sp->id, in host1x_syncpt_alloc()
72 sp->client = client; in host1x_syncpt_alloc()
73 sp->name = name; in host1x_syncpt_alloc()
76 sp->client_managed = true; in host1x_syncpt_alloc()
78 sp->client_managed = false; in host1x_syncpt_alloc()
81 return sp; in host1x_syncpt_alloc()
84 host1x_syncpt_base_free(sp->base); in host1x_syncpt_alloc()
85 sp->base = NULL; in host1x_syncpt_alloc()
99 u32 host1x_syncpt_id(struct host1x_syncpt *sp) in host1x_syncpt_id() argument
101 return sp->id; in host1x_syncpt_id()
110 u32 host1x_syncpt_incr_max(struct host1x_syncpt *sp, u32 incrs) in host1x_syncpt_incr_max() argument
112 return (u32)atomic_add_return(incrs, &sp->max_val); in host1x_syncpt_incr_max()
157 u32 host1x_syncpt_load(struct host1x_syncpt *sp) in host1x_syncpt_load() argument
161 val = host1x_hw_syncpt_load(sp->host, sp); in host1x_syncpt_load()
162 trace_host1x_syncpt_load_min(sp->id, val); in host1x_syncpt_load()
170 u32 host1x_syncpt_load_wait_base(struct host1x_syncpt *sp) in host1x_syncpt_load_wait_base() argument
172 host1x_hw_syncpt_load_wait_base(sp->host, sp); in host1x_syncpt_load_wait_base()
174 return sp->base_val; in host1x_syncpt_load_wait_base()
181 int host1x_syncpt_incr(struct host1x_syncpt *sp) in host1x_syncpt_incr() argument
183 return host1x_hw_syncpt_cpu_incr(sp->host, sp); in host1x_syncpt_incr()
191 static bool syncpt_load_min_is_expired(struct host1x_syncpt *sp, u32 thresh) in syncpt_load_min_is_expired() argument
193 host1x_hw_syncpt_load(sp->host, sp); in syncpt_load_min_is_expired()
195 return host1x_syncpt_is_expired(sp, thresh); in syncpt_load_min_is_expired()
205 int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout, in host1x_syncpt_wait() argument
218 if (host1x_syncpt_is_expired(sp, thresh)) { in host1x_syncpt_wait()
220 *value = host1x_syncpt_load(sp); in host1x_syncpt_wait()
226 val = host1x_hw_syncpt_load(sp->host, sp); in host1x_syncpt_wait()
227 if (host1x_syncpt_is_expired(sp, thresh)) { in host1x_syncpt_wait()
247 err = host1x_intr_add_action(sp->host, sp, thresh, in host1x_syncpt_wait()
264 syncpt_load_min_is_expired(sp, thresh), in host1x_syncpt_wait()
266 if (remain > 0 || host1x_syncpt_is_expired(sp, thresh)) { in host1x_syncpt_wait()
268 *value = host1x_syncpt_load(sp); in host1x_syncpt_wait()
283 dev_warn(sp->host->dev, in host1x_syncpt_wait()
285 current->comm, sp->id, sp->name, in host1x_syncpt_wait()
288 host1x_debug_dump_syncpts(sp->host); in host1x_syncpt_wait()
291 host1x_debug_dump(sp->host); in host1x_syncpt_wait()
297 host1x_intr_put_ref(sp->host, sp->id, ref); in host1x_syncpt_wait()
307 bool host1x_syncpt_is_expired(struct host1x_syncpt *sp, u32 thresh) in host1x_syncpt_is_expired() argument
314 current_val = (u32)atomic_read(&sp->min_val); in host1x_syncpt_is_expired()
315 future_val = (u32)atomic_read(&sp->max_val); in host1x_syncpt_is_expired()
359 if (!host1x_syncpt_client_managed(sp)) in host1x_syncpt_is_expired()
440 void host1x_syncpt_free(struct host1x_syncpt *sp) in host1x_syncpt_free() argument
442 if (!sp) in host1x_syncpt_free()
445 mutex_lock(&sp->host->syncpt_mutex); in host1x_syncpt_free()
447 host1x_syncpt_base_free(sp->base); in host1x_syncpt_free()
448 kfree(sp->name); in host1x_syncpt_free()
449 sp->base = NULL; in host1x_syncpt_free()
450 sp->client = NULL; in host1x_syncpt_free()
451 sp->name = NULL; in host1x_syncpt_free()
452 sp->client_managed = false; in host1x_syncpt_free()
454 mutex_unlock(&sp->host->syncpt_mutex); in host1x_syncpt_free()
460 struct host1x_syncpt *sp = host->syncpt; in host1x_syncpt_deinit() local
463 for (i = 0; i < host->info->nb_pts; i++, sp++) in host1x_syncpt_deinit()
464 kfree(sp->name); in host1x_syncpt_deinit()
474 u32 host1x_syncpt_read_max(struct host1x_syncpt *sp) in host1x_syncpt_read_max() argument
478 return (u32)atomic_read(&sp->max_val); in host1x_syncpt_read_max()
489 u32 host1x_syncpt_read_min(struct host1x_syncpt *sp) in host1x_syncpt_read_min() argument
493 return (u32)atomic_read(&sp->min_val); in host1x_syncpt_read_min()
501 u32 host1x_syncpt_read(struct host1x_syncpt *sp) in host1x_syncpt_read() argument
503 return host1x_syncpt_load(sp); in host1x_syncpt_read()
540 struct host1x_syncpt_base *host1x_syncpt_get_base(struct host1x_syncpt *sp) in host1x_syncpt_get_base() argument
542 return sp ? sp->base : NULL; in host1x_syncpt_get_base()