summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 54aa22e..5c3e92b 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -481,6 +481,10 @@ void lcd_update_rect(int x, int y, int width, int height)
lcd_write_reg(R_ENTRY_MODE, r_entry_mode);
+ /* we need to make x and width even to enable 32bit transfers */
+ width = (width + (x & 1) + 1) & ~1;
+ x &= ~1;
+
lcd_window(x, y, x+width-1, y+height-1);
lcd_write_cmd(R_WRITE_DATA_2_GRAM);