mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
rk27xx: wait for the LCD DMA transfer to end
lcd_update_rect() waited on the channel's CTL_L LLP_DST_EN bit, which the last descriptor has clear: it clears when the last block is loaded, not when it is done. The update returned with that line still being read, and the next one reprogrammed the window and the channel under it. Wait for the channel to disable itself, which it does after its last block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: Icf9314fbe40b8ea53a7f5f24ea11513e87a54cf6
This commit is contained in:
parent
5c5dac2dbc
commit
3fa27091f3
1 changed files with 5 additions and 2 deletions
|
|
@ -305,8 +305,11 @@ void lcd_update_rect(int x, int y, int width, int height)
|
|||
/* Setup buffered writes to lcd controler */
|
||||
MCU_CTRL = MCU_CTRL_RS_HIGH|MCU_CTRL_BUFF_WRITE|MCU_CTRL_BUFF_START;
|
||||
|
||||
/* Wait for DMA transfer to finish */
|
||||
while (DWDMA_CTL_L(0) & (1<<27));
|
||||
/* Wait for the DMA transfer to finish: the channel disables itself
|
||||
* after its last block. CTL_L's LLP_DST_EN (bit 27) is no measure -
|
||||
* it clears as soon as the last block is loaded, while that block
|
||||
* still runs. */
|
||||
while (DWDMA_DMA_CHEN & (1<<0));
|
||||
}
|
||||
|
||||
void lcd_update()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue