comparison libvo/vo_s3fb.c @ 30556:358ac046eccc

libvo: Mark functions not used outside of their files as static.
author diego
date Tue, 16 Feb 2010 16:22:17 +0000
parents 0f1b5b68af32
children fbe5c829c69b
comparison
equal deleted inserted replaced
30555:ad6740b58b0d 30556:358ac046eccc
103 #define S3V_MMIO_REGSIZE 0x8000 /* 32KB */ 103 #define S3V_MMIO_REGSIZE 0x8000 /* 32KB */
104 #define S3_NEWMMIO_VGABASE (S3_NEWMMIO_REGBASE + 0x8000) 104 #define S3_NEWMMIO_VGABASE (S3_NEWMMIO_REGBASE + 0x8000)
105 105
106 #define OUTREG(mmreg, value) *(unsigned int *)(&v->mmio[mmreg]) = value 106 #define OUTREG(mmreg, value) *(unsigned int *)(&v->mmio[mmreg]) = value
107 107
108 int readcrtc(int reg) { 108 static int readcrtc(int reg)
109 {
109 outb(reg, 0x3d4); 110 outb(reg, 0x3d4);
110 return inb(0x3d5); 111 return inb(0x3d5);
111 } 112 }
112 113
113 void writecrtc(int reg, int value) { 114 static void writecrtc(int reg, int value)
115 {
114 outb(reg, 0x3d4); 116 outb(reg, 0x3d4);
115 outb(value, 0x3d5); 117 outb(value, 0x3d5);
116 } 118 }
117 119
118 // enable S3 registers 120 // enable S3 registers
119 int enable(void) { 121 static int enable(void)
122 {
120 int fd; 123 int fd;
121 124
122 if (v) 125 if (v)
123 return 1; 126 return 1;
124 errno = 0; 127 errno = 0;
146 v = NULL; 149 v = NULL;
147 } 150 }
148 return 0; 151 return 0;
149 } 152 }
150 153
151 void disable(void) { 154 static void disable(void)
155 {
152 if (v) { 156 if (v) {
153 writecrtc(0x53, v->cr53); 157 writecrtc(0x53, v->cr53);
154 writecrtc(0x39, v->cr39); 158 writecrtc(0x39, v->cr39);
155 writecrtc(0x38, v->cr38); 159 writecrtc(0x38, v->cr38);
156 ioperm(0x3d4, 2, 0); 160 ioperm(0x3d4, 2, 0);
158 free(v); 162 free(v);
159 v = NULL; 163 v = NULL;
160 } 164 }
161 } 165 }
162 166
163 int yuv_on(int format, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int crop, int xres, int yres, int line_length, int offset) { 167 static int yuv_on(int format, int src_w, int src_h, int dst_x, int dst_y,
168 int dst_w, int dst_h, int crop, int xres, int yres,
169 int line_length, int offset)
170 {
164 int tmp, pitch, start, src_wc, src_hc, bpp; 171 int tmp, pitch, start, src_wc, src_hc, bpp;
165 172
166 if (format == 0 || format == 7) 173 if (format == 0 || format == 7)
167 bpp = 4; 174 bpp = 4;
168 else if (format == 6) 175 else if (format == 6)
225 writecrtc(0x67, readcrtc(0x67) | 0x4); 232 writecrtc(0x67, readcrtc(0x67) | 0x4);
226 233
227 return offset; 234 return offset;
228 } 235 }
229 236
230 void yuv_off(void) { 237 static void yuv_off(void)
238 {
231 writecrtc(0x67, readcrtc(0x67) & ~0xc); 239 writecrtc(0x67, readcrtc(0x67) & ~0xc);
232 memset(v->mmio + 0x8180, 0, 0x80); 240 memset(v->mmio + 0x8180, 0, 0x80);
233 OUTREG(0x81b8, 0x900); 241 OUTREG(0x81b8, 0x900);
234 OUTREG(0x81bc, 0x900); 242 OUTREG(0x81bc, 0x900);
235 OUTREG(0x81c8, 0x900); 243 OUTREG(0x81c8, 0x900);