summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/ipod
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/arm/ipod
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/arm/ipod')
-rw-r--r--firmware/target/arm/ipod/lcd-color_nano.c2
-rw-r--r--firmware/target/arm/ipod/lcd-gray.c4
-rw-r--r--firmware/target/arm/ipod/video/lcd-video.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/ipod/lcd-color_nano.c b/firmware/target/arm/ipod/lcd-color_nano.c
index 589e8654ae..c7676fa721 100644
--- a/firmware/target/arm/ipod/lcd-color_nano.c
+++ b/firmware/target/arm/ipod/lcd-color_nano.c
@@ -280,7 +280,7 @@ void lcd_update_rect(int x, int y, int width, int height)
lcd_setup_drawing_region(x, y, width, height);
- addr = (unsigned long*)&lcd_framebuffer[y][x];
+ addr = (unsigned long*)FBADDR(x, y);
while (height > 0) {
int r, h, pixels_to_write;
diff --git a/firmware/target/arm/ipod/lcd-gray.c b/firmware/target/arm/ipod/lcd-gray.c
index 11d4cba2f5..d8695cdb10 100644
--- a/firmware/target/arm/ipod/lcd-gray.c
+++ b/firmware/target/arm/ipod/lcd-gray.c
@@ -340,10 +340,10 @@ void lcd_update_rect(int x, int y, int width, int height)
#if defined(IPOD_MINI) || defined(IPOD_MINI2G)
if (pix_offset == -2)
- lcd_write_data_shifted(&lcd_framebuffer[y][2*x], width);
+ lcd_write_data_shifted(FBADDR(2*x, y), width);
else
#endif
- lcd_write_data(&lcd_framebuffer[y][2*x], width);
+ lcd_write_data(FBADDR(2*x, y), width);
}
}
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c
index c499e9f745..27d889aafa 100644
--- a/firmware/target/arm/ipod/video/lcd-video.c
+++ b/firmware/target/arm/ipod/video/lcd-video.c
@@ -410,7 +410,7 @@ void lcd_update_rect(int x, int y, int width, int height)
/* Prevent the tick from triggering BCM updates while we're writing. */
lcd_block_tick();
- addr = &lcd_framebuffer[y][x];
+ addr = FBADDR(x, y);
bcmaddr = BCMA_CMDPARAM + (LCD_WIDTH*2) * y + (x << 1);
if (width == LCD_WIDTH)