annotate drivers/mga_vid_test.c @ 2917:3dd4e8a45d0d

double buffering. But problems are still there
author nick
date Thu, 15 Nov 2001 17:29:52 +0000
parents 76ca00724e12
children aee789fa2d07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
1 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 * mga_vid_test.c
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 * Sept 1999
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 * This software has been released under the terms of the GNU Public
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * license. See http://www.gnu.org/copyleft/gpl.html for details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 //#include <stddef.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 #include <sys/ioctl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #include <unistd.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 #include <fcntl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #include <sys/mman.h>
854
76ca00724e12 gcc warnings fixed - patch by Aelius aelius@wish.net
arpi_esp
parents: 76
diff changeset
19 #include <inttypes.h>
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #include "mga_vid.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 mga_vid_config_t config;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 uint8_t *mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 uint32_t is_g400;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #define SRC_IMAGE_WIDTH 256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define SRC_IMAGE_HEIGHT 256
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 uint8_t y_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 uint8_t cr_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 uint8_t cb_image[SRC_IMAGE_WIDTH * SRC_IMAGE_HEIGHT];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 write_frame_g200(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 uint8_t *dest;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 uint32_t bespitch,h,w;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 dest = mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 bespitch = (config.src_width + 31) & ~31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 for(h=0; h < config.src_height; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 memcpy(dest, y, config.src_width);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 y += config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 dest += bespitch;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 for(w=0; w < config.src_width/2; w++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 *dest++ = *cb++;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 *dest++ = *cr++;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 dest += bespitch - config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 write_frame_g400(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 uint8_t *dest;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 uint32_t bespitch,h;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 dest = mga_vid_base;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 bespitch = (config.src_width + 31) & ~31;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 for(h=0; h < config.src_height; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 memcpy(dest, y, config.src_width);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 y += config.src_width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 dest += bespitch;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 memcpy(dest, cb, config.src_width/2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 cb += config.src_width/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 dest += bespitch/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 for(h=0; h < config.src_height/2; h++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 memcpy(dest, cr, config.src_width/2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 cr += config.src_width/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 dest += bespitch/2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 void write_frame(uint8_t *y,uint8_t *cr, uint8_t *cb)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 if(is_g400)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 write_frame_g400(y,cr,cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 write_frame_g200(y,cr,cb);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 draw_cool_pattern(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 int i,x,y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 for (y=0; y<config.src_height; y++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 for (x=0; x<config.src_width; x++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 y_image[i++] = x*x/2 + y*y/2 - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 cr_image[i++] = x - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 cb_image[i++] = y - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 void
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 draw_color_blend(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 int i,x,y;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 for (y=0; y<config.src_height; y++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134 for (x=0; x<config.src_width; x++) {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 y_image[i++] = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 cr_image[i++] = x - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 i = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 for (y=0; y<config.src_height/2; y++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 for (x=0; x<config.src_width/2; x++)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 cb_image[i++] = y - 128;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 int
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 main(int argc, char *argv[])
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 int f;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 f = open("/dev/mga_vid",O_RDWR);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 if(f == -1)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 fprintf(stderr,"Couldn't open driver\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 exit(1);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167
76
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
168 config.version = MGA_VID_VERSION;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 config.src_width = SRC_IMAGE_WIDTH;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 config.src_height= SRC_IMAGE_HEIGHT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 config.dest_width = SRC_IMAGE_WIDTH;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 config.dest_height = SRC_IMAGE_HEIGHT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 config.x_org= 10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 config.y_org= 10;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 config.colkey_on = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176 config.format = MGA_VID_FORMAT_YV12;
76
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
177 config.frame_size=SRC_IMAGE_WIDTH*SRC_IMAGE_HEIGHT*2;
d95acdc18f38 updated to be compatible with new mga_vid.o
arpi_esp
parents: 1
diff changeset
178 config.num_frames=1;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 if (ioctl(f,MGA_VID_CONFIG,&config))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 perror("Error in config ioctl");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185 if (config.card_type == MGA_G200)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 printf("Testing MGA G200 Backend Scaler with %d MB of RAM\n", config.ram_size);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 is_g400 = 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 printf("Testing MGA G400 Backend Scaler with %d MB of RAM\n", config.ram_size);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 is_g400 = 1;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 ioctl(f,MGA_VID_ON,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 mga_vid_base = (uint8_t*)mmap(0,256 * 4096,PROT_WRITE,MAP_SHARED,f,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 printf("mga_vid_base = %8p\n",mga_vid_base);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
199
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
200
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
201 //memset(y_image,80,256 * 128);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 //memset(cr_image,80,256/2 * 20);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 //memset(cb_image,80,256/2 * 20);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205 printf("(1) There should be a green square, offset by 10 pixels from\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 " the upper left corner displayed\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 draw_cool_pattern();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 printf("(2) There should be a cool mosaic like pattern now.\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215 draw_color_blend();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 write_frame(y_image,cr_image,cb_image);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217 printf("(3) There should be a color blend with black, red, purple, blue\n"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 " corners (starting top left going CW)\n");
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219 sleep(3);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221 ioctl(f,MGA_VID_OFF,0);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223 close(f);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224 return 0;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225 }