Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions software/libdvi/dvi.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,14 @@ static void __dvi_func(dvi_dma_irq_handler)(struct dvi_inst *inst) {
// now have until the end of this region to generate DMA blocklist for next
// scanline.
dvi_timing_state_advance(inst->timing, &inst->timing_state);
if (inst->tmds_buf_release && !queue_try_add_u32(&inst->q_tmds_free, &inst->tmds_buf_release))
panic("TMDS free queue full in IRQ!");
if (inst->tmds_buf_release && !queue_try_add_u32(&inst->q_tmds_free, &inst->tmds_buf_release)) {
// Would be a bug ("TMDS free queue full in IRQ"). Hang here rather
// than panic(): panic is flash-resident, and core1 may run with
// flash access disabled (e.g. CircuitPython's MPU lockout), where
// calling into flash hard faults before anything is printed.
while (true)
tight_loop_contents();
}
inst->tmds_buf_release = inst->tmds_buf_release_next;
inst->tmds_buf_release_next = NULL;

Expand Down