1959 Commits

Author SHA1 Message Date
Thomas Wood
76dad7f414 Add default debug flags for tests
Include debugging symbols in tests by default to improve stack traces
and also set the compiler optimisation level to improve the debugging
experience.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26 15:50:05 +00:00
Thomas Wood
277ca2b992 lib: print a stack trace when a test assertion fails
Add an optional dependency on libunwind to print stack traces when a
test assertion fails.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-03-26 15:50:05 +00:00
Chris Wilson
2659cbbf64 igt/gem_exec_(nop|blt): Repeat measurements at min/max GPU frequencies
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 14:04:56 +00:00
Chris Wilson
7763349a9a igt/gem_concurrent_blit: Separate out the combinatorial explosion
Apparently nobody else likes testing and debugging GEM coherency issues.
However, this also means that QA is skipping these vital tests. Split
out a set of canaries into igt/gem_concurrent_blit and keep the rest in
igt/gem_concurrent_all.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89497
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
Chris Wilson
c666a19e0c igt/gem_exec_blt: Repeat measurement and average
Through away the unstable outliers for a more consistent measurement.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
Chris Wilson
cd8d3809a6 igt/gem_exec_nop: Repeat and average to stabilize measurements
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-26 08:15:19 +00:00
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
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
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
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
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
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
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
Tvrtko Ursulin
b1177831ab tests/kms_flip_tiling: Exercise Y tiling modes on Gen9+
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:24:27 +00:00
Damien Lespiau
7b8ba120b9 testdisplay/skl: Add command line options for Yb/Yf tiled fbs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:24:21 +00:00
Tvrtko Ursulin
e36091d1c7 tiling: Convert framebuffer helpers to use fb modifiers
This converts the IGT API only, underneath legacy set_tiling is still used.

v2: One got away in kms_flip.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:23:48 +00:00
Tvrtko Ursulin
0c15e068a5 tests/kms_addfb: Y tiled testcases
v2: Moved all init into fixtures.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:15:26 +00:00
Tvrtko Ursulin
0a087733d2 tests/kms_addfb: Add support for fb modifiers
Just a few basic tests to make sure fb modifiers can be used and
behave sanely when mixed with the old set_tiling API.

v2:
   * Review feedback from Daniel Vetter:
      1. Move cap detection into the subtest so skipping works.
      2. Added some gtkdoc comments.
      3. Two more test cases.
      4. Removed unused parts for now.

v3:
   * Removed two tests which do not make sense any more after the
     fb modifier rewrite.

v4:
   * Moved gtkdoc comments into .c file.
   * Moved all initialization into fixtures.
   * Rebased for fb modifier changes.

v5:
   * Added bad modifier subtest.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:14:27 +00:00
Chris Wilson
f59935c0ce igt/kms_psr_sink_crc: Prettify i915_edp_psr_status failures
Change the formatting asserts into requires and add the contents into
the debug log.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89525
2015-03-11 08:53:27 +00:00
Matt Roper
07be8fec15 igt.cocci: Replace igt_assert() with igt_assert_CMP() where possible
The integer comparison macros give us better error output by including
the actual values that failed the comparison.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-06 18:06:10 +01:00
Matt Roper
14a3d88a09 tests/kms_plane: Ensure planes recover from DPMS
i915 was using the main atomic 'disable plane' to turn off sprite planes
during a CRTC disable.  This was problematic because it modified the
plane state, preventing us from recovering the original state later.
One such case was that during a DPMS OFF followed by a DPMS ON, any
sprite planes would not be restored properly.

Let's add a test that toggles DPMS off and on and ensures that the CRC
remains the same (i.e., planes are successfully restored unchanged).

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-03-06 18:06:07 +01:00
Chris Wilson
e23accf437 igt/gem_wait: Test negative timeouts
The user should be able to specify a negative timeout to indefinitely
wait upon a bo becoming idle.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06 08:50:19 +00:00
Chris Wilson
15559e6cb6 igt/gem_wait: Timeout parameter to the WAIT ioctl is signed
So convert from uint64_t to int64_t. The distinction becomes important
when you realise what test we were missing...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-03-06 08:50:19 +00:00
Tim Gore
ee5c119c0c tests/gem_render_tiled_blits: split into subtests
The gem_render_tiled_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.
A similar issue with gem_render_linear_blits was resolved
by creating several subtests. A "basic" subtest that uses
minimal memory buffers to test the basic operation, and
two stress tests which are skipped if there is insufficient
memory. The first stress test uses more memory than the
graphics apperture and the second uses enough to ensure
that swap space is used (if present).
This patch makes the same changes to gem_render_tiled_blits.

v2: Following comments from Daniel Vetter:
  a) Use igt_main macro instead of "open coding", and
  b) cull some leading spaces

Signed-off-by: Tim Gore <tim.gore@intel.com>
2015-03-04 16:18:13 +01:00
Tim Gore
9f90aabc66 tests/gem_render_linear_blits: split into two subtests
The gem_render_linear_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.
After a discussion with Chris Wilson I have split this
test into a "basic" and an "apperture-thrash" subtest,
in the same way as gem_linear_blits. The basic test
uses just two buffer objects and the apperture-thrash
test is skipped if there is insuffiecient memory.

v2: Following comment from Chris Wilson:
    a) Remove the command line option for count.
    b) Add a third subtest to ensure swap is tested

v3: Replace some leading spaces with tabs

v4: Follwing comment from Daniel Vetter:
    a) Use igt_main macro instead of "open coding", and
    b) cull some more leading spaces

Signed-off-by: Tim Gore <tim.gore@intel.com>
2015-03-04 16:18:13 +01:00
Daniel Vetter
5e4fc0c48c tests/gem_tiled_swapping: Skip on L-shaped memory
The only thing the kernel can do is pin the buffers, which essentially
means no swapped tiled objects.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-02 10:41:23 +01:00
Paulo Zanoni
f26d8a04c3 tests/pm_rpm: I2C VGA detection is unreliable
We fail to detect some VGA monitors using our I2C method, leading to
bug reports from QA. If you look at the dmesg of these cases, you'll
see the Kernel complaining about EDID reading mostly FFs and then
disabling bit-mangling. Since we don't want to reimplement everything
the Kernel does, let's just accept the fact that some VGA outputs
won't be properly detected.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84273
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-02-27 16:45:04 -03:00
Daniel Vetter
305fb1db5c lib: add igt_assert_lt
Found one user in gem_wait.c

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-27 16:24:25 +01:00
Daniel Vetter
e3f8eb58e6 tests/kms_universal_planes: Inline igt_assert(ret == 0) checks
This way the debug output in case of failures is nicer since we dump
the entire test condition.

Also replace one open-coded igt_assert_eq.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-27 16:18:40 +01:00
Matt Roper
59d8d663cd kms_universal_plane: Check for cursor fb leaks
We've been leaking the framebuffers that get created inside the
legacy -> universal cursor compatibility layer and nobody noticed.  Add
an i-g-t test to check debugfs and ensure we end up the same number of
framebuffers we started with after performing cursor operations.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-27 16:11:31 +01:00
Marc Herbert
d73c5eb977 lib/igt_kms.c: igt_require -> igt_require_f("two displays required\n")
The bare "Test requirement: modes" message is too cryptic, I had to go and
read the source code to understand the missing requirement.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-27 16:06:37 +01:00
Deepak S
8e0a0c9de6 tests/pm_rc6_residency: Add media_rc6_residency_counter subtest
Added new media_rc6_residency_subtest for  chv & vlv.

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-26 17:52:06 +01:00
Deepak S
af02ef4a48 tests/pm_rc6_residency: Fix proper residency calculation
With current code we are not considering the RC6 residency during sysfs
read. This is causing test to fail due to incorrect residency_accuracy check
This patch consider code time spent for accuracy check

Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-26 17:52:03 +01:00