summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-02-16 23:17:49 +0000
committerDave Chapman <dave@dchapman.com>2006-02-16 23:17:49 +0000
commitbd203e02cbac02752c49d67b95c65bc90afbd212 (patch)
tree60000db384f725bd1c9e036e71b6de1dd86cacc1 /firmware
parent4c63ab6a6ef6c2b87a1923cbe40d397aff440977 (diff)
downloadrockbox-bd203e02cbac02752c49d67b95c65bc90afbd212.tar.gz
rockbox-bd203e02cbac02752c49d67b95c65bc90afbd212.tar.bz2
rockbox-bd203e02cbac02752c49d67b95c65bc90afbd212.zip
iPod 5G: Split lcd_bcm_finishup() function into two halves, and incorporate into the start and end of lcd_update_rect.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8712 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/lcd-ipodvideo.c37
1 files changed, 21 insertions, 16 deletions
diff --git a/firmware/drivers/lcd-ipodvideo.c b/firmware/drivers/lcd-ipodvideo.c
index 8c404c80e4..c113652bd0 100644
--- a/firmware/drivers/lcd-ipodvideo.c
+++ b/firmware/drivers/lcd-ipodvideo.c
@@ -131,21 +131,7 @@ static unsigned lcd_bcm_read32(unsigned address) {
return inw(0x30000000) | inw(0x30000000) << 16;
}
-static inline void lcd_bcm_finishup(void) {
- unsigned data;
-
- outw(0x31, 0x30030000);
-
- lcd_bcm_read32(0x1FC);
-
- do {
- /* This function takes about 14ms to execute - so we yield() */
- yield();
- data = lcd_bcm_read32(0x1F8);
- } while (data == 0xFFFA0005 || data == 0xFFFF);
-
- lcd_bcm_read32(0x1FC);
-}
+extern void _HD_ARM_Update5G (fb_data *fb, int x, int y, int w, int h);
/* Update a fraction of the display. */
void lcd_update_rect(int x, int y, int width, int height) ICODE_ATTR;
@@ -155,7 +141,9 @@ void lcd_update_rect(int x, int y, int width, int height)
int newx,newwidth;
int count;
int c, r;
+ unsigned int data;
unsigned short *src;
+ static int finishup_needed = 0;
/* Ensure x and width are both even - so we can read 32-bit aligned
data from lcd_framebuffer */
@@ -170,6 +158,18 @@ void lcd_update_rect(int x, int y, int width, int height)
rect3 = (x + width) - 1; /* max horiz */
rect4 = (y + height) - 1; /* max vert */
+ if (finishup_needed) {
+ /* Bottom-half of original lcd_bcm_finishup() function */
+ do {
+ /* This function takes about 14ms to execute - so we yield() */
+ yield();
+ data = lcd_bcm_read32(0x1F8);
+ } while (data == 0xFFFA0005 || data == 0xFFFF);
+ }
+
+ lcd_bcm_read32(0x1FC);
+
+
/* setup the drawing region */
count=(width * height) << 1;
lcd_bcm_setup_rect(0x34, rect1, rect2, rect3, rect4, count);
@@ -193,7 +193,12 @@ void lcd_update_rect(int x, int y, int width, int height)
src += (LCD_WIDTH - width);
}
- lcd_bcm_finishup();
+ /* Top-half of original lcd_bcm_finishup() function */
+ outw(0x31, 0x30030000);
+
+ lcd_bcm_read32(0x1FC);
+
+ finishup_needed = 1;
}
/* Update the display.