1584 Commits

Author SHA1 Message Date
Daniel Vetter
701a755bde tests/kms_cursor_crc: Review from Imre for Sagar's patch
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20 17:32:14 +01:00
Sagar Kamble
ba3a1a86b7 kms_cursor_crc: Enabling this test for all cursor sizes
v1: Added 128x128 and 256x256 cursor size support.

v2: Refined the test to use igt_subtest_f and automate enumeration.

v3: Restructuring test enumeration using drmGetCap. [Daniel's review comments]

Signed-off-by: Sagar Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-20 17:32:14 +01:00
Rodrigo Vivi
cde058ae35 tests/gem_gtt_hog: Fix for BDW
Update XY_COLOR_BLT command for Broadwell.

v2: stash devid and remove ugly double allocation. (by Chris).
v3: fix inverted blt command size and stash fd, devid and intel_gen.
v4: improved len calculation and noop between blt commands. (by Chris).

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=73724

Cc: Chris Wilson chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 13:15:24 -07:00
Rodrigo Vivi
d8164356e7 tests/gem_gtt_hog: Use XY_COLOR_BLT instead of COLOR_BLT.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 13:15:21 -07:00
Rodrigo Vivi
2f96726c96 tests/gem_wait_render_timeout: Fix for BDW
Update XY_COLOR_BLT command for Broadwell.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 13:12:33 -07:00
Rodrigo Vivi
3e6d9d912a tests/gem_wait_render_timeout: Use XY_COLOR_BLT instead of COLOR_BLT.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
2014-03-19 11:45:21 -07:00
Ben Widawsky
e8562b3081 gem_wait_render_timeout: use igt_assert_cmpint
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-03-19 11:42:07 -07:00
Daniel Vetter
f2e5dc0114 lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/
Functions which provide feature checks through igt_skip should be of
the form <prefix>_require_<feature>.

Otoh feature checks which return in a boolean whether the feature is
available should be of the form <prefix>_has_<feature>, e.g.
gem_has_blt.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17 09:47:50 +01:00
Daniel Vetter
cc8f0e6e3a lib/igt_debugfs: Remove debugfs from pipe crc functions
All tests have now lost explicit references to igt_debugfs_t!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17 09:47:50 +01:00
Daniel Vetter
9a7609a8e4 lib/igt_debugfs: Remove debugfs from igt_debugfs_fopen
Also add a missing igt_assert to kms_fbc_crc and again add the missing
Returns: section to the api doc.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17 09:47:50 +01:00
Daniel Vetter
f04f17bcd4 lib/igt_debugfs: Remove debugfs from igt_debugfs_open
Also update the api docs a bit since the Returns: section was missing.

v2: Readd the accidentally lost line for @filename.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-17 09:47:32 +01:00
Daniel Vetter
374290e430 tests: update .gitignoe
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 16:13:45 +01:00
Daniel Vetter
b0b4f8db71 tests/drv_suspend: new forcewake subtest
I suspect that currently we have an issue in there with the runtime PM
refcounting, but silly me developed this on a machine with runtime PM
support ...

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 16:13:09 +01:00
Daniel Vetter
ea18fc16cd lib: extract igt_open_forcewake_handle
... and I immediately regret that I've killed the return value
for igt_debugfs_init, since we have callers which need to work
without the forcewake stuff, e.g. the reg dumper needs to work
without i915 loaded.

Put this new helper to good use in the mmio code and the pm_pc8
testcase.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 16:00:22 +01:00
Daniel Vetter
553d594b6e tests/pm_rps: wait longer for idling
Big cores seem to take forever to idle, at least my ivb here. Fairly
ridiculous, so maybe there's more room for our debooster to kick in.

Anyway, this gets the min-max-config-idle and reset subtests going
somewhat reliably on my ivb. They still occasionally fail with the
current frequency pegged to max (or close to it) for no apparent
reason at all. Rebooting tends to fix it.

Don't ask, don't tell.

Cc: Jeff McGee <jeff.mcgee@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 11:24:27 +01:00
Daniel Vetter
a7dd98497a tests/pm_rps: use igt_assert_cmpint
Much better debug output almost for free.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 11:24:27 +01:00
Daniel Vetter
5632bc81d9 tests/pm_rps: load harder
Big core platforms need some seriuos omph to break a sweat.

This fixes min-max-config-loaded here on my ivb.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75146
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 10:27:30 +01:00
Daniel Vetter
d4f89d0ff2 tests/pm_rps: simplify load helper setup
There's no need to be fancy here.

Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 10:27:30 +01:00
Daniel Vetter
5188bbe23e tests/pm_rps: ducttape for igt fork helper cleanup issues
We don't call cleanup handlers when exiting a subtest currently, only
when exiting the entire binary. Which means pm_rps falls over when it
fails more than one subtest.

Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-14 10:27:29 +01:00
Daniel Vetter
f962dee636 test/kms_pipe_crc_basic: Fix up igt_kms conversion breakage
Apparently the framework doesn't ignore disabled pipes correctly, so
help it out a bit.

Again an awesome track record for our QA and bug scrubbers :(

Oh and while I rant: Docs for this stuff, please ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 19:44:40 +01:00
Daniel Vetter
eaccd444f7 lib: switch intel_copy_bo to directly take a size
Instead of a width/height combination. Since I've been lazy with the
math this now only accepts page-aligned copy operations, but that's
all we need really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:22 +01:00
Daniel Vetter
32d41cc7a7 tests/prime_nv_tests: fix copied buffer size
Doesn't affect the test since we only check the first few bytes. But I
want to switch the copy code to always copy entire pages around, so
use the right buffer size.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-13 18:07:22 +01:00
Daniel Vetter
36a83a6c5c lib/igt_debugfs: drop drm_fd argument from igt_pipe_crc_new
It's nowhere used and removing it gives us a cleaner, more
orthogonal interface.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:52 +01:00
Daniel Vetter
803d07b2ff lib: make igt_debugfs_open infallible
(Almost) no one cared anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:48 +01:00
Daniel Vetter
adb28fd71d lib: move prefault helpers to igt_debugfs.c
This way all debugfs library code is in one place, ready for some api
documentation care.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-12 21:22:31 +01:00
Thomas Wood
6c659264a6 tests: add missing assertion
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 21:13:09 +01:00
Daniel Vetter
c769d0988b tests/drv_missed_irq_hand: Make it robuster
Just launching empty batches isn't enough load on my speedy g33
to force the kernel to enable interrupts an wait for them.

So use some real load. With that the test is now fully reliably on
my g33 amchine.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 15:45:22 +01:00
Daniel Vetter
c3f2b6a339 tests/gem_exec_blt: More reasonable runtime
Doing (1 << 18) - 1 repeats isn't really. With the reduced time the
test is also useful in some shell scripted tests which need some real
load (but not too much), like drv_missed_irq_hang.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 15:44:28 +01:00
Daniel Vetter
e2ee8b4080 tests/drv_missed_irq_hang: Remove debug output
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-03-11 15:32:30 +01:00
Chris Wilson
856afd588e igt/gem_pwrite_pread: Fix relocation offsets for gen8+
Oops, I didn't check to see if there was more than one call site where
we built and execbuffer.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-07 07:52:42 +00:00
Imre Deak
cdf74b69c9 kms_setmode: Add clone-single-crtc subtest
The clone-single-crtc will test various cloning scenarios.

Currently it does limit the number of simultanously cloned
connectors to the number of pipes in the system. That restriction
can be lifted in the future if desired.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-03-05 21:59:05 +02:00
Chris Wilson
a3b80912a9 igt/gem_pwrite_pread: Fix relocation offsets for gen8+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-05 11:10:18 +00:00
Chris Wilson
072d358bf0 igt/gem_pwrite_pread: Fix XY_SRC_COPY command length for gen8+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-28 21:48:38 +00:00
Paulo Zanoni
fa6b1516c5 tests/pm_pc8: be more verbose on test_i2c failures
Whenever I see that error, I go and print the numbers so I can check
which one is failing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-26 19:16:38 -03:00
Paulo Zanoni
d406249bed tests/pm_pc8: use intel_gen instead of a big IS_GEN check
Much better!

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-26 19:16:11 -03:00
Paulo Zanoni
0a57d0b8d3 tests/pm_pc8: BDW should also support PC8 residencies
And I'm hoping the MSR register addresses will be the same.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-26 19:15:44 -03:00
Paulo Zanoni
d3582aeade tests/pm_pc8: use XY_COLOR_BLT instead of just COLOR_BLT
And add BDW support to it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-26 19:15:18 -03:00
Paulo Zanoni
6a6b8a2138 tests/pm_pc8: add "stay" mode
I used to have a binary that would just disable all the screens - so
we can enter PC8/runtime PM - and then sleep forever. I used this
binary many times while debugging PC8 and runtime PM, and I also sent
the binary to many people so they would be able to test these things
without X running.

Since pm_pc8 already implements everything that the separate binary
needs, and it even has some additional code to try to configure the
environment to actually reach PC8, it's easier to just ask people to
run "sudo ./pm_pc8 --stay" instead of sending them a file, asking them
to compile it, setup the environment, and then run it.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-26 19:14:56 -03:00
Chris Wilson
8c475e0ba6 evictions: Limit the number of minor eviction surfaces to fit in RAM
We allocate more surfaces than used in a single pass in order to stress
the eviction code between batches. The intent here is not to exercise
swapping, and we fail to check that there is enough swap+memory to hold
all our surfaces. So limit the number of surfaces we allocate to fit
into RAM, and then require that the number of surfaces we need for
testing is less than the number of surfaces we can allocate.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-26 12:06:10 +00:00
Paulo Zanoni
37773d91d9 tests/pm_pc8: add pci-d3-state subtest
Currently the test suite just looks at the files provided by the
runtime power management framework to check if the device is runtime
suspended. Add a test that reads the PCI config space to check if the
device is actually in PCI D3 state or not.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-25 18:00:53 -03:00
Paulo Zanoni
31b20f7478 tests/pm_pc8: add reg-read-ioctl subtest
After I finally fixed the code that WARNs if we're runtime suspended
when reading registers I started getting the WARNs, so this test
should reproduce them on a Kernel with the problem.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-25 17:08:44 -03:00
Chris Wilson
81ade89d64 gem_render_tiled_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-24 08:57:35 +00:00
Chris Wilson
4550a18a57 gem_render_linear_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-24 08:57:35 +00:00
Ville Syrjälä
42aa254c65 kms_flip: Add dpms-vs-vblank-race and modeset-vs-vblank-race subtests
dpms-vs-vblank-race and modeset-vs-vblank-race try to race wait for
vblank ioctls from one thread against modeset/dpms ioctls from another.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-02-21 21:33:20 +02:00
Chris Wilson
a0c936cfc1 kms_flip: Skip tests that try to inject GPU hangs if already terminally wedged
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21 15:28:43 +00:00
Chris Wilson
0cc6a219f1 kms_flip: Assert that hang_gpu() should only fail is the GPU is already hung
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21 15:19:01 +00:00
Chris Wilson
bf74a0ca3f tests: Compile all threaded tests with -pthread when appropriate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21 14:44:05 +00:00
Ville Syrjälä
5f190f2d67 kms_flip: Fail the subtest if page flip hang recovery wasn't actually tested
Context banning can prevent the page flip hang tests from actaully
testing anything, so make the relevant subtests fail in that case.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-02-21 16:19:12 +02:00
Ville Syrjälä
48ba2cdf96 kms_flip: Restore rings to running state in unhang_gpu()
If things go bad, make sure the rings aren't left in the stopped state.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-02-21 16:19:11 +02:00
Paulo Zanoni
30c21ffe7f tests/pm_pc8: try to modprobe msr
Just in case it's compile with M instead of Y. If the module is not
there, the other assertions will catch the problem.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-21 10:09:00 -03:00