2162 Commits

Author SHA1 Message Date
Daniel Vetter
d1b5823ee7 tests/pm_rps: rename basic test to "basic-api"
Jeff plans to add more tests ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-27 23:38:02 +01:00
Jeff McGee
5d26a7e2a2 pm_rps: Make frequency logging more compact
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-27 23:37:50 +01:00
Jeff McGee
88864d2ba5 pm_rps: Remove repeat sysfs reads
Storing values avoids some unnecessary overhead but more importantly
allows all of our processing to be atomic.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-27 23:37:50 +01:00
Jeff McGee
4e3b661b48 pm_rps: Expand on min and max config testing
Add a function that methodically varies min and max to exercise
several valid and invalid combinations. Allow the caller to
define what is to be checked between each step.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-27 23:37:50 +01:00
Jesse Barnes
22533b1eb0 NEWS: update with nomodeset register access change 2014-01-27 10:43:02 -08:00
Jesse Barnes
0d20fa3cc2 quick_dump: more vlv dpio regs 2014-01-27 10:27:20 -08:00
Jesse Barnes
5ecac45ff0 mmio: allow register init even if debugfs isn't available and i915 isn't loaded
This lets us dump regs even if modeset=0 for example.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2014-01-27 10:27:20 -08:00
Chris Wilson
0b4c33f62c igt/gem_concurrent_blit: Scale resource usage to RAM correctly
Note that we use twice the number of buffers, and so we need to restrict
num_buffers appropriately to fit within RAM.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-26 14:38:42 +00:00
Chris Wilson
b5109e62ce intel_error_decode: Protect against missing ring registers
A dodgy kernel may miss printing out the ring registers leading to a
FPE.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-23 21:51:57 +00:00
Tvrtko Ursulin
4a9b70c326 tools: Allow building on Android after noinst_PROGRAMS is not defined any more
Looks like filter-out macro gets silently unhappy about an undefined variable.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-23 08:57:55 +00:00
Mika Kuoppala
c05c88c2b6 tests/gem_reset_stats: stop only one ring when submitting hang
If we stop all the rings, we can end up blaming the innocent
rings on hangcheck.

Reference: https://bugs.freedesktop.org/show_bug.cgi?id=73652
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-22 09:45:27 +01:00
Ben Widawsky
1bbb607d9f gem_storedw_batches_loop: Fix for pre-BDW
My git failures are truly remarkable. I ended up pushing the wrong
commit here:
commit 1552aa21124cabe762862bb414490510415a2b2d
Author: Ben Widawsky <benjamin.widawsky@intel.com>
Date:   Mon Jan 13 06:28:45 2014 -0800

    gem_storedw_batches_loop: Fix for BDW

This puts the offset of the reloc in the wrong place for pre-BDW

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73866
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-21 18:03:42 -08:00
Chris Wilson
03d144d16f kms_flip: Try to consume all fences after a flip
As a flip is outstanding, there is an issue that the kernel may not be
able to release one of the fences that userspace requires and erroneous
report EDEADLK (on gen2, gen3).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73696
2014-01-20 20:27:42 +00:00
Ben Widawsky
ac0224f184 quick_dump/watermarks: lp3, misc and debug
I forgot to git add this originally.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 11:01:58 -08:00
Ben Widawsky
3deaeb2826 quick_dump/broadwell: Use haswell_other
For now, the power controls and watermarks seem to be the same offsets.
So just reuse haswell_other.txt

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
58aa7346c3 quick_dump/hsw: Watermark debug
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
73ca22c9e8 quick_dump: Allow comments in the register files
Simple addition to the parser to add the following full line comments:
{';', '#', "//"}

Empty lines will also be ignored

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
724340cf36 quick_dump: Fix the indentation
Fix the spaces to use [the python standard] 4 soft spaces for tabe.
While here, add the proper vim tag so we don't do it again.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Ben Widawsky
a5d17d2b0e .gitignore: Add pycache
quick_dump which is python, generates files in __pycache__ which are the
moral equivalent of object files. Don't let people add them to the index
accidentally.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-20 10:27:39 -08:00
Daniel Vetter
5b91475130 tests/gem_fd_exhaustion: Make it work
- We need to drop root to actually hit the limits. This requires us to
  fork the actual test since otherwise the exit handlers (which
  require root) fail the entire test.
- Don't assert that the gem create ioctl succeeds, it won't on the
  final run of the loop.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:24:23 +01:00
Daniel Vetter
7d2ba073ad lib: add __gem_create
Useful for when a gem_create ioctl is expected to fail.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:13:36 +01:00
Daniel Vetter
71f1f9eafd tests/pm_rps: Add missing static
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:12:25 +01:00
Daniel Vetter
ae57cd7dc7 debugger: avoid global variable shadowing
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:11:47 +01:00
Daniel Vetter
862de5636f lib: extract igt_drop_root
Useful in other tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 22:06:48 +01:00
Daniel Vetter
70082e3677 tests: Add gem_fd_exhaustion
Exhausts the system limit on open files and then tries to create
a new shmem-backed gem object. Linus Torvalds reported that this
blows up on a null obj->base.filp, but I can't reproduce this here:

http://lists.freedesktop.org/archives/intel-gfx/2014-January/038433.html

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 18:01:24 +01:00
Daniel Vetter
36106004e0 tests: Move pm_rps to the right Makefile target
If it's not in the multi-test target group testrunners won't pick up
on the fact that they need to enumerate subtests first.

Cc: jeff.mcgee@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-19 14:48:07 +01:00
Jeff McGee
7f1c5057cf pm_rps: Fix verbose option and streamline its use
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-18 15:20:56 +01:00
Jeff McGee
d14cd7430b pm_rps: Convert to subtest structure
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-18 15:18:58 +01:00
Jeff McGee
0102b6bde6 pm_rps: Add read back checking on sysfs writes
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-18 15:17:16 +01:00
Daniel Vetter
e07e758004 tools: Install them all
No reason really not too, especially since we install manpages for
some of them.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66656
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-17 07:42:22 +01:00
Daniel Vetter
8fa2066d7e tests/gem_gtt_hog: Use igt_simple_main
Results in the compiler complaining about wrong exits and return values.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-15 23:59:52 +01:00
Daniel Vetter
eb1fddc057 tests/primve_nv_pcopy: Comment out unused check_swizzle function
I've botched this in my patch to disable the swizzled pcopy test.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-15 23:58:50 +01:00
Chris Wilson
5e278c86ed gem_gtt_hog: use a normal exit()
Since we don't execute any subtests, using igt_exit leads to
inconsistent behaviour. In the future, this may be converted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73641
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-15 10:46:19 +00:00
Robert Beckett
a896ef9c1f igt: tests/Android.mk: fix LOCAL_PATH usage
Fix usage of shared variable LOCAL_PATH in deferred variable expansion area.

In Makefile language, rule and dependency definitions use immediate
expansions of variables, so they get expanded as soon as the rule is
created (1st pass). Rule implementation (a.k.a recipe) use deferred
expansion (2nd pass).

Android effectively makes all Android.mk files a single makefile by
including them all in a big tree from the toplevel makefile. The rules
are all evaluated in the first pass and targets are generated. Then the
2nd pass happens and the required target's recipes are run. At this
point, LOCAL_PATH has been assigned the value from the last evaluated
Android.mk in the 1st phase that defined LOCAL_PATH (most Android.mk use
this variable). In my particular case, it was the bootloader's
Android.mk that was evaluated last and had defined LOCAL_PATH to it's
path. The errors are rather misleading due to it looking like a bug in
another module's Android.mk rather than this one :)

Basically, if you want to use a variable that any other Android.mk
defines, then you can only use it in an immediate expansion context,
not a deferred expansion context as it will likely be re-defined by
the time the 2nd pass happens.

This patch stores it in a unique variable that should not be being
used by other Android.mk files. An alternative fix would be to use $@
and $< as the files in question are target and dependency, but I never
like using those as they can easily break if dependencies are added
etc. I prefer variable to be explicitly named to make them obvious.

See gnu make manual for explanation of deferred vs immediate
expansion of variables :
http://www.gnu.org/software/make/manual/make.html#Reading-Makefiles

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Robert Beckett <robert.beckett@intel.com>
2014-01-14 18:53:00 +00:00
Mika Kuoppala
44c0b2aeff tests/gem_reset_stats: run tests on all rings
Run all relevant tests on all rings.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 19:40:49 +01:00
Mika Kuoppala
3367359a98 tests/gem_reset_stats: split ctx tests
Split context related tests from non-context ones
and cleanup the naming.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 19:40:46 +01:00
Daniel Vetter
fef1930bf3 tests/prime_nv_pcopy: disable swizzle tests
It's pure luck that nv can detile some of the intel layouts since one
of the video MC formats matches it. Since we can't possible fix this
comment the test out.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73538
Acked-by: Maarten Lankhorst <bugs@mblankhorst.nl>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-14 13:41:21 +01:00
Ben Widawsky
1552aa2112 gem_storedw_batches_loop: Fix for BDW
Existing code was trying to be too clever and wasn't properly emitting
the high dword, or the correct length.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-13 06:28:45 -08:00
Ville Syrjälä
fee27cf822 tests: Drop glib.h include from kms_cursor_crc and kms_fbc_crc
kms_cursor_crc and kms_fbc_crc don't need glib.h. This was just some
copy-paste error on my part.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-01-13 17:11:18 +02:00
Jeff McGee
2a7dbe5f01 pm_rps: Use igt exit handler for restore
Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
d0b5fd2bff pm_rps: Fix test to target original min and max
The goal of the test is to confirm that gt_cur_freq_mhz can be forced
to the boundaries of the frequency range by collapsing gt_min_freq_mhz
and gt_max_freq_mhz to the target value. But we miss testing the upper
end of the range by targetting the current value of max after it has
been set equal to min. So fix by targetting orginal max instead of
current max.

This correction exposes a problem in setfreq where min is always set
to target before max, which should fail if the target value is greater
than max. So fix that too.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
44b5d7b330 pm_rps: Assert that valid sysfs writes return success
do_writeval now always checks the return value, whether we expect
success or a specific error. Also add new macro writeval_inval to
simplify repeated use of do_writeval to test for EINVAL return code.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Jeff McGee
265efbb2c4 pm_rps: Use unbuffered I/O on sysfs files
Bionic C library may not re-read a buffered, read-only file which
results in failure to monitor changes in gt_cur_freq_mhz.

Signed-off-by: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 22:31:51 +01:00
Chris Wilson
45d63644d2 tests/gem_pipe_control_store_loop: Delete bogus assertion
target_bo->offset was just being used to verify that the batch
submission worked and fortunately was not being relied upon for any
subsequent conditions. However, address 0 is valid and so the assertion
itself was bogus as it is possible (almost assured with full-ppgtt) for
the target_bo to be located at address 0.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72984
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-10 21:17:43 +00:00
Chris Wilson
84af2b9be8 gem_gtt_hog: Print elapsed time in ms
Missed one last diff before pushing
2014-01-10 16:10:31 +00:00
Chris Wilson
f62abaff99 tests: Add gem_gtt_hog
The purpose of this test is to exercise the userspace latency hogs
reported by Arjan van de Ven. He found some applications blocked the
device by stalling on the GPU inside the pagefault handler.
2014-01-10 15:44:11 +00:00
Daniel Vetter
2c9e761845 tests/gem_largeobject: Prefault instead of pin
This doesn't test pin but pwriting to big objects ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72901
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01:00
Daniel Vetter
cb9e8376fa tests: fixup igt_simple_main fallout
Oops, I should look at compilier warnings a bit better.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-10 09:24:33 +01:00
Daniel Vetter
7775fca2df tests/gem_ctx_exec: fix ram requirement fumble
We need to half available ram, not double it ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72557
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08 20:25:26 +01:00
Daniel Vetter
864d09ed4c tests/NAMING-CONVENTION: s/snooped/snoop/
Oops. We should be a bit more consistent with which verb form we're
picking. tile,tiled,tiling is even worse ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-08 20:25:26 +01:00