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 static int uvesafb_exec(struct uvesafb_ktask
*tsk
);
114 #define UVESAFB_EXACT_RES 1
115 #define UVESAFB_EXACT_DEPTH 2
118 struct vbe_ib vbe_ib
; /* VBE Info Block */
119 struct vbe_mode_ib
*vbe_modes
; /* list of supported VBE modes */
123 u8 ypan
; /* 0 - nothing, 1 - ypan, 2 - ywrap */
124 u8 pmi_setpal
; /* PMI for palette changes */
125 u16
*pmi_base
; /* protected mode interface location */
128 u8
*vbe_state_orig
; /*
129 * original hardware state, before the
132 u8
*vbe_state_saved
; /* state saved by fb_save_state */
137 struct vbe_crtc_ib crtc
;
141 #endif /* _UVESAFB_H */