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 February 17, 2020 18 .Dt FBIO 7I 19 .Os 20 .Sh NAME 21 .Nm fbio 22 .Nd frame buffer control operations 23 .Sh DESCRIPTION 24 The frame buffers provided with this release support the same general interface 25 that is defined by 26 .In sys/fbio.h . 27 Each responds to an 28 .Dv FBIOGTYPE 29 .Xr ioctl 2 30 request which returns information in a 31 .Vt fbtype 32 structure. 33 .Pp 34 Each 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 38 which is used by higher-level software to 39 determine how to perform graphics functions. 40 Each device is used by opening it, doing an 41 .Dv FBIOGTYPE 42 .Xr ioctl 2 43 to see which frame buffer type is 44 present, and thereby selecting the appropriate device-management routines. 45 .Pp 46 .Dv FBIOGINFO 47 returns information specific to the GS accelerator. 48 .Pp 49 .Dv FBIOSVIDEO 50 and 51 .Dv FBIOGVIDEO 52 are general-purpose 53 .Xr ioctl 2 54 requests for controlling possible video features of frame buffers. 55 These 56 .Xr ioctl 2 57 requests either set or return the value of a flags integer. 58 At this point, only the 59 .Dv FBVIDEO_ON 60 option is available, controlled by 61 .Dv FBIOSVIDEO . 62 .Dv FBIOGVIDEO 63 returns the current video state. 64 .Pp 65 The 66 .Dv FBIOSATTR 67 and 68 .Dv FBIOGATTR 69 .Xr ioctl 2 70 requests allow access to special features of newer frame buffers. 71 They use the 72 .Vt fbsattr 73 and 74 .Vt fbgattr 75 structures. 76 .Pp 77 Some color frame buffers support the 78 .Dv FBIOPUTCMAP 79 and 80 .Dv FBIOGETCMAP 81 .Xr ioctl 2 82 requests, which provide access to the colormap. 83 They use the 84 .Vt fbcmap 85 structure. 86 .Pp 87 Also, some framebuffers with multiple colormaps will either encode the colormap 88 identifier in the high-order bits of the 89 .Dq index 90 field in the 91 .Vt fbcmap 92 structure, or use the 93 .Dv FBIOPUTCMAPI 94 and 95 .Dv FBIOGETCMAPI 96 .Xr ioctl 2 97 requests. 98 .Pp 99 .Dv FBIOVERTICAL 100 is used to wait for the start of the next vertical retrace 101 period. 102 .Pp 103 .Dv FBIOVRTOFFSET 104 Returns the offset to a read-only 105 .Dq Em vertical retrace page 106 for those framebuffers that support it. 107 This vertical retrace page may be mapped into user space with 108 .Xr mmap 2 . 109 The first word of the vertical 110 retrace page (type 111 .Vt "unsigned int" ) 112 is a counter that is incremented every time there is a vertical retrace. 113 The user process can use this counter in a variety of ways. 114 .Pp 115 .Dv FBIOMONINFO 116 returns a 117 .Vt mon_info 118 structure which contains information about 119 the monitor attached to the framebuffer, if available. 120 .Pp 121 .Dv FBIOSCURSOR , 122 .Dv FBIOGCURSOR , 123 .Dv FBIOSCURPOS 124 and 125 .Dv FBIOGCURPOS 126 are used to control the hardware cursor for those framebuffers that have this 127 feature. 128 .Dv FBIOGCURMAX 129 returns the maximum sized cursor supported by the framebuffer. 130 Attempts to create a cursor larger than this will fail. 131 .Pp 132 Finally 133 .Dv FBIOSDEVINFO 134 and 135 .Dv FBIOGDEVINFO 136 are used to transfer 137 variable-length, device-specific information into and out of framebuffers. 138 .Sh SEE ALSO 139 .Xr ioctl 2 , 140 .Xr mmap 2 141 .Sh BUGS 142 The 143 .Dv FBIOSATTR 144 and 145 .Dv FBIOGATTR 146 .Xr ioctl 2 147 requests are only 148 supported by frame buffers which emulate older frame buffer types. 149 If a frame buffer emulates another frame buffer, 150 .Dv FBIOGTYPE 151 returns the emulated type. 152 To get the real type, use 153 .Dv FBIOGATTR . 154 .Pp 155 The 156 .Dv FBIOGCURPOS 157 ioctl was incorrectly defined in previous operating 158 systems, and older code running in binary compatibility mode may get incorrect 159 results.