summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2011-10-01 08:57:51 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2011-10-01 08:57:51 +0000
commit88455968f41004ec19e9ba37731e23de85d7d17a (patch)
tree857ff77fe7f4965bb2a8b91174a326f0762ac4bc
parentda09f7f0f14f2b6514a1e5dd0e223ff8e9f766d0 (diff)
downloadrockbox-88455968f41004ec19e9ba37731e23de85d7d17a.tar.gz
rockbox-88455968f41004ec19e9ba37731e23de85d7d17a.zip
rk27xx - implement partial lcd updates
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30624 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/rk27xx/lcd-rk27xx.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/firmware/target/arm/rk27xx/lcd-rk27xx.c b/firmware/target/arm/rk27xx/lcd-rk27xx.c
index e98dc4ab86..fda95e3174 100644
--- a/firmware/target/arm/rk27xx/lcd-rk27xx.c
+++ b/firmware/target/arm/rk27xx/lcd-rk27xx.c
@@ -286,21 +286,30 @@ void lcd_init_device()
286 */ 286 */
287void lcd_update() 287void lcd_update()
288{ 288{
289 unsigned int x,y; 289 lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
290
291 for (y=0; y<240; y++)
292 for (x=0; x<400; x++)
293 LCD_DATA = lcd_pixel_transform(lcd_framebuffer[y][x]);
294} 290}
295 291
296/* not implemented yet */ 292
297void lcd_update_rect(int x, int y, int width, int height) 293void lcd_update_rect(int x, int y, int width, int height)
298{ 294{
299 (void)x; 295 int px = x, py = y;
300 (void)y; 296 int pxmax = x + width, pymax = y + height;
301 (void)width; 297
302 (void)height; 298 /* addresses setup */
303 lcd_update(); 299 lcd_write_reg(WINDOW_H_START, y);
300 lcd_write_reg(WINDOW_H_END, pymax-1);
301 lcd_write_reg(WINDOW_V_START, x);
302 lcd_write_reg(WINDOW_V_END, pxmax-1);
303 lcd_write_reg(GRAM_H_ADDR, y);
304 lcd_write_reg(GRAM_V_ADDR, x);
305
306 lcd_cmd(GRAM_WRITE);
307
308 for (py=y; py<pymax; py++)
309 {
310 for (px=x; px<pxmax; px++)
311 LCD_DATA = lcd_pixel_transform(lcd_framebuffer[py][px]);
312 }
304} 313}
305 314
306/* Blit a YUV bitmap directly to the LCD */ 315/* Blit a YUV bitmap directly to the LCD */