Add some definitions. Their actual support will be added

to video drivers later.
This commit is contained in:
Kazutaka YOKOTA 2001-08-02 11:17:38 +00:00
parent 2cc33d7946
commit 6d1699583d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=81038
2 changed files with 70 additions and 1 deletions

View File

@ -75,10 +75,12 @@ typedef int vi_set_hw_cursor_t(video_adapter_t *adp, int col, int row);
typedef int vi_set_hw_cursor_shape_t(video_adapter_t *adp, int base,
int height, int celsize, int blink);
typedef int vi_blank_display_t(video_adapter_t *adp, int mode);
/* defined in sys/fbio.h
#define V_DISPLAY_ON 0
#define V_DISPLAY_BLANK 1
#define V_DISPLAY_STAND_BY 2
#define V_DISPLAY_SUSPEND 3
*/
typedef int vi_mmap_t(video_adapter_t *adp, vm_offset_t offset, int prot);
typedef int vi_ioctl_t(video_adapter_t *adp, u_long cmd, caddr_t data);
typedef int vi_clear_t(video_adapter_t *adp);

View File

@ -151,7 +151,7 @@ struct fbgattr {
int emu_types[FB_ATTR_NEMUTYPES]; /* possible emulations */
/* (-1 if unused) */
};
/* FBIOSATTR _IOW('F', 5, struct fbsattr) -- unsupported */
#define FBIOSATTR _IOW('F', 5, struct fbsattr)
#define FBIOGATTR _IOR('F', 6, struct fbgattr)
/*
@ -163,6 +163,9 @@ struct fbgattr {
#define FBIOSVIDEO _IOW('F', 7, int)
#define FBIOGVIDEO _IOR('F', 8, int)
/* vertical retrace */
#define FBIOVERTICAL _IO('F', 9)
/*
* Hardware cursor control (for, e.g., CG6). A rather complex and icky
* interface that smells like VMS, but there it is....
@ -201,6 +204,60 @@ struct fbcursor {
/* get maximum cursor size */
#define FBIOGCURMAX _IOR('F', 28, struct fbcurpos)
/*
* Video board information
*/
struct brd_info {
u_short accessible_width; /* accessible bytes in scanline */
u_short accessible_height; /* number of accessible scanlines */
u_short line_bytes; /* number of bytes/scanline */
u_short hdb_capable; /* can this thing hardware db? */
u_short vmsize; /* video memory size */
u_char boardrev; /* board revision # */
u_char pad0;
u_long pad1;
};
#define FBIOGXINFO _IOR('F', 39, struct brd_info)
/*
* Monitor information
*/
struct mon_info {
u_long mon_type; /* bit array */
#define MON_TYPE_STEREO 0x8 /* stereo display */
#define MON_TYPE_0_OFFSET 0x4 /* black level 0 ire instead of 7.5 */
#define MON_TYPE_OVERSCAN 0x2 /* overscan */
#define MON_TYPE_GRAY 0x1 /* greyscale monitor */
u_long pixfreq; /* pixel frequency in Hz */
u_long hfreq; /* horizontal freq in Hz */
u_long vfreq; /* vertical freq in Hz */
u_long vsync; /* vertical sync in scanlines */
u_long hsync; /* horizontal sync in pixels */
/* these are in pixel units */
u_short hfporch; /* horizontal front porch */
u_short hbporch; /* horizontal back porch */
u_short vfporch; /* vertical front porch */
u_short vbporch; /* vertical back porch */
};
#define FBIOMONINFO _IOR('F', 40, struct mon_info)
/*
* Color map I/O.
*/
struct fbcmap_i {
unsigned int flags;
#define FB_CMAP_BLOCK (1 << 0) /* wait for vertical refresh */
#define FB_CMAP_KERNEL (1 << 1) /* called within kernel */
int id; /* color map id */
int index; /* first element (0 origin) */
int count; /* number of elements */
u_char *red; /* red color map elements */
u_char *green; /* green color map elements */
u_char *blue; /* blue color map elements */
};
#define FBIOPUTCMAPI _IOW('F', 41, struct fbcmap_i)
#define FBIOGETCMAPI _IOW('F', 42, struct fbcmap_i)
/* The new style frame buffer ioctls. */
/* video mode information block */
@ -265,9 +322,11 @@ struct video_adapter {
#define V_ADP_PALETTE (1 << 5)
#define V_ADP_BORDER (1 << 6)
#define V_ADP_VESA (1 << 7)
#define V_ADP_BOOTDISPLAY (1 << 8)
#define V_ADP_PROBED (1 << 16)
#define V_ADP_INITIALIZED (1 << 17)
#define V_ADP_REGISTERED (1 << 18)
#define V_ADP_ATTACHED (1 << 19)
int va_io_base;
int va_io_size;
int va_crtc_addr;
@ -475,4 +534,12 @@ typedef struct video_color_palette video_color_palette_t;
#define FBIO_GETPALETTE _IOW('F', 113, video_color_palette_t)
#define FBIO_SETPALETTE _IOW('F', 114, video_color_palette_t)
/* blank display */
#define V_DISPLAY_ON 0
#define V_DISPLAY_BLANK 1
#define V_DISPLAY_STAND_BY 2
#define V_DISPLAY_SUSPEND 3
#define FBIO_BLANK _IOW('F', 115, int)
#endif /* !_SYS_FBIO_H_ */