summaryrefslogtreecommitdiff
path: root/firmware/target/arm/ipod/video/lcd-as-video.S
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-10-28 12:09:46 +0000
committerJens Arnold <amiconn@rockbox.org>2007-10-28 12:09:46 +0000
commitb05066de125c26cae2780efed7279b84ad9506b1 (patch)
treeac7227ef988c86ae530c6d77d6590502227ee2bd /firmware/target/arm/ipod/video/lcd-as-video.S
parent868d3ce39c9675ec778fa53a592b471775662264 (diff)
downloadrockbox-b05066de125c26cae2780efed7279b84ad9506b1.tar.gz
rockbox-b05066de125c26cae2780efed7279b84ad9506b1.zip
iPod Video: Further optimised LCD data transfer (5..6% speedup, but increase in FPS measured with test_fps is less), making use of the fact that the low address bits aren't decoded by the BCM. Major cleanup of the driver, and introduced register names.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15341 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/video/lcd-as-video.S')
-rw-r--r--firmware/target/arm/ipod/video/lcd-as-video.S42
1 files changed, 41 insertions, 1 deletions
diff --git a/firmware/target/arm/ipod/video/lcd-as-video.S b/firmware/target/arm/ipod/video/lcd-as-video.S
index 938df3e86a..ffd2e0cf10 100644
--- a/firmware/target/arm/ipod/video/lcd-as-video.S
+++ b/firmware/target/arm/ipod/video/lcd-as-video.S
@@ -17,6 +17,47 @@
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20 .section .icode, "ax", %progbits
21
22 .align 2
23 .global lcd_write_data
24 .type lcd_write_data, %function
25 /* r0 = addr */
26lcd_write_data: /* r1 = pixel count */
27 stmfd sp!, {r4-r6}
28 mov r2, #0x30000000 /* LCD data port */
29
30 tst r0, #2 /* first pixel unaligned? */
31 ldrneh r3, [r0], #2
32 strneh r3, [r2]
33 subne r1, r1, #1
34
35 subs r1, r1, #16
36.loop16:
37 ldmgeia r0!, {r3-r6}
38 stmgeia r2, {r3-r6}
39 ldmgeia r0!, {r3-r6}
40 stmgeia r2, {r3-r6}
41 subges r1, r1, #16
42 bge .loop16
43
44 /* no need to correct the count, we're just checking bits from now */
45 tst r1, #8
46 ldmneia r0!, {r3-r6}
47 stmneia r2, {r3-r6}
48 tst r1, #4
49 ldmneia r0!, {r3-r4}
50 stmneia r2, {r3-r4}
51 tst r1, #2
52 ldrne r3, [r0], #4
53 strne r3, [r2]
54 tst r1, #1
55 ldrneh r3, [r0]
56 strneh r3, [r2]
57
58 ldmfd sp!, {r4-r6}
59 bx lr
60
20/**************************************************************************** 61/****************************************************************************
21 * void lcd_write_yuv_420_lines(unsigned char const * const src[3], 62 * void lcd_write_yuv_420_lines(unsigned char const * const src[3],
22 * int width, 63 * int width,
@@ -30,7 +71,6 @@
30 * |G| = |74 -24 -51| |Cb - 128| >> 8 71 * |G| = |74 -24 -51| |Cb - 128| >> 8
31 * |B| |74 128 0| |Cr - 128| >> 9 72 * |B| |74 128 0| |Cr - 128| >> 9
32 */ 73 */
33 .section .icode, "ax", %progbits
34 .align 2 74 .align 2
35 .global lcd_write_yuv420_lines 75 .global lcd_write_yuv420_lines
36 .type lcd_write_yuv420_lines, %function 76 .type lcd_write_yuv420_lines, %function