diff options
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g')
-rwxr-xr-x | firmware/target/arm/s5l8700/ipodnano2g/lcd-asm-nano2g.S | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-asm-nano2g.S b/firmware/target/arm/s5l8700/ipodnano2g/lcd-asm-nano2g.S index 7fd703972d..2b170f329b 100755 --- a/firmware/target/arm/s5l8700/ipodnano2g/lcd-asm-nano2g.S +++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-asm-nano2g.S | |||
@@ -19,6 +19,15 @@ | |||
19 | * | 19 | * |
20 | ****************************************************************************/ | 20 | ****************************************************************************/ |
21 | 21 | ||
22 | /**************************************************************************** | ||
23 | * #define FORCE_FIFO_WAIT | ||
24 | * | ||
25 | * This is not needed in YUV blitting when the LCD IF is fast enough. In this | ||
26 | * case YUV-to-RGB conversion per pixel needs longer than the transfer of a | ||
27 | * pixel via the LCD IF. For iPod nano 2G this is true if the LCD IF is | ||
28 | * configured to use LCD_PHTIME = 0x00 (see lcd-nano2g.c). | ||
29 | ****************************************************************************/ | ||
30 | |||
22 | #include "config.h" | 31 | #include "config.h" |
23 | 32 | ||
24 | .section .icode, "ax", %progbits | 33 | .section .icode, "ax", %progbits |
@@ -185,13 +194,13 @@ lcd_write_yuv420_lines: | |||
185 | /* calculate pixel_2 and pack with pixel_1 before writing */ | 194 | /* calculate pixel_2 and pack with pixel_1 before writing */ |
186 | orr r5, r5, r3, lsl #5 /* pixel_2 = r<<11 | g<<5 | b */ | 195 | orr r5, r5, r3, lsl #5 /* pixel_2 = r<<11 | g<<5 | b */ |
187 | orr r5, r5, r6, lsl #11 /* r5 = pixel_2 */ | 196 | orr r5, r5, r6, lsl #11 /* r5 = pixel_2 */ |
188 | 197 | #ifdef FORCE_FIFO_WAIT | |
189 | /* wait for FIFO half full */ | 198 | /* wait for FIFO half full */ |
190 | .fifo_wait1: | 199 | .fifo_wait1: |
191 | ldr r3, [lr, #-0x24] /* while (LCD_STATUS & 0x08); */ | 200 | ldr r3, [lr, #-0x24] /* while (LCD_STATUS & 0x08); */ |
192 | tst r3, #0x8 | 201 | tst r3, #0x8 |
193 | bgt .fifo_wait1 | 202 | bgt .fifo_wait1 |
194 | 203 | #endif | |
195 | stmia lr, {r4,r5} /* write pixel_1 and pixel_2 */ | 204 | stmia lr, {r4,r5} /* write pixel_1 and pixel_2 */ |
196 | 205 | ||
197 | subs r7, r7, #2 /* check for loop end */ | 206 | subs r7, r7, #2 /* check for loop end */ |
@@ -265,13 +274,13 @@ lcd_write_yuv420_lines: | |||
265 | /* calculate pixel_2 and pack with pixel_1 before writing */ | 274 | /* calculate pixel_2 and pack with pixel_1 before writing */ |
266 | orr r5, r5, r3, lsl #5 /* pixel_2 = r<<11 | g<<5 | b */ | 275 | orr r5, r5, r3, lsl #5 /* pixel_2 = r<<11 | g<<5 | b */ |
267 | orr r5, r5, r6, lsl #11 /* r5 = pixel_2 */ | 276 | orr r5, r5, r6, lsl #11 /* r5 = pixel_2 */ |
268 | 277 | #ifdef FORCE_FIFO_WAIT | |
269 | /* wait for FIFO half full */ | 278 | /* wait for FIFO half full */ |
270 | .fifo_wait2: | 279 | .fifo_wait2: |
271 | ldr r3, [lr, #-0x24] /* while (LCD_STATUS & 0x08); */ | 280 | ldr r3, [lr, #-0x24] /* while (LCD_STATUS & 0x08); */ |
272 | tst r3, #0x8 | 281 | tst r3, #0x8 |
273 | bgt .fifo_wait2 | 282 | bgt .fifo_wait2 |
274 | 283 | #endif | |
275 | stmia lr, {r4,r5} /* write pixel_1 and pixel_2 */ | 284 | stmia lr, {r4,r5} /* write pixel_1 and pixel_2 */ |
276 | 285 | ||
277 | subs r7, r7, #2 /* check for loop end */ | 286 | subs r7, r7, #2 /* check for loop end */ |