diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2010-12-11 23:55:14 +0000 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2010-12-11 23:55:14 +0000 |
commit | 8e1021bd4c048f793ae5593a08d81e0994b5aba1 (patch) | |
tree | d7dd70738d5b363569070c05dc82660c6b8181e7 | |
parent | 08bcbd08d2b8229c6ea54c02d0805376bc75757d (diff) |
HD300 - further speedup of lcd_update() by utilizing DMA transfer when unboosted. The gain is 438 -> 728 fps @ 45MHz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28799 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/coldfire/mpio/hd300/lcd-hd300.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c index 31087a5d43..d66210db22 100644 --- a/firmware/target/coldfire/mpio/hd300/lcd-hd300.c +++ b/firmware/target/coldfire/mpio/hd300/lcd-hd300.c @@ -210,8 +210,22 @@ void lcd_update(void) lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1); lcd_write_command(LCD_CNTL_DATA_WRITE); - /* Copy display bitmap to hardware */ - lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT); + /* lcd can't handle the speed of DMA transfer when boosted */ + if ( cpu_frequency > 60000000 ) + { + /* Copy display bitmap to hardware */ + lcd_write_data (&lcd_framebuffer[0][0], LCD_WIDTH*LCD_FBHEIGHT); + } + else + { + /* Copy display bitmap to hardware using DMA */ + DSR3 = 1; + DAR3 = 0xf0000002; + SAR3 = (unsigned long)lcd_framebuffer; + BCR3 = LCD_WIDTH*LCD_FBHEIGHT; + DCR3 = DMA_BWC(1) | DMA_SINC | DMA_SSIZE(DMA_SIZE_BYTE) | + DMA_DSIZE(DMA_SIZE_BYTE) | DMA_START; + } } /* Update a fraction of the display. */ |