Lines Matching refs:sp
27 static void syncpt_restore(struct host1x_syncpt *sp) in syncpt_restore() argument
29 u32 min = host1x_syncpt_read_min(sp); in syncpt_restore()
30 struct host1x *host = sp->host; in syncpt_restore()
32 host1x_sync_writel(host, min, HOST1X_SYNC_SYNCPT(sp->id)); in syncpt_restore()
38 static void syncpt_restore_wait_base(struct host1x_syncpt *sp) in syncpt_restore_wait_base() argument
40 struct host1x *host = sp->host; in syncpt_restore_wait_base()
42 host1x_sync_writel(host, sp->base_val, in syncpt_restore_wait_base()
43 HOST1X_SYNC_SYNCPT_BASE(sp->id)); in syncpt_restore_wait_base()
49 static void syncpt_read_wait_base(struct host1x_syncpt *sp) in syncpt_read_wait_base() argument
51 struct host1x *host = sp->host; in syncpt_read_wait_base()
53 sp->base_val = in syncpt_read_wait_base()
54 host1x_sync_readl(host, HOST1X_SYNC_SYNCPT_BASE(sp->id)); in syncpt_read_wait_base()
60 static u32 syncpt_load(struct host1x_syncpt *sp) in syncpt_load() argument
62 struct host1x *host = sp->host; in syncpt_load()
67 old = host1x_syncpt_read_min(sp); in syncpt_load()
68 live = host1x_sync_readl(host, HOST1X_SYNC_SYNCPT(sp->id)); in syncpt_load()
69 } while ((u32)atomic_cmpxchg(&sp->min_val, old, live) != old); in syncpt_load()
71 if (!host1x_syncpt_check_max(sp, live)) in syncpt_load()
73 __func__, sp->id, host1x_syncpt_read_min(sp), in syncpt_load()
74 host1x_syncpt_read_max(sp)); in syncpt_load()
83 static int syncpt_cpu_incr(struct host1x_syncpt *sp) in syncpt_cpu_incr() argument
85 struct host1x *host = sp->host; in syncpt_cpu_incr()
86 u32 reg_offset = sp->id / 32; in syncpt_cpu_incr()
88 if (!host1x_syncpt_client_managed(sp) && in syncpt_cpu_incr()
89 host1x_syncpt_idle(sp)) in syncpt_cpu_incr()
92 host1x_sync_writel(host, BIT(sp->id % 32), in syncpt_cpu_incr()
110 static void syncpt_assign_to_channel(struct host1x_syncpt *sp, in syncpt_assign_to_channel() argument
114 struct host1x *host = sp->host; in syncpt_assign_to_channel()
121 HOST1X_SYNC_SYNCPT_CH_APP(sp->id)); in syncpt_assign_to_channel()