1DRMMODEGETRESOURCES(3)     Direct Rendering Manager     DRMMODEGETRESOURCES(3)
2
3
4

NAME

6       drmModeGetResources - retrieve current display configuration
7       information
8

SYNOPSIS

10       #include <xf86drm.h>
11
12       #include <xf86drmMode.h>
13
14       drmModeResPtr drmModeGetResources(int fd);
15

DESCRIPTION

17       drmModeGetResources allocates, populates, and returns a drmModeRes
18       structure containing information about the current display
19       configuration. The structure contains the following fields:
20
21           typedef struct _drmModeRes {
22               int count_fbs;
23               uint32_t *fbs;
24
25               int count_crtcs;
26               uint32_t *crtcs;
27
28               int count_connectors;
29               uint32_t *connectors;
30
31               int count_encoders;
32               uint32_t *encoders;
33
34               uint32_t min_width, max_width;
35               uint32_t min_height, max_height;
36           } drmModeRes, *drmModeResPtr;
37
38       The count_fbs and fbs fields indicate the number of currently allocated
39       framebuffer objects (i.e., objects that can be attached to a given CRTC
40       or sprite for display).
41
42       The count_crtcs and crtcs fields list the available CRTCs in the
43       configuration. A CRTC is simply an object that can scan out a
44       framebuffer to a display sink, and contains mode timing and relative
45       position information. CRTCs drive encoders, which are responsible for
46       converting the pixel stream into a specific display protocol (e.g.,
47       MIPI or HDMI).
48
49       The count_connectors and connectors fields list the available physical
50       connectors on the system. Note that some of these may not be exposed
51       from the chassis (e.g., LVDS or eDP). Connectors are attached to
52       encoders and contain information about the attached display sink (e.g.,
53       width and height in mm, subpixel ordering, and various other
54       properties).
55
56       The count_encoders and encoders fields list the available encoders on
57       the device. Each encoder may be associated with a CRTC, and may be used
58       to drive a particular encoder.
59
60       The min* and max* fields indicate the maximum size of a framebuffer for
61       this device (i.e., the scanout size limit).
62

RETURN VALUE

64       drmModeGetResources returns a drmModeRes structure pointer on success,
65       NULL on failure. The returned structure must be freed with
66       drmModeFreeResources(3).
67

REPORTING BUGS

69       Bugs in this function should be reported to
70       https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=libdrm
71       under the "DRI" product, component "libdrm"
72

SEE ALSO

74       drm(7), drm-kms(7), drmModeGetFB(3), drmModeAddFB(3), drmModeAddFB2(3),
75       drmModeRmFB(3), drmModeDirtyFB(3), drmModeGetCrtc(3),
76       drmModeSetCrtc(3), drmModeGetEncoder(3), drmModeGetConnector(3)
77
78
79
80libdrm                          September 2012          DRMMODEGETRESOURCES(3)
Impressum