mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-06-06 19:15:07 +02:00
dma: don't wait on unbinds in SH3
This can freeze for reasons I didn't completely root cause. The MWE leading to this was made by @Calamari, is very dependent on factors I haven't completely characterized, but includes having the DMA driver, doing a world switch; and seems to require some timers (via gray engine) and stack usage, but I'm not clear on the role of that.
This commit is contained in:
parent
df9ecba326
commit
36f37b9200
1 changed files with 4 additions and 0 deletions
|
@ -298,6 +298,8 @@ static void configure(void)
|
||||||
|
|
||||||
static void funbind(void)
|
static void funbind(void)
|
||||||
{
|
{
|
||||||
|
if(isSH3()) return;
|
||||||
|
|
||||||
/* Wait for all OS transfers to finish before taking over */
|
/* Wait for all OS transfers to finish before taking over */
|
||||||
for(int channel = 0; channel < 6; channel++)
|
for(int channel = 0; channel < 6; channel++)
|
||||||
dma_channel_wait(channel, true);
|
dma_channel_wait(channel, true);
|
||||||
|
@ -305,6 +307,8 @@ static void funbind(void)
|
||||||
|
|
||||||
static void unbind(void)
|
static void unbind(void)
|
||||||
{
|
{
|
||||||
|
if(isSH3()) return;
|
||||||
|
|
||||||
/* Make sure all DMA transfers are finished before leaving gint */
|
/* Make sure all DMA transfers are finished before leaving gint */
|
||||||
for(int channel = 0; channel < 6; channel++)
|
for(int channel = 0; channel < 6; channel++)
|
||||||
dma_channel_wait(channel, false);
|
dma_channel_wait(channel, false);
|
||||||
|
|
Loading…
Add table
Reference in a new issue