forked from len0rd/rockbox
Samsung YH920 : fix lcd_blit_mono displaying twice too wide
lcd_write_data() wrote twice too much pixels to the controller The fix is the same than r22885, vertically packed 2bpp displays use 8-bits fb_data while horizontally packed 2bpp use 16-bits fb_data git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22893 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ccf2078150
commit
71db2d74b5
1 changed files with 15 additions and 11 deletions
|
@ -27,27 +27,31 @@
|
|||
.align 2
|
||||
|
||||
|
||||
/* Writes an array of pixels of specified width (in 8 bits unit)
|
||||
*
|
||||
* Arguments:
|
||||
* r0 : pixels array
|
||||
* r1 : number of pixels in 8 bits unit
|
||||
*
|
||||
* Register usage:
|
||||
* r2 : LCD_CONTROL value / pixel value
|
||||
* r3 : lcd bridge address
|
||||
*/
|
||||
|
||||
.global lcd_write_data
|
||||
.type lcd_write_data,%function
|
||||
|
||||
lcd_write_data:
|
||||
ldr r12, =LCD1_BASE
|
||||
ldr r3, =LCD1_BASE
|
||||
|
||||
.loop:
|
||||
ldrb r2, [r0], #1
|
||||
|
||||
1:
|
||||
ldr r3, [r12]
|
||||
tst r3, #LCD1_BUSY_MASK
|
||||
ldr r2, [r3]
|
||||
tst r2, #LCD1_BUSY_MASK
|
||||
bne 1b
|
||||
str r2, [r12, #0x10]
|
||||
|
||||
ldrb r2, [r0], #1
|
||||
1:
|
||||
ldr r3, [r12]
|
||||
tst r3, #LCD1_BUSY_MASK
|
||||
bne 1b
|
||||
str r2, [r12, #0x10]
|
||||
str r2, [r3, #0x10]
|
||||
|
||||
subs r1, r1, #1
|
||||
bne .loop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue