919 Commits

Author SHA1 Message Date
Oscar Mateo
4c7d5a52a7 build: Move logic to tests/Makefile.am and away from Makefile.sources
Makefile.sources is just a listing with all the sources, and the logic
to use these sources goes into either Makefile.am (automake) or
Android.mk (make).

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:01:09 +01:00
Oscar Mateo
d80c6bdedb build: Fix missing "\" in tests/Makefile.sources
Noticed by Damien Lespiau.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:00:52 +01:00
Oscar Mateo
ea11d103e0 build: list all test/tool/lib source files in their own Makefile.sources
In this way, all source files are listed in Makefile.sources and included
from Makefile.am, thus enabling the reuse from Android makefiles.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-12 12:00:36 +01:00
Damien Lespiau
c50dd7c149 gitignore: Ignore the newly introduced pm_psr
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-11 22:38:36 +00:00
Ben Widawsky
97e48cd619 gem_storedw_batches_loop: Fix for real this time
Last patch to fix the breakage when adding gen8 had bugs in the reloc
offset, and size field.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-11 13:33:04 -08:00
Oscar Mateo
4cc506f5ea tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
Some shells do not understand "&>". For instance, my Ubuntu 12.04
machine has /bin/sh pointing to dash, which makes a mess out of
"&>" (to the point that the helper processes cannot be killed).

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-11 18:25:37 +00:00
Ben Widawsky
b76a411c86 gem_linear_blits: Fix blit command length
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-11 09:44:13 -08:00
Paulo Zanoni
0d902cad5f tests/pm_pc8: reorganize main function
Split the tests into categories. There are too many tests, it's
getting harder to locate the ones we need.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
c527a29325 tests/pm_pc8: add some GEM tests
These are more complete tests than the previous test_batch() one. We
test CPU/GTT mmaps, pread/pwrite and batch buffers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
79670c54eb tests/pm_pc8: remove "batch" and "stress-test" subtests
They use a bad BLT command and don't check its result. The next patch
will add proper GEM tests that contain commands that work and code
that checks if the command is really working.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 19:38:03 -02:00
Paulo Zanoni
3775eae051 tests/pm_pc8: add debugfs/sysfs tests
They don't really exercise any particular special code path for PC8,
but the runtime D3 code will touch these code paths, so we'll need the
tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
0fbb834646 tests/pm_pc8: add modeset-lpsp-stress
It's the only one we were missing form the possible combinations.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
1bcae02e5c tests/pm_pc8: extract i2c_subtest_check_environment
Just to make it more organized and consistent with the other tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
2fd0eb53aa tests/pm_pc8: return void on test_i2c
And do the assertion in the code line that actually verifies the
condition we need. Makes it easier to debug failed tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Paulo Zanoni
514efb507d tests/pm_pc8: move teardown_environment next to setup_environment
So I can add/remove/verify code more easily.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-11-08 18:40:22 -02:00
Ben Widawsky
ffc43fcbc0 gem_cpu_reloc: Fixed botched BLIT conversion
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
2c0fc4a2e4 gem_evict_alignment: Skip on GEN8 for now
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Ben Widawsky
7c41331364 gem_evict_everything: Fix broken blit generalization
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 23:06:01 -08:00
Daniel Vetter
1d9512f6ce Revert "tests/gem_ctx_bad_exec: Check the errno, too"
This reverts commit 4a6a59f314f61e1e4156bb13a65efabee31a76fc.
2013-11-08 07:37:57 +01:00
Ben Widawsky
26d237cdc2 gem_storedw_batches_loop: Update for gen8
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-07 21:00:55 -08:00
Daniel Vetter
5dbc263036 tests/gem_overflow_reloc: Rework subtest enumeration
Subtest names must be stable across all platforms for easier tracking.
Hence move the gen8+ check into the subtests, using igt_require. This
will auto-skip the tests on platforms where a given test doesn't apply.

Also move the assignment of the relocation_type var outside of the
fixture block. Fixtures aren't run when enumerating subtests (so that
subtests can be enumerated on any platform, even without an intel gpu).

So gcc has indeed been right with it's "potentially uninitialized" var
warning after all ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:54:01 +01:00
Daniel Vetter
4cf1d089eb tests/gem_reloc_overflow: Polish after Rafael's patch
- use void* for generic pointer.
- Fix const usage.
- Shut up gcc about uninitizialized var.
- Be paranoid about the moved tests and make double-sure that the
  batch would indeed work safe for the condition being tested.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:43:43 +01:00
Rafael Barbalho
c537c23efc tests/gem_reloc_overflow: Add gen8+ specifc tests
Broadwell introduces 64-bit relocation addresses which add extra
corner cases. The test was refactored slightly with some tests that
were in the source offset tests were moved to the more generic reloc
test area. The source offset tests are now gen aware and called twice to
test both cpu & gtt relocation paths. In addition 2 new gen8+ test
were added to the test:

* Relocation straddling page a page
* Insufficient space for a relocation at the end of the buffer.

Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>

Conflicts:
	tests/gem_reloc_overflow.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-07 13:41:38 +01:00
Ben Widawsky
f57f55e4da tests/bdw: Port storedw_loop_vebox to gen8
I chose not to implement this in the same way as Zhao Yakui because I
was lazy.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Zhao Yakui
50a52f3ada tests/bdw: Port storedw_loop_blt to gen8
The code is from the storedw_loop_render.

v2 (by Ben): Flush on the correct ring

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Zhao Yakui
6a2d5059ff tests/bdw: Port storedw_loop_bsd to gen8
The code is from the storedw_loop_render.

v2 (by Ben): Flush on the correct Ring

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Damien Lespiau
636f726b80 tests/bdw: Port storedw_loop_render to bdw
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
3aad2ac83c tests/bdw: pwrite_pread
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
d348022934 tests/bdw: gem_linear_blits
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
adc5a41f2b tests/bdw: gem_pin
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
eb89ce7a7e tests/bdw: gem_exec_blt
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
91f9e19fcd tests/bdw: gem_evict_*
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
6fa529ecd6 tests/bdw: gem_cpu_reloc
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
3e2937bd99 tests/bdw: gem_exec_faulting_reloc
support gen8 style blits

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-06 09:34:35 -08:00
Ben Widawsky
f4dfa37e85 bdw: Update obvious missing blit support
This provides a macro that allows us to update all the arbitrary blit
commands we have stuck throughout the code. It assumes we don't actually
use 64b relocs (which is currently true). This also allows us to easily find
all the areas we need to update later when we really use the upper dword.

This block was done mostly with a sed job, and represents the easier
in test blit implementations.

v2 by Oscar: s/OUT_BATCH/BEGIN_BATCH in BLIT_COPY_BATCH_START

CC: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
2013-11-06 09:34:35 -08:00
Rodrigo Vivi
ad648d9deb tests: pm_psr
Check on debugfs if PSR is supported by panel and matching all conditions in
hardware. In this case PSR must be enabled and performance counting increasing

v2: check if performance counter is really increasing.
v3: respect new naming convention

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-11-06 12:58:21 -02:00
Daniel Vetter
4a6a59f314 tests/gem_ctx_bad_exec: Check the errno, too
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-05 13:42:47 +01:00
Oscar Mateo
466da453ae gem_flink_race: Assure no pending requests before object counting
Same thing that was done for prime_self_import.

v2: Move igt_drop_caches_set() call inside get_object_count() to make
it clearer why we want this.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-05 12:30:40 +01:00
Oscar Mateo
ece21fa865 prime_self_import: Assure no pending requests before object counting
We don't want a previously used object to be freed in the middle of a
before/after object counting operation (or we would get a "-1 objects
leaked" message). We have seen this happening, e.g., when a context
from a previous run dies, but its backing object is alive waiting for
a retire_work to kick in.

v2: Use igt_debugfs facilities for drop cache.
v3: Move igt_drop_caches_set() call inside get_object_count() to make
it clearer why we want this.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-05 12:30:40 +01:00
Daniel Vetter
682b674a67 tests: establish core_ prefix
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 19:49:10 +01:00
Daniel Vetter
51dc087864 tests: Use kms_ prefix a bit more
I was a bit on the fence about the basic pipe CRC test since that
doesn't really test kms, but debug infrastructure in debugfs.

Otoh running this one for a full kms testrun is always good, to make
sure that all the other (real) CRC based tests work sanely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 19:49:10 +01:00
Daniel Vetter
5738f1952d tests: establish pm_ prefix
Imo power management, power consumption and performance are tightly
enough coupled that we can throw them all into one bin.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 19:49:10 +01:00
Daniel Vetter
c32032111a tests: estbalish drv_ prefix
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 19:49:10 +01:00
Daniel Vetter
d983f99345 tests: Start to document naming conventions
Just a start and we need more work here. Some follow-up patches will
clear up some of the historical confusion.

While at it rename the pc8 "basic" test to "rte".

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 19:49:10 +01:00
Daniel Vetter
af9d1b5cdb lib: drop return value from igt_drop_caches
No one actually cares, everyone expects it to just work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 18:11:29 +01:00
Oscar Mateo
5f0ab94c3f lib: Add igt_drop_caches_set()
This is basically a "drop cache" interface to the igt_debugfs
facilities. Also, update existing users.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 18:05:37 +01:00
Oscar Mateo
a97402e89a tests: Fix "-thrashing" and "-thrash-inactive" distinction
A typo in the relocation tests made both sub-tests perform the
same action: drop *all* caches.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-04 18:05:31 +01:00
Daniel Vetter
163d85d5f0 tests: igt_no_subtest
Yet another check for the library.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 22:18:20 +01:00
Daniel Vetter
6d73fdbfd2 tests: Add a Makefile comment about the expected failures in igt_ tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 22:16:24 +01:00
Daniel Vetter
8f718b1cd8 tests: Add a test template
Requested by Paulo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-01 21:10:59 +01:00