#ifndef _DEV_FB_VESA_H_
#define _DEV_FB_VESA_H_
struct vesa_info
{
u_int8_t v_sig[4];
u_int16_t v_version;
u_int32_t v_oemstr;
u_int32_t v_flags;
#define V_DAC8 (1<<0)
#define V_NONVGA (1<<1)
#define V_SNOW (1<<2)
u_int32_t v_modetable;
u_int16_t v_memsize;
u_int16_t v_revision;
u_int32_t v_venderstr;
u_int32_t v_prodstr;
u_int32_t v_revstr;
u_int8_t v_strach[222];
u_int8_t v_oemdata[256];
} __packed;
struct vesa_mode
{
u_int16_t v_modeattr;
#define V_MODESUPP (1<<0)
#define V_MODEOPTINFO (1<<1)
#define V_MODEBIOSOUT (1<<2)
#define V_MODECOLOR (1<<3)
#define V_MODEGRAPHICS (1<<4)
#define V_MODENONVGA (1<<5)
#define V_MODENONBANK (1<<6)
#define V_MODELFB (1<<7)
#define V_MODEVESA (1<<16)
u_int8_t v_waattr;
u_int8_t v_wbattr;
#define V_WATTREXIST (1<<0)
#define V_WATTRREAD (1<<1)
#define V_WATTRWRITE (1<<2)
u_int16_t v_wgran;
u_int16_t v_wsize;
u_int16_t v_waseg;
u_int16_t v_wbseg;
u_int32_t v_posfunc;
u_int16_t v_bpscanline;
u_int16_t v_width;
u_int16_t v_height;
u_int8_t v_cwidth;
u_int8_t v_cheight;
u_int8_t v_planes;
u_int8_t v_bpp;
u_int8_t v_banks;
u_int8_t v_memmodel;
#define V_MMTEXT 0
#define V_MMCGA 1
#define V_MMHGC 2
#define V_MMEGA 3
#define V_MMPACKED 4
#define V_MMSEQU256 5
#define V_MMDIRCOLOR 6
#define V_MMYUV 7
u_int8_t v_banksize;
u_int8_t v_ipages;
u_int8_t v_reserved0;
u_int8_t v_redmasksize;
u_int8_t v_redfieldpos;
u_int8_t v_greenmasksize;
u_int8_t v_greenfieldpos;
u_int8_t v_bluemasksize;
u_int8_t v_bluefieldpos;
u_int8_t v_resmasksize;
u_int8_t v_resfieldpos;
u_int8_t v_dircolormode;
u_int32_t v_lfb;
u_int32_t v_offscreen;
u_int16_t v_offscreensize;
u_int16_t v_linbpscanline;
u_int8_t v_bankipages;
u_int8_t v_linipages;
u_int8_t v_linredmasksize;
u_int8_t v_linredfieldpos;
u_int8_t v_lingreenmasksize;
u_int8_t v_lingreenfieldpos;
u_int8_t v_linbluemasksize;
u_int8_t v_linbluefieldpos;
u_int8_t v_linresmasksize;
u_int8_t v_linresfieldpos;
u_int32_t v_maxpixelclock;
u_int8_t v_reserved1[190];
} __packed;
#ifdef _KERNEL
#define VESA_MODE(x) ((x) >= M_VESA_BASE && (x) <= M_VESA_MODE_MAX)
int vesa_load_ioctl(void);
int vesa_unload_ioctl(void);
#endif
#endif