3284 Commits

Author SHA1 Message Date
Damien Lespiau
672e88acb7 lib: Provide a raw version of the gen9 fast copy blits
So we can use it with bare kernel types, without going through libdrm
bos.

v2: Don't forget the object handle. (Tvrtko)
    Correct surface pitch calculation. (Tvrtko)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:20:10 +00:00
Damien Lespiau
6533d113a9 lib: Split two helpers to build fast copy's dword0 and dword1
Again, these helpers will be useful for a raw version of the gen9 fast
copy.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:20:08 +00:00
Damien Lespiau
130221b3b5 lib: Don't give a struct igt_buf * to fast_copy_pitch()
So we can use this function in a "raw" (ie without igt_buf) version.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-03-12 14:19:57 +00:00
Damien Lespiau
cbd927cd35 lib/skl: Add gen9 specific igt_blitter_fast_copy()
v2: Adjust for BB handling changes. (Tvrtko Ursulin)
    Correct XY_FAST_COPY_DST_TILING_Yf. (Tvrtko Ursulin)

v3: New tiling modes are not defined in the kernel any more. (Tvrtko Ursulin)

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2015-03-12 14:19:41 +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
b8db5d60e0 lib/core: Make the start of the debug output more clear
I missed the quiet "Log start" between the test failure and the debug
output (and so was very confused by the repetition). You have to shout
at me!

v2: Thomas suggested I make the end of the logging clear as well. Since
I completely missed that there was a end marker, he must be right!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Thomas Wood <thomas.wood@intel.com>
2015-03-06 15:43:03 +00: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
Daniel Vetter
50158de812 NEWS: Update to prep for release
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-03-05 09:42:29 +01: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
Mika Kuoppala
043f586958 tools/intel_gtt: Add support for gen8
Add 64bit ptes and 8MB mmiobar offset for gen8

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Acked-by: Ben Widawsky <benjamin.widawsky@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2015-03-04 12:31:26 +02: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
f45698df8b lib/igt_core: don't add newlines in logging functions
igt_kms extensively uses line continuation when dumping state updates
at the debug level. They got badly mangled with the recent changes to
for the log handling functions. Two separate fixes:
- Don't prepend domain and other metainformation when it's just a
  continuation line.
- Dont add newlines when dumping the log recorder.

If someone interleaves different log level messages this will go awry,
but really just don't do that.

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-27 19:34:38 +01: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
Daniel Vetter
d5579f472e tests/drv_suspend: Unrename tests
Renaming tests massively confuses QA's test result tracking and
blacklisting. So except when really good reasons are around we
shouldn't do it.

Here I think just adding the -hibernat suffix and leaving test names
unchanged is enough.

Cc: David Weinehall <david.weinehall@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-26 16:32:43 +01:00
Thomas Wood
26f40811d7 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:59:22 +00:00
Thomas Wood
d9224c3479 lib/tests: update .gitignore 2015-02-25 16:59:22 +00:00
Thomas Wood
4ff4ea601a lib: print the signal name to stderr when handling a signal
Print the received signal name to stderr when handling a signal. This
uses an array of handled signal names since strsignal() only provides
descriptions.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:50:13 +00:00
Thomas Wood
aecad4fc2e tests: remove extra file
Remove a file accidentally added in commit 6f582f7 (tests: Add
gem_ctx_param_basic).

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:48:25 +00:00
Thomas Wood
8fb19782f8 lib: remove handled option arguments from argv
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.

This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:48:25 +00:00
Thomas Wood
55cc132b32 lib: use defines for igt_simple_init and igt_subtest_init
Using defines removes an extra function call and prepares for changes
to the command line argument handling.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:48:25 +00:00
Thomas Wood
efddb93680 tests: improve pipe enumeration
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:48:25 +00:00
Praveen Paneri
0f3a5809e7 tests/gem_bad_blit.c : Fix dst address for Gen8 onwards
Gen8 Onwards use 48 bit addressing for src and dst base
addresses. This patch fixes this for destination base address.

Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-25 16:07:51 +01:00
Marc Herbert
c6d18ee56b lib/igt_kms.c: remove tests dependency on VT /dev/tty0
Required to run on any recent, freon-based and X11-free ChromeOS release.

v2:
- igt_debug() instead of igt_warn()
- return KD_GRAPHICS instead of -1UL
- print previous mode in debug statements. Among others this help a tiny
  bit with the now confusing debug output ("cannot change" immediately
  followed by a misleading "mode changed").

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-24 23:39:15 +01:00
David Weinehall
7890b09348 tests/drv_suspend: hibernation test
intel-gpu-tools currently has a bunch of tests for suspend,
but currently none (that I could find) for hibernate.

Attached is a rudimentary patch to add said test.  It does so
by repurposing the drv_suspend driver to handle both suspend
and hibernate, since the difference is miniscule.

I decided to split the suspend/autoresume functions in
igt_aux.c though, to be able to leave the igt_system_uspend_autoresume()
function unchanged (the other option would be to
introduce a boolean function argument and have that
decide what parameters to pass to rtcwake).

The timeout passed to rtcwake probably needs tuning (it might
even need to be dynamically adjusted, since the time hibernation takes
varies wildly depending on the amount of non-cache memory in use).

Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
2015-02-24 16:46:22 +02:00
Chris Wilson
5b93daf5cb lib: Use strtol not strtod for overiding the PCI ID
Simply to avoid the roundtrip through floating points and any extra
headaches from worrying about the implications

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-18 16:09:28 +00:00
Chris Wilson
eaa7e6183c lib: Cache DRM device id to reduce number of ioctls
The DRM device id for the igfx is fixed, since there can only be one in
the system. So once we query it for the first time we can safely report
that value on every subsequent request, cutting out a lot of noisy
ioctls from inside tests.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-18 16:04:12 +00:00
Thomas Wood
a22548fec0 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17 11:24:04 +00:00
Thomas Wood
f8fd4c977a lib: print recent log messages to stderr when a test or subtest fails
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17 11:24:04 +00:00
Thomas Wood
a5f21726cd lib: add a ring buffer for log entries
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17 11:24:04 +00:00
Matt Roper
89201c5328 tests/kms_universal_plane: Fix subtest enumeration
We shouldn't use the contents of data.display to determine which pipes
to run subtests on since this structure is initialized in an igt_fixture
and won't contain any useful data when enumerating subtests (i.e.,
--list-subtests won't return anything).

Instead, just assume we have three pipes in the main loop and ensure
that each subtest will skip if we don't really have that many.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-17 11:24:04 +00:00
Lu, Han
e8e28931b1 tools/intel_audio_dump: add support for Skylake
This patch adds support for dumping audio registers of Skylake.

Signed-off-by: Lu, Han <han.lu@intel.com>
2015-02-16 12:35:40 +08:00
Damien Lespiau
cd6644230b quick_dump: Add interrupt and PPAT registers to the SKL dump
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-02-13 17:00:15 +00:00
Daniel Vetter
3c8aa2fb6e tests/gem_ctx_param_basic: Include header, not source
Oops. Reported by Tim Gore.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 14:54:25 +01:00
Daniel Vetter
3cd45dec2e lib/igt_gt: Document and consolidate
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.

Also push the intel_gen call into igt_hang_ring while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 09:35:36 +01:00
Daniel Vetter
25c4347078 doc: Consolidate naming conventions into docbook
Duplication just means it gets out of sync.

Also update they keyword list in the Makefile, not everything was listed.
And add a new "invalid" keyword.

While at it update NEWS.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00
Daniel Vetter
14185f04bd tests/gem_wait: Adjust makefile
I've forgotten to do this in

commit e4753d2d96fbb88077e70820793137f45f02c9ba
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Sep 29 14:42:33 2014 +0200

    tests/gem_wait_render_timeout: Convert to subtests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00
Daniel Vetter
2eca38eab9 lib/igt_aux: s/swap/igt_swap/
It collides with the subtest naming convention glossary entry for swap.
Which makes the docbook xml stuff unhappy.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00
Daniel Vetter
3e9b4e37e6 tests: Align subtest with naming convention
Yeah, historically grown but we should try to be somewhat consistent.
It helps with filtering testcases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-02-13 09:35:36 +01:00