summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2015-08-13tools/null_state/gen9: Send all components in VF stateMika Kuoppala
Fix commit 59cdc16b1a6f069f944ff17851a59edf8f72d45d Author: Arun Siluvery <arun.siluvery@linux.intel.com> Date: Fri Jul 31 16:27:07 2015 +0100 tools/null_state/gen9: Send atleast one valid component in VF state to honor the Reviewed-by, send all four components as noted by Ben in his review. Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-08-13tools/null_state/gen9: Send atleast one valid component in VF stateArun Siluvery
A programming restriction exists for this instruction, atleast one component of one valid vertex element must be enabled. Cc: Ben Widawsky <benjamin.widawsky@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com> Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-08-12aubdump: Write header after figuring out the genKristian Høgsberg Kristensen
We have to defer figuring out the gen until we have a PCI ID, which we don't have for sure until the first execbuffer2 ioctl. We can't write the file header until we have the gen since we need to know the size of offsets in the file format. Move the call to write_header() into the dump_execbuffer2() where we have the gen. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-12aubdump: Handle 48 bit ppgtt dumpingKristian Høgsberg Kristensen
Put 48 bit block offsets in the AUB file and track the bo offsets with uint64_t. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-07tools/aubdump: Get PCI ID from getparam ioctl when we canKristian Høgsberg
Instead of doing an extra getparam ioctl to discover the PCI ID, we can snoop it when the application queries it. Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
2015-08-07tools/aubdump: Don't rely on open for discovering the drm fdKristian Høgsberg
DRI3 passes the drm fd over X protocol and as such we can't rely on hooking open to discover the drm fd. Instead we look for drm ioctl codes in the ioctl wrapper. If we don't have a drm fd and see something that looks like a drm ioctl, we stat the fd to see if it's a drm fd. If it is, we save it for later so we don't have to do an extra stat on every ioctl. We can then drop the open wrapper, but we keep the close wrapper so we can invalidate our cached drm_fd if it's closed. Signed-off-by: Kristian Høgsberg <krh@cryptic-dragon.jf.intel.com>
2015-08-06benchmarks/Android.mk, tools/Android.mk: Fix android build errorDerek Morton
Recently added tools / benckmarks have the same module name as existing tests. Android does not allow duplicate modules. This patch appends _benchmark and _tool to the module names used when building benckmarks and tools to prevent clashes with tests of the same name. Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-05tools: Use right #include path for i915_drm.hKristian Høgsberg Kristensen
pkg-config adds /usr/include/libdrm to the include path so we only need i915_drm.h Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-04tools/aubdump: Add --device option for overriding device IDKristian Høgsberg Kristensen
This lets us capture AUB traces for platforms different from the one we're running on. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-08-04tools/aubdump.c: Also define struct drm_i915_gem_userptr for compatibilityKristian Høgsberg Kristensen
Oops, we obviously also need to define the argument struct for userptr. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-31tools/aubdump: #define DRM_IOCTL_I915_GEM_USERPTR if kernel headers don'tKristian Høgsberg Kristensen
Fix compile error on older kernels. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-31tools: Add LD_PRELOAD-based AUB dumper toolKristian Høgsberg Kristensen
This does everything the aub dump functionality in libdrm does, but without being part of libdrm. This moves the very developer oriented functionality out of core libdrm and adds some flexibility in how we activate it (we can specify filename, for example). Most importantly, this lets us dump aub files for tools and/or drivers that don't use libdrm, without having to add that code to each of those projects. The tool is used much like strace or valgrind. For example: $ intel_aubdump -v --output=stuff.aub -- glxgears -geometry 500x500 will launch glxgears with its options and enable aub dumping and pass the -v and --output=stuff.aub options to the aub dumper. Signed-off-by: Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
2015-07-20Android.mk: Disable tools that do not build for androidDerek Morton
Disable the tools / demo code that do not currently build for android until they can be fixed. Affected tools / demos intel_display_crc intel_sprite_on v2: intel_display_crc compiled conditionally on ANDROID_HAS_CAIRO flag. v3: removed intel_reg from the skip list as Thomas has prepared a patch to fix it for Android. Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20tools/Android.mk: add any extra program sourcesThomas Wood
v2: remove unintended change and fix source file duplication errors (Derek Morton) Cc: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-20intel_reg: support platforms without sys/io.hThomas Wood
Based on an idea from Jani Nikula. Cc: Jani Nikula <jani.nikula@intel.com> Cc: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-19tools: Add a simple stats generator 'igt_stats'Chris Wilson
A rudimentary tool on top of the igt_stats library. Reads a list of numbers from stdin or from a file and prints the estimate of the central location, aka average. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-02build: Add DEBUG_FLAGS to tools and self-testsDamien Lespiau
Makes using GDB better on those binaries. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-30tools: Add an intel_firmware_decode toolDamien Lespiau
So we can inspect fw headers. Sample output: Firmware: skl_dmc_ver1_18.bin (7892 bytes) CSS header (128 bytes) module_type: DMC (9) header_len: 32 header_ver: 0x10000 module_id: 0x0 module_vendor: 0x0 date: 0x7df060c size: 1973 key_size: 0 modulus_size: 0 exponent_size: 0 version: 1.18 (0x10012) kernel_header_info: 0x0 Package header (256 bytes) header_len: 64 header_ver: 1 num_entries: 3 Firmware #1 stepping: A.* offset: 4294967295 Firmware #2 stepping: B.* offset: 4294967295 Firmware #3 stepping: *.* offset: 0 0x7f0867143000 0x7f0867143180 signature: 0x40403e3e header_len: 128 header_ver: 1 dmcc_ver: 520 project: 0x900 fw_size: 1845 fw_version: 0x10008 mmio_count: 3 write(0x0008f074, 0x00002fc0) write(0x0008f004, 0x02500204) write(0x0008f034, 0xc003b400) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Spwan igt_init_with_size() from igt_init()Damien Lespiau
It's all about good looking APIs. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a way to specify if the data set is a population or a sampleDamien Lespiau
This changes how we compute the variance. We want an unbiased variance when reasoning about a sample. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Add a way to retrieve the standard deviationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27stats: Be more precise and talk about mean, not averageDamien Lespiau
There are several types of averages eg. mean, median and mode. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Don't try other dividers if we find a 0 central freq ↵Damien Lespiau
deviation Paulo suggested that we could short-circuit the search for a good divider if we find a 0 deviation of the DCO frequency from the central frequency. Out of the 373 test frequencies, 34 hit that fast path. Suggested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Sync a comment with from the kernel codeDamien Lespiau
Might as well try to keep the code in both this test and the kernel as close as possible. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Fix the mininum deviation computationDamien Lespiau
Paulo noticed that, because we were only comparing positive deviations with positive deviations and negative deviations with negative deviations, we weren't actually always using the absolute minimal deviation at all. This improves the average deviation across all tested frequencies (373): before: average deviation: 215.13 after: average deviation: 194.47 Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Cycle through dividers, then central freqsDamien Lespiau
Follow Paulo's comment on the corresponding kernel patch. This means we also have to move the break when we have cycled through the even dividers as well. This improves the number of even dividers used across the tested frequencies (373) (at the expense of a slightly worse average deviation, but "even dividers take precedence over a lower deviation". before: even/odd dividers: 338/35 average deviation: 206.52 after: even/odd dividers: 363/10 average deviation: 215.13 Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-25skl_compute_wrpll: Print the average deviationDamien Lespiau
It's interesting to watch the effect of some algorithm tweaks on the average deviation between the central freq and the dco freq. A metric we'd like to minimize. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-11tools: print a warning for tools replaced by intel_regThomas Wood
Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-05-15intel_display_crc: A new tool to play with display CRCsDamien Lespiau
The CRC debug interface is a bit more than a simple textual file in debugfs as there are a small command language to control what we want from them. This tool starts, slowly, by allowing us to dump the pipe CRCs whenever we want. It can be handy to check what is the current CRC when we reach a certain state on the screen (when using --interactive-debug for instance) against a known CRC. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-12quick_dump: Expand the WM cursor registersDamien Lespiau
The tool I used to generate that list doesn't support expanding the list of registers when dealing with something like CUR_WM_A_*. Expand it by hand for now (tm). Remove CUR_PAL_${pipe}_* for the same reason (and because it's not very useful to have). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-11quick_dump/skl: Add more pipe/plane registersDamien Lespiau
With the recent developments, add scaler and NV12 registers to the dump. Also add the cursor registers that were missing in the first batch. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-11build: Add missing line continuationDamien Lespiau
When -lrt was added, it was missing a '\' at the end of line. Add it. Cc: Tim Gore <tim.gore@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-08skl_compute_wrpll: Prefer even dividersDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-08skl_compute_wrpll: Count how many even/odd dividers we computeDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-08skl_compute_wrpll: Make sure we respect the DCO frequency constraintsDamien Lespiau
We might as well verify that we have a semblance of all being in order by making sure the DCO frequency is within the expected bounds. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-08skl_compute_wrpll: Add a way to test the SKL WRPLL algorithmDamien Lespiau
I had various problems (infinite loops, unable to compute dividers for certain frequencies) after implementing a BSpec update. Much easier to debug that in userspace. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-08compute_wrpll: Rename ddi_compute_wrpll to hsw_compute_wrpllDamien Lespiau
We're going to add the SKL version, time to rename the HSW/BDW one. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-05-05rename global mmio variable to igt_global_mmioJani Nikula
Global variable names should reflect the fact that they are indeed global, and at the very least they should not be as short as just "mmio". Rename mmio to igt_global_mmio. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_vga_{read,write}: use INREG and OUTREGJani Nikula
Use INREG and OUTREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_display_poller: use INREG and OUTREGJani Nikula
Use INREG and OUTREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_watermark: switch to INREGJani Nikula
Use INREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_reg_{read,write}: switch to INREG and OUTREGJani Nikula
Use INREG and OUTREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_reg_checker: switch to INREGJani Nikula
Use INREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_backlight: switch to INREG and OUTREGJani Nikula
Use INREG and OUTREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-05-05intel_reg: switch to INREG and OUTREGJani Nikula
Use INREG and OUTREG instead of using mmio directly. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-04-27tools: add missing header to distributed sourcesThomas Wood
Make sure all the sources for intel_reg are included in the distribution. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-27tools: update .gitignoreThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-23intel_reg: introduce one intel_reg tool to rule them allJani Nikula
Three Tools for the Elven-kings under the sky, Seven for the Dwarf-lords in their halls of stone, Nine for Mortal Men doomed to die, One for the Dark Lord on his dark throne In the Land of Mordor where the Shadows lie. One Tool to rule them all, One Tool to find them, One Tool to bring them all and in the darkness bind them In the Land of Mordor where the Shadows lie. J.R.R. Tolkien's epigraph to The Lord of The Tools | sed 's/Ring/Tool/g' Introduce intel_reg as the one Intel graphics register multitool to replace intel_reg_read, intel_reg_write, intel_iosf_sb_read, intel_iosf_sb_write, intel_vga_read, intel_vga_write, intel_reg_dumper, intel_reg_snapshot, and quick_dump.py. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-04-22tools/quick_dump/makefile.am: add -lrt to get clock_gettimeTim Gore
Attempting to build IGT on linux without libunwind fails due to tools/quick_dump not linking the rt library, causing an undefined symbol error for clock_gettime. Adding -lrt to the list of libraries in Makefile.am fixes this. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-04-16quick_dump: Fix undefined symbols from libunwindVille Syrjälä
../../lib/.libs/libintel_tools.a(igt_core.o): In function `print_backtrace': intel-gpu-tools/lib/igt_core.c:981: undefined reference to `_Ux86_64_getcontext' intel-gpu-tools/lib/igt_core.c:982: undefined reference to `_ULx86_64_init_local' intel-gpu-tools/lib/igt_core.c:983: undefined reference to `_ULx86_64_step' intel-gpu-tools/lib/igt_core.c:987: undefined reference to `_ULx86_64_get_proc_name' Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>