diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-12-12 15:10:45 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-12-12 15:10:45 +0000 |
commit | 335df1d0403013879b3237b9997316d7ab8bbfbf (patch) | |
tree | 5b4e61ddfc7ec74fe4fa7f10cec252d224132ffb | |
parent | 26f2bfde03420edad4de1f22cb3d515dc063b20d (diff) | |
download | rockbox-335df1d0403013879b3237b9997316d7ab8bbfbf.tar.gz rockbox-335df1d0403013879b3237b9997316d7ab8bbfbf.zip |
FS#11807 - Major speedup of iPod nano 2G. Part 2: Use 16 bit data width and simplify write commands. Gives another +27% for YUV.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28811 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c index 5bda9e7387..5eabfdb463 100644 --- a/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c +++ b/firmware/target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | |||
@@ -219,14 +219,10 @@ unsigned short lcd_init_sequence_1[] = { | |||
219 | static inline void s5l_lcd_write_cmd_data(int cmd, int data) | 219 | static inline void s5l_lcd_write_cmd_data(int cmd, int data) |
220 | { | 220 | { |
221 | while (LCD_STATUS & 0x10); | 221 | while (LCD_STATUS & 0x10); |
222 | LCD_WCMD = cmd >> 8; | 222 | LCD_WCMD = cmd; |
223 | while (LCD_STATUS & 0x10); | ||
224 | LCD_WCMD = cmd & 0xff; | ||
225 | 223 | ||
226 | while (LCD_STATUS & 0x10); | 224 | while (LCD_STATUS & 0x10); |
227 | LCD_WDATA = data >> 8; | 225 | LCD_WDATA = data; |
228 | while (LCD_STATUS & 0x10); | ||
229 | LCD_WDATA = data & 0xff; | ||
230 | } | 226 | } |
231 | 227 | ||
232 | static inline void s5l_lcd_write_cmd(unsigned short cmd) | 228 | static inline void s5l_lcd_write_cmd(unsigned short cmd) |
@@ -238,23 +234,19 @@ static inline void s5l_lcd_write_cmd(unsigned short cmd) | |||
238 | static inline void s5l_lcd_write_wcmd(unsigned short cmd) | 234 | static inline void s5l_lcd_write_wcmd(unsigned short cmd) |
239 | { | 235 | { |
240 | while (LCD_STATUS & 0x10); | 236 | while (LCD_STATUS & 0x10); |
241 | LCD_WCMD = cmd >> 8; | 237 | LCD_WCMD = cmd; |
242 | while (LCD_STATUS & 0x10); | ||
243 | LCD_WCMD = cmd & 0xff; | ||
244 | } | 238 | } |
245 | 239 | ||
246 | static inline void s5l_lcd_write_data(unsigned short data) | 240 | static inline void s5l_lcd_write_data(unsigned short data) |
247 | { | 241 | { |
248 | while (LCD_STATUS & 0x10); | 242 | while (LCD_STATUS & 0x10); |
249 | LCD_WDATA = data & 0xff; | 243 | LCD_WDATA = data; |
250 | } | 244 | } |
251 | 245 | ||
252 | static inline void s5l_lcd_write_wdata(unsigned short data) | 246 | static inline void s5l_lcd_write_wdata(unsigned short data) |
253 | { | 247 | { |
254 | while (LCD_STATUS & 0x10); | 248 | while (LCD_STATUS & 0x10); |
255 | LCD_WDATA = data >> 8; | 249 | LCD_WDATA = data; |
256 | while (LCD_STATUS & 0x10); | ||
257 | LCD_WDATA = data & 0xff; | ||
258 | } | 250 | } |
259 | 251 | ||
260 | /*** hardware configuration ***/ | 252 | /*** hardware configuration ***/ |
@@ -409,6 +401,8 @@ void lcd_init_device(void) | |||
409 | lcd_type = 0; /* Similar to ILI9320 - aka "type 2" */ | 401 | lcd_type = 0; /* Similar to ILI9320 - aka "type 2" */ |
410 | else | 402 | else |
411 | lcd_type = 1; /* Similar to LDS176 - aka "type 7" */ | 403 | lcd_type = 1; /* Similar to LDS176 - aka "type 7" */ |
404 | |||
405 | LCD_CON |= 0x100; /* use 16 bit bus width, little endian */ | ||
412 | 406 | ||
413 | lcd_ispowered = true; | 407 | lcd_ispowered = true; |
414 | } | 408 | } |
@@ -417,8 +411,7 @@ void lcd_init_device(void) | |||
417 | 411 | ||
418 | static inline void lcd_write_pixel(fb_data pixel) | 412 | static inline void lcd_write_pixel(fb_data pixel) |
419 | { | 413 | { |
420 | LCD_WDATA = pixel >> 8; | 414 | LCD_WDATA = pixel; |
421 | LCD_WDATA = pixel; /* no need to &0xff here, only lower 8 bit used */ | ||
422 | } | 415 | } |
423 | 416 | ||
424 | /* Update the display. | 417 | /* Update the display. |