From 335df1d0403013879b3237b9997316d7ab8bbfbf Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sun, 12 Dec 2010 15:10:45 +0000 Subject: 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 --- .../target/arm/s5l8700/ipodnano2g/lcd-nano2g.c | 23 ++++++++-------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'firmware/target/arm') 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[] = { static inline void s5l_lcd_write_cmd_data(int cmd, int data) { while (LCD_STATUS & 0x10); - LCD_WCMD = cmd >> 8; - while (LCD_STATUS & 0x10); - LCD_WCMD = cmd & 0xff; + LCD_WCMD = cmd; while (LCD_STATUS & 0x10); - LCD_WDATA = data >> 8; - while (LCD_STATUS & 0x10); - LCD_WDATA = data & 0xff; + LCD_WDATA = data; } static inline void s5l_lcd_write_cmd(unsigned short cmd) @@ -238,23 +234,19 @@ static inline void s5l_lcd_write_cmd(unsigned short cmd) static inline void s5l_lcd_write_wcmd(unsigned short cmd) { while (LCD_STATUS & 0x10); - LCD_WCMD = cmd >> 8; - while (LCD_STATUS & 0x10); - LCD_WCMD = cmd & 0xff; + LCD_WCMD = cmd; } static inline void s5l_lcd_write_data(unsigned short data) { while (LCD_STATUS & 0x10); - LCD_WDATA = data & 0xff; + LCD_WDATA = data; } static inline void s5l_lcd_write_wdata(unsigned short data) { while (LCD_STATUS & 0x10); - LCD_WDATA = data >> 8; - while (LCD_STATUS & 0x10); - LCD_WDATA = data & 0xff; + LCD_WDATA = data; } /*** hardware configuration ***/ @@ -409,6 +401,8 @@ void lcd_init_device(void) lcd_type = 0; /* Similar to ILI9320 - aka "type 2" */ else lcd_type = 1; /* Similar to LDS176 - aka "type 7" */ + + LCD_CON |= 0x100; /* use 16 bit bus width, little endian */ lcd_ispowered = true; } @@ -417,8 +411,7 @@ void lcd_init_device(void) static inline void lcd_write_pixel(fb_data pixel) { - LCD_WDATA = pixel >> 8; - LCD_WDATA = pixel; /* no need to &0xff here, only lower 8 bit used */ + LCD_WDATA = pixel; } /* Update the display. -- cgit v1.2.3