summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/sandisk/sansa-c200/lcd-c200.c13
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;
27 27
28/* LCD command set for Samsung S6B33B2 */ 28/* LCD command set for Samsung S6B33B2 */
29 29
30#define R_NOP 0x00
30#define R_OSCILLATION_MODE 0x02 31#define R_OSCILLATION_MODE 0x02
31#define R_DRIVER_OUTPUT_MODE 0x10 32#define R_DRIVER_OUTPUT_MODE 0x10
32#define R_DCDC_SET 0x20 33#define R_DCDC_SET 0x20
@@ -243,6 +244,11 @@ void lcd_blit_yuv(unsigned char * const src[3],
243 lcd_send_command(y); 244 lcd_send_command(y);
244 lcd_send_command(y + 1); 245 lcd_send_command(y + 1);
245 246
247 /* NOP needed because on some c200s, the previous lcd_send_command
248 is interpreted as a separate command instead of part of
249 R_Y_ADDR_AREA. */
250 lcd_send_command(R_NOP);
251
246 lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y); 252 lcd_write_yuv420_lines_odither(yuv_src, width, stride, x, y);
247 yuv_src[0] += stride << 1; /* Skip down two luma lines */ 253 yuv_src[0] += stride << 1; /* Skip down two luma lines */
248 yuv_src[1] += stride >> 1; /* Skip down one chroma line */ 254 yuv_src[1] += stride >> 1; /* Skip down one chroma line */
@@ -259,6 +265,8 @@ void lcd_blit_yuv(unsigned char * const src[3],
259 lcd_send_command(y); 265 lcd_send_command(y);
260 lcd_send_command(y + 1); 266 lcd_send_command(y + 1);
261 267
268 lcd_send_command(R_NOP);
269
262 lcd_write_yuv420_lines(yuv_src, width, stride); 270 lcd_write_yuv420_lines(yuv_src, width, stride);
263 yuv_src[0] += stride << 1; /* Skip down two luma lines */ 271 yuv_src[0] += stride << 1; /* Skip down two luma lines */
264 yuv_src[1] += stride >> 1; /* Skip down one chroma line */ 272 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)
304 lcd_send_command(x); 312 lcd_send_command(x);
305 lcd_send_command(x + width - 1); 313 lcd_send_command(x + width - 1);
306 } 314 }
315
307 lcd_send_command(R_Y_ADDR_AREA); 316 lcd_send_command(R_Y_ADDR_AREA);
308 lcd_send_command(y + 0x1a); 317 lcd_send_command(y + 0x1a);
309 lcd_send_command(y + height - 1 + 0x1a); 318 lcd_send_command(y + height - 1 + 0x1a);
310 319
320 /* NOP needed because on some c200s, the previous lcd_send_command is
321 interpreted as a separate command instead of part of R_Y_ADDR_AREA. */
322 lcd_send_command(R_NOP);
323
311 do { 324 do {
312 int w = width; 325 int w = width;
313 do { 326 do {