diff options
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c index 3d93feac04..d9eb3ecdef 100644 --- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | |||
@@ -25,10 +25,9 @@ | |||
25 | #include "lcd-target.h" | 25 | #include "lcd-target.h" |
26 | #include "system.h" | 26 | #include "system.h" |
27 | #include "kernel.h" | 27 | #include "kernel.h" |
28 | #include "backlight-target.h" | ||
29 | 28 | ||
30 | /* | 29 | /* |
31 | Warning: code behaviour is unpredictable when threads get switched in IRQ mode! | 30 | Warning: code behaviour is unpredictable when switch_thread() gets called in IRQ mode! |
32 | So don't update the LCD in an interrupt handler! | 31 | So don't update the LCD in an interrupt handler! |
33 | */ | 32 | */ |
34 | 33 | ||
@@ -42,6 +41,7 @@ void lcd_init_device(void) | |||
42 | __cpm_start_lcd(); | 41 | __cpm_start_lcd(); |
43 | lcd_init_controller(); | 42 | lcd_init_controller(); |
44 | __cpm_stop_lcd(); | 43 | __cpm_stop_lcd(); |
44 | |||
45 | lcd_is_on = true; | 45 | lcd_is_on = true; |
46 | mutex_init(&lcd_mtx); | 46 | mutex_init(&lcd_mtx); |
47 | wakeup_init(&lcd_wkup); | 47 | wakeup_init(&lcd_wkup); |
@@ -71,7 +71,7 @@ bool lcd_enabled(void) | |||
71 | /* Update a fraction of the display. */ | 71 | /* Update a fraction of the display. */ |
72 | void lcd_update_rect(int x, int y, int width, int height) | 72 | void lcd_update_rect(int x, int y, int width, int height) |
73 | { | 73 | { |
74 | x=0;y=0;width=LCD_WIDTH;height=LCD_HEIGHT; | 74 | x=0;y=0;width=LCD_WIDTH;height=LCD_HEIGHT; /* HACK! */ |
75 | mutex_lock(&lcd_mtx); | 75 | mutex_lock(&lcd_mtx); |
76 | 76 | ||
77 | __cpm_start_lcd(); | 77 | __cpm_start_lcd(); |
@@ -133,12 +133,13 @@ void DMA_CALLBACK(DMA_LCD_CHANNEL)(void) | |||
133 | This must be called after all other LCD functions that change the display. */ | 133 | This must be called after all other LCD functions that change the display. */ |
134 | void lcd_update(void) | 134 | void lcd_update(void) |
135 | { | 135 | { |
136 | if (!lcd_is_on || !backlight_enabled()) | 136 | if(!lcd_is_on) |
137 | return; | 137 | return; |
138 | 138 | ||
139 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); | 139 | lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT); |
140 | } | 140 | } |
141 | 141 | ||
142 | /* TODO: use IPU */ | ||
142 | void lcd_blit_yuv(unsigned char * const src[3], | 143 | void lcd_blit_yuv(unsigned char * const src[3], |
143 | int src_x, int src_y, int stride, | 144 | int src_x, int src_y, int stride, |
144 | int x, int y, int width, int height) | 145 | int x, int y, int width, int height) |