4 #include <linux/types.h>
27 #define TF_BUF_ESDI 0x02
28 #define TF_BUF_ESBX 0x04
29 #define TF_BUF_RET 0x08
38 /* Constants for the capabilities field
40 #define VBE_CAP_CAN_SWITCH_DAC 0x01
41 #define VBE_CAP_VGACOMPAT 0x02
43 /* The VBE Info Block */
45 char vbe_signature
[4];
51 __u16 oem_software_rev
;
52 __u32 oem_vendor_name_ptr
;
53 __u32 oem_product_name_ptr
;
54 __u32 oem_product_rev_ptr
;
58 } __attribute__ ((packed
));
62 /* VBE CRTC Info Block */
74 } __attribute__ ((packed
));
76 #define VBE_MODE_VGACOMPAT 0x20
77 #define VBE_MODE_COLOR 0x08
78 #define VBE_MODE_SUPPORTEDHW 0x01
79 #define VBE_MODE_GRAPHICS 0x10
80 #define VBE_MODE_LFB 0x80
82 #define VBE_MODE_MASK (VBE_MODE_COLOR | VBE_MODE_SUPPORTEDHW | \
83 VBE_MODE_GRAPHICS | VBE_MODE_LFB)
85 /* VBE Mode Info Block */
87 /* for all VBE revisions */
96 u16 bytes_per_scan_line
;
111 /* Direct color fields for direct/6 and YUV/7 memory models. */
112 /* Offsets are bit positions of lsb in the mask. */
121 u8 direct_color_info
; /* direct color mode attributes */
128 u16 lin_bytes_per_scan_line
;
142 } __attribute__ ((packed
));
144 #define UVESAFB_DEFAULT_MODE "640x480-16"
146 /* How long to wait for a reply from userspace [ms] */
147 #define UVESAFB_TIMEOUT 5000
149 /* Max number of concurrent tasks */
150 #define UVESAFB_TASKS_MAX 16
152 #define dac_reg (0x3c8)
153 #define dac_val (0x3c9)
155 struct uvesafb_pal_entry
{
156 u_char blue
, green
, red
, pad
;
157 } __attribute__ ((packed
));
159 struct uvesafb_ktask
{
160 struct uvesafb_task t
;
162 struct completion
*done
;
166 static int uvesafb_exec(struct uvesafb_ktask
*tsk
);
168 #define UVESAFB_EXACT_RES 1
169 #define UVESAFB_EXACT_DEPTH 2
172 struct vbe_ib vbe_ib
; /* VBE Info Block */
173 struct vbe_mode_ib
*vbe_modes
; /* list of supported VBE modes */
177 u8 ypan
; /* 0 - nothing, 1 - ypan, 2 - ywrap */
178 u8 pmi_setpal
; /* PMI for palette changes */
179 u16
*pmi_base
; /* protected mode interface location */
182 u8
*vbe_state_orig
; /*
183 * original hardware state, before the
186 u8
*vbe_state_saved
; /* state saved by fb_save_state */
191 struct vbe_crtc_ib crtc
;
194 #endif /* __KERNEL__ */
195 #endif /* _UVESAFB_H */