diff options
author | yokota <yokota@FreeBSD.org> | 2001-08-02 11:17:38 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 2001-08-02 11:17:38 +0000 |
commit | cf9ff167def1584f5e10b22e728e45e49132834c (patch) | |
tree | ea2aa623b723930f505f1aa9989c82c0fdb0edd5 | |
parent | 09f2ade6f1c521011c3287bf96ee11c463f39297 (diff) | |
download | FreeBSD-src-cf9ff167def1584f5e10b22e728e45e49132834c.zip FreeBSD-src-cf9ff167def1584f5e10b22e728e45e49132834c.tar.gz |
Add some definitions. Their actual support will be added
to video drivers later.
-rw-r--r-- | sys/dev/fb/fbreg.h | 2 | ||||
-rw-r--r-- | sys/sys/fbio.h | 69 |
2 files changed, 70 insertions, 1 deletions
diff --git a/sys/dev/fb/fbreg.h b/sys/dev/fb/fbreg.h index ba6c0e1..e8a8513 100644 --- a/sys/dev/fb/fbreg.h +++ b/sys/dev/fb/fbreg.h @@ -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); diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h index 1ae1d13..42e3ee9 100644 --- a/sys/sys/fbio.h +++ b/sys/sys/fbio.h @@ -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_ */ |