3893 Commits

Author SHA1 Message Date
Micah Fedke
2111173083 tests: update core_getstats to run on any platform
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
fd282fb9d4 tests: update core_getclient to run on any platform
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
75c9e92efb tests: update core_getversion to run on any platform
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
253544f7a3 tests: update core_get_client_auth to run on any platform
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
f91e93fa40 lib: remove support for deprecated drm_open_any*() calls
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
Apply the new API to all call sites within the test suite using the following
semantic patch:

// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)

@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)

@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Micah Fedke
e2241805a4 lib: adding drm_open_driver() interface
The drm_open_driver*() functions replace the drm_open_any*() functions and
provide the same utility, but in a way that is platform agnostic, not
intel-specific.  This opens the path for adopting intel-gpu-tools to non-intel
platforms.

This commit renames the calls and adds the chipset parameter which can be used
to restrict the opening to a specific hardware family.  For example,
drm_open_driver(DRIVER_INTEL) will only return a valid fd if an intel GPU is
found on the system, along with performing intel-specific initialization stuff
like gem_quiescent_gpu(), et al.  If OPEN_ANY_GPU is specified, the first
available drm device of any type will be opened.

Other hardware type flags may be added in the future.

The drm_open_any*() calls are retained as aliases of
drm_open_driver*(OPEN_ANY_GPU) but will be removed in a subsequent patch.

Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
2bacd07eb3 lib: don't use igt_warn in signal handlers
igt_wan and other log functions are not async-signal safe, so should not
be used in signal handlers.

Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Derek Morton
bcd3e1f33f tools/Android.mk: Fix compile error in intel_reg.c
The patch "tools: install the register definition files" caused
a build error on android as it added 'PKGDATADIR' which was not
defined in the Android build environment. This patch adds that
define to tools/Android.mk. It also copies the files it points
to so they are actually in the target file system.

v2: Added local variable for tool path

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
3546514791 null_state_gen: add const to intel_batch_state_copy data
The data is not modified by the function and is often declared const.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Thomas Wood
fdecc1b5af tools/aubdump: remove void pointer arithmetic
A gcc extension allows void pointer arithmetic by treating the size of
void as 1, but this generates a warning when -Wpointer-arith is used.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-11 14:39:43 +01:00
Ville Syrjälä
2155d1eb54 tools/intel_bios_reader: Add MIPI device type
Decode the MIPI [sic] device type.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:11:35 +03:00
Ville Syrjälä
d8313c3002 tools/intel_bios_reader: Decode the device type bits
Each bit in the device type is supposed to mean something. Decode their
meaning.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:11:35 +03:00
Ville Syrjälä
a02305260e tools/intel_bios_reader: Print the child dev handle
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 16:00:58 +03:00
Ville Syrjälä
b701bb14c6 intel_bios_reader: Don't explode looking for the devid
Check that the offset where expect to find the device id is withing the
BIOS image, instead of accessing whatever (if anything) happens to be
there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:58:39 +03:00
Ville Syrjälä
b1e756451c intel_bios_reader: Read the child device size from VBT
New stuff has been added to the end of the child device block at various
times, so using a hardcoded size for the block is a bad idea.
Fortunately the size of the block is listed in the VBT just before the
blocks themselves, so grab it from there.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:58:38 +03:00
Ville Syrjälä
c137ac7158 tools/intel_display_poller: Align DSPSURF to 128k to appease gen4/vlv/chv
gen4/vlv/chv require DSPSURF to be 128k aligned. Try to respect that
in order to avoid ugly glitches.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
a8b85ea21b tools/intel_display_poller: Make pipe name alphabetic
Instead of raw numbers the user can now specify the pipe
as 'a',b'... or 'A','B'...

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
01a2a4d85d tools/intel_display_poller: Try to fix pipe<->plane handling on gen2/3
Check the pipe assignment for each plane (excluding plane C since the
kernel doesn't use that one) and pick the first one that's assigned to
the target pipe.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
ba139493a6 tools/intel_display_poller: Add CHV support
Add CHV support by adding a pipe_offset[] thingy (like we have in the
kernel) to deal with the wonky register offsets.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:33:28 +03:00
Ville Syrjälä
7d2f1d7d9e tools/intel_reg: Print the potential port names in the help text
v2: Repaint with Jani's favorite color

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-11 15:32:28 +03:00
Ville Syrjälä
fb8131545f tools/intel_reg: Set register stride to 1 for VGA registers
VGA registers are generally 8 bits long, so set the stride to 1 byte.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-09-09 22:41:45 +03:00
Mika Kuoppala
88fed9fbca tools/intel_reg: Use pci device from config on write
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>
2015-09-08 16:15:16 +01:00
Ander Conselvan de Oliveira
6eed1b5eb4 kms_addfb_basic: Require fb modifiers for unused field tests
The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS
userspace, so use igt_require_fb_modifiers(). Also, the size of the
ioctl changed with the addition of the modifiers, so it is necessary to
use the LOCAL_ version of it, otherwise some data may get truncated.

v2: Improve commit message. (Thomas)
    Remove one spurious change to use LOCAL_DRM_IOCTL_ADDFB2. (Thomas)

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Daniele Ceraolo Spurio
2269997cff tests/gem_bad_reloc: use correct page table size
2 subparts of gem_bad_reloc check that the reloc address is below the
global gtt boundary. However, when executing from ppgtt the reloc
address can be greater than that and still be a valid address.

To be sure that we're using the right upper limit, select it based on
the ppgtt mode.

Cc: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
b04691b3e8 tests/gem_pwrite_snooped: disable const cast warning
Disable -Wcast-qual temporarily to allow memchr_inv to return non-const
data (similar to memchr), without causing a compiler warning.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
84cfa9e4d2 tests: remove gem_storedw_loop_* tests
These have been replaced by subtests in gem_storedw_loop.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-09-08 16:15:16 +01:00
Thomas Wood
1dcace3018 build: fix unused-result warnings
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
f0381d1abe lib: various documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Thomas Wood
de2470ea4f intel_reg: ensure "intel_reg help" always works
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
9ecb50e5c5 tools: install the register definition files
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>
2015-09-08 16:14:45 +01:00
Thomas Wood
af97918494 tools: remove quick_dump
Remove quick_dump as it has been replaced by the intel_reg tool and move
the register definition files to tools/registers.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
2142a15d49 tests/gem_storedw_loop: remove redundant ppgtt check
All tests require ppgtt, so checking for it later on has no effect.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
673aab8a0a tests/gem_storedw_loop: skip on gen6 bsd
MI_STORE_DATA is broken on gen6 bsd.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
b9d27f03c7 tools/null_state_gen: fix various compiler warnings
Add the debug and warning flags to cflags and fix the resulting issues.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
4ee6709e3b tests/tools: add --as-needed to linker flags
Add --as-needed to the linker flags to reduce the number of shared
library dependencies, since not all the tests and tools use all the
libraries required by the helper library (for example, many tests do not
use cairo). This helps portability of the binaries and also makes a
very small improvement to the execution speed and memory consumption.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:14:45 +01:00
Thomas Wood
88cbb41ade lib/gpgpu_fill.c: fix file permissions
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Ander Conselvan de Oliveira
4c63f54de9 gem_storedw_loop: Skip test if device doesn't have requested ring
The VEBOX ring is not available in generations before Haswell, so make
tests that use it skip instead of fail in previous gens.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Tim Gore
d3d56bf2af tests/gem_ctx_exec.c: only hang the ring we are testing
In the reset-pin-leak test we were calling
igt_set_stop_rings(STOP_RING_DEFAULTS) which sets the
stop_rings bits for all gpu engines. But we only submit
work to the render engine. When TDR is enabled (as it is
in Android currently) only the render engine gets reset,
which clears the stop_rings bit for the render engine but
not for the other engines. This causes the test to fail on
the second iteration because stop_rings is not clear.

So just set the stop_rings bit for the engine we are going
to hang, namely the render engine.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-25 17:20:14 +01:00
Paulo Zanoni
71b85f9713 kms_frontbuffer_tracking: print the status when it's not what we expect
Printing the status on an unexpected failure is always the first thing
I do. So do this always.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:36:01 -03:00
Paulo Zanoni
a07d0a47be kms_frontbuffer_tracking: add slow_draw() subtest
It fails on my SKL machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:35:30 -03:00
Paulo Zanoni
229110442a kms_frontbuffer_tracking: wait for PSR to be HW Enabled & Active
Make sure PSR is fully there.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:34:56 -03:00
Paulo Zanoni
c1fe951b8a kms_frontbuffer_tracking: add options for setting the shared fb X/Y
I'm using this to debug some aspects of the GTT tracking.

While at it, do a small rename and fix the ASCII art.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-25 11:34:28 -03:00
Chris Wilson
5e68ad9f82 benchmarks/gem_exec_reloc: Allow profiling 0 relocs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-21 22:27:35 +01:00
Thomas Wood
05f5e16eaf lib: fix distcheck issues
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 14:13:16 +01:00
Thomas Wood
804e11f40d lib: add a single include header
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Thomas Wood
a11879a4ab assembler: remove built sources with make clean
Built sources are generated by "make all", so should be removed by "make
clean". This also ensures "distcleancheck" passes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-21 09:37:10 +01:00
Mika Kuoppala
c37b235202 tests/drv_hangman: Adjust to 64bit bb offsets
commit e1f123257a1f7d3af36a31a0fb2d4c6f40039fed
Author: Michel Thierry <michel.thierry@intel.com>
Date:   Wed Jul 29 17:23:56 2015 +0100

    drm/i915: Expand error state's address width to 64b

changed the batch buffer address to be 64b. Fix the parsing
of gtt offset accordingly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91638
Cc: Akash Goel <akash.goel@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-08-19 12:12:28 +03:00
Jani Nikula
0e25e5d92d igt: remove deprecated reg access tools in favor of intel_reg
intel_iosf_sb_read, intel_iosf_sb_write, intel_reg_dumper,
intel_reg_read, intel_reg_snapshot, intel_reg_write, intel_vga_read, and
intel_vga_write have been deprecated in favor of intel_reg. Remove the
deprecated tools. intel_reg does everything they do, and more.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2015-08-17 10:47:56 +03:00
Chris Wilson
9b73ce43fe overlay: Fix min frequency detection on BYT/BSW
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-16 12:13:29 +01:00