From fc89fec3e6705348d2ae6f22b6927907aaa634b5 Mon Sep 17 00:00:00 2001 From: joevt Date: Wed, 20 Mar 2024 10:28:15 -0700 Subject: [PATCH] dbdma: Do interrupt after setting resCount and xferStatus. --- devices/common/dbdma.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/devices/common/dbdma.cpp b/devices/common/dbdma.cpp index eca45f2..67afa42 100644 --- a/devices/common/dbdma.cpp +++ b/devices/common/dbdma.cpp @@ -189,8 +189,6 @@ void DMAChannel::finish_cmd() { this->ch_stat |= CH_STAT_BT; } } - - this->update_irq(); } if (res.is_writable) @@ -206,6 +204,10 @@ void DMAChannel::finish_cmd() { if (this->cur_cmd < DBDMA_Cmd::STOP && !branch_taken) this->cmd_ptr += 16; + if (this->cur_cmd < DBDMA_Cmd::STOP) { + this->update_irq(); + } + this->cmd_in_progress = false; }