Lines Matching full:vc4
60 struct vc4_dev *vc4 = in vc4_overflow_mem_work() local
67 mutex_lock(&vc4->bin_bo_lock); in vc4_overflow_mem_work()
69 if (!vc4->bin_bo) in vc4_overflow_mem_work()
72 bo = vc4->bin_bo; in vc4_overflow_mem_work()
74 bin_bo_slot = vc4_v3d_get_bin_slot(vc4); in vc4_overflow_mem_work()
80 spin_lock_irqsave(&vc4->job_lock, irqflags); in vc4_overflow_mem_work()
82 if (vc4->bin_alloc_overflow) { in vc4_overflow_mem_work()
89 exec = vc4_first_bin_job(vc4); in vc4_overflow_mem_work()
91 exec = vc4_last_render_job(vc4); in vc4_overflow_mem_work()
93 exec->bin_slots |= vc4->bin_alloc_overflow; in vc4_overflow_mem_work()
98 vc4->bin_alloc_used &= ~vc4->bin_alloc_overflow; in vc4_overflow_mem_work()
101 vc4->bin_alloc_overflow = BIT(bin_bo_slot); in vc4_overflow_mem_work()
103 V3D_WRITE(V3D_BPOA, bo->base.paddr + bin_bo_slot * vc4->bin_alloc_size); in vc4_overflow_mem_work()
107 spin_unlock_irqrestore(&vc4->job_lock, irqflags); in vc4_overflow_mem_work()
110 mutex_unlock(&vc4->bin_bo_lock); in vc4_overflow_mem_work()
116 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_finish_bin_job() local
117 struct vc4_exec_info *next, *exec = vc4_first_bin_job(vc4); in vc4_irq_finish_bin_job()
123 next = vc4_first_bin_job(vc4); in vc4_irq_finish_bin_job()
136 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_cancel_bin_job() local
137 struct vc4_exec_info *exec = vc4_first_bin_job(vc4); in vc4_cancel_bin_job()
144 vc4_perfmon_stop(vc4, exec->perfmon, false); in vc4_cancel_bin_job()
146 list_move_tail(&exec->head, &vc4->bin_job_list); in vc4_cancel_bin_job()
153 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_finish_render_job() local
154 struct vc4_exec_info *exec = vc4_first_render_job(vc4); in vc4_irq_finish_render_job()
160 vc4->finished_seqno++; in vc4_irq_finish_render_job()
161 list_move_tail(&exec->head, &vc4->job_done_list); in vc4_irq_finish_render_job()
163 nextbin = vc4_first_bin_job(vc4); in vc4_irq_finish_render_job()
164 nextrender = vc4_first_render_job(vc4); in vc4_irq_finish_render_job()
171 vc4_perfmon_stop(vc4, exec->perfmon, true); in vc4_irq_finish_render_job()
191 wake_up_all(&vc4->job_wait_queue); in vc4_irq_finish_render_job()
192 schedule_work(&vc4->job_done_work); in vc4_irq_finish_render_job()
199 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq() local
216 schedule_work(&vc4->overflow_mem_work); in vc4_irq()
221 spin_lock(&vc4->job_lock); in vc4_irq()
223 spin_unlock(&vc4->job_lock); in vc4_irq()
228 spin_lock(&vc4->job_lock); in vc4_irq()
230 spin_unlock(&vc4->job_lock); in vc4_irq()
240 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_preinstall() local
242 if (!vc4->v3d) in vc4_irq_preinstall()
245 init_waitqueue_head(&vc4->job_wait_queue); in vc4_irq_preinstall()
246 INIT_WORK(&vc4->overflow_mem_work, vc4_overflow_mem_work); in vc4_irq_preinstall()
257 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_postinstall() local
259 if (!vc4->v3d) in vc4_irq_postinstall()
273 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_uninstall() local
275 if (!vc4->v3d) in vc4_irq_uninstall()
287 cancel_work_sync(&vc4->overflow_mem_work); in vc4_irq_uninstall()
293 struct vc4_dev *vc4 = to_vc4_dev(dev); in vc4_irq_reset() local
307 spin_lock_irqsave(&vc4->job_lock, irqflags); in vc4_irq_reset()
310 spin_unlock_irqrestore(&vc4->job_lock, irqflags); in vc4_irq_reset()