Module Name: src Committed By: tnn Date: Sat Nov 2 19:22:37 UTC 2019
Modified Files: src/share/man/man4: wsdisplay.4 Log Message: documentation for WSDISPLAYIO_FBINFO To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/share/man/man4/wsdisplay.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/share/man/man4/wsdisplay.4 diff -u src/share/man/man4/wsdisplay.4:1.47 src/share/man/man4/wsdisplay.4:1.48 --- src/share/man/man4/wsdisplay.4:1.47 Mon Aug 12 11:11:28 2019 +++ src/share/man/man4/wsdisplay.4 Sat Nov 2 19:22:36 2019 @@ -1,4 +1,4 @@ -.\" $NetBSD: wsdisplay.4,v 1.47 2019/08/12 11:11:28 nia Exp $ +.\" $NetBSD: wsdisplay.4,v 1.48 2019/11/02 19:22:36 tnn Exp $ .\" .\" Copyright (c) 1999 Matthias Drochner. .\" Copyright (c) 2002 Ben Harris. @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 25, 2015 +.Dd November 2, 2019 .Dt WSDISPLAY 4 .Os .Sh NAME @@ -192,6 +192,52 @@ Their definitions are found in Retrieve the type of the display. The list of types is in .In dev/wscons/wsconsio.h . +.It Dv WSDISPLAYIO_FBINFO Pq Li "struct wsdisplayio_fbinfo" +Retrieve extended information about a framebuffer display, +including the framebuffer's pixel packing layout. +The returned structure is as follows: +.Bd -literal -offset indent +struct wsdisplayio_fbinfo { + uint64_t fbi_fbsize; + uint64_t fbi_fboffset; + uint32_t fbi_width; + uint32_t fbi_height; + uint32_t fbi_stride; + uint32_t fbi_bitsperpixel; + uint32_t fbi_pixeltype; + union _fbi_subtype { + struct _fbi_rgbmasks { + uint32_t red_offset; + uint32_t red_size; + uint32_t green_offset; + uint32_t green_size; + uint32_t blue_offset; + uint32_t blue_size; + uint32_t alpha_offset; + uint32_t alpha_size; + } fbi_rgbmasks; + struct _fbi_cmapinfo { + uint32_t cmap_entries; + } fbi_cmapinfo; + } fbi_subtype; + uint32_t fbi_flags; +}; +.Ed +.Pp +For a "true colour" display, the +.Va fbi_pixeltype +field contains +.Dv WSFB_RGB +and the +.Va fbi_rgbmasks +field contains the pixel packing layout. +For a colour indexed display, the +.Va fbi_pixeltype +field contains +.Dv WSFB_CI +and the +.Va fbi_cmapinfo +field contains the number of color map entries. .It Dv WSDISPLAYIO_GINFO Pq Li "struct wsdisplay_fbinfo" Retrieve basic information about a framebuffer display. The returned structure is as follows: