summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/iriver
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2012-02-22 21:18:05 +1100
committerJonathan Gordon <rockbox@jdgordon.info>2012-02-28 11:44:59 +1100
commitb37e6bc8c119289aca8740dd5e3b60d72f9d6b40 (patch)
tree7ee9d491811c950943f0fc068d2e2b460ff05c6d /firmware/target/coldfire/iriver
parent15c69b8bafc3e89e1a825b5bbefef4a97f0001b1 (diff)
downloadrockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.tar.gz
rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.tar.bz2
rockbox-b37e6bc8c119289aca8740dd5e3b60d72f9d6b40.zip
lcd drivers: Convert lcd_[remote_]framebuffer to a pointer
Change all lcd drivers to using a pointer to the static framebuffer instead of directly accessing the static array. This will let us later do fun things like dynamic framebuffer sizes (RaaA) or ability to use different buffers for different layers (dynamic skin backdrops!) Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
Diffstat (limited to 'firmware/target/coldfire/iriver')
-rw-r--r--firmware/target/coldfire/iriver/h100/lcd-h100.c4
-rw-r--r--firmware/target/coldfire/iriver/h300/lcd-h300.c4
-rw-r--r--firmware/target/coldfire/iriver/lcd-remote-iriver.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/firmware/target/coldfire/iriver/h100/lcd-h100.c b/firmware/target/coldfire/iriver/h100/lcd-h100.c
index ae77affd18..b13751b9eb 100644
--- a/firmware/target/coldfire/iriver/h100/lcd-h100.c
+++ b/firmware/target/coldfire/iriver/h100/lcd-h100.c
@@ -216,7 +216,7 @@ void lcd_update(void)
lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1);
lcd_write_command(LCD_CNTL_DATA_WRITE);
- lcd_write_data (lcd_framebuffer[y], LCD_WIDTH);
+ lcd_write_data (FBADDR(0, y), LCD_WIDTH);
}
}
@@ -244,6 +244,6 @@ void lcd_update_rect(int x, int y, int width, int height)
lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1);
lcd_write_command(LCD_CNTL_DATA_WRITE);
- lcd_write_data (&lcd_framebuffer[y][x], width);
+ lcd_write_data (FBADDR(x,y), width);
}
}
diff --git a/firmware/target/coldfire/iriver/h300/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c
index 6c21a7e260..191c769c97 100644
--- a/firmware/target/coldfire/iriver/h300/lcd-h300.c
+++ b/firmware/target/coldfire/iriver/h300/lcd-h300.c
@@ -447,13 +447,13 @@ void lcd_update_rect(int x, int y, int width, int height)
if (width == LCD_WIDTH)
{
dma_count = 1;
- SAR3 = (unsigned long)lcd_framebuffer[y];
+ SAR3 = (unsigned long)FBADDR(0, y);
BCR3 = (LCD_WIDTH*sizeof(fb_data)) * height;
}
else
{
dma_count = height;
- SAR3 = dma_addr = (unsigned long)&lcd_framebuffer[y][x];
+ SAR3 = dma_addr = (unsigned long)FBADDR(x,y);
BCR3 = dma_len = width * sizeof(fb_data);
}
DCR3 = DMA_INT | DMA_AA | DMA_BWC(1)
diff --git a/firmware/target/coldfire/iriver/lcd-remote-iriver.c b/firmware/target/coldfire/iriver/lcd-remote-iriver.c
index 0ff041f033..03c0e40dbe 100644
--- a/firmware/target/coldfire/iriver/lcd-remote-iriver.c
+++ b/firmware/target/coldfire/iriver/lcd-remote-iriver.c
@@ -312,7 +312,7 @@ void lcd_remote_update(void)
lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y);
lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | ((xoffset >> 4) & 0xf));
lcd_remote_write_command(LCD_REMOTE_CNTL_LOWCOL | (xoffset & 0xf));
- lcd_remote_write_data(lcd_remote_framebuffer[y], LCD_REMOTE_WIDTH);
+ lcd_remote_write_data(FBREMOTEADDR(0, y), LCD_REMOTE_WIDTH);
}
}
@@ -346,6 +346,6 @@ void lcd_remote_update_rect(int x, int y, int width, int height)
lcd_remote_write_command(LCD_REMOTE_CNTL_SET_PAGE_ADDRESS | y);
lcd_remote_write_command(LCD_REMOTE_CNTL_HIGHCOL | (((x+xoffset) >> 4) & 0xf));
lcd_remote_write_command(LCD_REMOTE_CNTL_LOWCOL | ((x+xoffset) & 0xf));
- lcd_remote_write_data(&lcd_remote_framebuffer[y][x], width);
+ lcd_remote_write_data(FBREMOTEADDR(x,y), width);
}
}