diff --strip-trailing-cr -u -r rockbox-original/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c rockbox-modified/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c --- rockbox-original/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c 2007-03-24 11:20:59.000000000 +0200 +++ rockbox-modified/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c 2007-03-25 19:23:10.000000000 +0300 @@ -23,6 +23,7 @@ #include "config.h" #include "lcd.h" #include "system.h" +#include "pcm_playback.h" #include #define LCD_DATA_IN_GPIO GPIOB_INPUT_VAL @@ -115,9 +116,12 @@ static inline void cache_flush(void) { #ifndef BOOTLOADER - outl(inl(0xf000f044) | 0x2, 0xf000f044); - while ((CACHE_CTL & 0x8000) != 0) + if(pcm_is_playing() == 0) { + outl(inl(0xf000f044) | 0x2, 0xf000f044); + while ((CACHE_CTL & 0x8000) != 0) + { + } } #endif } @@ -261,10 +265,6 @@ { (void)x; (void)width; - /* Turn off DMA and wait for the transfer to complete */ - /* TODO: Work out the proper delay */ - LCD_REG_6 &= ~1; - udelay(1000); /* Copy the Rockbox framebuffer to the second framebuffer */ /* TODO: Move the second framebuffer into uncached SDRAM */ @@ -279,12 +279,6 @@ inline void lcd_update(void) { - /* TODO: It may be faster to swap the addresses of lcd_driver_framebuffer - * and lcd_framebuffer */ - /* Turn off DMA and wait for the transfer to complete */ - LCD_REG_6 &= ~1; - udelay(1000); - /* Copy the Rockbox framebuffer to the second framebuffer */ memcpy(lcd_driver_framebuffer, lcd_framebuffer, sizeof(fb_data) * LCD_WIDTH * LCD_HEIGHT); cache_flush();