2434 Commits

Author SHA1 Message Date
Mika Kuoppala
bfa6fa9a4b lib: add igt_get_stop_rings and igt_set_stop_rings
Multiple tests are introducing hangs by fidding with i915_ring_stop
debugfs entry.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10 17:40:48 +03:00
Mika Kuoppala
1c7ca57e53 tests/gem_reset_stats: end hanging batch properly
As we use chained batch into itself to hang the gpu, there
was no need to end the batchbuffer with BATCH_BUFFER_END.

With the introduction of command parser, the batch
need to have proper BATCH_BUFFER_END in it or it
will be rejected.

While at it, shift the upper half of batch gtt_offset
accordingly with gen8+

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-10 17:24:38 +03:00
Brad Volkin
f74c443925 tests/gem_exec_parse: Test for OACONTROL tracking
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-09 14:25:17 +02:00
Chris Wilson
9eec5b0f11 gem_tiled_swapping: Test using all available fences
Use extra threads to cause extra memory pressure and stress upon the
relevant code. Limit the number of threads to available fences to avoid
falling off the fence cliff.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07 13:12:29 +01:00
Chris Wilson
ff7806e52c gem_tiled_swapping: Purge all page/swap caches first
Reset the system to a vanilla state before we query how much RAM/swap
space is available for our testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07 13:12:29 +01:00
Chris Wilson
5d607a744f intel-gpu-overlay: Update debugfs path for min/max frequency
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-07 12:07:46 +01:00
Paulo Zanoni
574d62db39 tools/intel_reg_dumper: use haswell_debug_regs on BDW too
Instead of using an older set of registers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-04 13:33:13 -03:00
Paulo Zanoni
1fd9fc0012 tests/pm_pc8: skip tests when no screens are connected
Instead of failing, just skip the tests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73642
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-04 13:32:30 -03:00
Paulo Zanoni
abba92d9cf tests/pm_pc8: add missing newline
Otherwise the output will get even more confusing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-04-04 13:31:49 -03:00
Daniel Vetter
d6362ce8a8 tests/gem_cmd_parse: restrict to gen7
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76982
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-03 18:03:21 +02:00
Chris Wilson
e8869c4bc4 gem_tiled_swapping: Limit to available memory
If there is not enough free RAM+swap for us to execute our test, we will
hit OOM, so check first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-03 09:45:55 +01:00
Mika Kuoppala
b8afe98004 lib/rendercopy: fix alloc len for gen7_bind_buf
Fortunately saved by the alignment.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-04-02 15:38:55 +03:00
Thomas Wood
d4933259b8 tests: create files that list the available tests
Add Makefile targets to create two text files containing the list of
available single and multi-test programs. This enables the tests to be
enumerated without requiring the build system.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-04-02 13:50:28 +02:00
tgore
22bc1a287e intel-gpu-tools: avoid include of cairo.h on Android builds
A recent commit means igt_debugfs.c now needs to include igt_kms.h,
which in turn includes igt_fb.h and hence cairo.h.
We need to avoid this inclusion of cairo.h when building for Android,
(until we have a cairo port) so I have added a #ifndef around it.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-31 14:09:29 +02:00
Daniel Vetter
4fdca96066 tools/quick_dump: Fix make distcheck
Someone really needs to fix this Makefile ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 17:54:58 +01:00
tgore
e599ff443c intel-gpu-tools: fix some include path problems on android builds
When building within the android tree (specifically in /external)
the compilation fails due to the wrong versions of some header files
getting picked up. This commit adds some include paths to ensure the
correct headers are found

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 17:50:44 +01:00
tgore
a96c634076 intel-gpu-tools: fix problem with redefinition of mmap64
In android builds there is no reliable way to determine if mmap64 is defined
or not, and this sometimes leads to a compile error due to its re-defnition.
So this commit avoids its use altogether in intel-gpu-tools for Android builds,
unless the HAVE_MMAP64 macro is defined.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-28 17:50:41 +01:00
Daniel Vetter
798fca377a README: update piglit cmd
Pointed out by Jesse.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-27 23:04:58 +01:00
Jesse Barnes
2031da4073 intel_infoframes: remove bogus "being transmitted" check from VLV
This bit is reserved on VLV.
2014-03-27 11:10:18 -07:00
Jesse Barnes
c1c96d8342 intel_infoframes: add VLV support
Different reg offsets and such.
2014-03-27 11:01:36 -07:00
Ben Widawsky
47c551bd70 quick_dump: Put the cairo cflags with the other cflags.
I had been hoping we can avoid linking against cairo, but alas it was
not meant to be.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-27 09:56:59 -07:00
Daniel Vetter
9048aa1974 tools/quick_dump: re-apply ducttape
Someone with actual automake-fu really needs to fix this up for real
since compiling a bunch of source files again, with broken dep
tracking even just because we can't link against a .la somehow really
isn't too awesome.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 22:57:52 +01:00
Daniel Vetter
961a46c82b tests/pm_rps: Add a new testcase to provoke the "stuck at max" bug
Note that the sleep(5); to fully idle the gpu is _really_ important.
Without it the bug is not exhibited.

The issue at hand is that after gem_quiescent_gpu we are at max
(expected, since the blocking waits peg to max), but then we never go
down to a lower freq again until we're fully idle. The tiny load is
sufficient to keep the gpu at max. I've played around with this a bit
and even ridiculously low loads (like one MI_STORE per 50ms) are
enough to keep the gpu at max freq.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 22:15:12 +01:00
Daniel Vetter
669a2fca6c tests/pm_rps: quiescent harder
Apparently some rps chips are prone to stick to max once you're there.
And all the synchronous waits in gem_quiescent_gpu are _really_ good
at forcing the kernel to go full throttle.

And even a positively tiny load (one MI_STORE_IMM per 50 ms) is enough
to eternally keeep it there, which means the first idle measurement of
the freqs before we do the reset it completely busted.

Just add a wait before the tricky test and call it a day.

Option b) would have been to now have this tiny load, but I think a
good reminder how quirky rps is is always welcome. Just in case we
start sleeping too easy at night.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74956
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 21:33:38 +01:00
Damien Lespiau
896b550984 rendercopy/gen8: Remove a hole in struct gen8_blend_state
Using uint64_t in that second member makes it aligned to 64bits, while
the first member is only 32bits. We then had a 32bits hole in there!

Found-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ben Widawsky <benjamin.widawsky@intel.com>
Cc: Rafael Barbalho <rafael.barbalho@intel.com>
Tested-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-03-26 19:07:02 +00:00
Jesse Barnes
7255a84c9c testdisplay: make termio unbuffered
So hotkeys take effect immediately.
2014-03-26 11:13:23 -07:00
Daniel Vetter
3d9e63f2ad lib/igt_fb: api documentation
Also realign function parameters and replace abort() with igt_fail()
while at it.

v2: Forgotten to add a nice intro.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:28 +01:00
Daniel Vetter
7568edf4b1 lib/igt_fb: setup font in igt_get_cairo_ctx
We always want the same boring one, so extract it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:28 +01:00
Daniel Vetter
ae461e67e8 lib/igt_fb: drop kmstest_ prefix from static functions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:28 +01:00
Daniel Vetter
c6c2b2bb70 lib/igt_kms/bf: doc skeleton
igt_kms docs are just skeleton and also added igt_fb to make sure the
linking works correctly.

Next up: Actually documenting igt_fb.

Also fix that depency spelling fumble I've copied around to a few too
many places.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:28 +01:00
Daniel Vetter
64401f57e9 lib: fold igt_display into igt_kms
For 1 function and 2 types we kinda don't need separate files.
Especially now that igt_kms is much more focused on the actual modeset
stuff with all the framebuffer helpers extracted to igt_fb.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:28 +01:00
Daniel Vetter
9aea7ae541 lib/igt_fb: switch to igt_ prefix from kmstest_
Shorter and more in line with our general igt_ prefix for everything
which isn't somehow intel or i915-gem or otherwise hw specific - these
helpers here are all fully generic framebuffer handling functions
based on kms + cairo.

Well, the actual buffer alloc is done with i915 gem, but meh ;-)

Two special cases:
- bpp_depth_to_drm_format and drm_format_to_bpp completely lacked
  prefixes, so just add igt_.
- write_fb was a bit misleading given that we have gem_write for
  uploading to buffers. Rename that to write_fb_to_png to make it
  crystal clear what this thing does even without looking at docs.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
57d7db8cf8 lib: extract igt_fb library
Stuff all the framebuffer creation, cairo and drm fourcc format
handling in there. This gives us a very clear cut in the headers where
igt_fb.c only needs to include igt_fb.h, and igt_kms.c includes both
(well igt_kms.h pulls in igt_fb.h since we always need this).

The aim here is to add api docs for igt_fb since that part of the kms
library seems fairly stable already, while all the mode setting and
iteration is still a bit in flux.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
0b3019733b gitignore: Add logfiles from make check
A bit annoying to see this stuff around in git status, so exclude it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
ef107940bb lib/igt_kms: make kmstest_get_cairo_surface static
Only used internally in igt_kms.c.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
2fc2fa5471 lib/igt_kms: s/kmstest_create_fb2/kmstest_create_fb/
Simplify the name since the old _fb function is now gone.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
70182167d6 lib: remove kmstest_create_fb
Use the new-style function using drm fourcc codes instead everywhere.

To easily use thew fourcc based interface also expose
bpp_depth_to_drm_format from the library. Finally include drm_fourcc.h
from the igt_kms.h header since pretty much everyone needs this now.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Daniel Vetter
288e80f278 lib/igt_aux: Lost doc polish hunk.
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 18:50:27 +01:00
Ben Widawsky
785a0cd4ba quick_dump: Fix the danvet fallout.
quick_dump built fine, but it could actually run, since a lot of the
linking happens at run time. There is one hack where we redefine the
environment stuff, since depending on igt_aux means we have to pull in
libdrm, which I do not want to do.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-26 09:02:58 -07:00
Mika Kuoppala
db25973c86 lib/intel_batchbuffer fix OUT_RELOC doc tag
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-03-26 17:40:23 +02:00
Daniel Vetter
71c6f87eb3 lib/igt_core: fix igt_skip_on_simulation regression
I've forgotten that we might want to call this from within specific
subtests (or special helpers like the autoresume one).

Also props for being competent enough to write a testcase, but
incompetent enough to botch the job up.

Fix both things and remove a leftover debug printf while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-26 15:09:23 +01:00
Daniel Vetter
c819014752 README: document quirks for regenerating gtk-doc
It sucks a bit atm :(

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 17:46:32 +01:00
Daniel Vetter
05f6a35d40 tests/gem_exec_parse: fixups for the recent massive refactoring
I think we might have some use for a do_ioctl_expected_errno or some
such thing. But that's for later.

Cc: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:23:59 +01:00
Brad Volkin
6bf7307d8d tests/gem_exec_parse: Test a command crossing a page boundary
This is a speculative test in that it's not particularly relevant
today, but is important if we switch the parser implementation to
use kmap_atomic instead of vmap.

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:18:48 +01:00
Brad Volkin
56fee51b31 tests/gem_exec_parse: Test for batches w/o MI_BATCH_BUFFER_END
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:18:37 +01:00
Brad Volkin
1f3e03bee3 tests/gem_exec_parse: Add tests for bitmask checks
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:17:08 +01:00
Brad Volkin
1b1321cde7 tests/gem_exec_parse: Add tests for register whitelist
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:17:03 +01:00
Brad Volkin
59cb7e105e tests/gem_exec_parse: Add tests for rejected commands
Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:17:01 +01:00
Brad Volkin
e8b4ecd387 tests: Add a test for the command parser
Start with a simple testcase that should pass.

v2: Switch to I915_PARAM_CMD_PARSER_VERSION

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-25 14:16:57 +01:00
Mika Kuoppala
49c611b590 tests/gem_reset_stats: run non hw context tests also on older gens
To gain more coverage on interface, default context and banning.
As there is no proper reset support for gen <= 3, we only
do limited interface testing on those.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-24 18:13:08 +01:00