xref: /illumos-gate/usr/src/man/man4i/fbio.4i (revision 6446bd46ed1b4e9f69da153665f82181ccaedad5)
1.\" Copyright (c) 2003, Sun Microsystems, Inc.
2.\" Copyright (c) 2017, Joyent, Inc.
3.\" The contents of this file are subject to the terms of the
4.\" Common Development and Distribution License (the "License").
5.\" You may not use this file except in compliance with the License.
6.\"
7.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8.\" or http://www.opensolaris.org/os/licensing.
9.\" See the License for the specific language governing permissions
10.\" and limitations under the License.
11.\"
12.\" When distributing Covered Code, include this CDDL HEADER in each
13.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14.\" If applicable, add the following below this CDDL HEADER, with the fields
15.\" enclosed by brackets "[]" replaced with your own identifying
16.\" information: Portions Copyright [yyyy] [name of copyright owner]
17.Dd March 13, 2022
18.Dt FBIO 4I
19.Os
20.Sh NAME
21.Nm fbio
22.Nd frame buffer control operations
23.Sh DESCRIPTION
24The frame buffers provided with this release support the same general interface
25that is defined by
26.In sys/fbio.h .
27Each responds to an
28.Dv FBIOGTYPE
29.Xr ioctl 2
30request which returns information in a
31.Vt fbtype
32structure.
33.Pp
34Each device has an
35.\" FBTYPE isn't macro, enum, or type, just used to describe a number of
36.\" CPP-macros of the form #define FBTYPE_xxxx
37.Sy FBTYPE
38which is used by higher-level software to
39determine how to perform graphics functions.
40Each device is used by opening it, doing an
41.Dv FBIOGTYPE
42.Xr ioctl 2
43to see which frame buffer type is
44present, and thereby selecting the appropriate device-management routines.
45.Pp
46.Dv FBIOGINFO
47returns information specific to the GS accelerator.
48.Pp
49.Dv FBIOSVIDEO
50and
51.Dv FBIOGVIDEO
52are general-purpose
53.Xr ioctl 2
54requests for controlling possible video features of frame buffers.
55These
56.Xr ioctl 2
57requests either set or return the value of a flags integer.
58At this point, only the
59.Dv FBVIDEO_ON
60option is available, controlled by
61.Dv FBIOSVIDEO .
62.Dv FBIOGVIDEO
63returns the current video state.
64.Pp
65The
66.Dv FBIOSATTR
67and
68.Dv FBIOGATTR
69.Xr ioctl 2
70requests allow access to special features of newer frame buffers.
71They use the
72.Vt fbsattr
73and
74.Vt fbgattr
75structures.
76.Pp
77Some color frame buffers support the
78.Dv FBIOPUTCMAP
79and
80.Dv FBIOGETCMAP
81.Xr ioctl 2
82requests, which provide access to the colormap.
83They use the
84.Vt fbcmap
85structure.
86.Pp
87Also, some framebuffers with multiple colormaps will either encode the colormap
88identifier in the high-order bits of the
89.Dq index
90field in the
91.Vt fbcmap
92structure, or use the
93.Dv FBIOPUTCMAPI
94and
95.Dv FBIOGETCMAPI
96.Xr ioctl 2
97requests.
98.Pp
99.Dv FBIOVERTICAL
100is used to wait for the start of the next vertical retrace
101period.
102.Pp
103.Dv FBIOVRTOFFSET
104Returns the offset to a read-only
105.Dq Em vertical retrace page
106for those framebuffers that support it.
107This vertical retrace page may be mapped into user space with
108.Xr mmap 2 .
109The first word of the vertical
110retrace page (type
111.Vt "unsigned int" )
112is a counter that is incremented every time there is a vertical retrace.
113The user process can use this counter in a variety of ways.
114.Pp
115.Dv FBIOMONINFO
116returns a
117.Vt mon_info
118structure which contains information about
119the monitor attached to the framebuffer, if available.
120.Pp
121.Dv FBIOSCURSOR ,
122.Dv FBIOGCURSOR ,
123.Dv FBIOSCURPOS
124and
125.Dv FBIOGCURPOS
126are used to control the hardware cursor for those framebuffers that have this
127feature.
128.Dv FBIOGCURMAX
129returns the maximum sized cursor supported by the framebuffer.
130Attempts to create a cursor larger than this will fail.
131.Pp
132Finally
133.Dv FBIOSDEVINFO
134and
135.Dv FBIOGDEVINFO
136are used to transfer
137variable-length, device-specific information into and out of framebuffers.
138.Sh SEE ALSO
139.Xr ioctl 2 ,
140.Xr mmap 2
141.Sh BUGS
142The
143.Dv FBIOSATTR
144and
145.Dv FBIOGATTR
146.Xr ioctl 2
147requests are only
148supported by frame buffers which emulate older frame buffer types.
149If a frame buffer emulates another frame buffer,
150.Dv FBIOGTYPE
151returns the emulated type.
152To get the real type, use
153.Dv FBIOGATTR .
154.Pp
155The
156.Dv FBIOGCURPOS
157ioctl was incorrectly defined in previous operating
158systems, and older code running in binary compatibility mode may get incorrect
159results.
160