summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2018-01-16meson: Build cnl_compute_wrpllPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-01-12tools: Update .gitignorePetri Latvala
Fixes: 834321a5d76a ("tools: Cannonlake port clock programming") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2018-01-11include inttypes.h for PRI definesMike Frysinger
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96620 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-08tools: Cannonlake port clock programmingMika Kahola
Cannonlake port clock programming tests and verifies DPLL legal dividers P, Q, and K. This tests adds two reference clocks 19.2MHz and 24MHz to test algorithm's capability to find P, Q, and K dividers as well as DCO frequency for different symbol clock rates. The test compares two algorithms, the reference with double precision and i915 implementation with fixed point precision. In case of a difference in computation the difference on dividers is printed out to the screen. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2017-12-08debugger/overlay/tools: make sure to include embedded drm-uapi headersLionel Landwerlin
Headers from lib/ depend on drm uapi headers. Since we started embedding them, let's make sure to pull them first. We still depend on libdrm in places, we don't want the system headers from libdrm to be included prior to the embedded ones. v2: Fix debugger/overlay (Lionel) v3: More fixes in lib/tests (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-12-07tools/intel_aubdump: Add ability to simulate execlist submissionScott D Phillips
Newer devices do not have the legacy ring buffer submission model, so aub files generated using that model cannot be handled by some internal tools. The execlist submission modeled by this change is pretty simplistic, using GGTT only and synchronizing after every batch. v2: - Move addr_bits init in separate patch (Jordan) - Don't change GTT entries in gen < 10 Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2017-12-07tools/intel_aubdump: Set addr_bits before write_headerScott D Phillips
write_header() uses addr_bits, so do the initialization earlier. Also set the gen to a non-zero value in case of unknown device, for use by a later patch. Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2017-11-29tools/intel_watermark: Right justify register namesVille Syrjälä
I think the dump is a more legible when the register names are right justified. That way the register name and its value are right next to each other. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Clean up formattingVille Syrjälä
Align the comlums properly, and replace some of the whitespace in the printf()s with properly sized fields. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Clean up SKL plane namesVille Syrjälä
Only print the plane name for planes that actually exist. Also Also include the pipe in the plane name. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Refactor reg name stuffVille Syrjälä
Pull the code to generate the SKL register names into small helper to declutter the main code. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29tools/intel_watermark: Silence gcc7 snprintf() warningsVille Syrjälä
Bump the snprintf() buffer size to 32 bytes to silence gcc. intel_watermark.c:203:57: warning: ‘%c’ directive output may be truncated writing 1 byte into a region of size between 0 and 9 [-Wformat-truncation=] snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d", ^~ intel_watermark.c:203:43: note: directive argument in the range [0, 8] snprintf(reg_name, sizeof(reg_name), "PLANE_WM_%1d_%c_%1d", ^~~~~~~~~~~~~~~~~~~~~ etc. Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Tested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-29igt: Remove Android supportArkadiusz Hiler
This patch gets rid of the Android support, deleting all the hacks and moving code around to the places it belongs. Android build is not really maintained properly and rots rather fast. With recent push for Meson here and Android going for Soong it will only accelerate. It's a good time to drop the illusion of providing any support. Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Kalyan Kondapally <kalyan.kondapally@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-11-22intel_gvtg_test: Handle system(3) return value.Tvrtko Ursulin
Avoid the build warning by checking the pkill either did not find any guests or managed to send a signal to all of them. v2: Inspect system(3) return value properly. (Petri Latvala) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-11-21tools/intel_watermark: Try not to dump nonexistent planes on SKL+Dhinakaran Pandiyan
Having registers for nonexistent planes in the dumpo might end up being rather confusing. Try to only include real planes. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools/intel_watermark: Dump WM_LINETIME on SKL+Ville Syrjälä
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools/intel_watermark: Polish SKL+ register dump output a bitVille Syrjälä
Print hex numbers with "0x" prefix, and make the output a bit more compact. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools/intel_watermark: Eliminate pointless %s in printf()Ville Syrjälä
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools/intel_watermark: Update intel_watermark with SKL supportDhinakaran Pandiyan
Added support to print SKL watermark and DDB registers. v2: Printed raw register data, renamed planes and combined two printf()'s (Ville) v3: s/drm_fd/-1/ for intel_register_access_init() Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> [vsyrjala: make it build, fix indentation, etc.] Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools/intel_watermark: Print linetime wms in usecVille Syrjälä
Let's print the linetime watermarks un usecs. Might make it easier to spot bogus values. Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-11-21tools: Stop opening the driver just to find the debugfsChris Wilson
Since the tools want to work without the module loaded, remove the assumption that we want to load the driver to find debugfs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjala <ville.syrjala@linux.intel.com>
2017-11-17tools/error_decode: Print ASCII user buffersChris Wilson
Look at the first 16 characters of the user buffer and if they are all printable, assume that user buffer contains ASCII data (e.g. a debug log) that we want to simply print out. Otherwise, we treat it as a binary data and hexdump as before. Tvrtko: you know you could just write this as a printf (d'oh) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-11-06tools/aubdump: Avoid ISO C90 warningThierry Reding
GCC will warn about ISO C90 forbidding to mix declarations and code. Declare the variable at the beginning of the function to suppress the warning. Signed-off-by: Thierry Reding <treding@nvidia.com>
2017-10-24meson: intel_dp_compliance depends on libudevJani Nikula
Only build intel_dp_compliance when libudev is available, also include libudev in the list of dependencies. Fixes error when libudev isn't there: ../tools/intel_dp_compliance_hotplug.c:33:21: fatal error: libudev.h: No such file or directory #include <libudev.h> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2017-10-20tools/intel_vbt_decode: abstract child devices printing moreJani Nikula
Unify the common code for current and legacy blocks. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: dump more child device data for version < 152Jani Nikula
There's no evidence that this is the limit. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: unify legacy child device block dumpingJani Nikula
It's the same stuff as in the new child devices. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: unify child device printing across versionsJani Nikula
Make it easier to compare dumping against the struct definition. v2: Fix version comparison for flags, aux channel and dongle detect, and fix some typos while at it (Ville) Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: abstract DSI bridge type dumpJani Nikula
Cleaner than having it inline. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: use %.*s instead of duplicating a stringJani Nikula
child->device_id may not be terminated, but we can use %.*s format specifier to define the max length to print. No need to make a copy. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: update dvo port name dumpingJani Nikula
Add names for new ports, throw out unused macros. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-20tools/intel_vbt_decode: make a copy of child devices before dumpingJani Nikula
Take child device size into account, avoid reading past the actual child device. Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-10-10intel_aubdump: Default to 48-bit AUBs when the gen is unknownJordan Justen
v2: * Use 48-bit rather than 64-bit (Ken) * Use 'addr_bits' rather than 'use_64bit' Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-04Fix compilation on some distrosAusmus, James
Some distros (such as Gentoo) are removing the include of sys/sysmacros.h from sys/types.h. Explicitly include sysmacros.h in files where we use the minor() and major() functions. Signed-off-by: James Ausmus <james.ausmus@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-10-02meson: Distribute meson build system filesPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2017-09-21intel_aubdump: Support I915_EXEC_BATCH_FIRST.Kenneth Graunke
The batch is now on the other end of the list. Fixes issues where modern Mesa and modern kernels together start putting the batch at the front of the list, and intel_aubdump looks for it at the end of the list, causing it to interpret some other buffer as the batch. Then AubLoad or aubinator see bogus data like 1.0 float as a GPU command and get grumpy.
2017-09-15meson: Process intel_aubdump.in into intel_aubdumpJordan Justen
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15intel_aubdump.in: Set executable permissions (for meson build)Jordan Justen
Meson detects if an input file is executable, and copies that to the output file. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install intel_gpu_abrtVille Syrjälä
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Drop the 'lib' prefix from intel_aubdump.soVille Syrjälä
Autotools didn't add the 'lib' prefix to the intel_aubdump.so filename. Coerce meson to match that. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Build and install intel_dp_complianceVille Syrjälä
v2: Fix spaces vs. tabs (Jordan) Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Build and install intel_l3_parityVille Syrjälä
v2: Fix spaces vs. tabs (Jordan) Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install intel_reg register definitionsVille Syrjälä
FIXME: install_subdir exclude_files knob seems to require meson 0.42+. Is that acceptable? v2: Fix spaces vs. tabs (Jordan) Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Build and install intel_regVille Syrjälä
v2: Fix spaces vs. tabs (Jordan) Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15tools/intel_reg: s/PKGDATADIR/IGT_DATADIR/Ville Syrjälä
We use IGT_DATADIR to refer to $pkgdatadir elsewhere, so let's have intel_reg follow suit. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-15meson: Install toolsVille Syrjälä
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2017-09-08meson: basic build system supportDaniel Vetter
Why? Because it's fast. Like really, really fast. Some data (from a snb laptop, so rather lower-powered): - Incremental build after $ touch lib/igt_core.c with meson: 0.6s It notices that the symbol list of the libigt.so hasn't changed and doesn't bother re-linking the almost 300 binaries we have. make -j 6 for the same scenario takes 44s. - Incremental build with nothing changed: make: 0.7s, meson: 0.2s This means stuff like --disable-git-hash is entirely pointless with meson, it's faster than a make ever can be (with 0.6s). - Reconfigure stage: ninja reconfigure 0.8s vs. ./configure 8.6s) - Running tests, after a full build: ninja test 6s vs. make check 24s - Full build (i.e. including ./autogen.sh respectively meson build), including tests, from a pristine git checkout. automake 2m49s vs. meson 44s. Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Daniel Stone <daniel@fooishbar.org> 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-08build: remove _GNU_SOURCE from source filesDaniel Vetter
We are, the build system takes care of that. 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@ffwll.ch>
2017-09-08build: Nuke #ifdef HAVE_CONFIG_H cargo-cultDaniel Vetter
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the X11 transition to the modular build, where in the imake -> modular build transition config.h wasn't universally available. Now we just make this a requirement (so yeah Android better generate one too). v2: Improve commit message a bit. 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@ffwll.ch>
2017-09-08build: Define _GNU_SOURCE in Makefile.amDaniel Vetter
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>