1 .\" shorthand for double quote that works everywhere.
3 .TH drmModeGetResources __drivermansuffix__ __vendorversion__
5 drmModeGetResources \- retrieve current display configuration information
8 .B "#include <xf86drmMode.h>"
10 .BI "typedef struct _drmModeRes {"
15 .BI " int count_crtcs;"
16 .BI " uint32_t *crtcs;"
18 .BI " int count_connectors;"
19 .BI " uint32_t *connectors;"
21 .BI " int count_encoders;"
22 .BI " uint32_t *encoders;"
24 .BI " uint32_t min_width, max_width;"
25 .BI " uint32_t min_height, max_height;"
26 .B "} drmModeRes, *drmModeResPtr;"
28 .B "drmModeResPtr drmModeGetResources(int fd);"
31 This function will allocate, populate, and return a drmModeRes structure
32 containing information about the current display configuration.
38 fields indicate the number of currently allocated framebuffer objects (i.e.
39 objects that can be attached to a given CRTC or sprite for display).
45 fields list the available CRTCs in the configuration. A CRTC is simply
46 an object that can scan out a framebuffer to a display sink, and contains
47 mode timing and relative position information. CRTCs drive encoders, which
48 are responsible for converting the pixel stream into a specific display
49 protocol (e.g. MIPI or HDMI).
55 fields list the available physical connectors on the system. Note that
56 some of these may not be exposed from the chassis (e.g. LVDS or eDP).
57 Connectors are attached to encoders and contain information about the
58 attached display sink (e.g. width and height in mm, subpixel ordering, and
59 various other properties).
65 fields list the available encoders on the device. Each encoder may be
66 associated with a CRTC, and may be used to drive a particular encoder.
68 The min and max height fields indicate the maximum size of a framebuffer
69 for this device (i.e. the scanout size limit).
72 Returns a drmModeRes structure pointer on success, 0 on failure.
75 Bugs in this function should be reported to http://bugs.freedesktop.org under
76 the "Mesa" product, with "Other" or "libdrm" as the component.
79 drmModeGetFB(__libmansuffix__), drmModeAddFB(__libmansuffix__), drmModeAddFB2(__libmansuffix__), drmModeRmFB(__libmansuffix__), drmModeDirtyFB(__libmansuffix__), drmModeGetCrtc(__libmansuffix__), drmModeSetCrtc(__libmansuffix__), drmModeGetEncoder(__libmansuffix__), drmModeGetConnector(__libmansuffix__)