#ifndef _SYS_FBIO_H
#define _SYS_FBIO_H
#include <sys/types.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ASM
struct fbtype {
int fb_type;
int fb_height;
int fb_width;
int fb_depth;
int fb_cmsize;
int fb_size;
};
#define FIOC ('F'<<8)
#define FBIOGTYPE (FIOC|0)
#ifdef _KERNEL
struct fbpixrect {
struct pixrect *fbpr_pixrect;
};
#define FBIOGPIXRECT (FIOC|1)
#endif
struct fbinfo {
int fb_physaddr;
int fb_hwwidth;
int fb_hwheight;
int fb_addrdelta;
unsigned char *fb_ropaddr;
int fb_unit;
};
#define FBIOGINFO (FIOC|2)
struct fbcmap {
int index;
int count;
unsigned char *red;
unsigned char *green;
unsigned char *blue;
};
#ifdef _SYSCALL32
struct fbcmap32 {
int32_t index;
int32_t count;
caddr32_t red;
caddr32_t green;
caddr32_t blue;
};
#endif
#define FBIOPUTCMAP (FIOC|3)
#define FBIOGETCMAP (FIOC|4)
#define FB_ATTR_NDEVSPECIFIC 8
#define FB_ATTR_NEMUTYPES 4
struct fbsattr {
int flags;
#define FB_ATTR_AUTOINIT 1
#define FB_ATTR_DEVSPECIFIC 2
int emu_type;
int dev_specific[FB_ATTR_NDEVSPECIFIC];
};
struct fbgattr {
int real_type;
int owner;
struct fbtype fbtype;
struct fbsattr sattr;
int emu_types[FB_ATTR_NEMUTYPES];
};
#define FBIOSATTR (FIOC|5)
#define FBIOGATTR (FIOC|6)
#define FBVIDEO_OFF 0
#define FBVIDEO_ON 1
#define FBIOSVIDEO (FIOC|7)
#define FBIOGVIDEO (FIOC|8)
#define FBIOVERTICAL (FIOC|9)
#define GRABPAGEALLOC (FIOC|10)
#define GRABPAGEFREE (FIOC|11)
#define GRABATTACH (FIOC|12)
#define FBIOGPLNGRP (FIOC|13)
#define FBIOGCMSIZE (FIOC|14)
#define FBIOSCMSIZE (FIOC|15)
#define FBIOSCMS (FIOC|16)
#define FBIOAVAILPLNGRP (FIOC|17)
#define FBDBL_AVAIL 0x80000000
#define FBDBL_DONT_BLOCK 0x40000000
#define FBDBL_AVAIL_PG 0x20000000
#define FBDBL_A 0x1
#define FBDBL_B 0x2
#define FBDBL_BOTH (FBDBL_A | FBDBL_B)
#define FBDBL_NONE 0x4
struct fbdblinfo {
unsigned int dbl_devstate;
unsigned int dbl_read;
unsigned int dbl_write;
unsigned int dbl_display;
int dbl_depth;
char dbl_wid;
};
#define FBIODBLGINFO (FIOC|18)
#define FBIODBLSINFO (FIOC|19)
#define FBIOSWINFD (FIOC|20)
#define FBIOSAVWINFD (FIOC|21)
#define FBIORESWINFD (FIOC|22)
#define FBIOSRWINFD (FIOC|23)
struct fbcurpos {
short x, y;
};
struct fbcursor {
short set;
#define FB_CUR_SETCUR 0x01
#define FB_CUR_SETPOS 0x02
#define FB_CUR_SETHOT 0x04
#define FB_CUR_SETCMAP 0x08
#define FB_CUR_SETSHAPE 0x10
#define FB_CUR_SETALL 0x1F
short enable;
struct fbcurpos pos;
struct fbcurpos hot;
struct fbcmap cmap;
struct fbcurpos size;
char *image;
char *mask;
};
#ifdef _SYSCALL32
struct fbcursor32 {
short set;
short enable;
struct fbcurpos pos;
struct fbcurpos hot;
struct fbcmap32 cmap;
struct fbcurpos size;
caddr32_t image;
caddr32_t mask;
};
#endif
#define FBIOSCURSOR (FIOC|24)
#define FBIOGCURSOR (FIOC|25)
#define FBIOSCURPOS (FIOC|26)
#define FBIOGCURPOS (FIOC|27)
#define FBIOGCURMAX (FIOC|28)
#define GRABLOCKINFO (FIOC|29)
#define FB_WID_SHARED_8 0
#define FB_WID_SHARED_24 1
#define FB_WID_DBL_8 2
#define FB_WID_DBL_24 3
struct fb_wid_alloc {
unsigned int wa_type;
int wa_index;
unsigned int wa_count;
};
struct fb_wid_item {
unsigned int wi_type;
int wi_index;
unsigned int wi_attrs;
unsigned int wi_values[NBBY*sizeof (int)];
};
struct fb_wid_list {
unsigned int wl_flags;
unsigned int wl_count;
struct fb_wid_item *wl_list;
};
#ifdef _SYSCALL32
struct fb_wid_list32 {
uint32_t wl_flags;
uint32_t wl_count;
caddr32_t wl_list;
};
#endif
struct fb_wid_dbl_info {
struct fb_wid_alloc dbl_wid;
char dbl_fore;
char dbl_back;
char dbl_read_state;
char dbl_write_state;
};
#define FBIO_WID_ALLOC (FIOC|30)
#define FBIO_WID_FREE (FIOC|31)
#define FBIO_WID_PUT (FIOC|32)
#define FBIO_WID_GET (FIOC|33)
#define FBIO_DEVID (FIOC|34)
#define FBIO_U_RST (FIOC|35)
#define FBIO_FULLSCREEN_ELIMINATION_GROUPS (FIOC|36)
#define FBIO_WID_DBL_SET (FIOC|37)
#define FBIOVRTOFFSET (FIOC|38)
struct gfxfb_info {
uint16_t terminal_origin_x;
uint16_t terminal_origin_y;
uint32_t pitch;
uint16_t font_width;
uint16_t font_height;
uint8_t red_mask_size;
uint8_t red_field_position;
uint8_t green_mask_size;
uint8_t green_field_position;
uint8_t blue_mask_size;
uint8_t blue_field_position;
};
struct cg6_info {
ushort_t accessible_width;
ushort_t accessible_height;
ushort_t line_bytes;
ushort_t hdb_capable;
ushort_t vmsize;
uchar_t boardrev;
uchar_t slot;
uint_t pad1;
};
struct s3_info {
ushort_t accessible_width;
ushort_t accessible_height;
ushort_t line_bytes;
ushort_t hdb_capable;
ushort_t vmsize;
uchar_t boardrev;
uchar_t slot;
uint_t pad1;
};
struct p9000_info {
ushort_t accessible_width;
ushort_t accessible_height;
ushort_t line_bytes;
ushort_t hdb_capable;
ushort_t vmsize;
uchar_t boardrev;
uchar_t slot;
uint_t pad1;
};
struct p9100_info {
ushort_t accessible_width;
ushort_t accessible_height;
ushort_t line_bytes;
ushort_t hdb_capable;
ushort_t vmsize;
uchar_t boardrev;
uchar_t slot;
uint_t pad1;
};
struct wd90c24a2_info {
ushort_t accessible_width;
ushort_t accessible_height;
ushort_t line_bytes;
ushort_t hdb_capable;
ushort_t vmsize;
uchar_t boardrev;
uchar_t slot;
uint_t pad1;
};
#define MON_TYPE_STEREO 0x8
#define MON_TYPE_0_OFFSET 0x4
#define MON_TYPE_OVERSCAN 0x2
#define MON_TYPE_GRAY 0x1
struct mon_info {
uint_t mon_type;
uint_t pixfreq;
uint_t hfreq;
uint_t vfreq;
uint_t vsync;
uint_t hsync;
ushort_t hfporch;
ushort_t hbporch;
ushort_t vfporch;
ushort_t vbporch;
};
#define FBIOGXINFO (FIOC|39)
#define FBIOMONINFO (FIOC|40)
struct fbcmap_i {
unsigned int flags;
int id;
int index;
int count;
unsigned char *red;
unsigned char *green;
unsigned char *blue;
};
#ifdef _SYSCALL32
struct fbcmap_i32 {
uint32_t flags;
int32_t id;
int32_t index;
int32_t count;
caddr32_t red;
caddr32_t green;
caddr32_t blue;
};
#endif
#define FB_CMAP_BLOCK 0x1
#define FB_CMAP_KERNEL 0x2
#define FBIOPUTCMAPI (FIOC|41)
#define FBIOGETCMAPI (FIOC|42)
#define FBIO_ASSIGNWID (FIOC|43)
#define FBIO_STEREO (FIOC|44)
#define FB_WIN_STEREO 0x2
#endif
#define FBTYPE_NOTYPE (-1)
#define FBTYPE_SUN1BW 0
#define FBTYPE_SUN1COLOR 1
#define FBTYPE_SUN2BW 2
#define FBTYPE_SUN2COLOR 3
#define FBTYPE_SUN2GP 4
#define FBTYPE_SUN5COLOR 5
#define FBTYPE_SUN3COLOR 6
#define FBTYPE_MEMCOLOR 7
#define FBTYPE_SUN4COLOR 8
#define FBTYPE_NOTSUN1 9
#define FBTYPE_NOTSUN2 10
#define FBTYPE_NOTSUN3 11
#define FBTYPE_SUNFAST_COLOR 12
#define FBTYPE_SUNROP_COLOR 13
#define FBTYPE_SUNFB_VIDEO 14
#define FBTYPE_SUNGIFB 15
#define FBTYPE_SUNGPLAS 16
#define FBTYPE_SUNGP3 17
#define FBTYPE_SUNGT 18
#define FBTYPE_SUNLEO 19
#define FBTYPE_MDICOLOR 20
#define FBTYPE_LASTPLUSONE 21
#ifdef __cplusplus
}
#endif
#endif