From a1842c04f9cb73210d4cacde61a9e4b115050765 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Wed, 18 Jun 2014 07:15:00 +0200 Subject: lcd-24bit: Introduce a 24-bit mid-level LCD driver With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754 --- firmware/asm/SOURCES | 4 ++++ firmware/asm/lcd-as-memframe-24bit.c | 3 +++ firmware/asm/lcd-as-memframe.c | 8 ++++---- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 firmware/asm/lcd-as-memframe-24bit.c (limited to 'firmware/asm') diff --git a/firmware/asm/SOURCES b/firmware/asm/SOURCES index 0cd351efdd..d74d4d3c60 100644 --- a/firmware/asm/SOURCES +++ b/firmware/asm/SOURCES @@ -12,5 +12,9 @@ strlen.c defined(COWON_D2) || defined(MINI2440) || defined(SAMSUNG_YPR0) || \ defined(SAMSUNG_YPR1) || (defined(MROBE_500) && !defined(LCD_USE_DMA))) && \ !defined(SIMULATOR) +#if LCD_DEPTH == 24 +lcd-as-memframe-24bit.c +#else lcd-as-memframe.c #endif +#endif diff --git a/firmware/asm/lcd-as-memframe-24bit.c b/firmware/asm/lcd-as-memframe-24bit.c new file mode 100644 index 0000000000..2cca575799 --- /dev/null +++ b/firmware/asm/lcd-as-memframe-24bit.c @@ -0,0 +1,3 @@ + +/* The ASM version of lcd-as-memframe.c isn't 24bit capable */ +#include "lcd-as-memframe.c" diff --git a/firmware/asm/lcd-as-memframe.c b/firmware/asm/lcd-as-memframe.c index 5f4917b721..032022d7ec 100644 --- a/firmware/asm/lcd-as-memframe.c +++ b/firmware/asm/lcd-as-memframe.c @@ -78,7 +78,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst, b = clamp(b, 0, 64*256-1); } - *dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); + *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6); #if LCD_WIDTH >= LCD_HEIGHT dst++; @@ -98,7 +98,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst, b = clamp(b, 0, 64*256-1); } - *dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); + *dst = FB_RGBPACK(r >> 6, g >> 6, b >> 6); #if LCD_WIDTH >= LCD_HEIGHT dst++; @@ -143,7 +143,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst, b = clamp(b, 0, 64*256-1); } - *dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); + *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); #if LCD_WIDTH >= LCD_HEIGHT dst++; @@ -163,7 +163,7 @@ extern void lcd_write_yuv420_lines(fb_data *dst, b = clamp(b, 0, 64*256-1); } - *dst = LCD_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); + *dst = FB_RGBPACK_LCD(r >> 9, g >> 8, b >> 9); #if LCD_WIDTH >= LCD_HEIGHT dst++; -- cgit v1.2.3