1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <uapi/video/uvesafb.h>
8 /* VBE CRTC Info Block */
20 } __attribute__ ((packed));
22 #define VBE_MODE_VGACOMPAT 0x20
23 #define VBE_MODE_COLOR 0x08
24 #define VBE_MODE_SUPPORTEDHW 0x01
25 #define VBE_MODE_GRAPHICS 0x10
26 #define VBE_MODE_LFB 0x80
28 #define VBE_MODE_MASK (VBE_MODE_COLOR | VBE_MODE_SUPPORTEDHW | \
29 VBE_MODE_GRAPHICS | VBE_MODE_LFB)
31 /* VBE Mode Info Block */
33 /* for all VBE revisions */
42 u16 bytes_per_scan_line;
57 /* Direct color fields for direct/6 and YUV/7 memory models. */
58 /* Offsets are bit positions of lsb in the mask. */
67 u8 direct_color_info; /* direct color mode attributes */
74 u16 lin_bytes_per_scan_line;
88 } __attribute__ ((packed));
90 #define UVESAFB_DEFAULT_MODE "640x480-16"
92 /* How long to wait for a reply from userspace [ms] */
93 #define UVESAFB_TIMEOUT 5000
95 /* Max number of concurrent tasks */
96 #define UVESAFB_TASKS_MAX 16
98 #define dac_reg (0x3c8)
99 #define dac_val (0x3c9)
101 struct uvesafb_pal_entry {
102 u_char blue, green, red, pad;
103 } __attribute__ ((packed));
105 struct uvesafb_ktask {
106 struct uvesafb_task t;
108 struct completion *done;
112 #define UVESAFB_EXACT_RES 1
113 #define UVESAFB_EXACT_DEPTH 2
116 struct vbe_ib vbe_ib; /* VBE Info Block */
117 struct vbe_mode_ib *vbe_modes; /* list of supported VBE modes */
121 u8 ypan; /* 0 - nothing, 1 - ypan, 2 - ywrap */
122 u8 pmi_setpal; /* PMI for palette changes */
123 u16 *pmi_base; /* protected mode interface location */
126 u8 *vbe_state_orig; /*
127 * original hardware state, before the
130 u8 *vbe_state_saved; /* state saved by fb_save_state */
135 struct vbe_crtc_ib crtc;
139 #endif /* _UVESAFB_H */