summaryrefslogtreecommitdiff
path: root/firmware/target/arm/imx233/creative-zen/lcd-zenv.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/creative-zen/lcd-zenv.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/creative-zen/lcd-zenv.c')
-rw-r--r--firmware/target/arm/imx233/creative-zen/lcd-zenv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/creative-zen/lcd-zenv.c b/firmware/target/arm/imx233/creative-zen/lcd-zenv.c
index 06b0f158f3..75d2775814 100644
--- a/firmware/target/arm/imx233/creative-zen/lcd-zenv.c
+++ b/firmware/target/arm/imx233/creative-zen/lcd-zenv.c
@@ -172,8 +172,9 @@ void lcd_update_rect(int x, int y, int w, int h)
172 lcd_send(false, 0x75); lcd_send(true, y); lcd_send(true, y + h - 1); 172 lcd_send(false, 0x75); lcd_send(true, y); lcd_send(true, y + h - 1);
173 lcd_send(false, 0x5c); 173 lcd_send(false, 0x5c);
174 imx233_lcdif_set_word_length(16); 174 imx233_lcdif_set_word_length(16);
175 void* (*fbaddr)(int x, int y) = FB_CURRENTVP_BUFFER->get_address_fn;
175 for(int yy = y; yy < y + h; yy++) 176 for(int yy = y; yy < y + h; yy++)
176 imx233_lcdif_pio_send(true, w, FBADDR(x, yy)); 177 imx233_lcdif_pio_send(true, w, fbaddr(x,yy));
177} 178}
178 179
179#ifndef BOOTLOADER 180#ifndef BOOTLOADER