Lines Matching refs:host
99 static void reset_threshold_interrupt(struct host1x *host, in reset_threshold_interrupt() argument
106 host1x_hw_intr_set_syncpt_threshold(host, id, thresh); in reset_threshold_interrupt()
107 host1x_hw_intr_enable_syncpt_intr(host, id); in reset_threshold_interrupt()
164 static int process_wait_list(struct host1x *host, in process_wait_list() argument
182 host1x_hw_intr_disable_syncpt_intr(host, syncpt->id); in process_wait_list()
184 reset_threshold_interrupt(host, &syncpt->intr.wait_head, in process_wait_list()
206 struct host1x *host = syncpt->host; in syncpt_thresh_work() local
208 (void)process_wait_list(host, syncpt, in syncpt_thresh_work()
209 host1x_syncpt_load(host->syncpt + id)); in syncpt_thresh_work()
212 int host1x_intr_add_action(struct host1x *host, u32 id, u32 thresh, in host1x_intr_add_action() argument
235 syncpt = host->syncpt + id; in host1x_intr_add_action()
243 host1x_hw_intr_set_syncpt_threshold(host, id, thresh); in host1x_intr_add_action()
247 host1x_hw_intr_enable_syncpt_intr(host, id); in host1x_intr_add_action()
257 void host1x_intr_put_ref(struct host1x *host, u32 id, void *ref) in host1x_intr_put_ref() argument
266 syncpt = host->syncpt + id; in host1x_intr_put_ref()
267 (void)process_wait_list(host, syncpt, in host1x_intr_put_ref()
268 host1x_syncpt_load(host->syncpt + id)); in host1x_intr_put_ref()
273 int host1x_intr_init(struct host1x *host, unsigned int irq_sync) in host1x_intr_init() argument
276 u32 nb_pts = host1x_syncpt_nb_pts(host); in host1x_intr_init()
278 mutex_init(&host->intr_mutex); in host1x_intr_init()
279 host->intr_syncpt_irq = irq_sync; in host1x_intr_init()
280 host->intr_wq = create_workqueue("host_syncpt"); in host1x_intr_init()
281 if (!host->intr_wq) in host1x_intr_init()
285 struct host1x_syncpt *syncpt = host->syncpt + id; in host1x_intr_init()
294 host1x_intr_start(host); in host1x_intr_init()
299 void host1x_intr_deinit(struct host1x *host) in host1x_intr_deinit() argument
301 host1x_intr_stop(host); in host1x_intr_deinit()
302 destroy_workqueue(host->intr_wq); in host1x_intr_deinit()
305 void host1x_intr_start(struct host1x *host) in host1x_intr_start() argument
307 u32 hz = clk_get_rate(host->clk); in host1x_intr_start()
310 mutex_lock(&host->intr_mutex); in host1x_intr_start()
311 err = host1x_hw_intr_init_host_sync(host, DIV_ROUND_UP(hz, 1000000), in host1x_intr_start()
314 mutex_unlock(&host->intr_mutex); in host1x_intr_start()
317 mutex_unlock(&host->intr_mutex); in host1x_intr_start()
320 void host1x_intr_stop(struct host1x *host) in host1x_intr_stop() argument
323 struct host1x_syncpt *syncpt = host->syncpt; in host1x_intr_stop()
324 u32 nb_pts = host1x_syncpt_nb_pts(host); in host1x_intr_stop()
326 mutex_lock(&host->intr_mutex); in host1x_intr_stop()
328 host1x_hw_intr_disable_all_syncpt_intrs(host); in host1x_intr_stop()
344 mutex_unlock(&host->intr_mutex); in host1x_intr_stop()
351 host1x_hw_intr_free_syncpt_irq(host); in host1x_intr_stop()
353 mutex_unlock(&host->intr_mutex); in host1x_intr_stop()