blob: 2c2cd3637a433fb6b003f0294b434c66e5f5f002 [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
Daniel Vettereafdf502011-11-01 14:33:53 +0100102 These tools generally must be run as root, safe for the ones that just
103 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
Thomas Wood84f23412014-10-29 11:18:27 +0000129
130Requirements
131------------
132
Jani Nikulad9a25af2015-04-01 12:08:59 +0300133This is a non-exhaustive list of package dependencies required for building
Paul Kocialkowski73387cf2017-07-25 15:48:25 +0300134the default configuration (package names may vary):
Jani Nikulabefabe22013-10-08 21:19:06 +0300135
Daniel Vettera90846a2014-03-11 21:03:39 +0100136 gtk-doc-tools
Jani Nikulad9a25af2015-04-01 12:08:59 +0300137 libcairo2-dev
138 libdrm-dev
Jani Nikula5a9d0a32016-12-23 10:12:17 +0200139 libkmod-dev
Jani Nikulad9a25af2015-04-01 12:08:59 +0300140 libpciaccess-dev
Jani Nikula5a9d0a32016-12-23 10:12:17 +0200141 libprocps-dev
Jani Nikulad9a25af2015-04-01 12:08:59 +0300142 libunwind-dev
Jani Nikula4650d342015-04-14 22:33:33 +0300143 python-docutils
Jani Nikulad9a25af2015-04-01 12:08:59 +0300144 x11proto-dri2-dev
145 xutils-dev
Marius Vlad1112abe2016-03-01 18:01:33 +0200146
Paul Kocialkowski73387cf2017-07-25 15:48:25 +0300147The following dependencies are required for building chamelium support
148(package names may vary):
149
150 libxmlrpc-core-c3-dev
151 libpixman-1-dev
152 libudev-dev
153 libglib2.0-dev
154 libgsl-dev
155
Paul Kocialkowski4524a892017-08-21 18:27:20 +0300156The following dependencies are requires for building audio support
157(package names may vary):
158
159 libasound2-dev
160 libgsl-dev
161
Daniel Vetter2e0b57d2017-09-05 14:36:23 +0200162Experimental meson build system support
163---------------------------------------
164
165Right now this is just a preview for developers, automake is still used by CI
166and needs to keep working. One-liner howto:
167
168$ mkdir build && meson build && cd build && ninja
169
170Note that meson insist on separate build directories from the source tree.
171
172Running testcases is done with
173
174$ cd build && ninja test
175
176gtkdocs is currently not yet supported.
177
Marius Vlad1112abe2016-03-01 18:01:33 +0200178Releases for maintainers
179------------------------
180
181(1.14)
182
183http://www.x.org/wiki/Development/Documentation/ReleaseHOWTO/