summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2015-12-02tools: fix intel_gpu_abrt to use intel_regJani Nikula1-1/+1
intel_reg_dumper is gone, replaced by 'intel_reg dump'. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-11-24tools/aubdump: Link with -ldl.Matt Turner1-1/+1
aubdump.c uses dlsym(), so it needs to link with -ldl. Otherwise: /bin/sh: symbol lookup error: /usr/lib64/intel_aubdump.so: undefined symbol: dlsym Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-11Add missing noreturn attribute to various functionsThomas Wood2-2/+2
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-11-09lib: Make instdone initialisation fail gracefullyChris Wilson1-1/+2
Just report that we don't recognise the chipset rather than explode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-06igt/intel_aubdump: Use the right ringBen Widawsky1-1/+1
This prevents the simulator from barfing when it sees commands from another ring. I've been using this locally for a very long time. Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-10-14tools/intel_audio_dump: add support for BroxtonLu, Han1-6/+7
This patch adds support for dumping audio registers of Broxton. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-10-02benchmarks: Fix build errors on Android M-DessertDerek Morton1-0/+1
Android M-Dessert treats implicit declaration of function warnings as errors resulting in igt failing to build. This patch fixes the errors by including missing header files as required. Mostly this involved including igt.h in the benchmarks. Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke4-4/+4
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11tools/Android.mk: Fix compile error in intel_reg.cDerek Morton1-0/+12
The patch "tools: install the register definition files" caused a build error on android as it added 'PKGDATADIR' which was not defined in the Android build environment. This patch adds that define to tools/Android.mk. It also copies the files it points to so they are actually in the target file system. v2: Added local variable for tool path Signed-off-by: Derek Morton <derek.j.morton@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11null_state_gen: add const to intel_batch_state_copy dataThomas Wood2-4/+4
The data is not modified by the function and is often declared const. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11tools/aubdump: remove void pointer arithmeticThomas Wood1-2/+2
A gcc extension allows void pointer arithmetic by treating the size of void as 1, but this generates a warning when -Wpointer-arith is used. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11tools/intel_bios_reader: Add MIPI device typeVille Syrjälä2-0/+2
Decode the MIPI [sic] device type. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_bios_reader: Decode the device type bitsVille Syrjälä2-0/+50
Each bit in the device type is supposed to mean something. Decode their meaning. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_bios_reader: Print the child dev handleVille Syrjälä2-0/+36
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11intel_bios_reader: Don't explode looking for the devidVille Syrjälä1-2/+5
Check that the offset where expect to find the device id is withing the BIOS image, instead of accessing whatever (if anything) happens to be there. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11intel_bios_reader: Read the child device size from VBTVille Syrjälä2-4/+5
New stuff has been added to the end of the child device block at various times, so using a hardcoded size for the block is a bad idea. Fortunately the size of the block is listed in the VBT just before the blocks themselves, so grab it from there. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_display_poller: Align DSPSURF to 128k to appease gen4/vlv/chvVille Syrjälä1-3/+3
gen4/vlv/chv require DSPSURF to be 128k aligned. Try to respect that in order to avoid ugly glitches. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_display_poller: Make pipe name alphabeticVille Syrjälä1-1/+11
Instead of raw numbers the user can now specify the pipe as 'a',b'... or 'A','B'... Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3Ville Syrjälä1-9/+17
Check the pipe assignment for each plane (excluding plane C since the kernel doesn't use that one) and pick the first one that's assigned to the target pipe. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_display_poller: Add CHV supportVille Syrjälä1-229/+49
Add CHV support by adding a pipe_offset[] thingy (like we have in the kernel) to deal with the wonky register offsets. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11tools/intel_reg: Print the potential port names in the help textVille Syrjälä3-0/+14
v2: Repaint with Jani's favorite color Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-09tools/intel_reg: Set register stride to 1 for VGA registersVille Syrjälä1-2/+2
VGA registers are generally 8 bits long, so set the stride to 1 byte. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-08tools/intel_reg: Use pci device from config on writeMika Kuoppala1-1/+1
Use the pre configured pci device from config also in write path. Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08build: fix unused-result warningsThomas Wood2-3/+4
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08intel_reg: ensure "intel_reg help" always worksThomas Wood1-1/+1
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08tools: install the register definition filesThomas Wood3-4/+5
Install the register definition files and use them by default in intel_reg. v2: remove redundant path check Suggested-by: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08tools: remove quick_dumpThomas Wood40-329/+2
Remove quick_dump as it has been replaced by the intel_reg tool and move the register definition files to tools/registers. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com>
2015-09-08tools/null_state_gen: fix various compiler warningsThomas Wood9-23/+51
Add the debug and warning flags to cflags and fix the resulting issues. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08tests/tools: add --as-needed to linker flagsThomas Wood1-0/+1
Add --as-needed to the linker flags to reduce the number of shared library dependencies, since not all the tests and tools use all the libraries required by the helper library (for example, many tests do not use cairo). This helps portability of the binaries and also makes a very small improvement to the execution speed and memory consumption. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-17igt: remove deprecated reg access tools in favor of intel_regJani Nikula10-3784/+0
intel_iosf_sb_read, intel_iosf_sb_write, intel_reg_dumper, intel_reg_read, intel_reg_snapshot, intel_reg_write, intel_vga_read, and intel_vga_write have been deprecated in favor of intel_reg. Remove the deprecated tools. intel_reg does everything they do, and more. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-13tools/null_state/gen9: Send all components in VF stateMika Kuoppala1-1/+1
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 Siluvery1-1/+6
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 Kristensen1-2/+1
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 Kristensen1-6/+12
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øgsberg1-1/+11
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øgsberg1-26/+12
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 Morton1-1/+1
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 Kristensen1-1/+1
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 Kristensen2-6/+34
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 Kristensen1-0/+16
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 Kristensen1-0/+5
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 Kristensen5-0/+754
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 Morton1-0/+4
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 Wood1-1/+5
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 Wood1-1/+16
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 Wilson3-0/+107
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 Lespiau1-1/+1
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 Lespiau3-0/+289
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 Lespiau1-1/+1
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 Lespiau1-0/+1
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>