.\" Man page generated from reStructuredText. . .TH DRMMODEGETRESOURCES 3 "September 2012" "" "Direct Rendering Manager" .SH NAME drmModeGetResources \- retrieve current display configuration information . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fB#include \fP .sp \fB#include \fP .sp \fBdrmModeResPtr drmModeGetResources(int fd);\fP .SH DESCRIPTION .sp \fBdrmModeGetResources\fP allocates, populates, and returns a drmModeRes structure containing information about the current display configuration. The structure contains the following fields: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C typedef struct _drmModeRes { int count_fbs; uint32_t *fbs; int count_crtcs; uint32_t *crtcs; int count_connectors; uint32_t *connectors; int count_encoders; uint32_t *encoders; uint32_t min_width, max_width; uint32_t min_height, max_height; } drmModeRes, *drmModeResPtr; .ft P .fi .UNINDENT .UNINDENT .sp The \fIcount_fbs\fP and \fIfbs\fP fields indicate the number of currently allocated framebuffer objects (i.e., objects that can be attached to a given CRTC or sprite for display). .sp The \fIcount_crtcs\fP and \fIcrtcs\fP fields list the available CRTCs in the configuration. A CRTC is simply an object that can scan out a framebuffer to a display sink, and contains mode timing and relative position information. CRTCs drive encoders, which are responsible for converting the pixel stream into a specific display protocol (e.g., MIPI or HDMI). .sp The \fIcount_connectors\fP and \fIconnectors\fP fields list the available physical connectors on the system. Note that some of these may not be exposed from the chassis (e.g., LVDS or eDP). Connectors are attached to encoders and contain information about the attached display sink (e.g., width and height in mm, subpixel ordering, and various other properties). .sp The \fIcount_encoders\fP and \fIencoders\fP fields list the available encoders on the device. Each encoder may be associated with a CRTC, and may be used to drive a particular encoder. .sp The \fImin_*\fP and \fImax_*\fP fields indicate the maximum size of a framebuffer for this device (i.e., the scanout size limit). .SH RETURN VALUE .sp \fBdrmModeGetResources\fP returns a drmModeRes structure pointer on success, NULL on failure. The returned structure must be freed with \fBdrmModeFreeResources\fP(3). .SH REPORTING BUGS .sp Bugs in this function should be reported to \fI\%https://gitlab.freedesktop.org/mesa/drm/\-/issues\fP .SH SEE ALSO .sp \fBdrm\fP(7), \fBdrm\-kms\fP(7), \fBdrmModeGetFB\fP(3), \fBdrmModeAddFB\fP(3), \fBdrmModeAddFB2\fP(3), \fBdrmModeRmFB\fP(3), \fBdrmModeDirtyFB\fP(3), \fBdrmModeGetCrtc\fP(3), \fBdrmModeSetCrtc\fP (3), \fBdrmModeGetEncoder\fP (3), \fBdrmModeGetConnector\fP(3) .\" Generated by docutils manpage writer. .