summaryrefslogtreecommitdiff
path: root/firmware/target/arm/samsung/yh920/lcd-yh920.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/samsung/yh920/lcd-yh920.c')
-rw-r--r--firmware/target/arm/samsung/yh920/lcd-yh920.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/firmware/target/arm/samsung/yh920/lcd-yh920.c b/firmware/target/arm/samsung/yh920/lcd-yh920.c
index 73b9ae502b..d24396050a 100644
--- a/firmware/target/arm/samsung/yh920/lcd-yh920.c
+++ b/firmware/target/arm/samsung/yh920/lcd-yh920.c
@@ -237,11 +237,10 @@ void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
237 237
238/* Update a fraction of the display. */ 238/* Update a fraction of the display. */
239/* void lcd_update_rect(int, int, int, int) ICODE_ATTR; */ 239/* void lcd_update_rect(int, int, int, int) ICODE_ATTR; */
240void lcd_update_rect(int x0, int y, int width, int height) 240void lcd_update_rect(int x, int y, int width, int height)
241{ 241{
242 const fb_data *addr; 242 const fb_data *addr;
243 int ymax; 243 int ymax;
244 int x = x0;
245 244
246 /* The Y coordinates have to work on even 8 pixel rows */ 245 /* The Y coordinates have to work on even 8 pixel rows */
247 ymax = (y + height-1) >> 2; 246 ymax = (y + height-1) >> 2;
@@ -258,13 +257,12 @@ void lcd_update_rect(int x0, int y, int width, int height)
258 for (; y <= ymax; y++) 257 for (; y <= ymax; y++)
259 { 258 {
260 lcd_write_reg(LCD_CNTL_PAGE, y); 259 lcd_write_reg(LCD_CNTL_PAGE, y);
261 lcd_write_reg(LCD_CNTL_COLUMN, x0); 260 lcd_write_reg(LCD_CNTL_COLUMN, x);
262 261
263 addr = &lcd_framebuffer[y][x0]; 262 addr = &lcd_framebuffer[y][x];
264 263
265 lcd_send_cmd(LCD_CNTL_DATA_WRITE); 264 lcd_send_cmd(LCD_CNTL_DATA_WRITE);
266 for (x = 0; x < width; x++) 265 lcd_write_data(addr, width);
267 lcd_send_data(*addr++);
268 } 266 }
269} 267}
270 268