Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 1 | Intel GPU Tools |
| 2 | =============== |
| 3 | |
| 4 | Description |
| 5 | ----------- |
| 6 | |
| 7 | Intel GPU Tools is a collection of tools for development and testing of the |
| 8 | Intel DRM driver. There are many macro-level test suites that get used against |
| 9 | the driver, including xtest, rendercheck, piglit, and oglconform, but failures |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 10 | from those can be difficult to track down to kernel changes, and many require |
| 11 | complicated build procedures or specific testing environments to get useful |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 12 | results. Therefore, Intel GPU Tools includes low-level tools and tests |
| 13 | specifically for development and testing of the Intel DRM Driver. |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 14 | |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 15 | Intel GPU Tools is split into several sections: |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 16 | |
| 17 | benchmarks/ |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 18 | This is a collection of useful microbenchmarks that can be used to tune |
| 19 | DRM code in relevant ways. |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 20 | |
Eric Anholt | 676a109 | 2009-03-27 16:03:02 -0700 | [diff] [blame] | 21 | 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 Vetter | eafdf50 | 2011-11-01 14:33:53 +0100 | [diff] [blame] | 25 | Note that a few other microbenchmarks are in tests (like gem_gtt_speed). |
| 26 | |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 27 | tests/ |
| 28 | This is a set of automated tests to run against the DRM to validate |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 29 | 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 Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 34 | |
Thomas Wood | d3cfe28 | 2014-07-11 10:47:43 +0100 | [diff] [blame] | 35 | 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 Vetter | eafdf50 | 2011-11-01 14:33:53 +0100 | [diff] [blame] | 39 | |
Thomas Wood | d3cfe28 | 2014-07-11 10:47:43 +0100 | [diff] [blame] | 40 | ./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 | |
| 48 | Useful patterns for test filtering are described in |
| 49 | tests/NAMING-CONVENTION and the full list of tests and subtests can be |
| 50 | produced by passing -l to the run-tests.sh script. |
| 51 | |
| 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 Vetter | df545c1 | 2012-12-04 10:34:46 +0100 | [diff] [blame] | 58 | |
| 59 | git://anongit.freedesktop.org/piglit |
| 60 | |
Thomas Wood | 6d28f6a | 2014-06-09 13:35:21 +0100 | [diff] [blame] | 61 | 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 Wood | d3cfe28 | 2014-07-11 10:47:43 +0100 | [diff] [blame] | 65 | directory, or set the path key in the "igt" section of piglit.conf to |
| 66 | the intel-gpu-tools root directory. |
Daniel Vetter | df545c1 | 2012-12-04 10:34:46 +0100 | [diff] [blame] | 67 | |
Thomas Wood | d3cfe28 | 2014-07-11 10:47:43 +0100 | [diff] [blame] | 68 | 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 Vetter | fd6c66c | 2013-12-20 15:49:59 +0100 | [diff] [blame] | 71 | |
Thomas Wood | 6d28f6a | 2014-06-09 13:35:21 +0100 | [diff] [blame] | 72 | piglit-sources # ./piglit run igt <results-file> |
Daniel Vetter | df545c1 | 2012-12-04 10:34:46 +0100 | [diff] [blame] | 73 | |
| 74 | The testlist is built at runtime, so no need to update anything in |
| 75 | piglit when adding new tests. See |
| 76 | |
Thomas Wood | 6d28f6a | 2014-06-09 13:35:21 +0100 | [diff] [blame] | 77 | piglit-sources $ ./piglit run -h |
Daniel Vetter | df545c1 | 2012-12-04 10:34:46 +0100 | [diff] [blame] | 78 | |
| 79 | for some useful options. |
| 80 | |
Daniel Vetter | a7433ec | 2013-08-12 14:02:03 +0200 | [diff] [blame] | 81 | 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 Vetter | eafdf50 | 2011-11-01 14:33:53 +0100 | [diff] [blame] | 90 | lib/ |
| 91 | Common helper functions and headers used by the other tools. |
| 92 | |
| 93 | man/ |
| 94 | Manpages, unfortunately rather incomplete. |
Eric Anholt | 676a109 | 2009-03-27 16:03:02 -0700 | [diff] [blame] | 95 | |
Eric Anholt | 8c64183 | 2009-03-26 17:15:11 -0700 | [diff] [blame] | 96 | tools/ |
| 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 Anholt | 6abc9b1 | 2009-03-26 18:44:13 -0700 | [diff] [blame] | 101 | |
Daniel Vetter | eafdf50 | 2011-11-01 14:33:53 +0100 | [diff] [blame] | 102 | These tools generally must be run as root, safe for the ones that just |
| 103 | decode dumps. |
Ben Widawsky | 3b10b7b | 2011-07-28 14:58:24 -0700 | [diff] [blame] | 104 | |
Ben Widawsky | d8d114b | 2013-02-07 08:35:57 -0800 | [diff] [blame] | 105 | tools/quick_dump |
| 106 | Quick dumper is a python tool built with SWIG bindings to |
| 107 | important libraries exported by the rest of the tool suite. The tool |
| 108 | itself is quite straight forward, and should also be a useful example |
| 109 | for others wishing to write python based i915 tools. |
| 110 | |
Ben Widawsky | d8d114b | 2013-02-07 08:35:57 -0800 | [diff] [blame] | 111 | Note to package maintainers: It is not recommended to package |
| 112 | this directory, as the tool is not yet designed for wide usage. If the |
| 113 | package is installed via "make install" the users will have to set |
Ben Widawsky | cf17d10 | 2013-02-19 09:53:43 -0800 | [diff] [blame] | 114 | their python library path appropriately. Use --disable-dumper |
Ben Widawsky | d8d114b | 2013-02-07 08:35:57 -0800 | [diff] [blame] | 115 | |
Ben Widawsky | 3b10b7b | 2011-07-28 14:58:24 -0700 | [diff] [blame] | 116 | debugger/ |
| 117 | This tool is to be used to do shader debugging. It acts like a |
| 118 | debug server accepting connections from debug clients such as |
| 119 | mesa. The connections is made with unix domain sockets, and at some |
| 120 | point it would be nice if this directory contained a library for |
| 121 | initiating connections with debug clients.. |
| 122 | |
| 123 | The debugger must be run as root: "sudo debugger/eudb" |
Jani Nikula | befabe2 | 2013-10-08 21:19:06 +0300 | [diff] [blame] | 124 | |
Daniel Vetter | a90846a | 2014-03-11 21:03:39 +0100 | [diff] [blame] | 125 | docs/ |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 126 | Contains the automatically generated intel-gpu-tools libraries |
| 127 | reference documentation in docs/reference/. You need to have the |
| 128 | gtk-doc tools installed and use the "--enable-gtk-doc" configure flag |
| 129 | to generate this API documentation. |
Daniel Vetter | a90846a | 2014-03-11 21:03:39 +0100 | [diff] [blame] | 130 | |
Thomas Wood | 3dd7ad1 | 2014-06-09 14:05:42 +0100 | [diff] [blame] | 131 | To regenerate the html files when updating documentation, use: |
Daniel Vetter | c819014 | 2014-03-25 17:46:32 +0100 | [diff] [blame] | 132 | |
| 133 | $ make clean -C docs && make -C docs |
| 134 | |
Thomas Wood | 3dd7ad1 | 2014-06-09 14:05:42 +0100 | [diff] [blame] | 135 | If you've added/changed/removed a symbol or anything else that changes |
| 136 | the overall structure or indexes, this needs to be reflected in |
| 137 | intel-gpu-tools-sections.txt. Entirely new sections will also need to be |
| 138 | added to intel-gpu-tools-docs.xml in the appropriate place. |
Daniel Vetter | c819014 | 2014-03-25 17:46:32 +0100 | [diff] [blame] | 139 | |
Thomas Wood | 84f2341 | 2014-10-29 11:18:27 +0000 | [diff] [blame] | 140 | |
| 141 | Requirements |
| 142 | ------------ |
| 143 | |
Jani Nikula | d9a25af | 2015-04-01 12:08:59 +0300 | [diff] [blame] | 144 | This is a non-exhaustive list of package dependencies required for building |
| 145 | everything (package names may vary): |
Jani Nikula | befabe2 | 2013-10-08 21:19:06 +0300 | [diff] [blame] | 146 | |
Daniel Vetter | a90846a | 2014-03-11 21:03:39 +0100 | [diff] [blame] | 147 | gtk-doc-tools |
Jani Nikula | d9a25af | 2015-04-01 12:08:59 +0300 | [diff] [blame] | 148 | libcairo2-dev |
| 149 | libdrm-dev |
| 150 | libpciaccess-dev |
| 151 | libpython3.3-dev |
| 152 | libunwind-dev |
Jani Nikula | 4650d34 | 2015-04-14 22:33:33 +0300 | [diff] [blame] | 153 | python-docutils |
Jani Nikula | d9a25af | 2015-04-01 12:08:59 +0300 | [diff] [blame] | 154 | swig2.0 |
| 155 | x11proto-dri2-dev |
| 156 | xutils-dev |