Skip to content

Commit

Permalink
Fixed contents of DMA related registers after a DMA completes
Browse files Browse the repository at this point in the history
Co-Authored-By: Matt Pharoah <[email protected]>
  • Loading branch information
2 people authored and Narann committed May 3, 2024
1 parent d6a2668 commit b272296
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/device/rcp/rsp/rsp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ static void do_sp_dma(struct rsp_core* sp, const struct sp_dma* dma)
post_framebuffer_write(&sp->dp->fb, dramaddr - length, length);
dramaddr+=skip;
}

sp->regs[SP_MEM_ADDR_REG] = memaddr & 0xfff;
sp->regs[SP_DRAM_ADDR_REG] = dramaddr & 0xffffff;
sp->regs[SP_RD_LEN_REG] = 0xff8;
}
else
{
Expand All @@ -77,6 +81,10 @@ static void do_sp_dma(struct rsp_core* sp, const struct sp_dma* dma)
}
dramaddr+=skip;
}

sp->regs[SP_MEM_ADDR_REG] = memaddr & 0xfff;
sp->regs[SP_DRAM_ADDR_REG] = dramaddr & 0xffffff;
sp->regs[SP_RD_LEN_REG] = 0xff8;
}

/* schedule end of dma event */
Expand Down Expand Up @@ -224,6 +232,8 @@ void poweron_rsp(struct rsp_core* sp)
sp->rsp_task_locked = 0;
sp->mi->r4300->cp0.interrupt_unsafe_state &= ~INTR_UNSAFE_RSP;
sp->regs[SP_STATUS_REG] = 1;
sp->regs[SP_RD_LEN_REG] = 0xff8;
sp->regs[SP_WR_LEN_REG] = 0xff8;
}


Expand Down

0 comments on commit b272296

Please sign in to comment.