diff options
author | David Herrmann | 2012-09-28 16:44:19 -0500 |
---|---|---|
committer | Jesse Barnes | 2013-01-09 18:17:03 -0600 |
commit | 6b7e45c7516b7fdfe85e7792f82624458dcb2ac6 (patch) | |
tree | 6c802a2a375c77b0babbf83487f7abee70db6deb /man | |
parent | 891517f5111cd82909906d5e8ee0299db0d46762 (diff) | |
download | external-libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.tar.gz external-libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.tar.xz external-libdrm-6b7e45c7516b7fdfe85e7792f82624458dcb2ac6.zip |
man: convert manpages to XML instead of plain troff
If we want to use the manpages in external documentation other than normal
manpages, we should rather use XML. Furthermore, almost no-one knows troff
today, anyway, and XML allows others to easily add more pages without
having to learn troff.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'man')
-rw-r--r-- | man/Makefile.am | 58 | ||||
-rw-r--r-- | man/drmAvailable.man | 25 | ||||
-rw-r--r-- | man/drmAvailable.xml | 75 | ||||
-rw-r--r-- | man/drmHandleEvent.man | 45 | ||||
-rw-r--r-- | man/drmHandleEvent.xml | 102 | ||||
-rw-r--r-- | man/drmModeGetResources.man | 79 | ||||
-rw-r--r-- | man/drmModeGetResources.xml | 139 |
7 files changed, 363 insertions, 160 deletions
diff --git a/man/Makefile.am b/man/Makefile.am index ccd6545c..b93fdef8 100644 --- a/man/Makefile.am +++ b/man/Makefile.am | |||
@@ -1,11 +1,47 @@ | |||
1 | libmandir = $(LIB_MAN_DIR) | 1 | # |
2 | libman_PRE = drmAvailable.man \ | 2 | # This generates man-pages out of the Docbook XML files. Simply add your files |
3 | drmHandleEvent.man \ | 3 | # to the $MANPAGES array. If aliases are created, please add them to the |
4 | drmModeGetResources.man | 4 | # MANPAGES_ALIASES array so they get installed correctly. |
5 | libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) | 5 | # |
6 | EXTRA_DIST = $(libman_PRE) | 6 | |
7 | CLEANFILES = $(libman_DATA) | 7 | MANPAGES = \ |
8 | SUFFIXES = .$(LIB_MAN_SUFFIX) .man | 8 | drmAvailable.3 \ |
9 | 9 | drmHandleEvent.3 \ | |
10 | .man.$(LIB_MAN_SUFFIX): | 10 | drmModeGetResources.3 |
11 | $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ | 11 | MANPAGES_ALIASES = |
12 | |||
13 | XML_FILES = \ | ||
14 | ${patsubst %.1,%.xml,${patsubst %.3,%.xml,${patsubst %.5,%.xml,${patsubs %.7,%.xml,$(MANPAGES)}}}} | ||
15 | CLEANFILES = | ||
16 | EXTRA_DIST = | ||
17 | man_MANS = | ||
18 | |||
19 | if HAVE_XSLTPROC | ||
20 | |||
21 | CLEANFILES += $(MANPAGES) $(MANPAGES_ALIASES) | ||
22 | EXTRA_DIST += $(MANPAGES) $(MANPAGES_ALIASES) $(XML_FILES) | ||
23 | man_MANS += $(MANPAGES) $(MANPAGES_ALIASES) | ||
24 | |||
25 | XSLTPROC_FLAGS = \ | ||
26 | --stringparam man.authors.section.enabled 0 \ | ||
27 | --stringparam man.copyright.section.enabled 0 \ | ||
28 | --stringparam funcsynopsis.style ansi \ | ||
29 | --stringparam man.output.quietly 1 | ||
30 | |||
31 | XSLTPROC_PROCESS_MAN = \ | ||
32 | $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ | ||
33 | $(XSLTPROC) -o $@ $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< | ||
34 | |||
35 | %.1: %.xml | ||
36 | $(XSLTPROC_PROCESS_MAN) | ||
37 | |||
38 | %.3: %.xml | ||
39 | $(XSLTPROC_PROCESS_MAN) | ||
40 | |||
41 | %.5: %.xml | ||
42 | $(XSLTPROC_PROCESS_MAN) | ||
43 | |||
44 | %.7: %.xml | ||
45 | $(XSLTPROC_PROCESS_MAN) | ||
46 | |||
47 | endif # HAVE_XSLTPROC | ||
diff --git a/man/drmAvailable.man b/man/drmAvailable.man deleted file mode 100644 index e1bb8dc8..00000000 --- a/man/drmAvailable.man +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | .\" shorthand for double quote that works everywhere. | ||
2 | .ds q \N'34' | ||
3 | .TH drmAvailable __drivermansuffix__ __vendorversion__ | ||
4 | .SH NAME | ||
5 | drmAvailable \- determine whether a DRM kernel driver has been loaded | ||
6 | .SH SYNOPSIS | ||
7 | .nf | ||
8 | .B "#include <xf86drm.h>" | ||
9 | |||
10 | .B "int drmAvailable(void);" | ||
11 | .fi | ||
12 | .SH DESCRIPTION | ||
13 | This function allows the caller to determine whether a kernel DRM driver is | ||
14 | loaded. | ||
15 | |||
16 | .SH RETURN VALUE | ||
17 | If a DRM driver is currently loaded, this function returns 1. Otherwise 0 | ||
18 | is returned. | ||
19 | |||
20 | .SH REPORTING BUGS | ||
21 | Bugs in this function should be reported to http://bugs.freedesktop.org under | ||
22 | the "Mesa" product, with "Other" or "libdrm" as the component. | ||
23 | |||
24 | .SH "SEE ALSO" | ||
25 | drmOpen(__libmansuffix__) | ||
diff --git a/man/drmAvailable.xml b/man/drmAvailable.xml new file mode 100644 index 00000000..55bef94a --- /dev/null +++ b/man/drmAvailable.xml | |||
@@ -0,0 +1,75 @@ | |||
1 | <?xml version='1.0'?> <!--*-nxml-*--> | ||
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | ||
4 | |||
5 | <!-- | ||
6 | Written 2012 by David Herrmann <dh.herrmann@googlemail.com> | ||
7 | Dedicated to the Public Domain | ||
8 | --> | ||
9 | |||
10 | <refentry id="drmAvailable"> | ||
11 | <refentryinfo> | ||
12 | <title>Direct Rendering Manager</title> | ||
13 | <productname>libdrm</productname> | ||
14 | <date>September 2012</date> | ||
15 | <authorgroup> | ||
16 | <author> | ||
17 | <contrib>Developer</contrib> | ||
18 | <firstname>David</firstname> | ||
19 | <surname>Herrmann</surname> | ||
20 | <email>dh.herrmann@googlemail.com</email> | ||
21 | </author> | ||
22 | </authorgroup> | ||
23 | </refentryinfo> | ||
24 | |||
25 | <refmeta> | ||
26 | <refentrytitle>drmAvailable</refentrytitle> | ||
27 | <manvolnum>3</manvolnum> | ||
28 | </refmeta> | ||
29 | |||
30 | <refnamediv> | ||
31 | <refname>drmAvailable</refname> | ||
32 | <refpurpose>determine whether a DRM kernel driver has been | ||
33 | loaded</refpurpose> | ||
34 | </refnamediv> | ||
35 | |||
36 | <refsynopsisdiv> | ||
37 | <funcsynopsis> | ||
38 | |||
39 | <funcsynopsisinfo>#include <xf86drm.h></funcsynopsisinfo> | ||
40 | |||
41 | <funcprototype> | ||
42 | <funcdef>int <function>drmAvailable</function></funcdef> | ||
43 | <paramdef>void</paramdef> | ||
44 | </funcprototype> | ||
45 | |||
46 | </funcsynopsis> | ||
47 | </refsynopsisdiv> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | <para><function>drmAvailable</function> allows the caller to determine | ||
52 | whether a kernel DRM driver is loaded.</para> | ||
53 | </refsect1> | ||
54 | |||
55 | <refsect1> | ||
56 | <title>Return Value</title> | ||
57 | <para><function>drmAvailable</function> returns 1 if a DRM driver is | ||
58 | currently loaded. Otherwise 0 is returned.</para> | ||
59 | </refsect1> | ||
60 | |||
61 | <refsect1> | ||
62 | <title>Reporting Bugs</title> | ||
63 | <para>Bugs in this function should be reported to | ||
64 | http://bugs.freedesktop.org under the "Mesa" product, with "Other" or | ||
65 | "libdrm" as the component.</para> | ||
66 | </refsect1> | ||
67 | |||
68 | <refsect1> | ||
69 | <title>See Also</title> | ||
70 | <para> | ||
71 | <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | ||
72 | <citerefentry><refentrytitle>drmOpen</refentrytitle><manvolnum>3</manvolnum></citerefentry> | ||
73 | </para> | ||
74 | </refsect1> | ||
75 | </refentry> | ||
diff --git a/man/drmHandleEvent.man b/man/drmHandleEvent.man deleted file mode 100644 index b98f417d..00000000 --- a/man/drmHandleEvent.man +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | .\" shorthand for double quote that works everywhere. | ||
2 | .ds q \N'34' | ||
3 | .TH drmHandleEvent __drivermansuffix__ __vendorversion__ | ||
4 | .SH NAME | ||
5 | drmHandleEvent \- read and process pending DRM events | ||
6 | .SH SYNOPSIS | ||
7 | .nf | ||
8 | .B "#include <xf86drm.h>" | ||
9 | |||
10 | .B "typedef struct _drmEventContext {" | ||
11 | .BI " int version;" | ||
12 | .BI " void (*vblank_handler)(int fd," | ||
13 | .BI " unsigned int sequence," | ||
14 | .BI " unsigned int tv_sec," | ||
15 | .BI " unsigned int tv_usec," | ||
16 | .BI " void *user_data);" | ||
17 | .BI " void (*page_flip_handler)(int fd," | ||
18 | .BI " unsigned int sequence," | ||
19 | .BI " unsigned int tv_sec," | ||
20 | .BI " unsigned int tv_usec," | ||
21 | .BI " void *user_data);" | ||
22 | .B "} drmEventContext, *drmEventContextPtr;" | ||
23 | |||
24 | .B "int drmHandleEvent(int fd, drmEventContextPtr evctx);" | ||
25 | .fi | ||
26 | .SH DESCRIPTION | ||
27 | This function will process outstanding DRM events on | ||
28 | .I fd | ||
29 | , which must be an open DRM device. This function should be called after | ||
30 | the DRM file descriptor has polled readable; it will read the events and | ||
31 | use the passed-in | ||
32 | .I evctx | ||
33 | structure to call function pointers with the parameters noted above. | ||
34 | |||
35 | .SH RETURN VALUE | ||
36 | Returns 0 on success, or if there is no data to read from the file descriptor. | ||
37 | Returns -1 if the read on the file descriptor fails or returns less than a | ||
38 | full event record. | ||
39 | |||
40 | .SH REPORTING BUGS | ||
41 | Bugs in this function should be reported to http://bugs.freedesktop.org under | ||
42 | the "Mesa" product, with "Other" or "libdrm" as the component. | ||
43 | |||
44 | .SH "SEE ALSO" | ||
45 | drmModePageFlip(__libmansuffix__), drmWaitVBlank(__libmansuffix__) | ||
diff --git a/man/drmHandleEvent.xml b/man/drmHandleEvent.xml new file mode 100644 index 00000000..b1006e51 --- /dev/null +++ b/man/drmHandleEvent.xml | |||
@@ -0,0 +1,102 @@ | |||
1 | <?xml version='1.0'?> <!--*-nxml-*--> | ||
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | ||
4 | |||
5 | <!-- | ||
6 | Written 2012 by David Herrmann <dh.herrmann@googlemail.com> | ||
7 | Dedicated to the Public Domain | ||
8 | --> | ||
9 | |||
10 | <refentry id="drmHandleEvent"> | ||
11 | <refentryinfo> | ||
12 | <title>Direct Rendering Manager</title> | ||
13 | <productname>libdrm</productname> | ||
14 | <date>September 2012</date> | ||
15 | <authorgroup> | ||
16 | <author> | ||
17 | <contrib>Developer</contrib> | ||
18 | <firstname>David</firstname> | ||
19 | <surname>Herrmann</surname> | ||
20 | <email>dh.herrmann@googlemail.com</email> | ||
21 | </author> | ||
22 | </authorgroup> | ||
23 | </refentryinfo> | ||
24 | |||
25 | <refmeta> | ||
26 | <refentrytitle>drmHandleEvent</refentrytitle> | ||
27 | <manvolnum>3</manvolnum> | ||
28 | </refmeta> | ||
29 | |||
30 | <refnamediv> | ||
31 | <refname>drmHandleEvent</refname> | ||
32 | <refpurpose>read and process pending DRM events</refpurpose> | ||
33 | </refnamediv> | ||
34 | |||
35 | <refsynopsisdiv> | ||
36 | |||
37 | <funcsynopsis> | ||
38 | <funcsynopsisinfo>#include <xf86drm.h></funcsynopsisinfo> | ||
39 | |||
40 | <funcprototype> | ||
41 | <funcdef>int <function>drmHandleEvent</function></funcdef> | ||
42 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
43 | <paramdef>drmEventContextPtr <parameter>evctx</parameter></paramdef> | ||
44 | </funcprototype> | ||
45 | </funcsynopsis> | ||
46 | |||
47 | </refsynopsisdiv> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | <para><function>drmHandleEvent</function> processes outstanding DRM events | ||
52 | on the DRM file-descriptor passed as <parameter>fd</parameter>. This | ||
53 | function should be called after the DRM file-descriptor has polled | ||
54 | readable; it will read the events and use the passed-in | ||
55 | <parameter>evctx</parameter> structure to call function pointers | ||
56 | with the parameters noted below: | ||
57 | |||
58 | <programlisting> | ||
59 | typedef struct _drmEventContext { | ||
60 | int version; | ||
61 | void (*vblank_handler) (int fd, | ||
62 | unsigned int sequence, | ||
63 | unsigned int tv_sec, | ||
64 | unsigned int tv_usec, | ||
65 | void *user_data) | ||
66 | void (*page_flip_handler) (int fd, | ||
67 | unsigned int sequence, | ||
68 | unsigned int tv_sec, | ||
69 | unsigned int tv_usec, | ||
70 | void *user_data) | ||
71 | } drmEventContext, *drmEventContextPtr; | ||
72 | </programlisting> | ||
73 | |||
74 | </para> | ||
75 | |||
76 | </refsect1> | ||
77 | |||
78 | <refsect1> | ||
79 | <title>Return Value</title> | ||
80 | <para><function>drmHandleEvent</function> returns <literal>0</literal> on | ||
81 | success, or if there is no data to read from the file-descriptor. | ||
82 | Returns <literal>-1</literal> if the read on the file-descriptor fails | ||
83 | or returns less than a full event record.</para> | ||
84 | </refsect1> | ||
85 | |||
86 | <refsect1> | ||
87 | <title>Reporting Bugs</title> | ||
88 | <para>Bugs in this function should be reported to | ||
89 | http://bugs.freedesktop.org under the "Mesa" product, with "Other" or | ||
90 | "libdrm" as the component.</para> | ||
91 | </refsect1> | ||
92 | |||
93 | <refsect1> | ||
94 | <title>See Also</title> | ||
95 | <para> | ||
96 | <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | ||
97 | <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | ||
98 | <citerefentry><refentrytitle>drmModePageFlip</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
99 | <citerefentry><refentrytitle>drmWaitVBlank</refentrytitle><manvolnum>3</manvolnum></citerefentry> | ||
100 | </para> | ||
101 | </refsect1> | ||
102 | </refentry> | ||
diff --git a/man/drmModeGetResources.man b/man/drmModeGetResources.man deleted file mode 100644 index 369bf7d8..00000000 --- a/man/drmModeGetResources.man +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | .\" shorthand for double quote that works everywhere. | ||
2 | .ds q \N'34' | ||
3 | .TH drmModeGetResources __drivermansuffix__ __vendorversion__ | ||
4 | .SH NAME | ||
5 | drmModeGetResources \- retrieve current display configuration information | ||
6 | .SH SYNOPSIS | ||
7 | .nf | ||
8 | .B "#include <xf86drmMode.h>" | ||
9 | |||
10 | .BI "typedef struct _drmModeRes {" | ||
11 | |||
12 | .BI " int count_fbs;" | ||
13 | .BI " uint32_t *fbs;" | ||
14 | |||
15 | .BI " int count_crtcs;" | ||
16 | .BI " uint32_t *crtcs;" | ||
17 | |||
18 | .BI " int count_connectors;" | ||
19 | .BI " uint32_t *connectors;" | ||
20 | |||
21 | .BI " int count_encoders;" | ||
22 | .BI " uint32_t *encoders;" | ||
23 | |||
24 | .BI " uint32_t min_width, max_width;" | ||
25 | .BI " uint32_t min_height, max_height;" | ||
26 | .B "} drmModeRes, *drmModeResPtr;" | ||
27 | |||
28 | .B "drmModeResPtr drmModeGetResources(int fd);" | ||
29 | .fi | ||
30 | .SH DESCRIPTION | ||
31 | This function will allocate, populate, and return a drmModeRes structure | ||
32 | containing information about the current display configuration. | ||
33 | |||
34 | The | ||
35 | .I count_fbs | ||
36 | and | ||
37 | .I fbs | ||
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). | ||
40 | |||
41 | The | ||
42 | .I count_crtcs | ||
43 | and | ||
44 | .I crtcs | ||
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). | ||
50 | |||
51 | The | ||
52 | .I count_connectors | ||
53 | and | ||
54 | .I connectors | ||
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). | ||
60 | |||
61 | The | ||
62 | .I count_encoders | ||
63 | and | ||
64 | .I encoders | ||
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. | ||
67 | |||
68 | The min and max height fields indicate the maximum size of a framebuffer | ||
69 | for this device (i.e. the scanout size limit). | ||
70 | |||
71 | .SH RETURN VALUE | ||
72 | Returns a drmModeRes structure pointer on success, 0 on failure. | ||
73 | |||
74 | .SH REPORTING BUGS | ||
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. | ||
77 | |||
78 | .SH "SEE ALSO" | ||
79 | drmModeGetFB(__libmansuffix__), drmModeAddFB(__libmansuffix__), drmModeAddFB2(__libmansuffix__), drmModeRmFB(__libmansuffix__), drmModeDirtyFB(__libmansuffix__), drmModeGetCrtc(__libmansuffix__), drmModeSetCrtc(__libmansuffix__), drmModeGetEncoder(__libmansuffix__), drmModeGetConnector(__libmansuffix__) | ||
diff --git a/man/drmModeGetResources.xml b/man/drmModeGetResources.xml new file mode 100644 index 00000000..2f5e8c2c --- /dev/null +++ b/man/drmModeGetResources.xml | |||
@@ -0,0 +1,139 @@ | |||
1 | <?xml version='1.0'?> <!--*-nxml-*--> | ||
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | ||
3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> | ||
4 | |||
5 | <!-- | ||
6 | Written 2012 by David Herrmann <dh.herrmann@googlemail.com> | ||
7 | Dedicated to the Public Domain | ||
8 | --> | ||
9 | |||
10 | <refentry id="drmModeGetResources"> | ||
11 | <refentryinfo> | ||
12 | <title>Direct Rendering Manager</title> | ||
13 | <productname>libdrm</productname> | ||
14 | <date>September 2012</date> | ||
15 | <authorgroup> | ||
16 | <author> | ||
17 | <contrib>Developer</contrib> | ||
18 | <firstname>David</firstname> | ||
19 | <surname>Herrmann</surname> | ||
20 | <email>dh.herrmann@googlemail.com</email> | ||
21 | </author> | ||
22 | </authorgroup> | ||
23 | </refentryinfo> | ||
24 | |||
25 | <refmeta> | ||
26 | <refentrytitle>drmModeGetResources</refentrytitle> | ||
27 | <manvolnum>3</manvolnum> | ||
28 | </refmeta> | ||
29 | |||
30 | <refnamediv> | ||
31 | <refname>drmModeGetResources</refname> | ||
32 | <refpurpose>retrieve current display configuration information</refpurpose> | ||
33 | </refnamediv> | ||
34 | |||
35 | <refsynopsisdiv> | ||
36 | |||
37 | <funcsynopsis> | ||
38 | <funcsynopsisinfo>#include <xf86drm.h></funcsynopsisinfo> | ||
39 | <funcsynopsisinfo>#include <xf86drmMode.h></funcsynopsisinfo> | ||
40 | |||
41 | <funcprototype> | ||
42 | <funcdef>drmModeResPtr <function>drmModeGetResources</function></funcdef> | ||
43 | <paramdef>int <parameter>fd</parameter></paramdef> | ||
44 | </funcprototype> | ||
45 | </funcsynopsis> | ||
46 | |||
47 | </refsynopsisdiv> | ||
48 | |||
49 | <refsect1> | ||
50 | <title>Description</title> | ||
51 | <para><function>drmModeGetResources</function> allocates, populates, and | ||
52 | returns a <structname>drmModeRes</structname> structure containing | ||
53 | information about the current display configuration. The structure | ||
54 | contains the following fields: | ||
55 | |||
56 | <programlisting> | ||
57 | typedef struct _drmModeRes { | ||
58 | int count_fbs; | ||
59 | uint32_t *fbs; | ||
60 | |||
61 | int count_crtcs; | ||
62 | uint32_t *crtcs; | ||
63 | |||
64 | int count_connectors; | ||
65 | uint32_t *connectors; | ||
66 | |||
67 | int count_encoders; | ||
68 | uint32_t *encoders; | ||
69 | |||
70 | uint32_t min_width, max_width; | ||
71 | uint32_t min_height, max_height; | ||
72 | } drmModeRes, *drmModeResPtr; | ||
73 | </programlisting> | ||
74 | |||
75 | </para> | ||
76 | |||
77 | <para>The <structfield>count_fbs</structfield> and | ||
78 | <structfield>fbs</structfield> fields indicate the number of currently | ||
79 | allocated framebuffer objects (i.e., objects that can be attached to | ||
80 | a given CRTC or sprite for display).</para> | ||
81 | |||
82 | <para>The <structfield>count_crtcs</structfield> and | ||
83 | <structfield>crtcs</structfield> fields list the available CRTCs in | ||
84 | the configuration. A CRTC is simply an object that can scan out a | ||
85 | framebuffer to a display sink, and contains mode timing and relative | ||
86 | position information. CRTCs drive encoders, which are responsible for | ||
87 | converting the pixel stream into a specific display protocol (e.g., | ||
88 | MIPI or HDMI).</para> | ||
89 | |||
90 | <para>The <structfield>count_connectors</structfield> and | ||
91 | <structfield>connectors</structfield> fields list the available | ||
92 | physical connectors on the system. Note that some of these may not be | ||
93 | exposed from the chassis (e.g., LVDS or eDP). Connectors are attached | ||
94 | to encoders and contain information about the attached display sink | ||
95 | (e.g., width and height in mm, subpixel ordering, and various other | ||
96 | properties).</para> | ||
97 | |||
98 | <para>The <structfield>count_encoders</structfield> and | ||
99 | <structfield>encoders</structfield> fields list the available encoders | ||
100 | on the device. Each encoder may be associated with a CRTC, and may be | ||
101 | used to drive a particular encoder.</para> | ||
102 | |||
103 | <para>The <structfield>min*</structfield> and | ||
104 | <structfield>max*</structfield> fields indicate the maximum size of a | ||
105 | framebuffer for this device (i.e., the scanout size limit).</para> | ||
106 | </refsect1> | ||
107 | |||
108 | <refsect1> | ||
109 | <title>Return Value</title> | ||
110 | <para><function>drmModeGetResources</function> returns a drmModeRes | ||
111 | structure pointer on success, <literal>NULL</literal> on failure. The | ||
112 | returned structure must be freed with | ||
113 | <citerefentry><refentrytitle>drmModeFreeResources</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> | ||
114 | </refsect1> | ||
115 | |||
116 | <refsect1> | ||
117 | <title>Reporting Bugs</title> | ||
118 | <para>Bugs in this function should be reported to | ||
119 | http://bugs.freedesktop.org under the "Mesa" product, with "Other" or | ||
120 | "libdrm" as the component.</para> | ||
121 | </refsect1> | ||
122 | |||
123 | <refsect1> | ||
124 | <title>See Also</title> | ||
125 | <para> | ||
126 | <citerefentry><refentrytitle>drm</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | ||
127 | <citerefentry><refentrytitle>drm-kms</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | ||
128 | <citerefentry><refentrytitle>drmModeGetFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
129 | <citerefentry><refentrytitle>drmModeAddFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
130 | <citerefentry><refentrytitle>drmModeAddFB2</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
131 | <citerefentry><refentrytitle>drmModeRmFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
132 | <citerefentry><refentrytitle>drmModeDirtyFB</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
133 | <citerefentry><refentrytitle>drmModeGetCrtc</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
134 | <citerefentry><refentrytitle>drmModeSetCrtc</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
135 | <citerefentry><refentrytitle>drmModeGetEncoder</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | ||
136 | <citerefentry><refentrytitle>drmModeGetConnector</refentrytitle><manvolnum>3</manvolnum></citerefentry> | ||
137 | </para> | ||
138 | </refsect1> | ||
139 | </refentry> | ||