diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-10-03 13:05:08 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-10-03 13:05:08 +0000 |
commit | fcc6a68c6e71426ecb955a1f328d5e14f8a2ee84 (patch) | |
tree | 0e4b59039801bb21eccd7cd7deb0e50055e1a82e /firmware | |
parent | 22933cc19cdbaf61a037caae4d69699a5b0dc4c2 (diff) |
Samsung YH920 LCD
Remove unused lcd_mono_data
Replace a loop in partial update function by asm lcd_write_data()
Remove a variable only used in this loop (x) and rename x0 to x
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22888 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/samsung/yh920/lcd-as-yh920.S | 35 | ||||
-rw-r--r-- | firmware/target/arm/samsung/yh920/lcd-yh920.c | 10 |
2 files changed, 4 insertions, 41 deletions
diff --git a/firmware/target/arm/samsung/yh920/lcd-as-yh920.S b/firmware/target/arm/samsung/yh920/lcd-as-yh920.S index 382c468097..9444954041 100644 --- a/firmware/target/arm/samsung/yh920/lcd-as-yh920.S +++ b/firmware/target/arm/samsung/yh920/lcd-as-yh920.S @@ -56,41 +56,6 @@ lcd_write_data: .size lcd_write_data,.-lcd_write_data - .global lcd_mono_data - .type lcd_mono_data,%function - -lcd_mono_data: - stmfd sp!, {r4, lr} - ldr lr, =LCD1_BASE - ldr r12, =lcd_dibits - -.mloop: - ldrb r2, [r0], #1 - mov r3, r2, lsr #4 - ldrb r4, [r12, r3] - -1: - ldr r3, [lr] - tst r3, #LCD1_BUSY_MASK - bne 1b - str r4, [lr, #0x10] - - and r3, r2, #0x0f - ldrb r4, [r12, r3] -1: - ldr r3, [lr] - tst r3, #LCD1_BUSY_MASK - bne 1b - str r4, [lr, #0x10] - - subs r1, r1, #1 - bne .mloop - - ldmfd sp!, {r4, pc} - - .size lcd_mono_data,.-lcd_mono_data - - .global lcd_grey_data .type lcd_grey_data,%function 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, /* Update a fraction of the display. */ /* void lcd_update_rect(int, int, int, int) ICODE_ATTR; */ -void lcd_update_rect(int x0, int y, int width, int height) +void lcd_update_rect(int x, int y, int width, int height) { const fb_data *addr; int ymax; - int x = x0; /* The Y coordinates have to work on even 8 pixel rows */ ymax = (y + height-1) >> 2; @@ -258,13 +257,12 @@ void lcd_update_rect(int x0, int y, int width, int height) for (; y <= ymax; y++) { lcd_write_reg(LCD_CNTL_PAGE, y); - lcd_write_reg(LCD_CNTL_COLUMN, x0); + lcd_write_reg(LCD_CNTL_COLUMN, x); - addr = &lcd_framebuffer[y][x0]; + addr = &lcd_framebuffer[y][x]; lcd_send_cmd(LCD_CNTL_DATA_WRITE); - for (x = 0; x < width; x++) - lcd_send_data(*addr++); + lcd_write_data(addr, width); } } |