blob: 7cd78e4473fff4f26bc0044ee4de691ec0247728 [file] [log] [blame]
Thomas Wood84f23412014-10-29 11:18:27 +00001Intel GPU Tools
2===============
3
4Description
5-----------
6
7Intel GPU Tools is a collection of tools for development and testing of the
8Intel DRM driver. There are many macro-level test suites that get used against
9the driver, including xtest, rendercheck, piglit, and oglconform, but failures
Eric Anholt8c641832009-03-26 17:15:11 -070010from those can be difficult to track down to kernel changes, and many require
11complicated build procedures or specific testing environments to get useful
Thomas Wood84f23412014-10-29 11:18:27 +000012results. Therefore, Intel GPU Tools includes low-level tools and tests
13specifically for development and testing of the Intel DRM Driver.
Eric Anholt8c641832009-03-26 17:15:11 -070014
Thomas Wood84f23412014-10-29 11:18:27 +000015Intel GPU Tools is split into several sections:
Eric Anholt8c641832009-03-26 17:15:11 -070016
17benchmarks/
Thomas Wood84f23412014-10-29 11:18:27 +000018 This is a collection of useful microbenchmarks that can be used to tune
19 DRM code in relevant ways.
Eric Anholt8c641832009-03-26 17:15:11 -070020
Eric Anholt676a1092009-03-27 16:03:02 -070021 The benchmarks require KMS to be enabled. When run with an X Server
22 running, they must be run as root to avoid the authentication
23 requirement.
24
Daniel Vettereafdf502011-11-01 14:33:53 +010025 Note that a few other microbenchmarks are in tests (like gem_gtt_speed).
26
Eric Anholt8c641832009-03-26 17:15:11 -070027tests/
28 This is a set of automated tests to run against the DRM to validate
Thomas Wood84f23412014-10-29 11:18:27 +000029 changes. Many of the tests have subtests, which can be listed by using
30 the --list-subtests command line option and then run using the
31 --run-subtest option. If --run-subtest is not used, all subtests will
32 be run. Some tests have futher options and these are detailed by using
33 the --help option.
Eric Anholt8c641832009-03-26 17:15:11 -070034
Thomas Woodd3cfe282014-07-11 10:47:43 +010035 The test suite can be run using the run-tests.sh script available in
36 the scripts directory. Piglit is used to run the tests and can either
37 be installed from your distribution (if available), or can be
38 downloaded locally for use with the script by running:
Daniel Vettereafdf502011-11-01 14:33:53 +010039
Thomas Woodd3cfe282014-07-11 10:47:43 +010040 ./scripts/run-tests.sh -d
41
42 run-tests.sh has options for filtering and excluding tests from test
43 runs:
44
45 -t <regex> only include tests that match the regular expression
46 -x <regex> exclude tests that match the regular expression
47
Thomas Wood498fb622015-12-02 16:35:50 +000048 Useful patterns for test filtering are described in the API
49 documentation and the full list of tests and subtests can be produced
50 by passing -l to the run-tests.sh script.
Thomas Woodd3cfe282014-07-11 10:47:43 +010051
52 Results are written to a JSON file and an HTML summary can also be
53 created by passing -s to the run-tests.sh script. Further options are
54 are detailed by using the -h option.
55
56
57 If not using the script, piglit can be obtained from:
Daniel Vetterdf545c12012-12-04 10:34:46 +010058
59 git://anongit.freedesktop.org/piglit
60
Thomas Wood6d28f6a2014-06-09 13:35:21 +010061 There is no need to build and install piglit if it is only going to be
62 used for running i-g-t tests.
63
64 Set the IGT_TEST_ROOT environment variable to point to the tests
Thomas Woodd3cfe282014-07-11 10:47:43 +010065 directory, or set the path key in the "igt" section of piglit.conf to
66 the intel-gpu-tools root directory.
Daniel Vetterdf545c12012-12-04 10:34:46 +010067
Thomas Woodd3cfe282014-07-11 10:47:43 +010068 The tests in the i-g-t sources need to have been built already. Then we
69 can run the testcases with (as usual as root, no other drm clients
70 running):
Daniel Vetterfd6c66c2013-12-20 15:49:59 +010071
Thomas Wood6d28f6a2014-06-09 13:35:21 +010072 piglit-sources # ./piglit run igt <results-file>
Daniel Vetterdf545c12012-12-04 10:34:46 +010073
74 The testlist is built at runtime, so no need to update anything in
75 piglit when adding new tests. See
76
Thomas Wood6d28f6a2014-06-09 13:35:21 +010077 piglit-sources $ ./piglit run -h
Daniel Vetterdf545c12012-12-04 10:34:46 +010078
79 for some useful options.
80
Daniel Vettera7433ec2013-08-12 14:02:03 +020081 Piglit only runs a default set of tests and is useful for regression
82 testing. Other tests not run are:
83 - tests that might hang the gpu, see HANG in Makefile.am
84 - gem_stress, a stress test suite. Look at the source for all the
85 various options.
86 - testdisplay is only run in the default mode. testdisplay has tons of
87 options to test different kms functionality, again read the source for
88 the details.
89
Daniel Vettereafdf502011-11-01 14:33:53 +010090lib/
91 Common helper functions and headers used by the other tools.
92
93man/
94 Manpages, unfortunately rather incomplete.
Eric Anholt676a1092009-03-27 16:03:02 -070095
Eric Anholt8c641832009-03-26 17:15:11 -070096tools/
97 This is a collection of debugging tools that had previously been
98 built with the 2D driver but not shipped. Some distros were hacking
99 up the 2D build to ship them. Instead, here's a separate package for
100 people debugging the driver.
Eric Anholt6abc9b12009-03-26 18:44:13 -0700101
Rhys Kiddcd9b86f2018-01-22 23:43:55 -0500102 These tools generally must be run as root, except for the ones that just
Daniel Vettereafdf502011-11-01 14:33:53 +0100103 decode dumps.
Ben Widawsky3b10b7b2011-07-28 14:58:24 -0700104
105debugger/
106 This tool is to be used to do shader debugging. It acts like a
107 debug server accepting connections from debug clients such as
108 mesa. The connections is made with unix domain sockets, and at some
109 point it would be nice if this directory contained a library for
110 initiating connections with debug clients..
111
112 The debugger must be run as root: "sudo debugger/eudb"
Jani Nikulabefabe22013-10-08 21:19:06 +0300113
Daniel Vettera90846a2014-03-11 21:03:39 +0100114docs/
Thomas Wood84f23412014-10-29 11:18:27 +0000115 Contains the automatically generated intel-gpu-tools libraries
116 reference documentation in docs/reference/. You need to have the
117 gtk-doc tools installed and use the "--enable-gtk-doc" configure flag
118 to generate this API documentation.
Daniel Vettera90846a2014-03-11 21:03:39 +0100119
Thomas Wood3dd7ad12014-06-09 14:05:42 +0100120 To regenerate the html files when updating documentation, use:
Daniel Vetterc8190142014-03-25 17:46:32 +0100121
122 $ make clean -C docs && make -C docs
123
Thomas Wood3dd7ad12014-06-09 14:05:42 +0100124 If you've added/changed/removed a symbol or anything else that changes
125 the overall structure or indexes, this needs to be reflected in
126 intel-gpu-tools-sections.txt. Entirely new sections will also need to be
127 added to intel-gpu-tools-docs.xml in the appropriate place.
Daniel Vetterc8190142014-03-25 17:46:32 +0100128
Eric Anholt1c058282017-11-10 12:29:40 -0800129include/drm-uapi
130 Imported DRM uapi headers from airlied's drm-next branch.
131 These should be updated all together by executing "make
132 headers_install" from that branch of the kernel and then
133 copying the resulting ./usr/include/drm/*.h in and committing
134 with a note of which commit on airlied's branch was used to
135 generate them.
136
Thomas Wood84f23412014-10-29 11:18:27 +0000137
138Requirements
139------------
140
Jani Nikulad9a25af2015-04-01 12:08:59 +0300141This is a non-exhaustive list of package dependencies required for building
Paul Kocialkowski73387cf2017-07-25 15:48:25 +0300142the default configuration (package names may vary):
Jani Nikulabefabe22013-10-08 21:19:06 +0300143
Daniel Vettera90846a2014-03-11 21:03:39 +0100144 gtk-doc-tools
Jani Nikulad9a25af2015-04-01 12:08:59 +0300145 libcairo2-dev
146 libdrm-dev
Jani Nikula5a9d0a32016-12-23 10:12:17 +0200147 libkmod-dev
Jani Nikulad9a25af2015-04-01 12:08:59 +0300148 libpciaccess-dev
Jani Nikula5a9d0a32016-12-23 10:12:17 +0200149 libprocps-dev
Jani Nikulad9a25af2015-04-01 12:08:59 +0300150 libunwind-dev
Jani Nikula4650d342015-04-14 22:33:33 +0300151 python-docutils
Jani Nikulad9a25af2015-04-01 12:08:59 +0300152 x11proto-dri2-dev
153 xutils-dev
Marius Vlad1112abe2016-03-01 18:01:33 +0200154
Paul Kocialkowski73387cf2017-07-25 15:48:25 +0300155The following dependencies are required for building chamelium support
156(package names may vary):
157
158 libxmlrpc-core-c3-dev
159 libpixman-1-dev
160 libudev-dev
161 libglib2.0-dev
162 libgsl-dev
163
Paul Kocialkowski4524a892017-08-21 18:27:20 +0300164The following dependencies are requires for building audio support
165(package names may vary):
166
167 libasound2-dev
168 libgsl-dev
169
Daniel Vetter07c33172018-01-11 09:47:52 +0100170Meson build system support
171--------------------------
Daniel Vetter2e0b57d2017-09-05 14:36:23 +0200172
Daniel Vetter07c33172018-01-11 09:47:52 +0100173Currently we support both meson and automake as build systems, but meson is the
174recommended choice. Oneliner to get started:
Daniel Vetter2e0b57d2017-09-05 14:36:23 +0200175
176$ mkdir build && meson build && cd build && ninja
177
178Note that meson insist on separate build directories from the source tree.
179
180Running testcases is done with
181
182$ cd build && ninja test
183
Daniel Vetter07c33172018-01-11 09:47:52 +0100184Documentation is built using
185
186$ cd build && ninja && ninja intel-gpu-tools-doc
187
188Note that there's a setup script similar to ./autogen.sh which creates a
189compatibility Makefile with a few useful default targets:
190
191$ ./meson.sh [make-arguments]
Daniel Vetter2e0b57d2017-09-05 14:36:23 +0200192
Marius Vlad1112abe2016-03-01 18:01:33 +0200193Releases for maintainers
194------------------------
195
196(1.14)
197
198http://www.x.org/wiki/Development/Documentation/ReleaseHOWTO/