Age | Commit message (Collapse) | Author |
|
Going forward, platforms may have separate architecture versions for
graphics and display and should no longer utilize a single 'gen'
version.
While doing this, let's change the versions to raw version values rather
than BIT(v) as we were doing in the past. It looks like some of the
existing uses of devinfo->gen were already misinterpreting this field
and failing to pass the value through ffs(), so this change may also fix
some bugs.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
|
|
Add a wrapper for gem_create_ext ioctl (a version of gem_create that
accepts extensions). In preparation for the driver change implementing it,
a local definition of its id and necessary structs have been added,
which are to be erased as soon as those definitions
appear in the i915_drm.h file.
The new ioctl wrapper is added to a separate file.
For consistency the wrapper of the old ioctl, gem_create
is moved from ioctl_wrappers to gem_create.
Signed-off-by: Andrzej Turko <andrzej.turko@linux.intel.com>
Cc: Zbigniew Kempczynski <zbigniew.kempczynski@intel.com>
Cc: Dominik Grzegorzek <dominik.grzegorzek@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Chris P Wilson <chris.p.wilson@intel.com>
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Just so that we can tell how the HW is configured.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
|
|
Add test for determining on which scanline the flipdone interrupt
is signalled. ilk+ and vlv/chv have this. Earlier platforms had
a "flip pending" bit instead which only seems to respond to CS flips
so not relevant for MMIO based flips.
v2: Rework the loops a bit to ease VRR in the future
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Let's support 4 pipes for tgl+.
v2: Fix up pipe_offsets[] as well
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Use intel_gen() to simplify some of the conditions. And for
the same of consistency we'll replace all the IS_GEN*()s.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
The ilk+ and bdw+ codepaths are identical, except for the ilk/snb
pipe C check. Unify them.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
skl+ (like hsw/bdw) always use the TILEOFF register, and never
the LINOFF register. Let's respect that.
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Modern platforms have more bits in the registers. Deal with it.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
ADL-P introduces dedicated SAGV watermark registers. Decode them.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Don't repeat the register name for each pipe to make the
register dump portion a bit less wide.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Decode pipe D watermark stuff too.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Modern platforms have just 5 universal planes + cursor per pipe..
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
TGL has the same amount of planes as ICL. Make intel_watermark
aware of that fact.
v2: Use intel_gen()
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
WM_SR_CNT (exists since HSW) has some kind of SR residency counter,
which is nice for checking whether the watermarks work decently.
Let's use it.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
WM_DBG has some useful sticky bits which tell us whether the
hardware has entered specific LP1+ and/or maxfifo modes since
those bits were last cleared. Let's dump those out.
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@gmail.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Now that autotools is gone and you always build to a dedicated build
directory with meson, we can remove .gitignore files that only had the
purpose of ignoring built binaries in the source directories.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
Reviewed-by: Arkadiusz Hiler <arek@hiler.eu>
|
|
path($PATH env variable)
When intel_dp_compliance binary location is part of PATH environment variable, running it from the shell without relative or full path, cause the following assertion failure because chdir:
$:~# intel_dp_compliance
(intel_dp_compliance:3070) CRITICAL: Test assertion failure function enter_exec_path, file ../tools/igt_compliance_utils.c:56:
(intel_dp_compliance:3070) CRITICAL: Failed assertion: ret == 0
(intel_dp_compliance:3070) CRITICAL: Last errno: 2, No such file or directory
(intel_dp_compliance:3070) CRITICAL: error: -1 != 0
Stack trace:
#0 ../lib/igt_core.c:1726 __igt_fail_assert()
#1 [enter_exec_path+0x8b]
#2 ../tools/intel_dp_compliance.c:843 main()
#3 ../csu/libc-start.c:342 __libc_start_main()
#4 [_start+0x2e]
Test (null) failed.
**** DEBUG ****
(intel_dp_compliance:3070) CRITICAL: Test assertion failure function enter_exec_path, file ../tools/igt_compliance_utils.c:56:
(intel_dp_compliance:3070) CRITICAL: Failed assertion: ret == 0
(intel_dp_compliance:3070) CRITICAL: Last errno: 2, No such file or directory
(intel_dp_compliance:3070) CRITICAL: error: -1 != 0
(intel_dp_compliance:3070) igt_core-INFO: Stack trace:
(intel_dp_compliance:3070) igt_core-INFO: #0 ../lib/igt_core.c:1726 __igt_fail_assert()
(intel_dp_compliance:3070) igt_core-INFO: #1 [enter_exec_path+0x8b]
(intel_dp_compliance:3070) igt_core-INFO: #2 ../tools/intel_dp_compliance.c:843 main()
(intel_dp_compliance:3070) igt_core-INFO: #3 ../csu/libc-start.c:342 __libc_start_main()
(intel_dp_compliance:3070) igt_core-INFO: #4 [_start+0x2e]
**** END ****
FAIL (-1.000s)
This patch fixes this issue.
v2: (PATH_MAX - 1) and dirname (Petri)
Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
|
|
Memory allocated during device scan were not being freed.
added call of igt_devices_free().
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Matt Roper <matthew.d.roper@intel.com>
|
|
Autotools have been deprecated in favor of Meson since early 2019.
Signed-off-by: Arkadiusz Hiler <arek@hiler.eu>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
The eDP change didn’t take into account choosing the right CRTC when compliance is requested on external DP.
This causes Hotplug Uevent sent from the kernel (intel_dp_short_pulse) to always trigger LT on eDP.
Without reverting this change the only way to run compliance on external display is to disconnect the eDP cable which is pain for ODMs.
So reverting this change until a full solution that handles multiple connected displays in place.
This reverts commit 391929b7402fd0417dcb9026c202241413653942.
Signed-off-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
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>
|
|
We can choose which compile warnings to enable, but once they are enabled
treat all warnings as error. This enforces stricter checks against compile
warnings creeping in.
v2: Fix redefinition warning errors from i915/gem_userptr_blits
v3: Fix the even more pedantic clang compilation
v4: Do not alter whitespace in lib/tests/igt_describe!
Note: clang does not build assembler/
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
/usr/bin/ld: intel_gpu_top.o: in function `print_percentage_bar':
/usr/src/intel-gpu-tools/tools/intel_gpu_top.c:1082: undefined reference to `ceil'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
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>
|
|
In preparation for a variation on the exisiting GEM_CREATE API, split
the ioctl from out of the large ioctl_wrappers.c
Signed-off-by: Andrzej Turko <andrzej.turko@linux.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>
|
|
If we know the right device fd, we can find the exact matching pci
device.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
|
|
Default device list prefers vendor and device names. Add -n switch
to display vendor/device as hex strings.
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>
|
|
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>
|
|
If decoding context couldn't be created, say the local libdrm does not
support the GPU which created the error state, it is much more handy to
at least decode and dump metadata and rings.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
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>
|
|
New default user frindly device listing mode which replaces:
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
With:
card0 8086:193B drm:/dev/dri/card0
└─renderD128 drm:/dev/dri/renderD128
Advantages are more compact, more readable, one entry per GPU.
Legacy format can be chose using the -s / --print-simple command line
switches.
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>
|
|
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>
|