diff options
author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-11-24 18:41:17 +0000 |
---|---|---|
committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-11-24 18:41:17 +0000 |
commit | 11c63f2f22f9faec1e41e2d37d249e1524ad291c (patch) | |
tree | af1663928b7001699aee89da9be7487c6585f454 /firmware/target/mips | |
parent | 3761c0108cbfc6f88c4bf43fc13a38a2f7db0d6f (diff) |
Onda VX747: fix LCD bug by blocking lcd_update_rect() requests
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19200 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c index 0b105b35a4..72c0268af0 100644 --- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c @@ -28,12 +28,14 @@ static volatile bool _lcd_on = false; static volatile bool lcd_poweroff = false; +static struct mutex lcd_mtx; /* LCD init */ void lcd_init_device(void) { lcd_init_controller(); _lcd_on = true; + mutex_init(&lcd_mtx); } void lcd_enable(bool state) @@ -57,6 +59,8 @@ bool lcd_enabled(void) /* Update a fraction of the display. */ void lcd_update_rect(int x, int y, int width, int height) { + mutex_lock(&lcd_mtx); + lcd_set_target(x, y, width, height); REG_DMAC_DCCSR(DMA_LCD_CHANNEL) = 0; @@ -83,6 +87,8 @@ void lcd_update_rect(int x, int y, int width, int height) while(REG_SLCD_STATE & SLCD_STATE_BUSY); REG_SLCD_CTRL = 0; + + mutex_unlock(&lcd_mtx); } /* Update the display. |