summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2017-09-08build: Define _GNU_SOURCE in Makefile.amDaniel Vetter1-1/+1
In meson I want to just set this everywhere (no reason not to), and doing so will allow us to clean up a few things. But that means autofoo needs to follow suit. v2: Rebase. Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Stone <daniels@collabora.com> Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-09-08Fix compiler warnings about printf() argumentsVille Syrjälä1-1/+1
gem_spin_batch.c:51:13: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=] intel_opregion_decode.c:313:9: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t {aka const long long unsigned int}’ [-Wformat=] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-05intel_display_poller: Fix truncation of a test name.Eric Anholt1-1/+1
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-05intel_watermark: Fix a warning about "const char" return being silly.Eric Anholt1-1/+1
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-08-30tools: Add intel_vbt_defs.h to Makefile.sourcesArkadiusz Hiler1-0/+1
So is will be picked up for the distributable tarball. Fixes: 09f35ea4dc06 ("tools/intel_vbt_decode: start migrating to kernel intel_vbt_defs.h") Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Acked-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate backlight dumping to kernel structJani Nikula2-28/+8
Drop obsolete field dumping. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate child device type bits decoding to kernel defsJani Nikula3-40/+41
This lets us use the verbatim copy of the kernel intel_vbt_defs.h file after kernel commit 058727ee8d9a ("drm/i915/bios: amend edp block based on intel_vbt_decode"). Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate edp dumping to kernel structJani Nikula3-36/+39
No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate psr dumping to kernel structJani Nikula3-27/+32
No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate child device dumping to kernel structJani Nikula3-81/+118
Retain the legacy definition for the obsolete child device block, at least for now. No functional changes. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: migrate timing dumping to kernel structJani Nikula3-31/+37
Adapt the dumping according to the changes, and do what the kernel does. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: start migrating to kernel intel_vbt_defs.hJani Nikula3-311/+715
Copy over most of intel_vbt_defs.h, and use everything that matches with minor changes from there. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: clean up struct lvds_dvo_timingJani Nikula2-22/+3
For reasons unknown, we have two copies of the struct. Deduplicate. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_vbt_decode: remove unused definitions from intel_bios.hJani Nikula1-268/+0
This is prep work for refactoring VBT definitions. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-29tools/intel_lid: use local register definitionJani Nikula1-2/+3
This makes the future intel_vbt_decode refactoring easier. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-08-24aubdump: Log some information about the execbuf callsJason Ekstrand1-1/+10
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
2017-08-24aubdump: Use write_reloc for filling out the ringbufferJason Ekstrand1-34/+32
Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-08-24aubdump: Reject execbuffer2 calls with bad BOsJason Ekstrand1-0/+8
This is required for the supports_48b_addresses check in the Vulkan driver to work without messing up the resulting aub. Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2017-08-16tools/intel_vbt_decode: Fix decoding of child device structureVille Syrjälä1-1/+1
Fix decoding of the start of the child device structure. I had accidentally duplicated the "device class/type" member and forgot to include the add-in offset later. Fortunately both were two byte fields so they effectively cancelled each other out and thus the remainder of the child device structure was being decoded correctly. But of course anything sitting between these two fields was being decoded incorrectly. Fixes: 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2017-08-08intel_gpu_top: Use drm_open_driver, don't need drm masterPetri Latvala1-1/+1
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-07-11igt: Add LOCAL defines for distro compatibilityArkadiusz Hiler1-1/+4
Each Linux distro takes a different spin on providing kernel's uapi headers (especialy the *drm*.h). You can get them with linux-headers, you can get them with libdrm. Sometime you can even get them twice, from both sources. Sometimes the headers match your kernel version, sometimes you end up stuck with headers matching the kernel that the given release of the distro came out with. This makes things harder for code that does not depend on libdrm, as we cannot have sane ./configure-time checks. So let's define LOCAL_ version for FENCE and EXECBUFFER2_WB defines until all the stable distros catch up (+/- some epsilon). Cc: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-07-06Make igtrc configuration common, with configurable suspend/resume delayPaul Kocialkowski1-2/+2
This adds support for configurable suspend/resume delay and takes the occasion to move igtrc configuation from igt_chamelium to igt_core. This way, suspend/resume delay configuration can be used for all tests. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@linux.intel.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2017-06-09Fix a couple of typos CLFAGS -> CFLAGSPetri Latvala1-1/+1
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07tools/Android.mk: Fix zlib inclusionArkadiusz Hiler1-4/+4
Add dependency on libz instead of doing path magic. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07Android.mk: Use drm stubsArkadiusz Hiler1-1/+1
Use drm stubs that sit under lib/stubs. Also drop strange, nonexistent additions to LOCAL_C_INCLUDES. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07Android.mk: Filter out *.h from src filesArkadiusz Hiler1-1/+1
Newer Android's build system complains about unused files if we leave those there. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07Android.mk: Fix libkmod useArkadiusz Hiler1-0/+2
On Android libkmod.h is nested under libkmod directory, so we should include appropriately. Also we need to link with it. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07tools/Android.mk: Add guc_logger and l3_parity skip listArkadiusz Hiler1-0/+2
Those tools does not build on Android due to "Linux-only" dependencies. Let's blacklist them for now. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-07Make conditions on HAVE_UDEV consistentArkadiusz Hiler3-3/+3
We have a lot of `#ifdef HAVE_UDEV` and ` #if HAVE_UDEV` all over the place, but ifdef and if have a slightly different semantics. Let make it consistent by using #ifdefs only. Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-06-06Fix the mac address definition typo in tools/intel_gvtg_test.Terrence Xu1-1/+1
Changed the "%2X" to "%02X", to prevent padding with spaces, which breaks qemu command line arguments when first RANDOM is <0x10. Signed-off-by: Sarvela Tomi P <tomi.p.sarvela@intel.com> Signed-off-by: Terrence Xu <terrence.xu@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-05-11intel_error_decode: Tell zlib the correct amount of memory we allocatedChris Wilson1-5/+4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-10intel_error_decode: Fix off-by-one when dumping the binary objectsChris Wilson1-1/+1
Include the last line to show the last bytes, important when looking for overflows! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-04intel_reg: Use the drm device fd as a hint onlyChris Wilson1-2/+1
We want intel_reg to work even when i915.ko isn't loaded, in which case there is debugfs to provide /debug/.../i915_forcewake, but we will survive without! Fixes: 301ad44cdf1b ("lib: Open debugfs files for the given DRM device") Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-22Fix build for intel_dp_complianceChris Wilson1-0/+1
Tries to use glib without setting the CFLAGS. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-14aubdump: Don't bail if a GEM handle of 0 is passed into execbufJason Ekstrand1-3/+2
A gem handle of 0 can be used to check for whether or not 48-bit addressing is available. This keeps aubdump from failing on you if you try to do the check. Reviewed-by: Rafael Antognolli <rafael.antognolli@intel.com>
2017-04-08tools/intel_error_decode: Dump the GuC log if availableChris Wilson1-0/+1
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-08tools/intel_error_decode: Don't try instruction decoding on data buffersChris Wilson1-15/+26
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Refactor matching known buffersChris Wilson1-81/+48
Lots of repeated code, and a few missed named buffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Automatically open a pagerChris Wilson1-0/+27
A feature I've wanted for a long time, just to save typing | less every time. Implementation nabbed from aubinator_error_decode. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Add support for user specified boChris Wilson1-0/+21
See EXEC_OBJECT_CAPTURE. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-06tools/intel_error_decode: Do ascii85 decode firstChris Wilson1-15/+14
The dashes "---" may occur within an ascii85 block, but only an ascii85 block starts with ':' or '~'. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-28tools: Remove accidentally included binary intel_bios_readerRobert Foss1-0/+0
The binary tools/intel_bios_reader was accidentally included in 3e04c5197ff965a8cd050f9c3b5213abcf437a31. This commit removes it again. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2017-03-24lib/debugfs: Phase out igt_debugfs_fopen()Chris Wilson1-3/+13
Wrapping fdopen() proved dangerous, the underlying fd is not refcounted, and we must close it in the library or else we easily leak and exhaust all fd. Since we can't provide igt_debugfs_fopen(), move the burden onto the caller for those that require a stream FILE*. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson12-28/+71
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso12-71/+28
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso12-28/+71
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10tools/intel_vbt_decode: Remove unused codePetri Latvala1-22/+0
efp_conn() and related have been unused since 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2017-03-09aubdump: Support EXECBUFFER2_WRJason Ekstrand1-1/+2
2017-03-09Add the new tool for create GVT-g Linux guest based on KVMGTTerrence Xu3-1/+357
GVT-g (Intel® Graphics Virtualization Technology) is a full GPU virtualization solution with mediated pass-through support. This tool is for create basic Linux guest based on KVMGT with VFIO framework, it including create vgpu, create guest, check IP address, destroy guest, remove vgpu,check dmesg log, etc functions. v2: Treat this case as a free-standing tool, with detect & skip when it's not running on GVT-g capable platform or running without the required tools. v3: Make some optimizations: like "update the generate mac address scripts", "provide more useful information for end user", etc. v4: Miscellaneous cleanup (Petri) Signed-off-by: Terrence Xu <terrence.xu@intel.com> Signed-off-by: Benyu Xu <benyux.xu@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-02-19tools/intel_guc_logger: Fix the assert for the verbosity levelOscar Mateo1-1/+1
I guess no one has needed to change the verbosity level of the GuC logs. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>