Index: lcd-16bit.c =================================================================== RCS file: /cvsroot/rockbox/firmware/drivers/lcd-16bit.c,v retrieving revision 1.39 diff -u -r1.39 lcd-16bit.c --- lcd-16bit.c 25 Sep 2006 12:45:13 -0000 1.39 +++ lcd-16bit.c 3 Jan 2007 06:09:46 -0000 @@ -238,7 +238,7 @@ /* Set a single pixel */ void lcd_drawpixel(int x, int y) { - if (((unsigned)x < LCD_WIDTH) && ((unsigned)y < LCD_HEIGHT)) + //if (((unsigned)x < LCD_WIDTH) && ((unsigned)y < LCD_HEIGHT)) lcd_fastpixelfuncs[drawmode](LCDADDR(x, y)); } @@ -295,7 +295,7 @@ for (i = 0; i < numpixels; i++) { - if (((unsigned)x < LCD_WIDTH) && ((unsigned)y < LCD_HEIGHT)) + //if (((unsigned)x < LCD_WIDTH) && ((unsigned)y < LCD_HEIGHT)) pfunc(LCDADDR(x, y)); if (d < 0) @@ -318,7 +318,7 @@ { int x, width; unsigned bits = 0; - enum fill_opt fillopt = OPT_NONE; + //enum fill_opt fillopt = OPT_NONE; fb_data *dst, *dst_end; lcd_fastpixelfunc_type *pfunc = lcd_fastpixelfuncs[drawmode]; @@ -331,8 +331,8 @@ } /* nothing to draw? */ - if (((unsigned)y >= LCD_HEIGHT) || (x1 >= LCD_WIDTH) || (x2 < 0)) - return; + //if (((unsigned)y >= LCD_HEIGHT) || (x1 >= LCD_WIDTH) || (x2 < 0)) + //return; /* clipping */ if (x1 < 0) @@ -346,42 +346,42 @@ { if (!lcd_backdrop) { - fillopt = OPT_SET; + //fillopt = OPT_SET; bits = bg_pattern; } - else - fillopt = OPT_COPY; + //else + //fillopt = OPT_COPY; } } else { if (drawmode & DRMODE_FG) { - fillopt = OPT_SET; + //fillopt = OPT_SET; bits = fg_pattern; } } dst = LCDADDR(x1, y); width = x2 - x1 + 1; - switch (fillopt) - { - case OPT_SET: - memset16(dst, bits, width); - break; - - case OPT_COPY: - memcpy(dst, (void *)((long)dst + lcd_backdrop_offset), - width * sizeof(fb_data)); - break; + //switch (fillopt) + //{ + //case OPT_SET: + // memset16(dst, bits, width); + //break; + + //case OPT_COPY: + //memcpy(dst, (void *)((long)dst + lcd_backdrop_offset), + //width * sizeof(fb_data)); + //break; - case OPT_NONE: + //case OPT_NONE: dst_end = dst + width; do pfunc(dst++); while (dst < dst_end); - break; - } + //break; + //} } /* Draw a vertical line (optimised) */ @@ -400,8 +400,8 @@ } /* nothing to draw? */ - if (((unsigned)x >= LCD_WIDTH) || (y1 >= LCD_HEIGHT) || (y2 < 0)) - return; + //if (((unsigned)x >= LCD_WIDTH) || (y1 >= LCD_HEIGHT) || (y2 < 0)) + //return; /* clipping */ if (y1 < 0) Index: lcd-ipodvideo.c =================================================================== RCS file: /cvsroot/rockbox/firmware/drivers/lcd-ipodvideo.c,v retrieving revision 1.17 diff -u -r1.17 lcd-ipodvideo.c --- lcd-ipodvideo.c 17 Aug 2006 08:37:35 -0000 1.17 +++ lcd-ipodvideo.c 3 Jan 2007 05:08:19 -0000 @@ -166,14 +166,14 @@ /* wait for it to be write ready */ while ((inw(0x30030000) & 0x2) == 0); - { - unsigned short *src = (unsigned short*)&lcd_framebuffer[y][x]; - unsigned short *end = &src[LCD_WIDTH * height]; - int line_rem = (LCD_WIDTH - width); - while (src < end) { - /* Duff's Device to unroll loop */ - register int count = width ; + } + unsigned short *src = (unsigned short*)&lcd_framebuffer[y][x]; + unsigned short *end = &src[LCD_WIDTH * height]; + int line_rem = (LCD_WIDTH - width); + while (src < end) { + /* Duff's Device to unroll loop */ + register int count = width ; register int n=( count + 7 ) / 8; switch( count % 8 ) { case 0: do{ outw(*(src++), 0x30000000); @@ -186,10 +186,10 @@ case 1: outw(*(src++), 0x30000000); } while(--n>0); } - src += line_rem; - } + src += line_rem; } + /* Top-half of original lcd_bcm_finishup() function */ outw(0x31, 0x30030000);