Lines Matching full:v3d

5  * DOC: Interrupt management for the V3D engine
41 struct v3d_dev *v3d = in v3d_overflow_mem_work() local
43 struct drm_device *dev = &v3d->drm; in v3d_overflow_mem_work()
63 spin_lock_irqsave(&v3d->job_lock, irqflags); in v3d_overflow_mem_work()
64 if (!v3d->bin_job) { in v3d_overflow_mem_work()
65 spin_unlock_irqrestore(&v3d->job_lock, irqflags); in v3d_overflow_mem_work()
70 list_add_tail(&bo->unref_head, &v3d->bin_job->render->unref_list); in v3d_overflow_mem_work()
71 spin_unlock_irqrestore(&v3d->job_lock, irqflags); in v3d_overflow_mem_work()
83 struct v3d_dev *v3d = arg; in v3d_irq() local
95 * add more memory. Also, as of V3D 4.1, FLDONE won't in v3d_irq()
98 schedule_work(&v3d->overflow_mem_work); in v3d_irq()
104 to_v3d_fence(v3d->bin_job->base.irq_fence); in v3d_irq()
106 v3d_job_update_stats(&v3d->bin_job->base, V3D_BIN); in v3d_irq()
107 trace_v3d_bcl_irq(&v3d->drm, fence->seqno); in v3d_irq()
114 to_v3d_fence(v3d->render_job->base.irq_fence); in v3d_irq()
116 v3d_job_update_stats(&v3d->render_job->base, V3D_RENDER); in v3d_irq()
117 trace_v3d_rcl_irq(&v3d->drm, fence->seqno); in v3d_irq()
122 if (intsts & V3D_INT_CSDDONE(v3d->ver)) { in v3d_irq()
124 to_v3d_fence(v3d->csd_job->base.irq_fence); in v3d_irq()
126 v3d_job_update_stats(&v3d->csd_job->base, V3D_CSD); in v3d_irq()
127 trace_v3d_csd_irq(&v3d->drm, fence->seqno); in v3d_irq()
135 if (v3d->ver < 71 && (intsts & V3D_INT_GMPV)) in v3d_irq()
136 dev_err(v3d->drm.dev, "GMP violation\n"); in v3d_irq()
138 /* V3D 4.2 wires the hub and core IRQs together, so if we & in v3d_irq()
141 if (v3d->single_irq_line && status == IRQ_NONE) in v3d_irq()
150 struct v3d_dev *v3d = arg; in v3d_hub_irq() local
161 to_v3d_fence(v3d->tfu_job->base.irq_fence); in v3d_hub_irq()
163 v3d_job_update_stats(&v3d->tfu_job->base, V3D_TFU); in v3d_hub_irq()
164 trace_v3d_tfu_irq(&v3d->drm, fence->seqno); in v3d_hub_irq()
174 (v3d->va_width - 32)); in v3d_hub_irq()
189 if (v3d->ver >= 41) { in v3d_hub_irq()
195 dev_err(v3d->drm.dev, "MMU error from client %s (%d) at 0x%llx%s%s%s\n", in v3d_hub_irq()
206 if (v3d->ver >= 71 && (intsts & V3D_V7_HUB_INT_GMPV)) { in v3d_hub_irq()
207 dev_err(v3d->drm.dev, "GMP Violation\n"); in v3d_hub_irq()
215 v3d_irq_init(struct v3d_dev *v3d) in v3d_irq_init() argument
219 INIT_WORK(&v3d->overflow_mem_work, v3d_overflow_mem_work); in v3d_irq_init()
224 for (core = 0; core < v3d->cores; core++) in v3d_irq_init()
225 V3D_CORE_WRITE(core, V3D_CTL_INT_CLR, V3D_CORE_IRQS(v3d->ver)); in v3d_irq_init()
226 V3D_WRITE(V3D_HUB_INT_CLR, V3D_HUB_IRQS(v3d->ver)); in v3d_irq_init()
228 irq1 = platform_get_irq_optional(v3d_to_pdev(v3d), 1); in v3d_irq_init()
232 ret = devm_request_irq(v3d->drm.dev, irq1, in v3d_irq_init()
234 "v3d_core0", v3d); in v3d_irq_init()
237 ret = devm_request_irq(v3d->drm.dev, in v3d_irq_init()
238 platform_get_irq(v3d_to_pdev(v3d), 0), in v3d_irq_init()
240 "v3d_hub", v3d); in v3d_irq_init()
244 v3d->single_irq_line = true; in v3d_irq_init()
246 ret = devm_request_irq(v3d->drm.dev, in v3d_irq_init()
247 platform_get_irq(v3d_to_pdev(v3d), 0), in v3d_irq_init()
249 "v3d", v3d); in v3d_irq_init()
254 v3d_irq_enable(v3d); in v3d_irq_init()
259 dev_err(v3d->drm.dev, "IRQ setup failed: %d\n", ret); in v3d_irq_init()
264 v3d_irq_enable(struct v3d_dev *v3d) in v3d_irq_enable() argument
269 for (core = 0; core < v3d->cores; core++) { in v3d_irq_enable()
270 V3D_CORE_WRITE(core, V3D_CTL_INT_MSK_SET, ~V3D_CORE_IRQS(v3d->ver)); in v3d_irq_enable()
271 V3D_CORE_WRITE(core, V3D_CTL_INT_MSK_CLR, V3D_CORE_IRQS(v3d->ver)); in v3d_irq_enable()
274 V3D_WRITE(V3D_HUB_INT_MSK_SET, ~V3D_HUB_IRQS(v3d->ver)); in v3d_irq_enable()
275 V3D_WRITE(V3D_HUB_INT_MSK_CLR, V3D_HUB_IRQS(v3d->ver)); in v3d_irq_enable()
279 v3d_irq_disable(struct v3d_dev *v3d) in v3d_irq_disable() argument
284 for (core = 0; core < v3d->cores; core++) in v3d_irq_disable()
289 for (core = 0; core < v3d->cores; core++) in v3d_irq_disable()
290 V3D_CORE_WRITE(core, V3D_CTL_INT_CLR, V3D_CORE_IRQS(v3d->ver)); in v3d_irq_disable()
291 V3D_WRITE(V3D_HUB_INT_CLR, V3D_HUB_IRQS(v3d->ver)); in v3d_irq_disable()
293 cancel_work_sync(&v3d->overflow_mem_work); in v3d_irq_disable()
297 void v3d_irq_reset(struct v3d_dev *v3d) in v3d_irq_reset() argument
299 v3d_irq_enable(v3d); in v3d_irq_reset()