diff options
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | 18 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/system-target.h | 2 |
2 files changed, 6 insertions, 14 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c index 907351c64e..5a3eedf65c 100644 --- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c +++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c | |||
@@ -49,29 +49,19 @@ bool lcd_enabled(void) | |||
49 | return _lcd_on; | 49 | return _lcd_on; |
50 | } | 50 | } |
51 | 51 | ||
52 | void lcd_copy_buffer_rect(fb_data* dest, fb_data* src, int width, int height) | ||
53 | { | ||
54 | int i; | ||
55 | for(i=0; i<width*height; i++) | ||
56 | *dest++ = *src++; | ||
57 | } | ||
58 | |||
59 | #define LCDADDR(x, y) ((unsigned int)&lcd_framebuffer[(y)][(x)]) | ||
60 | #define LCD_UNCACHED(addr) ((unsigned int)(addr) | 0xA0000000) | ||
61 | |||
62 | /* Update a fraction of the display. */ | 52 | /* Update a fraction of the display. */ |
63 | void lcd_update_rect(int x, int y, int width, int height) | 53 | void lcd_update_rect(int x, int y, int width, int height) |
64 | { | 54 | { |
65 | /* HACKY... */ | 55 | /* STILL HACKY... */ |
66 | x=0; y=0; width=400; height=240; | 56 | x=0; y=0; width=400; height=240; |
67 | 57 | ||
68 | lcd_set_target(x, y, width-1, height-1); | 58 | lcd_set_target(x, y, width-1, height-1); |
69 | 59 | ||
70 | REG_DMAC_DCCSR(0) = 0; | 60 | REG_DMAC_DCCSR(0) = 0; |
71 | REG_DMAC_DRSR(0) = DMAC_DRSR_RS_SLCD; /* source = SLCD */ | 61 | REG_DMAC_DRSR(0) = DMAC_DRSR_RS_SLCD; /* source = SLCD */ |
72 | REG_DMAC_DSAR(0) = LCDADDR(x, y) & 0x1FFFFFFF; | 62 | REG_DMAC_DSAR(0) = ((unsigned int)&lcd_framebuffer[y][x]) & 0x1FFFFFFF; |
73 | #if 0 | 63 | #if 0 |
74 | REG_DMAC_DTAR(0) = LCD_UNCACHED(SLCD_FIFO); | 64 | REG_DMAC_DTAR(0) = UNCACHED_ADDRESS(SLCD_FIFO); |
75 | #else | 65 | #else |
76 | REG_DMAC_DTAR(0) = 0x130500B0; /* SLCD_FIFO */ | 66 | REG_DMAC_DTAR(0) = 0x130500B0; /* SLCD_FIFO */ |
77 | #endif | 67 | #endif |
@@ -87,7 +77,7 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
87 | 77 | ||
88 | while( !(REG_DMAC_DCCSR(0) & DMAC_DCCSR_TT) ) | 78 | while( !(REG_DMAC_DCCSR(0) & DMAC_DCCSR_TT) ) |
89 | asm("nop"); | 79 | asm("nop"); |
90 | //REG_DMAC_DCCSR(0) &= ~DMAC_DCCSR_TT; | 80 | |
91 | } | 81 | } |
92 | 82 | ||
93 | /* Update the display. | 83 | /* Update the display. |
diff --git a/firmware/target/mips/ingenic_jz47xx/system-target.h b/firmware/target/mips/ingenic_jz47xx/system-target.h index 2fff6423b9..a84a99173a 100644 --- a/firmware/target/mips/ingenic_jz47xx/system-target.h +++ b/firmware/target/mips/ingenic_jz47xx/system-target.h | |||
@@ -101,3 +101,5 @@ static inline void restore_interrupt(int status) | |||
101 | 101 | ||
102 | void sti(void); | 102 | void sti(void); |
103 | void cli(void); | 103 | void cli(void); |
104 | |||
105 | #define UNCACHED_ADDRESS(addr) ((unsigned int)(addr) | 0xA0000000) | ||