25 #define TF_BUF_ESDI 0x02
26 #define TF_BUF_ESBX 0x04
27 #define TF_BUF_RET 0x08
36 /* Constants for the capabilities field
38 #define VBE_CAP_CAN_SWITCH_DAC 0x01
39 #define VBE_CAP_VGACOMPAT 0x02
41 /* The VBE Info Block */
43 char vbe_signature[4];
49 __u16 oem_software_rev;
50 __u32 oem_vendor_name_ptr;
51 __u32 oem_product_name_ptr;
52 __u32 oem_product_rev_ptr;
56 } __attribute__ ((packed));
60 /* VBE CRTC Info Block */
72 } __attribute__ ((packed));
74 #define VBE_MODE_VGACOMPAT 0x20
75 #define VBE_MODE_COLOR 0x08
76 #define VBE_MODE_SUPPORTEDHW 0x01
77 #define VBE_MODE_GRAPHICS 0x10
78 #define VBE_MODE_LFB 0x80
80 #define VBE_MODE_MASK (VBE_MODE_COLOR | VBE_MODE_SUPPORTEDHW | \
81 VBE_MODE_GRAPHICS | VBE_MODE_LFB)
83 /* VBE Mode Info Block */
85 /* for all VBE revisions */
94 u16 bytes_per_scan_line;
109 /* Direct color fields for direct/6 and YUV/7 memory models. */
110 /* Offsets are bit positions of lsb in the mask. */
119 u8 direct_color_info; /* direct color mode attributes */
126 u16 lin_bytes_per_scan_line;
140 } __attribute__ ((packed));
142 #define UVESAFB_DEFAULT_MODE "640x480-16"
144 /* How long to wait for a reply from userspace [ms] */
145 #define UVESAFB_TIMEOUT 5000
147 /* Max number of concurrent tasks */
148 #define UVESAFB_TASKS_MAX 16
150 #define dac_reg (0x3c8)
151 #define dac_val (0x3c9)
153 struct uvesafb_pal_entry {
154 u_char blue, green, red, pad;
155 } __attribute__ ((packed));
157 struct uvesafb_ktask {
158 struct uvesafb_task t;
160 struct completion *done;
164 static int uvesafb_exec(struct uvesafb_ktask *tsk);
166 #define UVESAFB_EXACT_RES 1
167 #define UVESAFB_EXACT_DEPTH 2
170 struct vbe_ib vbe_ib; /* VBE Info Block */
171 struct vbe_mode_ib *vbe_modes; /* list of supported VBE modes */
175 u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
176 u8 pmi_setpal; /* PMI for palette changes */
177 u16 *pmi_base; /* protected mode interface location */
180 u8 *vbe_state_orig; /*
181 * original hardware state, before the
184 u8 *vbe_state_saved; /* state saved by fb_save_state */
189 struct vbe_crtc_ib crtc;
192 #endif /* __KERNEL__ */
193 #endif /* _UVESAFB_H */