diff options
author | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2013-05-08 18:29:17 +0400 |
---|---|---|
committer | Andrew Ryabinin <ryabinin.a.a@gmail.com> | 2013-05-08 18:30:32 +0400 |
commit | 83554cce8d8f2cee322f3b7160f4fa8e9930f451 (patch) | |
tree | 65e451807726ee39942a509456f213e0d229e89e /firmware/target | |
parent | fce81a8a74deaa0dae504a3da190d786156a568d (diff) | |
download | rockbox-83554cce8d8f2cee322f3b7160f4fa8e9930f451.tar.gz rockbox-83554cce8d8f2cee322f3b7160f4fa8e9930f451.zip |
hm60x: Implement lcd_update_rect for v2 display.
Change-Id: I9d6b14bcbd26cfd760516f1ef3bf421698507806
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/rk27xx/lcd-hifiman.c | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/firmware/target/arm/rk27xx/lcd-hifiman.c b/firmware/target/arm/rk27xx/lcd-hifiman.c index 95cbd358d8..8360a84cff 100644 --- a/firmware/target/arm/rk27xx/lcd-hifiman.c +++ b/firmware/target/arm/rk27xx/lcd-hifiman.c | |||
@@ -252,9 +252,6 @@ static void lcd_v2_display_init(void) | |||
252 | 252 | ||
253 | lcd_write_reg(0x07, 0x1017); | 253 | lcd_write_reg(0x07, 0x1017); |
254 | 254 | ||
255 | lcd_write_reg(0x20, 0x00AF); | ||
256 | lcd_write_reg(0x21, 0x0000); | ||
257 | |||
258 | lcd_cmd(0x22); | 255 | lcd_cmd(0x22); |
259 | 256 | ||
260 | for (x=0; x<LCD_WIDTH; x++) | 257 | for (x=0; x<LCD_WIDTH; x++) |
@@ -271,23 +268,33 @@ static void lcd_v2_enable (bool on) | |||
271 | 268 | ||
272 | static void lcd_v2_set_gram_area(int x, int y, int width, int height) | 269 | static void lcd_v2_set_gram_area(int x, int y, int width, int height) |
273 | { | 270 | { |
274 | (void) x; | ||
275 | (void) y; | ||
276 | (void) width; | ||
277 | (void) height; | ||
278 | lcdctrl_bypass(1); | 271 | lcdctrl_bypass(1); |
279 | LCDC_CTRL |= RGB24B; | 272 | LCDC_CTRL |= RGB24B; |
273 | |||
274 | lcd_write_reg(0x36, height-1); | ||
275 | lcd_write_reg(0x37, y); | ||
276 | lcd_write_reg(0x38, width-1); | ||
277 | lcd_write_reg(0x39, x); | ||
278 | |||
279 | /* set GRAM address */ | ||
280 | lcd_write_reg(0x20, y); | ||
281 | lcd_write_reg(0x21, x); | ||
282 | |||
280 | lcd_cmd(0x22); | 283 | lcd_cmd(0x22); |
281 | LCDC_CTRL &= ~RGB24B; | 284 | LCDC_CTRL &= ~RGB24B; |
282 | } | 285 | } |
283 | 286 | ||
284 | static void lcd_v2_update_rect(int x, int y, int width, int height) | 287 | static void lcd_v2_update_rect(int x, int y, int width, int height) |
285 | { | 288 | { |
286 | (void) x; | 289 | int px = x, py = y; |
287 | (void) y; | 290 | int pxmax = x + width, pymax = y + height; |
288 | (void) width; | 291 | |
289 | (void) height; | 292 | lcd_v2_set_gram_area(x, y, pxmax, pymax); |
290 | lcd_update(); | 293 | |
294 | for (py=y; py<pymax; py++) | ||
295 | for (px=x; px<pxmax; px++) | ||
296 | LCD_DATA = (*FBADDR(px, py)); | ||
297 | |||
291 | } | 298 | } |
292 | 299 | ||
293 | void lcd_display_init(void) | 300 | void lcd_display_init(void) |