7 #define FB_VISUAL_TRUECOLOR 2 /* True color */
8 #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */
9 #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */
10 #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */
12 #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
13 #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
14 #define FB_SYNC_EXT 4 /* external sync */
15 #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
16 #define FB_SYNC_BROADCAST 16 /* broadcast video timings */
17 /* vtotal = 144d/288n/576i => PAL */
18 /* vtotal = 121d/242n/484i => NTSC */
19 #define FB_SYNC_ON_GREEN 32 /* sync on green */
21 #define FB_VMODE_NONINTERLACED 0 /* non interlaced */
22 #define FB_VMODE_INTERLACED 1 /* interlaced */
23 #define FB_VMODE_DOUBLE 2 /* double scan */
24 #define FB_VMODE_ODD_FLD_FIRST 4 /* interlaced: top line first */
25 #define FB_VMODE_MASK 255
27 #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
28 #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
29 #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
31 #define PICOS2KHZ(a) (1000000000UL/(a))
32 #define KHZ2PICOS(a) (1000000000UL/(a))
35 const char *name
; /* optional */
36 u32 refresh
; /* optional */
51 /* Interpretation of offset for color fields: All offsets are from the right,
52 * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you
53 * can use the offset as right argument to <<). A pixel afterwards is a bit
54 * stream and is written to video memory as that unmodified.
56 * For pseudocolor: offset and length should be the same for all color
57 * components. Offset specifies the position of the least significant bit
58 * of the pallette index in a pixel value. Length indicates the number
59 * of available palette entries (i.e. # of entries = 1 << length).
62 u32 offset
; /* beginning of bitfield */
63 u32 length
; /* length of bitfield */
64 u32 msb_right
; /* != 0 : Most significant bit is */
71 /* set color register */
72 int (*fb_setcolreg
)(unsigned regno
, unsigned red
, unsigned green
,
73 unsigned blue
, unsigned transp
, struct fb_info
*info
);
74 void (*fb_enable
)(struct fb_info
*info
);
75 void (*fb_disable
)(struct fb_info
*info
);
79 struct fb_videomode
*mode
;
82 struct device_d dev
; /* This is this fb device */
90 u32 xres
; /* visible resolution */
92 u32 bits_per_pixel
; /* guess what */
94 u32 grayscale
; /* != 0 Graylevels instead of colors */
96 struct fb_bitfield red
; /* bitfield in fb mem if true color, */
97 struct fb_bitfield green
; /* else only length is significant */
98 struct fb_bitfield blue
;
99 struct fb_bitfield transp
; /* transparency */
104 int register_framebuffer(struct fb_info
*info
);
106 #define FBIOGET_SCREENINFO _IOR('F', 1, loff_t)
107 #define FBIO_ENABLE _IO('F', 2)
108 #define FBIO_DISABLE _IO('F', 3)