diff options
author | Marcin Bukat <marcin.bukat@gmail.com> | 2013-05-11 12:55:23 +0200 |
---|---|---|
committer | Marcin Bukat <marcin.bukat@gmail.com> | 2013-05-11 12:55:23 +0200 |
commit | 440872bb4277c882ece20339fa4b2525c1c4ed2a (patch) | |
tree | 3a64dfdb95e3efe6859b02c0881a8ef5aa53970d /firmware/target/arm/rk27xx/lcd-hifiman.c | |
parent | ca8154741fd01e4b11461ce522da7d5e30a12d6e (diff) | |
download | rockbox-440872bb4277c882ece20339fa4b2525c1c4ed2a.tar.gz rockbox-440872bb4277c882ece20339fa4b2525c1c4ed2a.zip |
rk27xx: Use DMA for lcd_update_rect()
This speeds up partial updates quite a bit but what is more
important it opens up a way to efficiently implement
lcd_blit_yuv() using hw colorspace conversion.
Tested on rk27generic, hm60x v1 and v2 and on ma9.
Benchmark for hm60x v1 (by mortalis):
HEAD patched
1/1 141fps 138fps
1/4 315fps 395fps
Change-Id: I4cc115786c3139000fc14c49a7290e289cfd6c42
Diffstat (limited to 'firmware/target/arm/rk27xx/lcd-hifiman.c')
-rw-r--r-- | firmware/target/arm/rk27xx/lcd-hifiman.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/firmware/target/arm/rk27xx/lcd-hifiman.c b/firmware/target/arm/rk27xx/lcd-hifiman.c index 1adc6e36ed..bde1d3546f 100644 --- a/firmware/target/arm/rk27xx/lcd-hifiman.c +++ b/firmware/target/arm/rk27xx/lcd-hifiman.c | |||
@@ -175,19 +175,6 @@ static void lcd_v1_set_gram_area(int x_start, int y_start, | |||
175 | LCDC_CTRL &= ~RGB24B; | 175 | LCDC_CTRL &= ~RGB24B; |
176 | } | 176 | } |
177 | 177 | ||
178 | static void lcd_v1_update_rect(int x, int y, int width, int height) | ||
179 | { | ||
180 | int px = x, py = y; | ||
181 | int pxmax = x + width, pymax = y + height; | ||
182 | |||
183 | lcd_v1_set_gram_area(x, y, pxmax-1, pymax-1); | ||
184 | |||
185 | for (py=y; py<pymax; py++) | ||
186 | for (px=x; px<pxmax; px++) | ||
187 | LCD_DATA = (*FBADDR(px, py)); | ||
188 | } | ||
189 | |||
190 | |||
191 | #ifdef HM60X | 178 | #ifdef HM60X |
192 | 179 | ||
193 | enum lcd_type_t lcd_type; | 180 | enum lcd_type_t lcd_type; |
@@ -312,19 +299,6 @@ static void lcd_v2_set_gram_area(int x_start, int y_start, | |||
312 | LCDC_CTRL &= ~RGB24B; | 299 | LCDC_CTRL &= ~RGB24B; |
313 | } | 300 | } |
314 | 301 | ||
315 | static void lcd_v2_update_rect(int x, int y, int width, int height) | ||
316 | { | ||
317 | int px = x, py = y; | ||
318 | int pxmax = x + width, pymax = y + height; | ||
319 | |||
320 | lcd_v2_set_gram_area(x, y, pxmax-1, pymax-1); | ||
321 | |||
322 | for (py=y; py<pymax; py++) | ||
323 | for (px=x; px<pxmax; px++) | ||
324 | LCD_DATA = (*FBADDR(px, py)); | ||
325 | |||
326 | } | ||
327 | |||
328 | void lcd_display_init(void) | 302 | void lcd_display_init(void) |
329 | { | 303 | { |
330 | reset_lcd(); | 304 | reset_lcd(); |
@@ -352,16 +326,6 @@ void lcd_set_gram_area(int x_start, int y_start, | |||
352 | lcd_v2_set_gram_area(x_start, y_start, x_end, y_end); | 326 | lcd_v2_set_gram_area(x_start, y_start, x_end, y_end); |
353 | } | 327 | } |
354 | 328 | ||
355 | void lcd_update_rect(int x, int y, int width, int height) | ||
356 | { | ||
357 | if (lcd_type == LCD_V1) | ||
358 | lcd_v1_update_rect(x, y, width, height); | ||
359 | else | ||
360 | lcd_v2_update_rect(x, y, width, height); | ||
361 | } | ||
362 | |||
363 | |||
364 | |||
365 | #else /* HM801 */ | 329 | #else /* HM801 */ |
366 | 330 | ||
367 | void lcd_display_init(void) | 331 | void lcd_display_init(void) |
@@ -380,16 +344,8 @@ void lcd_set_gram_area(int x_start, int y_start, | |||
380 | { | 344 | { |
381 | lcd_v1_set_gram_area(x_start, y_start, x_end, y_end); | 345 | lcd_v1_set_gram_area(x_start, y_start, x_end, y_end); |
382 | } | 346 | } |
383 | |||
384 | void lcd_update_rect(int x, int y, int width, int height) | ||
385 | { | ||
386 | lcd_v1_update_rect(x, y, width, height); | ||
387 | } | ||
388 | |||
389 | #endif | 347 | #endif |
390 | 348 | ||
391 | |||
392 | |||
393 | bool lcd_active() | 349 | bool lcd_active() |
394 | { | 350 | { |
395 | return display_on; | 351 | return display_on; |