annotate TVout/fbset/modes.y @ 8398:034a576f817f

path fix
author gabucino
date Sat, 07 Dec 2002 20:31:37 +0000
parents 3b5f5d1c5041
children
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 * Linux Frame Buffer Device Configuration
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 * © Copyright 1995-1998 by Geert Uytterhoeven
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 * (Geert.Uytterhoeven@cs.kuleuven.ac.be)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 * --------------------------------------------------------------------------
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8 *
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 * This file is subject to the terms and conditions of the GNU General Public
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 * License. See the file COPYING in the main directory of the Linux
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11 * distribution for more details.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 %{
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 #define YYSTYPE long
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 #include <string.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #include "fb.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #include "fbset.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 extern int yylex(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 extern void yyerror(const char *s);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28 extern int line;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 static struct VideoMode VideoMode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33 static void ClearVideoMode(void)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 memset(&VideoMode, 0, sizeof(VideoMode));
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 VideoMode.accel_flags = FB_ACCELF_TEXT;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 %}
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 %start file
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 %token MODE GEOMETRY TIMINGS HSYNC VSYNC CSYNC GSYNC EXTSYNC BCAST LACED DOUBLE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 RGBA NONSTD ACCEL GRAYSCALE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45 ENDMODE POLARITY BOOLEAN STRING NUMBER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 %%
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49 file : vmodes
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 vmodes : /* empty */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 | vmodes vmode
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 vmode : MODE STRING geometry timings options ENDMODE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 VideoMode.name = (const char *)$2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 AddVideoMode(&VideoMode);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 ClearVideoMode();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 geometry : GEOMETRY NUMBER NUMBER NUMBER NUMBER NUMBER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 ClearVideoMode();
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 VideoMode.xres = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 VideoMode.yres = $3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 VideoMode.vxres = $4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 VideoMode.vyres = $5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 VideoMode.depth = $6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 timings : TIMINGS NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 VideoMode.pixclock = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 VideoMode.left = $3;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 VideoMode.right = $4;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 VideoMode.upper = $5;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 VideoMode.lower = $6;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 VideoMode.hslen = $7;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 VideoMode.vslen = $8;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 options : /* empty */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 | options hsync
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90 | options vsync
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 | options csync
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 | options gsync
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 | options extsync
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 | options bcast
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 | options laced
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 | options double
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 | options rgba
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 | options nonstd
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 | options accel
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 | options grayscale
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 hsync : HSYNC POLARITY
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 VideoMode.hsync = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109 vsync : VSYNC POLARITY
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 VideoMode.vsync = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 csync : CSYNC POLARITY
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 VideoMode.csync = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 gsync : GSYNC POLARITY
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 VideoMode.gsync = $2;
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 extsync : EXTSYNC BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 VideoMode.extsync = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133 bcast : BCAST BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135 VideoMode.bcast = $2;
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 laced : LACED BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 VideoMode.laced = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 double : DOUBLE BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 VideoMode.dblscan = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 rgba : RGBA STRING
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153 makeRGBA(&VideoMode, (const char*)$2);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 nonstd : NONSTD NUMBER
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 VideoMode.nonstd = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 accel : ACCEL BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 VideoMode.accel_flags = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169 grayscale : GRAYSCALE BOOLEAN
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171 VideoMode.grayscale = $2;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173 ;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 %%