Age | Commit message (Collapse) | Author |
|
Opendir(3) and fdopendir(3) are quite expensive system calls when ran in
a loop which iterates all processes in a system times all open files in
each.
Replace some of them (easy ones) with simpler open(2)/read(2) combo to
avoid hammering on the malloc/free.
This brings the default CPU usage of the tool on my desktop from ~3% to
~2%.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Be nice and explicitly free all memory on exit.
Also fix a Valgrind reported unitilised conditional jump.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
On kernels without support for the feature we should skip showing the
clients header to avoid confusing users.
Simply briefly open a render node to the selected device during init and
look if the relevant fields are present in the fdinfo data.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Issue: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/120
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Use the i915 exported data in /proc/<pid>/fdinfo to show GPU utilization
per DRM client.
Example of the output:
intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card0 - 220/ 221 MHz
70% RC6; 0.62/ 7.08 W; 760 irqs/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 23.06% |██████▊ | 0% 0%
Blitter 0.00% | | 0% 0%
Video 5.40% |█▋ | 0% 0%
VideoEnhance 20.67% |██████ | 0% 0%
PID NAME Render/3D Blitter Video VideoEnhance
3082 mpv | || ||▌ ||██ |
3117 neverball |█▉ || || || |
1 systemd |▍ || || || |
2338 gnome-shell | || || || |
v2:
* Removed hardcoded array size from client add/update by passing in
drm_fd_info directly.
* Added some asserts and simplified a couple expressions. (Umesh)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Save initial terminal attributes when in interactive mode, and reset
when the program quits or receives SIGINT. Prevents bad text entry
in some password prompts (e.g., su, passwd).
[tursulin: Added commit text from earlier posting. Drop static initializer.]
Signed-off-by: K. Eugene Carlson <kvngncrlsn@gmail.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Print out end user friendly help text when the running user has
insufficient privilege for accessing system wide performance counters.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Issue: https://gitlab.freedesktop.org/drm/intel/-/issues/5018
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
|
Adding a cross-check with ABI config name space and not just relying on
sysfs names.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Acked-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
|
|
When kernel feature was removed the intel_gpu_top part was forgotten.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Add a check if client stats are present to init_clients() so that the
returned clients data can be null from the start. This prevents the client
stats header to be printed on old kernels.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
Show a list of supported interactive commands when pressing 'h'.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Implement a default view where clients are aggregated by their PID.
Toggled by pressing 'H' similar to top(1).
v2:
* Fix memory leak.
v3:
* Do not allow sort by client id in aggregated mode.
* Tweak sort criteria and sorting decisions. (Chris)
v4:
* More tweaks to code flow. (Chris)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Slight improvement with regards to wrapping header components to fit
console width. If a single element is wider than max it can still
overflow but it should now work better for practical console widths.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
As a new client does not have a delta for its first sample, treat as
still as idle and hide it if the user requests not to be shown clients
with no activity.
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>
|
|
Scale the bar_len into the fractional bar before truncating!
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>
|
|
Useful to mimick top view.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
It is useful to let the user know what is the currently active sort mode.
v2:
* Show some other messages as well.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Walking the client "list" makes assumptions about the order of active and
free slots which means we need to sort the array after every update.
Patch is mostly just code movement with the only functional difference of
eliminating two subsequent scans with no sort in between This closes a
very short window there list iteration could get confused if sysfs clients
would change rapidly and unfavourably during tool startup.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Allow hiding inactive clients (used no GPU time ever) in interactive mode
by pressing 'i'.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Adds support for per-client engine busyness stats i915 exports in sysfs
and produces output like the below:
===============================================================================
intel-gpu-top: Intel Skylake (Gen9) @ /dev/dri/card0 - 951/ 950 MHz;
0% RC6; 14.60/23.62 W; 1482 irqs/s
IMC reads: 1287 MiB/s
IMC writes: 115 MiB/s
ENGINES BUSY MI_SEMA MI_WAIT
Render/3D 95.48% |█████████████████████████████████ | 5% 0%
Blitter 15.98% |█████ | 10% 0%
Video 35.40% |████████████ | 26% 0%
VideoEnhance 0.00% | | 0% 0%
PID NAME Render/3D Blitter Video VideoEnhance
1053 gem_wsim |███ || ||███ || |
1054 gem_wsim |███████ ||█ || || |
===============================================================================
Apart from the existing physical engine utilization it now also shows
utilization per client and per engine class.
v2:
* Version to match removal of global enable_stats toggle.
* Plus various fixes.
v3:
* Support brief backward jumps in client stats.
v4:
* Support device selection.
v5:
* Rebase for class aggregation.
* Optimise sysfs reads a tiny bit by openat(2) and caching client root.
v6:
* Show clients as soon as detected, just delay busyness data one period.
* Add option to show numeric busyness ('n').
* Further optimize sysfs reads.
* Trim overgrown array. (Chris)
* Simplify client sort callback and find client loop. (Chris)
* Zap non-printable chars when displaying client names. (Chris)
v7:
* Fix terminal height vs lines printed handling.
* Optimise client searches by relying on sorting.
* Added some sorting modes cyclable via 's'.
* Stray semi-colon and furhter sort cleanup. (Chris)
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>
|
|
TIOCGWINSZ returns zero columns and rows on serial so lets assume 80x24.
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>
|
|
Similarly to how top(1) handles SMP, we can default to showing engines of
a same class as a single bar graph entry.
To achieve this a little bit of hackery is employed. PMU sampling is left
as is and only at the presentation layer we create a fake set of engines,
one for each class, summing and normalizing the load respectively.
v2:
* Fix building the aggregated engines.
* Tidy static variable handling.
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>
|
|
Analogous to top(1) we can enable the user to exit from the tool by
pressing 'q' on the console.
v2:
* Fix sleep period with closed stdin. (Chris)
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>
|
|
In multi device world we may want to see generation of device we're
tracking counters. Add pretty name of the device to be more verbose.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
After combining rapl_parse and imc_parse into a single pmu_parse, I left
the "energy-" prefixes used by rapl (but not imc) in place. Lift the
prefix to rapl_open() so that pmu_parse() does work for both rapl and
imc!
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Fixes: d0b71b967ccd ("tools/intel_gpu_top: Consolidate imc to use pmu_counter")
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>
|
|
Follow the same pattern as rapl for imc, and consolidate everything to
work on struct pmu_counter.
v2: Combine rapl_parse/imc_parse into pmu_parse
v3: Keep the error message for RAPL not reporting Joules
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>
|
|
With integrated graphics the TDP is shared between the gpu and the cpu,
knowing the total energy consumed by the package is relevant to
understanding throttling.
v2: Tidy integration by eliminating struct rapl and improve output
formatting.
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>
|
|
It is more obvious for the user to only shows filters for DRM master
nodes since those are the ones that intel_gpu_top monitors.
v2:
* Filter prefix needs to be sys: when listing PCI devices.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
In the previous patch we switched the lsgpu output to a short and user
friendly format but some users will need a shorthand for getting other
types of device selection filters than the defaut drm.
Add some command line switches to enable this:
$ lsgpu
card0 8086:193B drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
$ lsgpu --sysfs
card0 8086:193B sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
└─renderD128 sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
$ lsgpu --pci
card0 8086:193B pci:vendor=8086,device=193B,card=0
└─renderD128
v2:
* Fix pci filter format.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Suggested-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
Adding a new device selection print type suitable for user-facing
use cases like intel_gpu_top -L and later lsgpu.
Instead of:
sys:/sys/devices/pci0000:00/0000:00:02.0/drm/card0
subsystem : drm
drm card : /dev/dri/card0
parent : sys:/sys/devices/pci0000:00/0000:00:02.0
sys:/sys/devices/pci0000:00/0000:00:02.0/drm/renderD128
subsystem : drm
drm render : /dev/dri/renderD128
parent : sys:/sys/devices/pci0000:00/0000:00:02.0
sys:/sys/devices/pci0000:00/0000:00:02.0
subsystem : pci
drm card : /dev/dri/card0
drm render : /dev/dri/renderD128
vendor : 8086
device : 193B
New format looks like:
card0 8086:193B drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
Advantages are more compact, more readable, one entry per GPU, shorter
string to copy and paste to intel_gpu_top -d, or respective usage.
v2:
* Increase stack filter size. (Zbigniew)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
Include the active device name on the update screen.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Last changes incidentally broke integrated device selection on !discrete
platforms. Add fallback to select card in discrete / integrated order.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Reviewed-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
|
|
intel_gpu_top requires card information and PCI_SLOT_NAME for dGPU.
Only pci subsystem contains both information.
In case of user filter is other than pci subsystem then we need card
information of associated pci subsystem which is stored as parent of
requested card if available.
A new api has been added to cater intel_gpu_top requirement.
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Dixit Ashutosh <ashutosh.dixit@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
So that we can also print a relevant error message when failing to find any devices in
intel_gpu_top.
Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
|
|
_open_pmu() was calling perf_igfx_open_group() which in turn was
calling igt_perf_type_id("i915") each time.
By making _open_pmu() take type as a parameter and call
igt_perf_open_group() we achieve two things:
* we use the correct type for engines->device instead of the
hardcoded "i915"
* optimization - we call igt_perf_type_id() once - it's reading
sysfs
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
In intel_gpu_top device path was hard coded for integrated GPU.
With this patch we:
* use igt_device_scan library for device scanning,
* make discrete GPU the default one,
* provided options for card selection.
v2:
* explicitly set ret to EXIT_SUCCESS after all the other uses
* fix use after free of opt_device (Tvrtko)
* use EXIT_FAILURE instead of "1" (Tvrtko)
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Since with multiple devices, we may have multiple different perf_pmu
each with their own type, we want to find the right one for the job.
The tests are run with a specific fd, from which we can extract the
appropriate bus-id and find the associated perf-type. The performance
monitoring tools are a little more general and not yet ready to probe
all device or bind to one in particular, so we just assume the default
igfx for the time being.
v2: Extract the bus address from out of sysfs
v3: A new name for a new decade!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: "Robert M. Fosha" <robert.m.fosha@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: "Robert M. Fosha" <robert.m.fosha@intel.com> #v2
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
A new -o command switch enables logging to a file.
v2:
* Support "-o -" for explicit stdout selection. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=108689
Cc: Eero Tamminen <eero.t.tamminen@intel.com>
Cc: 3.14pi@ukr.net
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Two new output modes are added: listing of text data to standard out (-l
on the command line), and dumping of JSON formatted records (-J), also to
standard out.
The first mode is selected automatically when non-interactive standard out
is detected.
Example of text output:
Freq MHz IRQ RC6 Power IMC MiB/s RCS/0 BCS/0 VCS/0 VCS/1 VECS/0
req act /s % W rd wr % se wa % se wa % se wa % se wa % se wa
0 0 0 0 0.00 360 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
350 350 0 100 0.00 35 2 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
350 350 0 100 0.00 34 2 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
350 350 0 100 0.00 143 6 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
350 350 0 100 0.00 169 7 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
350 350 0 100 0.00 169 7 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0 0.00 0 0
Example of JSON output:
{
"period": {
"duration": 1002.525224,
"unit": "ms"
},
"frequency": {
"requested": 349.118398,
"actual": 349.118398,
"unit": "MHz"
},
"interrupts": {
"count": 0.000000,
"unit": "irq/s"
},
"rc6": {
"value": 99.897752,
"unit": "%"
},
"power": {
"value": 0.000000,
"unit": "W"
},
"imc-bandwidth": {
"reads": 149.683843,
"writes": 6.104093,
"unit": "MiB/s"
},
"engines": {
"Render/3D/0": {
"busy": 0.000000,
"sema": 0.000000,
"wait": 0.000000,
"unit": "%"
},
"Blitter/0": {
"busy": 0.000000,
"sema": 0.000000,
"wait": 0.000000,
"unit": "%"
},
"Video/0": {
"busy": 0.000000,
"sema": 0.000000,
"wait": 0.000000,
"unit": "%"
},
"Video/1": {
"busy": 0.000000,
"sema": 0.000000,
"wait": 0.000000,
"unit": "%"
},
"VideoEnhance/0": {
"busy": 0.000000,
"sema": 0.000000,
"wait": 0.000000,
"unit": "%"
}
}
}
v2:
* Show example output in commit message.
* Install signal handler to complete output on SIGINT. (Chris Wilson)
v3:
* Use asprintf where possible. (Chris Wilson)
v4:
* Check asprintf return value, not the pointer.
* Rename fmt_d/dd to fmt_width/precision. (Chris Wilson)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=108689
Cc: Eero Tamminen <eero.t.tamminen@intel.com>
Cc: 3.14pi@ukr.net
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
intel-gpu-top is a dangerous tool which can hang machines due unsafe mmio
register access. This patch rewrites it to use only PMU.
Only overall command streamer busyness and GPU global data such as power
and frequencies are included in this new version.
For access to more GPU functional unit level data, an OA metric based tool
like gpu-top should be used instead.
v2:
* Sort engines by class and instance.
* Do not wait for one sampling period to display something on screen.
* Move code out of the asserts. (Rinat Ibragimov)
* Continuously adapt to terminal size. (Rinat Ibragimov)
v3:
* Change layout and precision of some field. (Chris Wilson)
Eero Tamminen:
* Use more user friendly engine names.
* Don't error out if a counter is missing.
* Add IMC read/write bandwidth.
* Report minimum required kernel version.
v4:
* Really support 4.16 by skipping of missing engines.
* Simpler and less hacky float printing.
* Preserve copyright header. (Antonio Argenziano)
* Simplify engines_ptr macro. (Rinat Ibragimov)
v5:
* Get RAPL unit from sysfs.
* Consolidate sysfs paths with a macro.
* Tidy error handling by carrying over and reporting errno.
* Check against console height on all prints.
* More readable minimum kernel version message. (Eero Tamminen)
* Column banner for per engine stats. (Eero Tamminen)
v6:
* Man page update. (Eero Tamminen)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Eero Tamminen <eero.t.tamminen@intel.com>
Cc: Rinat Ibragimov <ibragimovrinat@mail.ru>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> # v1
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> # v0.5
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
igt_kms.c: In function ‘igt_crtc_set_background’:
igt_kms.c:1940:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint64_t’ [-Wformat=]
LOG(display, "%s.%d: crtc_set_background(%lu)\n",
^
intel_firmware_decode.c: In function ‘csr_open’:
intel_firmware_decode.c:169:2: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 3 has type ‘__off_t’ [-Wformat=]
printf("Firmware: %s (%zd bytes)\n", filename, st.st_size);
^
intel_gpu_top.c: In function ‘main’:
intel_gpu_top.c:683:10: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]
stats[i] - last_stats[i]);
^
hsw_compute_wrpll.c: In function ‘main’:
hsw_compute_wrpll.c:644:3: warning: format ‘%li’ expects argument of type ‘long int’, but argument 7 has type ‘long long int’ [-Wformat=]
igt_fail_on_f(ref->r2 != r2 || ref->n2 != n2 || ref->p != p,
^
gem_gtt_hog.c: In function ‘__real_main155’:
gem_gtt_hog.c:177:2: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
igt_info("Time to execute %lu children: %7.3fms\n",
^
kms_flip.c: In function ‘run_test_step’:
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘__time_t’ [-Wformat=]
igt_assert_f(end - start > 0.9 * frame_time(o) &&
^
kms_flip.c:985:3: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 11 has type ‘__suseconds_t’ [-Wformat=]
kms_frontbuffer_tracking.c: In function ‘setup_sink_crc’:
kms_frontbuffer_tracking.c:1364:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘ssize_t’ [-Wformat=]
igt_info("Unexpected sink CRC error, rc=:%ld errno:%d %s\n",
^
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Makes their intent a bit clearer.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.
One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|