1
0
Fork 0
forked from len0rd/rockbox

Use commit_dcache() instead of commit_discard_idcache() where possible

- PCM playback DMA doesn't need the discard. Only recording DMA would
  need it.
- When creating threads for another core, the core creating the thread only
  needs to commit. The discard on the other core is handled elsewhere.

Change-Id: I864a0777e22f221a66218efd2c02ff3ad3889736
This commit is contained in:
Boris Gjenero 2012-02-04 22:27:42 -05:00
parent 67dd4d6995
commit 0a8235d052
2 changed files with 3 additions and 3 deletions

View file

@ -158,7 +158,7 @@ void ICODE_ATTR __attribute__((interrupt("FIQ"))) fiq_playback(void)
if (dma_play_data.addr < UNCACHED_BASE_ADDR) { if (dma_play_data.addr < UNCACHED_BASE_ADDR) {
/* Flush any pending cache writes */ /* Flush any pending cache writes */
dma_play_data.addr = UNCACHED_ADDR(dma_play_data.addr); dma_play_data.addr = UNCACHED_ADDR(dma_play_data.addr);
commit_discard_idcache(); commit_dcache();
} }
} }
} }
@ -444,7 +444,7 @@ void pcm_play_dma_start(const void *addr, size_t size)
if ((unsigned long)addr < UNCACHED_BASE_ADDR) { if ((unsigned long)addr < UNCACHED_BASE_ADDR) {
/* Flush any pending cache writes */ /* Flush any pending cache writes */
addr = UNCACHED_ADDR(addr); addr = UNCACHED_ADDR(addr);
commit_discard_idcache(); commit_dcache();
} }
dma_play_data.addr = (unsigned long)addr; dma_play_data.addr = (unsigned long)addr;

View file

@ -1609,7 +1609,7 @@ unsigned int create_thread(void (*function)(void),
/* Writeback stack munging or anything else before starting */ /* Writeback stack munging or anything else before starting */
if (core != CURRENT_CORE) if (core != CURRENT_CORE)
{ {
commit_discard_idcache(); commit_dcache();
} }
#endif #endif