1/**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 **************************************************************************** 11 ****************************************************************************/ 12#ifndef _LINUX_FB_H 13#define _LINUX_FB_H 14 15#include <asm/types.h> 16 17#define FB_MAJOR 29 18#define FB_MAX 32 19 20#define FBIOGET_VSCREENINFO 0x4600 21#define FBIOPUT_VSCREENINFO 0x4601 22#define FBIOGET_FSCREENINFO 0x4602 23#define FBIOGETCMAP 0x4604 24#define FBIOPUTCMAP 0x4605 25#define FBIOPAN_DISPLAY 0x4606 26#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) 27 28#define FBIOGET_CON2FBMAP 0x460F 29#define FBIOPUT_CON2FBMAP 0x4610 30#define FBIOBLANK 0x4611 31#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank) 32#define FBIO_ALLOC 0x4613 33#define FBIO_FREE 0x4614 34#define FBIOGET_GLYPH 0x4615 35#define FBIOGET_HWCINFO 0x4616 36#define FBIOPUT_MODEINFO 0x4617 37#define FBIOGET_DISPINFO 0x4618 38 39#define FB_TYPE_PACKED_PIXELS 0 40#define FB_TYPE_PLANES 1 41#define FB_TYPE_INTERLEAVED_PLANES 2 42#define FB_TYPE_TEXT 3 43#define FB_TYPE_VGA_PLANES 4 44 45#define FB_AUX_TEXT_MDA 0 46#define FB_AUX_TEXT_CGA 1 47#define FB_AUX_TEXT_S3_MMIO 2 48#define FB_AUX_TEXT_MGA_STEP16 3 49#define FB_AUX_TEXT_MGA_STEP8 4 50 51#define FB_AUX_VGA_PLANES_VGA4 0 52#define FB_AUX_VGA_PLANES_CFB4 1 53#define FB_AUX_VGA_PLANES_CFB8 2 54 55#define FB_VISUAL_MONO01 0 56#define FB_VISUAL_MONO10 1 57#define FB_VISUAL_TRUECOLOR 2 58#define FB_VISUAL_PSEUDOCOLOR 3 59#define FB_VISUAL_DIRECTCOLOR 4 60#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 61 62#define FB_ACCEL_NONE 0 63#define FB_ACCEL_ATARIBLITT 1 64#define FB_ACCEL_AMIGABLITT 2 65#define FB_ACCEL_S3_TRIO64 3 66#define FB_ACCEL_NCR_77C32BLT 4 67#define FB_ACCEL_S3_VIRGE 5 68#define FB_ACCEL_ATI_MACH64GX 6 69#define FB_ACCEL_DEC_TGA 7 70#define FB_ACCEL_ATI_MACH64CT 8 71#define FB_ACCEL_ATI_MACH64VT 9 72#define FB_ACCEL_ATI_MACH64GT 10 73#define FB_ACCEL_SUN_CREATOR 11 74#define FB_ACCEL_SUN_CGSIX 12 75#define FB_ACCEL_SUN_LEO 13 76#define FB_ACCEL_IMS_TWINTURBO 14 77#define FB_ACCEL_3DLABS_PERMEDIA2 15 78#define FB_ACCEL_MATROX_MGA2064W 16 79#define FB_ACCEL_MATROX_MGA1064SG 17 80#define FB_ACCEL_MATROX_MGA2164W 18 81#define FB_ACCEL_MATROX_MGA2164W_AGP 19 82#define FB_ACCEL_MATROX_MGAG100 20 83#define FB_ACCEL_MATROX_MGAG200 21 84#define FB_ACCEL_SUN_CG14 22 85#define FB_ACCEL_SUN_BWTWO 23 86#define FB_ACCEL_SUN_CGTHREE 24 87#define FB_ACCEL_SUN_TCX 25 88#define FB_ACCEL_MATROX_MGAG400 26 89#define FB_ACCEL_NV3 27 90#define FB_ACCEL_NV4 28 91#define FB_ACCEL_NV5 29 92#define FB_ACCEL_CT_6555x 30 93#define FB_ACCEL_3DFX_BANSHEE 31 94#define FB_ACCEL_ATI_RAGE128 32 95#define FB_ACCEL_IGS_CYBER2000 33 96#define FB_ACCEL_IGS_CYBER2010 34 97#define FB_ACCEL_IGS_CYBER5000 35 98#define FB_ACCEL_SIS_GLAMOUR 36 99#define FB_ACCEL_3DLABS_PERMEDIA3 37 100#define FB_ACCEL_ATI_RADEON 38 101#define FB_ACCEL_I810 39 102#define FB_ACCEL_SIS_GLAMOUR_2 40 103#define FB_ACCEL_SIS_XABRE 41 104#define FB_ACCEL_I830 42 105#define FB_ACCEL_NV_10 43 106#define FB_ACCEL_NV_20 44 107#define FB_ACCEL_NV_30 45 108#define FB_ACCEL_NV_40 46 109#define FB_ACCEL_XGI_VOLARI_V 47 110#define FB_ACCEL_XGI_VOLARI_Z 48 111#define FB_ACCEL_OMAP1610 49 112#define FB_ACCEL_NEOMAGIC_NM2070 90 113#define FB_ACCEL_NEOMAGIC_NM2090 91 114#define FB_ACCEL_NEOMAGIC_NM2093 92 115#define FB_ACCEL_NEOMAGIC_NM2097 93 116#define FB_ACCEL_NEOMAGIC_NM2160 94 117#define FB_ACCEL_NEOMAGIC_NM2200 95 118#define FB_ACCEL_NEOMAGIC_NM2230 96 119#define FB_ACCEL_NEOMAGIC_NM2360 97 120#define FB_ACCEL_NEOMAGIC_NM2380 98 121 122#define FB_ACCEL_SAVAGE4 0x80 123#define FB_ACCEL_SAVAGE3D 0x81 124#define FB_ACCEL_SAVAGE3D_MV 0x82 125#define FB_ACCEL_SAVAGE2000 0x83 126#define FB_ACCEL_SAVAGE_MX_MV 0x84 127#define FB_ACCEL_SAVAGE_MX 0x85 128#define FB_ACCEL_SAVAGE_IX_MV 0x86 129#define FB_ACCEL_SAVAGE_IX 0x87 130#define FB_ACCEL_PROSAVAGE_PM 0x88 131#define FB_ACCEL_PROSAVAGE_KM 0x89 132#define FB_ACCEL_S3TWISTER_P 0x8a 133#define FB_ACCEL_S3TWISTER_K 0x8b 134#define FB_ACCEL_SUPERSAVAGE 0x8c 135#define FB_ACCEL_PROSAVAGE_DDR 0x8d 136#define FB_ACCEL_PROSAVAGE_DDRK 0x8e 137 138struct fb_fix_screeninfo { 139 char id[16]; 140 unsigned long smem_start; 141 142 __u32 smem_len; 143 __u32 type; 144 __u32 type_aux; 145 __u32 visual; 146 __u16 xpanstep; 147 __u16 ypanstep; 148 __u16 ywrapstep; 149 __u32 line_length; 150 unsigned long mmio_start; 151 152 __u32 mmio_len; 153 __u32 accel; 154 155 __u16 reserved[3]; 156}; 157 158struct fb_bitfield { 159 __u32 offset; 160 __u32 length; 161 __u32 msb_right; 162 163}; 164 165#define FB_NONSTD_HAM 1 166 167#define FB_ACTIVATE_NOW 0 168#define FB_ACTIVATE_NXTOPEN 1 169#define FB_ACTIVATE_TEST 2 170#define FB_ACTIVATE_MASK 15 171 172#define FB_ACTIVATE_VBL 16 173#define FB_CHANGE_CMAP_VBL 32 174#define FB_ACTIVATE_ALL 64 175#define FB_ACTIVATE_FORCE 128 176#define FB_ACTIVATE_INV_MODE 256 177 178#define FB_ACCELF_TEXT 1 179 180#define FB_SYNC_HOR_HIGH_ACT 1 181#define FB_SYNC_VERT_HIGH_ACT 2 182#define FB_SYNC_EXT 4 183#define FB_SYNC_COMP_HIGH_ACT 8 184#define FB_SYNC_BROADCAST 16 185 186#define FB_SYNC_ON_GREEN 32 187 188#define FB_VMODE_NONINTERLACED 0 189#define FB_VMODE_INTERLACED 1 190#define FB_VMODE_DOUBLE 2 191#define FB_VMODE_MASK 255 192 193#define FB_VMODE_YWRAP 256 194#define FB_VMODE_SMOOTH_XPAN 512 195#define FB_VMODE_CONUPDATE 512 196 197#define FB_ROTATE_UR 0 198#define FB_ROTATE_CW 1 199#define FB_ROTATE_UD 2 200#define FB_ROTATE_CCW 3 201 202#define PICOS2KHZ(a) (1000000000UL/(a)) 203#define KHZ2PICOS(a) (1000000000UL/(a)) 204 205struct fb_var_screeninfo { 206 __u32 xres; 207 __u32 yres; 208 __u32 xres_virtual; 209 __u32 yres_virtual; 210 __u32 xoffset; 211 __u32 yoffset; 212 213 __u32 bits_per_pixel; 214 __u32 grayscale; 215 216 struct fb_bitfield red; 217 struct fb_bitfield green; 218 struct fb_bitfield blue; 219 struct fb_bitfield transp; 220 221 __u32 nonstd; 222 223 __u32 activate; 224 225 __u32 height; 226 __u32 width; 227 228 __u32 accel_flags; 229 230 __u32 pixclock; 231 __u32 left_margin; 232 __u32 right_margin; 233 __u32 upper_margin; 234 __u32 lower_margin; 235 __u32 hsync_len; 236 __u32 vsync_len; 237 __u32 sync; 238 __u32 vmode; 239 __u32 rotate; 240 __u32 reserved[5]; 241}; 242 243struct fb_cmap { 244 __u32 start; 245 __u32 len; 246 __u16 *red; 247 __u16 *green; 248 __u16 *blue; 249 __u16 *transp; 250}; 251 252struct fb_con2fbmap { 253 __u32 console; 254 __u32 framebuffer; 255}; 256 257#define VESA_NO_BLANKING 0 258#define VESA_VSYNC_SUSPEND 1 259#define VESA_HSYNC_SUSPEND 2 260#define VESA_POWERDOWN 3 261 262enum { 263 264 FB_BLANK_UNBLANK = VESA_NO_BLANKING, 265 266 FB_BLANK_NORMAL = VESA_NO_BLANKING + 1, 267 268 FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1, 269 270 FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1, 271 272 FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1 273}; 274 275#define FB_VBLANK_VBLANKING 0x001 276#define FB_VBLANK_HBLANKING 0x002 277#define FB_VBLANK_HAVE_VBLANK 0x004 278#define FB_VBLANK_HAVE_HBLANK 0x008 279#define FB_VBLANK_HAVE_COUNT 0x010 280#define FB_VBLANK_HAVE_VCOUNT 0x020 281#define FB_VBLANK_HAVE_HCOUNT 0x040 282#define FB_VBLANK_VSYNCING 0x080 283#define FB_VBLANK_HAVE_VSYNC 0x100 284 285struct fb_vblank { 286 __u32 flags; 287 __u32 count; 288 __u32 vcount; 289 __u32 hcount; 290 __u32 reserved[4]; 291}; 292 293#define ROP_COPY 0 294#define ROP_XOR 1 295 296struct fb_copyarea { 297 __u32 dx; 298 __u32 dy; 299 __u32 width; 300 __u32 height; 301 __u32 sx; 302 __u32 sy; 303}; 304 305struct fb_fillrect { 306 __u32 dx; 307 __u32 dy; 308 __u32 width; 309 __u32 height; 310 __u32 color; 311 __u32 rop; 312}; 313 314struct fb_image { 315 __u32 dx; 316 __u32 dy; 317 __u32 width; 318 __u32 height; 319 __u32 fg_color; 320 __u32 bg_color; 321 __u8 depth; 322 const char *data; 323 struct fb_cmap cmap; 324}; 325 326#define FB_CUR_SETIMAGE 0x01 327#define FB_CUR_SETPOS 0x02 328#define FB_CUR_SETHOT 0x04 329#define FB_CUR_SETCMAP 0x08 330#define FB_CUR_SETSHAPE 0x10 331#define FB_CUR_SETSIZE 0x20 332#define FB_CUR_SETALL 0xFF 333 334struct fbcurpos { 335 __u16 x, y; 336}; 337 338struct fb_cursor { 339 __u16 set; 340 __u16 enable; 341 __u16 rop; 342 const char *mask; 343 struct fbcurpos hot; 344 struct fb_image image; 345}; 346 347#endif 348