annotate TVout/matroxset/fb.h @ 11645:3837fd1bfa5b

mmx optimizations
author rfelker
date Mon, 15 Dec 2003 04:07:17 +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 #ifndef _LINUX_FB_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
2 #define _LINUX_FB_H
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
4 #include <linux/tty.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
5 #include <asm/types.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
6
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
7 /* Definitions of frame buffers */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
8
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
9 #define FB_MAJOR 29
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
10 #define FB_MAX 32 /* sufficient for now */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
11
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
12 /* ioctls
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
13 0x46 is 'F' */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
14 #define FBIOGET_VSCREENINFO 0x4600
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
15 #define FBIOPUT_VSCREENINFO 0x4601
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
16 #define FBIOGET_FSCREENINFO 0x4602
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
17 #define FBIOGETCMAP 0x4604
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
18 #define FBIOPUTCMAP 0x4605
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
19 #define FBIOPAN_DISPLAY 0x4606
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
20 /* 0x4607-0x460B are defined below */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
21 /* #define FBIOGET_MONITORSPEC 0x460C */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22 /* #define FBIOPUT_MONITORSPEC 0x460D */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 /* #define FBIOSWITCH_MONIBIT 0x460E */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #define FBIOGET_CON2FBMAP 0x460F
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #define FBIOPUT_CON2FBMAP 0x4610
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26 #define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank)
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
28
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 /* next 2 lines are temporary solution, support in 2.5 will be different */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
30 #define FBIOGET_VT_VSCREENINFO 0x4680
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #define FBIOPUT_VT_VSCREENINFO 0x4681
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 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 #define FB_TYPE_PLANES 1 /* Non interleaved planes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 #define FB_TYPE_TEXT 3 /* Text/attributes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38 #define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40 #define FB_AUX_TEXT_MDA 0 /* Monochrome text */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 #define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44 #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
45
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
46 #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
47 #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
48 #define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
49
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
50 #define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
51 #define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
52 #define FB_VISUAL_TRUECOLOR 2 /* True color */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
53 #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
54 #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
55 #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
56
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
57 #define FB_ACCEL_NONE 0 /* no hardware accelerator */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
58 #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
59 #define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
60 #define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
61 #define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
62 #define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
63 #define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 #define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65 #define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
66 #define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
67 #define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
68 #define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
69 #define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
70 #define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71 #define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
72 #define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
73 #define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74 #define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
75 #define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76 #define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
77 #define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
78 #define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
79 #define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
80 #define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
81 #define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82 #define FB_ACCEL_SUN_TCX 25 /* Sun tcx */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
83 #define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 #define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
85 #define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
86 #define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
87 #define FB_ACCEL_CT_6555x 30 /* C&T 6555x */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
88 #define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
89 #define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
90
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 struct fb_fix_screeninfo {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92 char id[16]; /* identification string eg "TT Builtin" */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
93 unsigned long smem_start; /* Start of frame buffer mem */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 /* (physical address) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
95 __u32 smem_len; /* Length of frame buffer mem */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
96 __u32 type; /* see FB_TYPE_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
97 __u32 type_aux; /* Interleave for interleaved Planes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
98 __u32 visual; /* see FB_VISUAL_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
99 __u16 xpanstep; /* zero if no hardware panning */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
100 __u16 ypanstep; /* zero if no hardware panning */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 __u16 ywrapstep; /* zero if no hardware ywrap */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102 __u32 line_length; /* length of a line in bytes */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
103 unsigned long mmio_start; /* Start of Memory Mapped I/O */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
104 /* (physical address) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
105 __u32 mmio_len; /* Length of Memory Mapped I/O */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
106 __u32 accel; /* Type of acceleration available */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
107 __u16 reserved[3]; /* Reserved for future compatibility */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
108 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
109
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
110 /* Interpretation of offset for color fields: All offsets are from the right,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
111 * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
112 * can use the offset as right argument to <<). A pixel afterwards is a bit
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
113 * stream and is written to video memory as that unmodified. This implies
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
114 * big-endian byte order if bits_per_pixel is greater than 8.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
115 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
116 struct fb_bitfield {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
117 __u32 offset; /* beginning of bitfield */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118 __u32 length; /* length of bitfield */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
119 __u32 msb_right; /* != 0 : Most significant bit is */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
120 /* right */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
121 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
123 #define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
124
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
125 #define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
126 #define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
127 #define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
128 #define FB_ACTIVATE_MASK 15
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129 /* values */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
130 #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
131 #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132 #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
133
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
134 #define FB_ACCELF_TEXT 1 /* text mode acceleration */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
135
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
136 #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
137 #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
138 #define FB_SYNC_EXT 4 /* external sync */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
139 #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
140 #define FB_SYNC_BROADCAST 16 /* broadcast video timings */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
141 /* vtotal = 144d/288n/576i => PAL */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
142 /* vtotal = 121d/242n/484i => NTSC */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
143 #define FB_SYNC_ON_GREEN 32 /* sync on green */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
144
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
145 #define FB_VMODE_NONINTERLACED 0 /* non interlaced */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
146 #define FB_VMODE_INTERLACED 1 /* interlaced */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
147 #define FB_VMODE_DOUBLE 2 /* double scan */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
148 #define FB_VMODE_MASK 255
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
149
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
150 #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
151 #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
152 #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
153
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
154 struct fb_var_screeninfo {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
155 __u32 xres; /* visible resolution */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
156 __u32 yres;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157 __u32 xres_virtual; /* virtual resolution */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
158 __u32 yres_virtual;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159 __u32 xoffset; /* offset from virtual to visible */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
160 __u32 yoffset; /* resolution */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
161
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
162 __u32 bits_per_pixel; /* guess what */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
163 __u32 grayscale; /* != 0 Graylevels instead of colors */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
164
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
165 struct fb_bitfield red; /* bitfield in fb mem if true color, */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
166 struct fb_bitfield green; /* else only length is significant */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
167 struct fb_bitfield blue;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
168 struct fb_bitfield transp; /* transparency */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
169
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170 __u32 nonstd; /* != 0 Non standard pixel format */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
171
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
172 __u32 activate; /* see FB_ACTIVATE_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
173
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
174 __u32 height; /* height of picture in mm */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
175 __u32 width; /* width of picture in mm */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
176
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
177 __u32 accel_flags; /* acceleration flags (hints) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
178
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
179 /* Timing: All values in pixclocks, except pixclock (of course) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
180 __u32 pixclock; /* pixel clock in ps (pico seconds) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
181 __u32 left_margin; /* time from sync to picture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
182 __u32 right_margin; /* time from picture to sync */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
183 __u32 upper_margin; /* time from sync to picture */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
184 __u32 lower_margin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
185 __u32 hsync_len; /* length of horizontal sync */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
186 __u32 vsync_len; /* length of vertical sync */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 __u32 sync; /* see FB_SYNC_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188 __u32 vmode; /* see FB_VMODE_* */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
189 __u32 reserved[6]; /* Reserved for future compatibility */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
190 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
191
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
192 struct fb_cmap {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
193 __u32 start; /* First entry */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
194 __u32 len; /* Number of entries */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
195 __u16 *red; /* Red values */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
196 __u16 *green;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 __u16 *blue;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
198 __u16 *transp; /* transparency, can be NULL */
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 struct fb_con2fbmap {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
202 __u32 console;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
203 __u32 framebuffer;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
204 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
205
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
206 /* VESA Blanking Levels */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
207 #define VESA_NO_BLANKING 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
208 #define VESA_VSYNC_SUSPEND 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
209 #define VESA_HSYNC_SUSPEND 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
210 #define VESA_POWERDOWN 3
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
211
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
212 struct fb_monspecs {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
213 __u32 hfmin; /* hfreq lower limit (Hz) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
214 __u32 hfmax; /* hfreq upper limit (Hz) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
215 __u16 vfmin; /* vfreq lower limit (Hz) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
216 __u16 vfmax; /* vfreq upper limit (Hz) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
217 unsigned dpms : 1; /* supports DPMS */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
218 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
219
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
220 /* next structure is only 2.2 temporary hack, 2.3 solution will be different */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
221 struct fb_vt_info {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
222 __u32 console;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
223 struct fb_var_screeninfo *info;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
224 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
225
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
226 #define FB_VBLANK_VBLANKING 1 /* currently in a vertical blank */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
227 #define FB_VBLANK_HBLANKING 2 /* currently in a horizontal blank */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
228 #define FB_VBLANK_HAVE_VBLANK 4 /* vertical blanks can be detected */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
229 #define FB_VBLANK_HAVE_HBLANK 8 /* horizontal blanks can be detected */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
230 #define FB_VBLANK_HAVE_COUNT 16 /* global retrace counter is available */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
231 #define FB_VBLANK_HAVE_VCOUNT 32 /* the vcount field is valid */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
232 #define FB_VBLANK_HAVE_HCOUNT 64 /* the hcount field is valid */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
233
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
234 struct fb_vblank {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
235 __u32 flags; /* FB_VBLANK flags */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
236 __u32 count; /* counter of retraces since boot */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
237 __s32 vcount; /* current scanline position */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
238 __s32 hcount; /* current scandot position */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
239 __u32 reserved[4]; /* reserved for future compatibility */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
240 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
241
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
242 #ifdef __KERNEL__
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
243
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
244 #if 1 /* to go away in 2.4.0 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
245 extern int GET_FB_IDX(kdev_t rdev);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
246 #else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
247 #define GET_FB_IDX(node) (MINOR(node))
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
248 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
249
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
250 #include <linux/fs.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
251 #include <linux/init.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
252
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
253
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
254 struct fb_info;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
255 struct fb_info_gen;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
256 struct vm_area_struct;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
257 struct file;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
258
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
259 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
260 * Frame buffer operations
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
261 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
262
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
263 struct fb_ops {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
264 /* open/release and usage marking */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
265 int (*fb_open)(struct fb_info *info, int user);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
266 int (*fb_release)(struct fb_info *info, int user);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
267 /* get non settable parameters */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
268 int (*fb_get_fix)(struct fb_fix_screeninfo *fix, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
269 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
270 /* get settable parameters */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
271 int (*fb_get_var)(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
272 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
273 /* set settable parameters */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
274 int (*fb_set_var)(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
275 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
276 /* get colormap */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
277 int (*fb_get_cmap)(struct fb_cmap *cmap, int kspc, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
278 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
279 /* set colormap */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
280 int (*fb_set_cmap)(struct fb_cmap *cmap, int kspc, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
281 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
282 /* pan display */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
283 int (*fb_pan_display)(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
284 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
285 /* perform fb specific ioctl */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
286 int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
287 unsigned long arg, int con, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
288 /* perform fb specific mmap */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
289 int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
290 /* switch to/from raster image mode */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
291 int (*fb_rasterimg)(struct fb_info *info, int start);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
292 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
293
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
294 struct fb_info {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
295 char modename[40]; /* default video mode */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
296 kdev_t node;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
297 int flags;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
298 int open; /* Has this been open already ? */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
299 #define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
300 struct fb_fix_screeninfo fix; /* Current fix */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
301 struct fb_monspecs monspecs; /* Current Monitor specs */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
302 struct fb_ops *fbops;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
303 char *screen_base; /* Virtual address */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
304 struct display *disp; /* initial display variable */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
305 struct display *currcon;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
306 struct vc_data *display_fg; /* Console visible on this display */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
307 char fontname[40]; /* default font name */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
308 int (*changevar)(int); /* tell console var has changed */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
309 int (*switch_con)(int, struct fb_info*);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
310 /* tell fb to switch consoles */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
311 int (*updatevar)(int, struct fb_info*);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
312 /* tell fb to update the vars */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
313 void (*blank)(int, struct fb_info*); /* tell fb to (un)blank the screen */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
314 /* arg = 0: unblank */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
315 /* arg > 0: VESA level (arg-1) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
316 void *pseudo_palette; /* Fake palette of 16 colors and
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
317 the cursor's color for non
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
318 palette mode */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
319 /* From here on everything is device dependent */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
320 void *par;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
321 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
322
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
323 #ifdef MODULE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
324 #define FBINFO_FLAG_DEFAULT FBINFO_FLAG_MODULE
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
325 #else
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
326 #define FBINFO_FLAG_DEFAULT 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
327 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
328
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
329 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
330 * This structure abstracts from the underlying hardware. It is not
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
331 * mandatory but used by the `generic' frame buffer operations.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
332 * Read drivers/video/skeletonfb.c for more information.
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
333 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
334
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
335 struct fbgen_hwswitch {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
336 void (*detect)(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
337 int (*encode_fix)(struct fb_fix_screeninfo *fix, const void *par,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
338 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
339 int (*decode_var)(const struct fb_var_screeninfo *var, void *par,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
340 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
341 int (*encode_var)(struct fb_var_screeninfo *var, const void *par,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
342 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
343 void (*get_par)(void *par, struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
344 void (*set_par)(const void *par, struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
345 int (*getcolreg)(unsigned regno, unsigned *red, unsigned *green,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
346 unsigned *blue, unsigned *transp, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
347 int (*setcolreg)(unsigned regno, unsigned red, unsigned green,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
348 unsigned blue, unsigned transp, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
349 int (*pan_display)(const struct fb_var_screeninfo *var,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
350 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
351 int (*blank)(int blank_mode, struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
352 void (*set_disp)(const void *par, struct display *disp,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
353 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
354 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
355
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
356 struct fb_info_gen {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
357 struct fb_info info;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
358
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
359 /* Entries for a generic frame buffer device */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
360 /* Yes, this starts looking like C++ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
361 u_int parsize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
362 struct fbgen_hwswitch *fbhw;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
363
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
364 /* From here on everything is device dependent */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
365 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
366
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
367 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
368 * `Generic' versions of the frame buffer device operations
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
369 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
370
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
371 extern int fbgen_get_fix(struct fb_fix_screeninfo *fix, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
372 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
373 extern int fbgen_get_var(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
374 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
375 extern int fbgen_set_var(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
376 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
377 extern int fbgen_get_cmap(struct fb_cmap *cmap, int kspc, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
378 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
379 extern int fbgen_set_cmap(struct fb_cmap *cmap, int kspc, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
380 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
381 extern int fbgen_pan_display(struct fb_var_screeninfo *var, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
382 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
383 extern int fbgen_ioctl(struct inode *inode, struct file *file,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
384 unsigned int cmd, unsigned long arg, int con,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
385 struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
386
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
387 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
388 * Helper functions
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
389 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
390
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
391 extern int fbgen_do_set_var(struct fb_var_screeninfo *var, int isactive,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
392 struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
393 extern void fbgen_set_disp(int con, struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
394 extern void fbgen_install_cmap(int con, struct fb_info_gen *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
395 extern int fbgen_update_var(int con, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
396 extern int fbgen_switch(int con, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
397 extern void fbgen_blank(int blank, struct fb_info *info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
398
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
399
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
400 /* drivers/video/fbmem.c */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
401 extern int register_framebuffer(struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
402 extern int unregister_framebuffer(const struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
403
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
404 extern int num_registered_fb;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
405 extern struct fb_info *registered_fb[FB_MAX];
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
406
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
407 /* drivers/video/fbmon.c */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
408 extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
409 const struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
410 extern int fbmon_dpms(const struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
411
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
412 /* drivers/video/fbcmap.c */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
413 extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
414 extern void fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
415 int fsfromto);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
416 extern int fb_get_cmap(struct fb_cmap *cmap, int kspc,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
417 int (*getcolreg)(u_int, u_int *, u_int *, u_int *,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
418 u_int *, struct fb_info *),
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
419 struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
420 extern int fb_set_cmap(struct fb_cmap *cmap, int kspc,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
421 int (*setcolreg)(u_int, u_int, u_int, u_int, u_int,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
422 struct fb_info *),
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
423 struct fb_info *fb_info);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
424 extern struct fb_cmap *fb_default_cmap(int len);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
425 extern void fb_invert_cmaps(void);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
426
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
427 struct fb_videomode {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
428 const char *name; /* optional */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
429 u32 refresh; /* optional */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
430 u32 xres;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
431 u32 yres;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
432 u32 pixclock;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
433 u32 left_margin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
434 u32 right_margin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
435 u32 upper_margin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
436 u32 lower_margin;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
437 u32 hsync_len;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
438 u32 vsync_len;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
439 u32 sync;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
440 u32 vmode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
441 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
442
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
443 extern int __init fb_find_mode(struct fb_var_screeninfo *var,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
444 struct fb_info *info, const char *mode_option,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
445 const struct fb_videomode *db,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
446 unsigned int dbsize,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
447 const struct fb_videomode *default_mode,
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
448 unsigned int default_bpp);
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
449
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
450 #endif /* __KERNEL__ */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
451
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
452 #if 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
453
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
454 #define FBCMD_GET_CURRENTPAR 0xDEAD0005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
455 #define FBCMD_SET_CURRENTPAR 0xDEAD8005
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
456
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
457 #endif
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
458
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
459
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
460 #if 1 /* Preliminary */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
461
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
462 /*
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
463 * Hardware Cursor
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
464 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
465
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
466 #define FBIOGET_FCURSORINFO 0x4607
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
467 #define FBIOGET_VCURSORINFO 0x4608
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
468 #define FBIOPUT_VCURSORINFO 0x4609
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
469 #define FBIOGET_CURSORSTATE 0x460A
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
470 #define FBIOPUT_CURSORSTATE 0x460B
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
471
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
472
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
473 struct fb_fix_cursorinfo {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
474 __u16 crsr_width; /* width and height of the cursor in */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
475 __u16 crsr_height; /* pixels (zero if no cursor) */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
476 __u16 crsr_xsize; /* cursor size in display pixels */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
477 __u16 crsr_ysize;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
478 __u16 crsr_color1; /* colormap entry for cursor color1 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
479 __u16 crsr_color2; /* colormap entry for cursor color2 */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
480 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
481
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
482 struct fb_var_cursorinfo {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
483 __u16 width;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
484 __u16 height;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
485 __u16 xspot;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
486 __u16 yspot;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
487 __u8 data[1]; /* field with [height][width] */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
488 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
489
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
490 struct fb_cursorstate {
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
491 __s16 xoffset;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
492 __s16 yoffset;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
493 __u16 mode;
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
494 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
495
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
496 #define FB_CURSOR_OFF 0
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
497 #define FB_CURSOR_ON 1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
498 #define FB_CURSOR_FLASH 2
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
499
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
500 #endif /* Preliminary */
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
501
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
502 #endif /* _LINUX_FB_H */