/** * DOC: Interrupt management for the V3D engine * * When we take a bin, render, TFU done, or CSD done interrupt, we * need to signal the fence for that job so that the scheduler can * queue up the next one and unblock any waiters. * * When we take the binner out of memory interrupt, we need to * allocate some new memory and pass it to the binner so that the * current job can make progress.
*/
/* We lost a race, and our work task came in after the bin job * completed and exited. This can happen because the HW * signals OOM before it's fully OOM, so the binner might just * barely complete. * * If we lose the race and our work task comes in after a new * bin job got scheduled, that's fine. We'll just give them * some binner pool anyway.
*/
spin_lock_irqsave(&v3d->job_lock, irqflags); if (!v3d->bin_job) {
spin_unlock_irqrestore(&v3d->job_lock, irqflags); goto out;
}
if (intsts & V3D_INT_OUTOMEM) { /* Note that the OOM status is edge signaled, so the * interrupt won't happen again until the we actually * add more memory. Also, as of V3D 4.1, FLDONE won't * be reported until any OOM state has been cleared.
*/
schedule_work(&v3d->overflow_mem_work);
status = IRQ_HANDLED;
}
if (intsts & V3D_INT_FLDONE) { struct v3d_fence *fence =
to_v3d_fence(v3d->bin_job->base.irq_fence);
/* We shouldn't be triggering these if we have GMP in * always-allowed mode.
*/ if (v3d->ver < V3D_GEN_71 && (intsts & V3D_INT_GMPV))
dev_err(v3d->drm.dev, "GMP violation\n");
/* V3D 4.2 wires the hub and core IRQs together, so if we & * didn't see the common one then check hub for MMU IRQs.
*/ if (v3d->single_irq_line && status == IRQ_NONE) return v3d_hub_irq(irq, arg);
/* Clear any pending interrupts someone might have left around * for us.
*/ for (core = 0; core < v3d->cores; core++)
V3D_CORE_WRITE(core, V3D_CTL_INT_CLR, V3D_CORE_IRQS(v3d->ver));
V3D_WRITE(V3D_HUB_INT_CLR, V3D_HUB_IRQS(v3d->ver));
irq = platform_get_irq_optional(v3d_to_pdev(v3d), 1); if (irq == -EPROBE_DEFER) return irq; if (irq > 0) {
v3d->irq[V3D_CORE_IRQ] = irq;
ret = devm_request_irq(v3d->drm.dev, v3d->irq[V3D_CORE_IRQ],
v3d_irq, IRQF_SHARED, "v3d_core0", v3d); if (ret) goto fail;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.