summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c37
-rwxr-xr-xfirmware/target/arm/tms320dm320/system-target.h3
2 files changed, 19 insertions, 21 deletions
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
index 54417b0f97..e4b36eb9be 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
@@ -27,6 +27,7 @@
27#include "kernel.h" 27#include "kernel.h"
28#include "memory.h" 28#include "memory.h"
29#include "system-target.h" 29#include "system-target.h"
30#include "lcd-target.h"
30 31
31/* Copies a rectangle from one framebuffer to another. Can be used in 32/* Copies a rectangle from one framebuffer to another. Can be used in
32 single transfer mode with width = num pixels, and height = 1 which 33 single transfer mode with width = num pixels, and height = 1 which
@@ -57,25 +58,25 @@ void lcd_init_device(void)
57 /* Clear the Frame */ 58 /* Clear the Frame */
58 memset16(FRAME, 0x0000, LCD_WIDTH*LCD_HEIGHT); 59 memset16(FRAME, 0x0000, LCD_WIDTH*LCD_HEIGHT);
59 60
60 outw(0x00ff, IO_OSD_MODE); 61 IO_OSD_MODE=0x00ff;
61 outw(0x0002, IO_OSD_VIDWINMD); 62 IO_OSD_VIDWINMD=0x0002;
62 outw(0x2001, IO_OSD_OSDWINMD0); 63 IO_OSD_OSDWINMD0=0x2001;
63 outw(0x0002, IO_OSD_OSDWINMD1); 64 IO_OSD_OSDWINMD1=0x0002;
64 outw(0x0000, IO_OSD_ATRMD); 65 IO_OSD_ATRMD=0x0000;
65 outw(0x0000, IO_OSD_RECTCUR); 66 IO_OSD_RECTCUR=0x0000;
66 67
67 outw((480*2) / 32, IO_OSD_OSDWIN0OFST); 68 IO_OSD_OSDWIN0OFST=(480*2) / 32;
68 addr = ((int)FRAME-CONFIG_SDRAM_START) / 32; 69 addr = ((int)FRAME-CONFIG_SDRAM_START) / 32;
69 outw(addr >> 16, IO_OSD_OSDWINADH); 70 IO_OSD_OSDWINADH=addr >> 16;
70 outw(addr & 0xFFFF, IO_OSD_OSDWIN0ADL); 71 IO_OSD_OSDWIN0ADL=addr & 0xFFFF;
71 72
72 outw(80, IO_OSD_BASEPX); 73 IO_OSD_BASEPX=80;
73 outw(2, IO_OSD_BASEPY); 74 IO_OSD_BASEPY=2;
74 75
75 outw(0, IO_OSD_OSDWIN0XP); 76 IO_OSD_OSDWIN0XP=0;
76 outw(0, IO_OSD_OSDWIN0YP); 77 IO_OSD_OSDWIN0YP=0;
77 outw(480, IO_OSD_OSDWIN0XL); 78 IO_OSD_OSDWIN0XL=480;
78 outw(640, IO_OSD_OSDWIN0YL); 79 IO_OSD_OSDWIN0YL=640;
79} 80}
80 81
81/* Update a fraction of the display. */ 82/* Update a fraction of the display. */
@@ -168,7 +169,7 @@ void lcd_yuv_blit(unsigned char * const src[3],
168{ 169{
169 /* Caches for chroma data so it only need be recaculated every other 170 /* Caches for chroma data so it only need be recaculated every other
170 line */ 171 line */
171/* unsigned char chroma_buf[LCD_HEIGHT/2*3];*/ /* 480 bytes */ 172 unsigned char chroma_buf[LCD_HEIGHT/2*3]; /* 480 bytes */
172 unsigned char const * yuv_src[3]; 173 unsigned char const * yuv_src[3];
173 off_t z; 174 off_t z;
174 175
@@ -188,9 +189,9 @@ void lcd_yuv_blit(unsigned char * const src[3],
188 189
189 do 190 do
190 { 191 {
191/* lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width, 192 lcd_write_yuv420_lines(dst, chroma_buf, yuv_src, width,
192 stride); 193 stride);
193 */ 194
194 yuv_src[0] += stride << 1; /* Skip down two luma lines */ 195 yuv_src[0] += stride << 1; /* Skip down two luma lines */
195 yuv_src[1] += stride >> 1; /* Skip down one chroma line */ 196 yuv_src[1] += stride >> 1; /* Skip down one chroma line */
196 yuv_src[2] += stride >> 1; 197 yuv_src[2] += stride >> 1;
diff --git a/firmware/target/arm/tms320dm320/system-target.h b/firmware/target/arm/tms320dm320/system-target.h
index 7adfda6f7d..065acd722f 100755
--- a/firmware/target/arm/tms320dm320/system-target.h
+++ b/firmware/target/arm/tms320dm320/system-target.h
@@ -26,7 +26,4 @@
26#define CPUFREQ_NORMAL 30000000 26#define CPUFREQ_NORMAL 30000000
27#define CPUFREQ_MAX 80000000 27#define CPUFREQ_MAX 80000000
28 28
29#define inw(p) (*((volatile unsigned short*)((p) + PHY_IO_BASE)))
30#define outw(v,p) (*((volatile unsigned short*)((p) + PHY_IO_BASE)) = (v))
31
32#endif /* SYSTEM_TARGET_H */ 29#endif /* SYSTEM_TARGET_H */