diff options
author | Mark Arigo <markarigo@gmail.com> | 2008-03-31 05:53:17 +0000 |
---|---|---|
committer | Mark Arigo <markarigo@gmail.com> | 2008-03-31 05:53:17 +0000 |
commit | 2ea0206502c54b73158ebf494bc0faa371ab0426 (patch) | |
tree | dbb171e02720ee71948e7bfd67f8d297ad045570 /firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | |
parent | 2541302089cc02d7d3ba4333aa73437a406d086d (diff) | |
download | rockbox-2ea0206502c54b73158ebf494bc0faa371ab0426.tar.gz rockbox-2ea0206502c54b73158ebf494bc0faa371ab0426.zip |
Fixes FS#8552. On some c200s, the second parameter in setting R_Y_ADDR_AREA was being interpreted as a separate command (most commonly initiating standby mode where the screen goes blank). While this may be a timing issue, some NOPs seem to fix it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16896 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/sandisk/sansa-c200/lcd-c200.c')
-rw-r--r-- | firmware/target/arm/sandisk/sansa-c200/lcd-c200.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c index fed4119077..a629739d50 100644 --- a/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c +++ b/firmware/target/arm/sandisk/sansa-c200/lcd-c200.c @@ -27,6 +27,7 @@ static unsigned lcd_yuv_options NOCACHEBSS_ATTR = 0; /* LCD command set for Samsung S6B33B2 */ +#define R_NOP 0x00 #define R_OSCILLATION_MODE 0x02 #define R_DRIVER_OUTPUT_MODE 0x10 #define R_DCDC_SET 0x20 @@ -243,6 +244,11 @@ void lcd_blit_yuv(unsigned char * const src[3], lcd_send_command(y); lcd_send_command(y + 1); + /* NOP needed because on some c200s, the previous lcd_send_command + is interpreted as a separate command instead of part of + R_Y_ADDR_AREA. */ + lcd_send_command(R_NOP); + lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); yuv_src[0] += stride << 1; /* Skip down two luma lines */ yuv_src[1] += stride >> 1; /* Skip down one chroma line */ @@ -259,6 +265,8 @@ void lcd_blit_yuv(unsigned char * const src[3], lcd_send_command(y); lcd_send_command(y + 1); + lcd_send_command(R_NOP); + lcd_write_yuv420_lines(yuv_src, width, stride); yuv_src[0] += stride << 1; /* Skip down two luma lines */ yuv_src[1] += stride >> 1; /* Skip down one chroma line */ @@ -304,10 +312,15 @@ void lcd_update_rect(int x, int y, int width, int height) lcd_send_command(x); lcd_send_command(x + width - 1); } + lcd_send_command(R_Y_ADDR_AREA); lcd_send_command(y + 0x1a); lcd_send_command(y + height - 1 + 0x1a); + /* NOP needed because on some c200s, the previous lcd_send_command is + interpreted as a separate command instead of part of R_Y_ADDR_AREA. */ + lcd_send_command(R_NOP); + do { int w = width; do { |