diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c index 1bb68f9686..11edcfecb1 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c | |||
@@ -53,6 +53,23 @@ unsigned int LCDBASEL(unsigned int address) | |||
53 | /* LCD init */ | 53 | /* LCD init */ |
54 | void lcd_init_device(void) | 54 | void lcd_init_device(void) |
55 | { | 55 | { |
56 | #ifdef BOOTLOADER | ||
57 | /* When the Rockbox bootloader starts, we are changing framebuffer address, | ||
58 | but we don't want what's shown on the LCD to change until we do an | ||
59 | lcd_update(), so copy the data from the old framebuffer to the new one */ | ||
60 | int i; | ||
61 | unsigned short *buf = (unsigned short*)FRAME; | ||
62 | |||
63 | memcpy(FRAME, (short *)((LCDSADDR1)<<1), 320*240*2); | ||
64 | |||
65 | /* The Rockbox bootloader is transitioning from RGB555I to RGB565 mode | ||
66 | so convert the frambuffer data accordingly */ | ||
67 | for(i=0; i< 320*240; i++){ | ||
68 | *buf = ((*buf>>1) & 0x1F) | (*buf & 0xffc0); | ||
69 | buf++; | ||
70 | } | ||
71 | #endif | ||
72 | |||
56 | LCDSADDR1 = (LCDBANK((unsigned)FRAME) << 21) | (LCDBASEU((unsigned)FRAME)); | 73 | LCDSADDR1 = (LCDBANK((unsigned)FRAME) << 21) | (LCDBASEU((unsigned)FRAME)); |
57 | LCDSADDR2 = LCDBASEL((unsigned)FRAME); | 74 | LCDSADDR2 = LCDBASEL((unsigned)FRAME); |
58 | LCDSADDR3 = 0x000000F0; | 75 | LCDSADDR3 = 0x000000F0; |