summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2022-03-21 18:54:52 -0400
committerWilliam Wilgus <wilgus.william@gmail.com>2022-03-21 23:53:48 -0400
commitcfeeb7889d5346e2abaf9b198375df62c58b098f (patch)
treef9956033372abe7d8bffa4e04bef0662dfb0da02 /firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c
parent60e5786b481a26ca7c0c810d812bf5664a58cb44 (diff)
downloadrockbox-cfeeb7889d5346e2abaf9b198375df62c58b098f.tar.gz
rockbox-cfeeb7889d5346e2abaf9b198375df62c58b098f.zip
Lcd save function pointer to frame buffer get_address_fn before loops
Calling multiple levels of indirection in a loop slows things down Really these need to be rewritten to take a start and end address like most of the rest of the codebase But this is safer without having test hardware in hand Change-Id: Idae7b92ee779d020ed7fcc9334e2d5a9c710e64d
Diffstat (limited to 'firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c')
-rw-r--r--firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c b/firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c
index cfcf85bfc0..8f49bfa3eb 100644
--- a/firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c
+++ b/firmware/target/arm/imx233/sony-nwz/lcd-nwze360.c
@@ -228,8 +228,9 @@ void lcd_update_rect(int x, int y, int w, int h)
228 } 228 }
229 else 229 else
230 { 230 {
231 void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn;
231 for(int i = 0; i < h; i++) 232 for(int i = 0; i < h; i++)
232 memcpy((fb_data *)FRAME + i * w, FBADDR(x,y + i), w * sizeof(fb_data)); 233 memcpy((fb_data *)FRAME + i * w, fbaddr(x,y + i), w * sizeof(fb_data));
233 } 234 }
234 /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode 235 /* WARNING The LCDIF has a limitation on the vertical count ! In 16-bit packed mode
235 * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count 236 * (which we used, ie 16-bit per pixel, 2 pixels per 32-bit words), the v_count