diff options
author | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2013-05-09 12:16:27 +0400 |
---|---|---|
committer | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2013-05-09 16:08:17 +0400 |
commit | d04bd89bbd954112f4665b21e63f57f7d7aee2d7 (patch) | |
tree | 1574183601d2e88976c82c9bb71b9c54cbe25819 | |
parent | 83554cce8d8f2cee322f3b7160f4fa8e9930f451 (diff) | |
download | rockbox-d04bd89.tar.gz rockbox-d04bd89.zip |
hm60x: Implement lcd_enable() for v2 display.
Change-Id: I5ed0cba03711b3ba6db58405fe805d92aece974e
-rw-r--r-- | firmware/target/arm/rk27xx/lcd-hifiman.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/firmware/target/arm/rk27xx/lcd-hifiman.c b/firmware/target/arm/rk27xx/lcd-hifiman.c index 8360a84cff..03b488548e 100644 --- a/firmware/target/arm/rk27xx/lcd-hifiman.c +++ b/firmware/target/arm/rk27xx/lcd-hifiman.c @@ -263,7 +263,32 @@ static void lcd_v2_display_init(void) static void lcd_v2_enable (bool on) { + if (on == display_on) + return; + + lcdctrl_bypass(1); + LCDC_CTRL |= RGB24B; + + if (on) + { + lcd_write_reg(0x10, 0x0000); + lcd_write_reg(0x11, 0x1B41); + udelay(50000); + lcd_write_reg(0x07, 0x1017); + udelay(50000); + } + else + { + lcd_write_reg(0x07, 0x0000); + udelay(50000); + lcd_write_reg(0x11, 0x0001); + udelay(50000); + lcd_write_reg(0x10, 0x0001); + } display_on = on; + + LCDC_CTRL &= ~RGB24B; + } static void lcd_v2_set_gram_area(int x, int y, int width, int height) |