diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-12-20 01:57:55 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-12-20 01:57:55 +0000 |
commit | ec380a79d900c2a47250e0b66d53432cd2482e05 (patch) | |
tree | b469477226de054d6c524622fc09aa74f000d641 | |
parent | d909eee0cecb8645ff9b8ab3001505c9ac4cf87b (diff) |
Ingenic players: disable LCD clock when unneeded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19497 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c index 996731c0cd..e37e991e71 100644 --- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c @@ -40,6 +40,7 @@ static struct wakeup lcd_wkup; void lcd_init_device(void) { lcd_init_controller(); + __cpm_stop_lcd(); lcd_is_on = true; mutex_init(&lcd_mtx); wakeup_init(&lcd_wkup); @@ -77,13 +78,15 @@ void lcd_update_rect(int x, int y, int width, int height) mutex_lock(&lcd_mtx); + __cpm_start_lcd(); + lcd_set_target(x, y, width, height); dma_enable(); 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_DRSR(DMA_LCD_CHANNEL) = DMAC_DRSR_RS_SLCD; /* source = SLCD */ REG_DMAC_DTAR(DMA_LCD_CHANNEL) = PHYSADDR(SLCD_FIFO); 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); REG_SLCD_CTRL &= ~SLCD_CTRL_DMA_EN; /* Disable SLCD DMA support */ + __cpm_stop_lcd(); + mutex_unlock(&lcd_mtx); } |