summaryrefslogtreecommitdiff
path: root/overlay
AgeCommit message (Collapse)Author
2019-01-29automake: Ditch all EXTRA_DIST directivesDaniel Vetter
We're not using automake to build tarballs anymore. Acked-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2019-01-28overlay: Write out the assumption for kernel-provided dataPetri Latvala
The code assumes (correctly) that perf_event_header's size is non-zero. Write that out so static analysis also knows it. Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
2018-07-25build: provide include for missing syscallsLucas De Marchi
Add directory with README file to allow missing syscalls to be defined. The syscalls themselves will be provided in follow up patches. v2: add support to autotools Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Acked-by: Antonio Argenziano <antonio.argenziano@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
2018-06-25meson: Add options to control optional partsPetri Latvala
Distributions want explicit control over optional parts so they can state runtime dependencies before building. Let's restore the functionality autotools used to provide. Where possible, the selection is done by choosing whether to build a particular item and the option name is build_$item. Example: build_overlay. Where not possible, the option name is with_$item. Example: with_valgrind. Array options require a bump of required meson version to 0.44. Debian stable has meson 0.37 which is already too old, stable-backports has 0.45, CI uses 0.45. Mesa's meson requirement is 0.44.1, for a perspective. Note, the old hack for not building docs when cross-compiling is gone, as doc building can be explicitly controlled now. v2: glib not optional v3: bump meson version to 0.44 Signed-off-by: Petri Latvala <petri.latvala@intel.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Eric Anholt <eric@anholt.net> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2018-06-06intel_gpu_overlay: Update for class:instance engine tracepointsTvrtko Ursulin
A miminal hack to parse the new tracepoint format and invent new "ring id's" based on engine class and instance. v2: * Make it a bit more future proof. (Lionel, Chris) * Some assorted fixups to show forgotten engines. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2018-05-21intel-gpu-overlay: Fix some build warningsTvrtko Ursulin
Trivial "set but unused" cleanup. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-05-14overlay: Remove the miscalculation of window positionChris Wilson
We already call x11_position() to calculate the position of the overlay, so do not need to manually recompute them inside x11_overlay_create(). This has the advantage that x11_position() understands the multi-monitor layout instructions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-03-27overlay: Call setlocale around strtodChris Wilson
strtod() is locale-dependent. The decimal conversion depends on the radix character ('.' for some of us like myself) varies by locale. As the kernel reports its values using the "C" locale, we need to switch to that when parsing; and switch back before reporting to the user. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105712 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2018-03-16intel-gpu-overlay: Update for renamed tracepointsTvrtko Ursulin
Request tracepoints have been renames so update the tool to be able to find them. v2: Only support new names. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-01overlay: fix invalid pointer accessLionel Landwerlin
The 'v' variable isn't defined in this part of the 'TracepointFmt' rule but because of the way the generator produces code (one function per rule) it doesn't realize we're accessing a variable from a different case of the rule and this doesn't lead to a C compiler error on undefined variable. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-01overlay: reindent tracepoint parserLionel Landwerlin
I wrote it, but couldn't reread myself... This doesn't contain any change apart from reindenting. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-02-01overlay: add missing foreground optionLionel Landwerlin
It seems we handle -f but we forgot to list it. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2018-01-11overlay: Update .gitignoreRhys Kidd
Fixes: 865a47ca ("overlay: parse tracepoints from sysfs to figure out fields' location") Signed-off-by: Rhys Kidd <rhyskidd@gmail.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2018-01-08meson: use message() rather than warning()Lucas De Marchi
warning() was only added to the meson interpreter in 0.44 which is currently the last version. Let's use message() as we are currently requiring meson > 0.40. Otherwise we get the following error: Meson encountered an error in file overlay/meson.build, line 62, column 1: Unknown function "warning". Fixes: 865a47ca ("overlay: parse tracepoints from sysfs to figure out fields' location") Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Cc: Rhys Kidd <rhyskidd@gmail.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Rhys Kidd <rhyskidd@gmail.com>
2017-12-22overlay: parse tracepoints from sysfs to figure out fields' locationLionel Landwerlin
With changes going to drm-tip, the tracepoints field locations are going to change. This change introduces a tracepoint parser (using a peg parser) which lets us figure out field positions on the fly. v2: Fix automake build (Lionel) v3: Make overlay build conditional on peg (Petri) Make wait_end callback more readable (Chris) Drop tracepoint_id(), instead parsing from format file (Lionel) v4: Fix existing configure.ac issue with overlay build (Petri) v5: Silence unused function (Lionel) v6: Fix missing double quote in v4 (Lionel) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk> For the build system changes: Acked-by: Petri Latvala <petri.latvala@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-05meson: build a full dependency for lib_igt_perfDaniel Vetter
meson prefers packages dependencies over passing arount static libraries, because those also include linker flags, include dirs and everything else. While at it pull the special cases out from the common build stanzas like we do with other special cases. Just a bit of ocd to keep everything polished. v2: Don't forget to add perf_pmu to the test list (Petri). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2017-11-24intel/pmu: Catch-up with i915 RC6 aggregation changesTvrtko Ursulin
Since i915 PMU is removing separate RC6 counters and now aggregates all under a single one, catch up the test and intel-gpu-overlay with those changes. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Use RAPL PMU for power readingTvrtko Ursulin
Wire up to the RAPL PMU for GPU energy readings. The only complication is that we have to add code to parse: # cat /sys/devices/power/events/energy-gpu.scale 2.3283064365386962890625e-10 v2: Link with -lm. v3: strtod can handle scientific notation, even though my initial reading of the man page did not spot that. (Chris Wilson) v4: Meson fix. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Catch-up to new i915 PMUTvrtko Ursulin
v2: Update for i915 changes. v3: Use 1eN for large numbers. (Chris Wilson) v4: Update for upstream engine class enum. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Fix interrupts PMU readoutTvrtko Ursulin
v2: Use correct address of. (Chris Wilson) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Consolidate perf PMU access to libraryTvrtko Ursulin
Various tool modules implement their owm PMU open wrapper which can be replaced by calling the library one. v2: * Remove extra newline. (Chris Wilson) * Commit msg. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-22intel-gpu-overlay: Move local perf implementation to a libraryTvrtko Ursulin
Idea is to avoid duplication across multiple users in upcoming patches. v2: Commit message and use a separate library instead of piggy- backing to libintel_tools. (Chris Wilson) v3: Add Petri's meson build recipe. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-11-21overlay: Fix compiler warning when compiling with recent gcc.Maarten Lankhorst
[1/316] Compiling C object 'overlay/intel-gpu-overlay@exe/overlay.c.o'. ../overlay/overlay.c: In function ‘show_gem_objects’: ../overlay/overlay.c:798:31: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 160 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects", ^~ ../overlay/overlay.c:798:30: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects", ^~~~~~~~~~~~~~~~~~~~~~~ ../overlay/overlay.c:798:30: note: using the range [-9223372036854775808, 9223372036854775807] for directive argument ../overlay/overlay.c:798:3: note: ‘snprintf’ output between 16 and 309 bytes into a destination of size 160 snprintf(buf, sizeof(buf), "%s %ldMB, %ld objects", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ comm->name, comm->bytes >> 20, comm->count); Might as well give it the 309 bytes it wants, plus on more. :-) Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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-15meson: Rename and install intel-gpu-overlayVille Syrjälä
Autotools called the binary 'intel-gpu-overlay', let's have meson use that name as well. Also install it. 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: 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-06-09Fix a couple of typos CLFAGS -> CFLAGSPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-05-10overlay: Convert to per-context seqno trackingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-05-10overlay: Fixup new layout of tracepointsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23overlay: Accommodate more enginesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-10overlay: Check for DRI2 errors when setting upChris Wilson
Otherwise we ignore a remote ssh connection and try to use DRI2 over it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-03lib/i915_pciids.h: Update to latest version wich includes GLK idsAnder Conselvan de Oliveira
Copy the include/drm/i915_pciids.h file from following kernel commit, which includes Geminilake PCI IDs. commit 8363e3c3947d0e22955f94a6a87e4f17ce5087b4 Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Date: Thu Nov 10 17:23:08 2016 +0200 drm/i915/glk: Add Geminilake PCI IDs Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2016-09-30overlay: Silence compiler warning for unused i81x_infoChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-22overlay: Fix -G (--geometry) parsingChris Wilson
For shortops to getops_long() you have to remember to specify them. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-07-04overlay/Makefile.am: Remove i915_pciids.h from overlay sourcesMarius Vlad
Commit d308bb082d429eb25 (lib: Start weaning off defunct intel_chipset.h) moved i915_pciids.h to lib/ from overlay/ and now is packaged by lib/. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-30lib: Start weaning off defunct intel_chipset.hChris Wilson
Several years ago we made the plan of only having one canonical source for i915_pciids.h, the kernel and everyone importing their definitions from that. For consistency, we style the intel_device_info after the kernel, most notably using a generation mask and a per-codename bitfield. This first step converts looking up the generation for a devid tree from a massive if(devid)-chain to a (cached) table lookup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-06-29overlay: sync i915_pciids.hChris Wilson
Syncing to commit a922eb8d4581c883c37ce6e12dca9ff2cb1ea723 Author: Rodrigo Vivi <rodrigo.vivi@intel.com> Date: Thu Jun 23 14:50:36 2016 -0700 drm/i915: Removing PCI IDs that are no longer listed as Kabylake. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-05-11benchmarks/, overlay/, demos/, tools/, tests/: Add optional Werror.marius vlad
v2: Initially added Werror by default. Make it optional so it doesn't break android build and (potential) distros maintaing the package (Hinted by Damien Lespiau). --enable-werror will enable -Werror compiler flag. Signed-off-by: Marius Vlad <marius.c.vlad@intel.com> Acked-by: Damien Lespiau <damien.lespiau@intel.com>
2015-11-18overlay: Show power consumption without i915-pmuChris Wilson
The power metter was not showing up due to an erroneous check for a failure to open the i915 perf interface. Reported-by: Marius Vlad <marius.c.vlad@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-11-11Fix comparison of unsigned integersThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08build: fix unused-result warningsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-16overlay: Fix min frequency detection on BYT/BSWChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-08overlay: Handle execlists not setting the rings as activeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-08overlay: Add Broadwell+ ids from kernel i915_pciids.hChris Wilson
2015-06-24overlay: Enable localeChris Wilson
Enabling locale allows us to use thousand separators and other such human touches in the output. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-11overlay: update .gitignoreThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-08overlay: Fix parsing of gem-objects for '[k]' clientsChris Wilson
Apparently '[]' are not non-whitespace characters and break '%s'. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-04-26intel-gpu-overlay: Improve error message for failure to open an outputChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>