diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/lcd-s3c2440.c')
-rw-r--r-- | firmware/target/arm/s3c2440/lcd-s3c2440.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/firmware/target/arm/s3c2440/lcd-s3c2440.c b/firmware/target/arm/s3c2440/lcd-s3c2440.c index d702b5713a..4a4674e87f 100644 --- a/firmware/target/arm/s3c2440/lcd-s3c2440.c +++ b/firmware/target/arm/s3c2440/lcd-s3c2440.c | |||
@@ -455,71 +455,6 @@ void lcd_update(void) | |||
455 | LCD_WIDTH*LCD_HEIGHT, 1); | 455 | LCD_WIDTH*LCD_HEIGHT, 1); |
456 | } | 456 | } |
457 | 457 | ||
458 | #if defined(TOSHIBA_GIGABEAT_F) || defined(TOSHIBA_GIGABEAT_S) | ||
459 | void lcd_bitmap_transparent_part(const fb_data *src, int src_x, int src_y, | ||
460 | int stride, int x, int y, int width, | ||
461 | int height) | ||
462 | { | ||
463 | int w, px; | ||
464 | fb_data *dst; | ||
465 | |||
466 | if (x + width > current_vp->width) | ||
467 | width = current_vp->width - x; /* Clip right */ | ||
468 | |||
469 | if (x < 0) /* Clip left */ | ||
470 | { | ||
471 | width += x; | ||
472 | src_x -= x; | ||
473 | x = 0; | ||
474 | } | ||
475 | |||
476 | if (width <= 0) | ||
477 | return; /* nothing left to do */ | ||
478 | |||
479 | if (y + height > current_vp->height) | ||
480 | height = current_vp->height - y; /* Clip bottom */ | ||
481 | |||
482 | if (y < 0) /* Clip top */ | ||
483 | { | ||
484 | height += y; | ||
485 | src_y -= y; | ||
486 | y = 0; | ||
487 | } | ||
488 | |||
489 | if (height <= 0) | ||
490 | return; /* nothing left to do */ | ||
491 | |||
492 | src += stride * src_y + src_x; /* move starting point */ | ||
493 | dst = &lcd_framebuffer[current_vp->y+y][current_vp->x+x]; | ||
494 | |||
495 | asm volatile ( | ||
496 | ".rowstart: \r\n" | ||
497 | "mov %[w], %[width] \r\n" /* Load width for inner loop */ | ||
498 | ".nextpixel: \r\n" | ||
499 | "ldrh %[px], [%[s]], #2 \r\n" /* Load src pixel */ | ||
500 | "add %[d], %[d], #2 \r\n" /* Uncoditionally increment dst */ | ||
501 | "cmp %[px], %[fgcolor] \r\n" /* Compare to foreground color */ | ||
502 | "streqh %[fgpat], [%[d], #-2] \r\n" /* Store foregroud if match */ | ||
503 | "cmpne %[px], %[transcolor] \r\n" /* Compare to transparent color */ | ||
504 | "strneh %[px], [%[d], #-2] \r\n" /* Store dst if not transparent */ | ||
505 | "subs %[w], %[w], #1 \r\n" /* Width counter has run down? */ | ||
506 | "bgt .nextpixel \r\n" /* More in this row? */ | ||
507 | "add %[s], %[s], %[sstp], lsl #1 \r\n" /* Skip over to start of next line */ | ||
508 | "add %[d], %[d], %[dstp], lsl #1 \r\n" | ||
509 | "subs %[h], %[h], #1 \r\n" /* Height counter has run down? */ | ||
510 | "bgt .rowstart \r\n" /* More rows? */ | ||
511 | : [w]"=&r"(w), [h]"+&r"(height), [px]"=&r"(px), | ||
512 | [s]"+&r"(src), [d]"+&r"(dst) | ||
513 | : [width]"r"(width), | ||
514 | [sstp]"r"(stride - width), | ||
515 | [dstp]"r"(LCD_WIDTH - width), | ||
516 | [transcolor]"r"(TRANSPARENT_COLOR), | ||
517 | [fgcolor]"r"(REPLACEWITHFG_COLOR), | ||
518 | [fgpat]"r"(current_vp->fg_pattern) | ||
519 | ); | ||
520 | } | ||
521 | #endif | ||
522 | |||
523 | void lcd_yuv_set_options(unsigned options) | 458 | void lcd_yuv_set_options(unsigned options) |
524 | { | 459 | { |
525 | lcd_yuv_options = options; | 460 | lcd_yuv_options = options; |