aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/fbio.h
diff options
context:
space:
mode:
authorKazutaka YOKOTA <yokota@FreeBSD.org>2001-08-02 11:17:38 +0000
committerKazutaka YOKOTA <yokota@FreeBSD.org>2001-08-02 11:17:38 +0000
commit6d1699583d7e8dd850610054f878d4d180a43681 (patch)
treeea2aa623b723930f505f1aa9989c82c0fdb0edd5 /sys/sys/fbio.h
parent2cc33d79460c4981d5d7f326110c56173b69493e (diff)
downloadsrc-6d1699583d7e8dd850610054f878d4d180a43681.tar.gz
src-6d1699583d7e8dd850610054f878d4d180a43681.zip
Add some definitions. Their actual support will be added
to video drivers later.
Notes
Notes: svn path=/head/; revision=81038
Diffstat (limited to 'sys/sys/fbio.h')
-rw-r--r--sys/sys/fbio.h69
1 files changed, 68 insertions, 1 deletions
diff --git a/sys/sys/fbio.h b/sys/sys/fbio.h
index 1ae1d1378c3d..42e3ee916fa7 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_ */