Age | Commit message (Collapse) | Author |
|
Convert open-coded for loops to __for_each_static_engine. That takes
care of the last direct user of intel_execution_engines2.
More work is needed to make intel_reg support dynamically queried
engines but this restores the old functionality.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Library was limited for reading registers for only
one device at a time in igt tests.
Changes in this patch give as oportunity to test multiple devices in
the same time.
v8: pack and rename structure, remove unnecessary field
v7: remove unnecessary code
v6: Reword patch. Cosmetic changes.
Cc: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Spurio Ceraolo <daniele.ceraolospurio@intel.com>
Cc: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Mrzyglod <daniel.t.mrzyglod@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
We need to keep igt working on linus and dif, or Joonas gets very upset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Andi Shyti <andi.shyti@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
One significant usecase for intel_reg/etc. is to be able to examine
the hardware state *before* loading the driver. If the tool forces
the driver to load we've totally lost that capability.
This reverts commit 8ae86621d6fff60b6e20c6b0f9b336785c935b0f.
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Michał Winiarski <michal.winiarski@intel.com>
|
|
It allows us to make things a little bit more generic. Also, we now
require fd rather than doing guesswork when it comes to pci address.
v2: Use readlinkat rather than string concat, move stuff around, provide
a version that does not assert. (Chris)
v3: Print addr on failure, avoid assignment in conditionals. (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This patch fix the following GCC warning:
../tools/intel_reg.c: In function ‘dump_decode’:
../tools/intel_reg.c:203:41: warning: ‘snprintf’ output may be truncated
before the last format character [-Wformat-truncation=]
snprintf(decode, sizeof(decode), "\n%s", bin);
[..]
../tools/intel_reg.c:200:40: warning: ‘%s’ directive output may be
truncated writing up to 1023 bytes into a region of size 1022
[-Wformat-truncation=]
snprintf(decode, sizeof(decode), " (%s)\n%s", tmp, bin);
[..]
../tools/intel_reg.c:200:4: note: ‘snprintf’ output between 5 and 2051
bytes into a destination of size 1024
snprintf(decode, sizeof(decode), " (%s)\n%s", tmp, bin);
[..]
The decode[] variable contains concatenated contents of bin[] and tmp[],
both of which are allocated as 1024 bytes.
Allocating 1024 chars for bin[] seems like an overkill, since all it
ever holds it the output of to_binary().
to_binary outputs fixed format:
--------------------------------------------------------------------
24 16 8 0
1 1 0 1 1 1 1 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1
--------------------------------------------------------------------
Which is 138 chars long (sans the new line).
We can limit the size of char bin[] to that number (-ish), and then
slightly bump the size of decode[] to accommodate for combined sizes of
tmp[] and bin[].
Changes since V1:
- Improve commit message
Changes since V2:
- updated commit message
- limit the amount of stack abuse
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
|
|
Add option to specify engine for register read/write operation.
If engine is specified, use MI_LOAD_REGISTER_IMM and MI_STORE_REGISTER_IMM
to write and read register using a batch targeted at that engine.
v2: no MI_NOOP after BBE (Chris)
v3: use modern engine names (Chris), use global fd
v4: strcasecmp (Chris)
v5: use register definition format for engine (Jani)
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
CC: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v4)
Acked-by: Jani Nikula <jani.nikula@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 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>
|
|
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>
|
|
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>
|
|
No reason why 'intel_reg dump' can't declare success after a succesful
dumping. Spotted after fixing tools_test to use the right tool :)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
gtkdoc can't handle aliasing, so let's rename the intel_device_info
function.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
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>
|
|
No functional change and no change in the current format.
Just introducing the missing Kabylake name strings.
v2: Duh! forgot the ")"...
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
v2: Repaint with Jani's favorite color
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Use the pre configured pci device from config also
in write path.
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Install the register definition files and use them by default in
intel_reg.
v2: remove redundant path check
Suggested-by: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Based on an idea from Jani Nikula.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Global variable names should reflect the fact that they are indeed
global, and at the very least they should not be as short as just
"mmio". Rename mmio to igt_global_mmio.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
Use INREG and OUTREG instead of using mmio directly.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
|
Three Tools for the Elven-kings under the sky,
Seven for the Dwarf-lords in their halls of stone,
Nine for Mortal Men doomed to die,
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
One Tool to rule them all, One Tool to find them,
One Tool to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
J.R.R. Tolkien's epigraph to The Lord of The Tools
| sed 's/Ring/Tool/g'
Introduce intel_reg as the one Intel graphics register multitool to
replace intel_reg_read, intel_reg_write, intel_iosf_sb_read,
intel_iosf_sb_write, intel_vga_read, intel_vga_write, intel_reg_dumper,
intel_reg_snapshot, and quick_dump.py.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|