summaryrefslogtreecommitdiffstats
path: root/firmware/asm
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-06-18 07:15:00 +0200
committerThomas Martitz <kugel@rockbox.org>2014-06-21 00:15:53 +0200
commita1842c04f9cb73210d4cacde61a9e4b115050765 (patch)
treea37af61ef9285b763a42cd33797e2f3d634fbf9f /firmware/asm
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.bz2
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip
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
Diffstat (limited to 'firmware/asm')
-rw-r--r--firmware/asm/SOURCES4
-rw-r--r--firmware/asm/lcd-as-memframe-24bit.c3
-rw-r--r--firmware/asm/lcd-as-memframe.c8
3 files changed, 11 insertions, 4 deletions
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++;