diff options
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c index 90ecfc6a3a..af5a132e30 100644 --- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "lcd.h" | 24 | #include "lcd.h" |
25 | #include "lcd-target.h" | 25 | #include "lcd-target.h" |
26 | #include "system-target.h" | 26 | #include "system-target.h" |
27 | #include "kernel.h" | ||
27 | 28 | ||
28 | static volatile bool _lcd_on = false; | 29 | static volatile bool _lcd_on = false; |
29 | static volatile bool lcd_poweroff = false; | 30 | static volatile bool lcd_poweroff = false; |
@@ -70,11 +71,18 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
70 | 71 | ||
71 | __dcache_writeback_all(); /* Size of framebuffer is way bigger than cache size */ | 72 | __dcache_writeback_all(); /* Size of framebuffer is way bigger than cache size */ |
72 | 73 | ||
74 | while(REG_SLCD_STATE & SLCD_STATE_BUSY); | ||
75 | REG_SLCD_CTRL = SLCD_CTRL_DMA_EN; | ||
76 | |||
73 | REG_DMAC_DMACR = DMAC_DMACR_DMAE; | 77 | REG_DMAC_DMACR = DMAC_DMACR_DMAE; |
74 | 78 | ||
75 | while( !(REG_DMAC_DCCSR(0) & DMAC_DCCSR_TT) ) | 79 | while( !(REG_DMAC_DCCSR(0) & DMAC_DCCSR_TT) ) |
76 | asm("nop"); | 80 | yield(); |
81 | |||
82 | REG_DMAC_DMACR = 0; | ||
77 | 83 | ||
84 | while(REG_SLCD_STATE & SLCD_STATE_BUSY); | ||
85 | REG_SLCD_CTRL = 0; | ||
78 | } | 86 | } |
79 | 87 | ||
80 | /* Update the display. | 88 | /* Update the display. |