3490 Commits

Author SHA1 Message Date
Chris Wilson
4f78f9ffa2 igt/gem_exec_blt: Do a warmup run first
Sometimes it takes a pass for the GPU to come up to full speed, so do a
"cold" pass first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
Chris Wilson
6259d0a36b igt/gem_exec_blt: Repeat measurements for stablity
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:18 +00:00
Chris Wilson
2fa35c7316 lib/core: Silence internally used signals
We use SIGTERM to kill off child processes. We use it a lot. Reporting
everytime we use it is just spam. Treat the similar user signals
(SIGINT, SIGQUIT and the should-never-have-been SIGPIPE) similarly to
reduce noise.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Wood <thomas.wood@intel.com>
2015-03-26 08:15:18 +00:00
Mika Kuoppala
559987fc01 tools/intel_error_decode: Add gen8+ fault data encodings
These two registers contains the 48bit fault address.

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-26 10:00:34 +02:00
Mika Kuoppala
f96bfb8e8c tools/intel_error_decode: Add decodings for FAULT_REG
Add decodings for FAULT_REG

v2: fix fault encodings and ignore addr type for gen8+ (Michel)
    fix engine mask

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-26 10:00:18 +02:00
Mika Kuoppala
0a2ef9c349 tools/intel_error_decode: Add ERROR decodings for gen8
Add ERROR decodings for gen8

Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-26 10:00:06 +02:00
Ville Syrjälä
1cfcca66ec tools: Update .gitignore
Ignore intel_watermark and unignore the, now extinct, intel_dpio_{read,write}.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-25 20:32:57 +02:00
Jeff McGee
07707aff75 tests/pm_sseu: Create new test pm_sseu
New test pm_sseu is intended for any subtest related to the
slice/subslice/EU power gating feature. The sole initial subtest,
'full-enable', confirms that the slice/subslice/EU state is at
full enablement when the render engine is active. Starting with
Gen9 SKL, the render power gating feature can leave SSEU in a
partially enabled state upon resumption of render work unless
explicit action is taken.

v2: Add test description and apply recommendations of igt.cocci
    (Thomas Wood).
v3: Skip instead of fail if debugfs entry i915_sseu_status is not
    available.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Tested-by: Lei Liu <lei.a.liu@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-25 17:52:27 +00:00
Jeff McGee
aef4605f7c lib: Add media spin
The media spin utility is derived from media fill. The purpose
is to create a simple means to keep the render engine (media
pipeline) busy for a controlled amount of time. It does so by
emitting a batch with a single execution thread that spins in
a tight loop the requested number of times. Each spin increments
a counter whose final 32-bit value is written to the destination
buffer on completion for checking. The implementation supports
Gen8, Gen8lp, and Gen9.

v2: Apply the recommendations of igt.cocci.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Tested-by: Lei Liu <lei.a.liu@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-25 17:52:11 +00:00
Jeff McGee
301b9e4bb3 tests/drv_getparams: Skip instead of fail on EINVAL
Avoid failing on older kernels where the GETPARAM interfaces
don't exist.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89669
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
2015-03-25 14:41:52 +01:00
Tim Gore
9ba93c43cf tests/gem_tiled_fence_blits: split into subtests
The gem_tiled_fence_blits test tends to get oom killed
on low memory (< 4GB) Android systems. This is because the
test tries to allocate (sysinfo.totalram * 9 / 10) in
buffer objects and the remaining 10% of memory is not
always enough for the Android system.
As with a similar issue with gem_render_linear_blits,
this problem is resolved by splitting into subtests.
A "basic" subtest uses minimal memory buffers to test
the basic operation, and a "normal" subtest which is
skipped if there is insufficient memory.

I also took the opportunity to cull some numeric literals.

Signed-off-by: Tim Gore <tim.gore@intel.com>
2015-03-25 14:41:52 +01:00
Ville Syrjälä
4d2577e0dd tools/intel_watermark: Tool to decode watermark registers
The watermark registers on the gmch platform are a bit of a mess. Add
a tool to make some sense of them. While at it decode the ilk-bdw wm
registers as well. SKL+ is left out for now since it's a very different
beast.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
e5e7a53071 lib: Add i854 PCI ID
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
978881801e tools/intel_iosf_sb_read: Support different register strides
Some IOSF SB units ogranize their registers in a pecualiar way. Even
though the registers are 32 bits wide, the register offsets only
increment by one when going from one register to the next. Correctly
deal with this when dumping several consecutive registers.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
bd692becf7 tools/intel_iosf_sb_read: Add -c command line option like intel_reg_read
Add a command line option '-c <count>' that can be used to read set of
consecutive registers without having to specify the offset for each of
them.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
dcb3edf2a9 tools/intel_iosf_sb_*: Support reading/writing multiple registers at once
Allow the user to specify a list of registers to read, and register/value
pairs to write.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0461e8cf43 tools/intel_iosf_sb_*: Use getopt() to parse the options
I want to add some command line options so switch to getopt() to make
that easier.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
38e3c58cba tools/intel_iosf_sb_*: Replace if ladder with an array and bsearch()
Replace the silly strcasecmp() if ladder with and array that maps the
unit names to port numbers. And keep the thing sorted so we can do
the lookup with bsearch() for extra speed :)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
29ebc68313 tools: Remove intel_dpio_{read,write} tools
intel_dpio_{read,write} as redundant as intel_iosf_sb_{read,write}
handle the same task.

The difference between the tools was the opcode used to read/write the
registers, but with DPIO both opcodes work just fine, so there's no need
for both sets of tools.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0129b02c7b toos/intel_iosf_sb_*: Fix DPIO IOSF SB port number
The correct port is 0x12, not 0x13 which is actually GPIO_NC.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
ac28ecefe0 lib: Allow 32bit addresses for IOSF-SB registers
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Ville Syrjälä
0a3ef582da lib: Change IOSF SB devfn to 0.0
The devfn field in the IOSF SB messages is only relevant when there's a
real PCI bus or some other multifunction device behind a single port.
Otherwise the port number itself is enough to uniquely identify the
target. In fact some IOSF SB targets reject the access when devfn is not
0.0 (eg. GPIO_NC on BYT).

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-03-24 15:30:20 +02:00
Damien Lespiau
06a9c35664 quick_dump/skl: Add power well registers
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-24 11:58:57 +00:00
Jesse Barnes
392e8ee75f tests/pm_rps: add test descriptions
Document a copule of the subtests with their purpose, methods, and
expected results.

Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-03-23 12:50:48 -07:00
Daniel Vetter
1765838e34 tests/gem_tiled_swapping: Fix up L-shaped testing
I've fumbled this, resulting in this this skipping everywhere.
Unfortunately no QA test report for this regression ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-23 11:02:28 +01:00
Daniel Vetter
a5934091b8 tests/gem_exec_lut_handle
Reduce default number of repeats a lot. High repeat count is only
useful for microbenchmarking, not that much for regression testing.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87131
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
a5c6b8df8b tests/kms_cursor_crc: Add dpms and suspend tests
There was some confusion about whether we restore cursors correctly
after dpms and suspend/resume. Apparently we still do!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
d297e58529 lib: Only warn about suspicious CRCs
It is theoretically possible to hit these in the wild, so only warn
about them. Dropping the test is probably too much since these caught
some real bugs in the past.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
562bbe12f6 tests: Remove usage of igt_crc_equal and _non_null
Tests should positively check for crc matches, not for mismatches.
Enforce this by only exposing and igt_assert function for comparing
crcs.

For the few tests which didn't just do this as consistency checks but
to do functional tests add FIXME comments that some reference crc
values are missing.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
e588f6dfa6 lib/debugfs: Add igt_assert_crc_equal
Because of hash collisions tests should only ever compare crc
checksums for equality. Checking for inequality can result in random
failures.

To ensure this only expose and igt_assert function and use that.
Follow-up patches will rework the code for tests which don't follow
this requirement and try to compare for CRC inequality.

v2: Rebase on top of Matt's kms_plane changes.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Daniel Vetter
4fec18e5e0 lib/core: add interactive debug point to igt_fail
Useful for inspecting the screen state in kms tests when they fail.

Also move the screen clearing in kms_cursor_crc to the bottom.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-23 11:02:28 +01:00
Chris Wilson
e7d26df419 igt/kms_vblank: Simple harness for measuring speed of drmWaitVBlank
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 15:33:51 +00:00
Chris Wilson
a72d405629 igt/gem_concurrent_blit: Test copying over itself
Suggested by Lionel Landwerlin as a means to emulate video decode
workloads.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 10:14:34 +00:00
Chris Wilson
ea4aa70f3c igt/gem_wait: When waiting for infinity, an infinity remains
Incorrect testing of out parameters leads to bug noise...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89494#c4
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-19 08:37:51 +00:00
Chris Wilson
1d0aa69f55 igt/gem_exec_nop: Enlighten the failure error message
References: https://bugs.freedesktop.org/show_bug.cgi?id=89633
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:47:13 +00:00
Chris Wilson
484c1a6f1c igt/gem_read_read_speed: Speed up batch submission
Create the RCS and BCS batches once and reuse them to avoid the
rewriting and relocation overhead on every submission - the goal is to
focus on the interring synchronisation overhead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
d3e9316b44 lib/batch: Fix range checks for blits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
233808a58d lib/batch: Trivial compile fix for 32-bit builds
intel_batchbuffer.c: In function 'fill_object':
intel_batchbuffer.c:589:20: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  obj->relocs_ptr = (uint64_t)relocs;
                    ^
intel_batchbuffer.c: In function 'exec_blit':
intel_batchbuffer.c:598:21: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
  exec.buffers_ptr = (uint64_t)objs;

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-18 08:37:33 +00:00
Chris Wilson
a172676488 igt/gem_concurrent_blt: Test overwrite source used for read-read optimisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
35b0ac99fc igt/gem_concurrent_blit: Exercise concurrent reads
Since we are considering implementing read-read optimisations for mixed
engine workloads, make sure that we at least have a few tests that check
for coherency when doing so.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
99b5ee8aaa igt/gem_concurrent_blit: Move buffer allocation after requires
The choice is to either move the igt_require from the buffer allocation
(and allow the allocation to fail) inside the igt_fixture, or move the
buffer allocation to the subtest. Moving it to the subtest has the
advantage of ensuring that every test has the same initial state (no
chance of leaking state across tests) and speeding up running a single
subtest.

Note this is necessary in order to run igt/gem_concurrent_blit on older
kernels, otherwise the requirement for mmap(wc) causes us to skip the
majority of tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Chris Wilson
ed7e33451e igt: Add benchmark for read-read optimisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-17 09:43:52 +00:00
Daniel Vetter
505645c2ab tests: Rename core_getparams to drv_getparams
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-13 17:59:22 +01:00
Jeff McGee
ae339f0977 tests/core_getparams: Create new test core_getparams
New test core_getparams consists of 2 subtests, each one testing
the ability of userspace to query the correct value of a GT config
attribute: subslice total or EU total. drm/i915 implementation of
these queries is required for Cherryview and Gen9+ devices (non-
simulated).

v2: Duplicate small amount of new libdrm functionality to avoid
    bumping libdrm version requirement (Daniel). Convert some
    igt_asserts to the appropriate comparison variants. Add a
    test description.
v3: Actually use the LOCAL GETPARAM defines. Otherwise can't build
    against older libdrm as intended by v2.

For: VIZ-4636
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-13 17:31:45 +01:00
Daniel Vetter
7655606532 NEWS: Post-release bump
Let's prep for more cool stuff!

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-13 09:37:49 +01:00
Thomas Wood
e3e659163f Update version to 1.10 and add the release date
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 17:06:54 +00:00
Thomas Wood
3b8e121552 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 17:05:18 +00:00
Thomas Wood
595575b9cb Remove old entries from .gitignore files
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 16:32:17 +00:00
Thomas Wood
a6c40c7665 lib: move igt_interactive_debug into igt_core.c
igt_interactive_debug should be defined in igt_core.c, rather than the
header, to avoid it being defined more than once.

Reported-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-12 15:11:11 +00:00
Damien Lespiau
dde047fe2c lib/fb: Use PRIx64 for uint64_t in format string
Fix the following warning:

  igt_fb.c: In function 'igt_create_fb_with_bo_size':
  igt_fb.c:414:2: warning: format '%llx' expects argument of type
    'long long unsigned int', but argument 9 has type 'uint64_t' [-Wformat=]

  igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=%llx, size=%d\n",

introduced by commit:

  commit e36091d1c7010e825897dc4487f9985ab353973b
  Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
  Date:   Tue Mar 3 14:11:01 2015 +0000

      tiling: Convert framebuffer helpers to use fb modifiers

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:33:36 +00:00