mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 21:25:19 -05:00
Ingenic players: disable LCD clock when unneeded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19497 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
d909eee0ce
commit
ec380a79d9
1 changed files with 6 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ static struct wakeup lcd_wkup;
|
||||||
void lcd_init_device(void)
|
void lcd_init_device(void)
|
||||||
{
|
{
|
||||||
lcd_init_controller();
|
lcd_init_controller();
|
||||||
|
__cpm_stop_lcd();
|
||||||
lcd_is_on = true;
|
lcd_is_on = true;
|
||||||
mutex_init(&lcd_mtx);
|
mutex_init(&lcd_mtx);
|
||||||
wakeup_init(&lcd_wkup);
|
wakeup_init(&lcd_wkup);
|
||||||
|
|
@ -77,13 +78,15 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
|
|
||||||
mutex_lock(&lcd_mtx);
|
mutex_lock(&lcd_mtx);
|
||||||
|
|
||||||
|
__cpm_start_lcd();
|
||||||
|
|
||||||
lcd_set_target(x, y, width, height);
|
lcd_set_target(x, y, width, height);
|
||||||
|
|
||||||
dma_enable();
|
dma_enable();
|
||||||
|
|
||||||
REG_DMAC_DCCSR(DMA_LCD_CHANNEL) = DMAC_DCCSR_NDES;
|
REG_DMAC_DCCSR(DMA_LCD_CHANNEL) = DMAC_DCCSR_NDES;
|
||||||
REG_DMAC_DRSR(DMA_LCD_CHANNEL) = DMAC_DRSR_RS_SLCD; /* source = SLCD */
|
|
||||||
REG_DMAC_DSAR(DMA_LCD_CHANNEL) = PHYSADDR((unsigned long)&lcd_framebuffer[y][x]);
|
REG_DMAC_DSAR(DMA_LCD_CHANNEL) = PHYSADDR((unsigned long)&lcd_framebuffer[y][x]);
|
||||||
|
REG_DMAC_DRSR(DMA_LCD_CHANNEL) = DMAC_DRSR_RS_SLCD; /* source = SLCD */
|
||||||
REG_DMAC_DTAR(DMA_LCD_CHANNEL) = PHYSADDR(SLCD_FIFO);
|
REG_DMAC_DTAR(DMA_LCD_CHANNEL) = PHYSADDR(SLCD_FIFO);
|
||||||
REG_DMAC_DTCR(DMA_LCD_CHANNEL) = width*height;
|
REG_DMAC_DTCR(DMA_LCD_CHANNEL) = width*height;
|
||||||
|
|
||||||
|
|
@ -108,6 +111,8 @@ void lcd_update_rect(int x, int y, int width, int height)
|
||||||
while(REG_SLCD_STATE & SLCD_STATE_BUSY);
|
while(REG_SLCD_STATE & SLCD_STATE_BUSY);
|
||||||
REG_SLCD_CTRL &= ~SLCD_CTRL_DMA_EN; /* Disable SLCD DMA support */
|
REG_SLCD_CTRL &= ~SLCD_CTRL_DMA_EN; /* Disable SLCD DMA support */
|
||||||
|
|
||||||
|
__cpm_stop_lcd();
|
||||||
|
|
||||||
mutex_unlock(&lcd_mtx);
|
mutex_unlock(&lcd_mtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue