4 #include <uapi/video/uvesafb.h>
7 /* VBE CRTC Info Block */
19 } __attribute__ ((packed));
21 #define VBE_MODE_VGACOMPAT 0x20
22 #define VBE_MODE_COLOR 0x08
23 #define VBE_MODE_SUPPORTEDHW 0x01
24 #define VBE_MODE_GRAPHICS 0x10
25 #define VBE_MODE_LFB 0x80
27 #define VBE_MODE_MASK (VBE_MODE_COLOR | VBE_MODE_SUPPORTEDHW | \
28 VBE_MODE_GRAPHICS | VBE_MODE_LFB)
30 /* VBE Mode Info Block */
32 /* for all VBE revisions */
41 u16 bytes_per_scan_line;
56 /* Direct color fields for direct/6 and YUV/7 memory models. */
57 /* Offsets are bit positions of lsb in the mask. */
66 u8 direct_color_info; /* direct color mode attributes */
73 u16 lin_bytes_per_scan_line;
87 } __attribute__ ((packed));
89 #define UVESAFB_DEFAULT_MODE "640x480-16"
91 /* How long to wait for a reply from userspace [ms] */
92 #define UVESAFB_TIMEOUT 5000
94 /* Max number of concurrent tasks */
95 #define UVESAFB_TASKS_MAX 16
97 #define dac_reg (0x3c8)
98 #define dac_val (0x3c9)
100 struct uvesafb_pal_entry {
101 u_char blue, green, red, pad;
102 } __attribute__ ((packed));
104 struct uvesafb_ktask {
105 struct uvesafb_task t;
107 struct completion *done;
111 static int uvesafb_exec(struct uvesafb_ktask *tsk);
113 #define UVESAFB_EXACT_RES 1
114 #define UVESAFB_EXACT_DEPTH 2
117 struct vbe_ib vbe_ib; /* VBE Info Block */
118 struct vbe_mode_ib *vbe_modes; /* list of supported VBE modes */
122 u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
123 u8 pmi_setpal; /* PMI for palette changes */
124 u16 *pmi_base; /* protected mode interface location */
127 u8 *vbe_state_orig; /*
128 * original hardware state, before the
131 u8 *vbe_state_saved; /* state saved by fb_save_state */
136 struct vbe_crtc_ib crtc;
140 #endif /* _UVESAFB_H */