2434 Commits

Author SHA1 Message Date
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
Chris Wilson
ea332b64b6 lib: Test against available swap
Even if we ignore the double-accounting bug in Linux, we need to be sure
that the remaining swapspace is adequate for running our test as the
system may be under load before we even start.

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
Ben Widawsky
8ebc02a54c quick_dump: Add missed broadwell autodetect
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-02-21 13:15:35 -08: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
Paulo Zanoni
41267dca3c tests/pm_pc8: try to modprobe i2c-dev
Just in case the module is compiled 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:08:35 -03:00
Paulo Zanoni
4eb37bf4c1 tests/pm_pc8: add gem-idle subtest
It's triggering WARNs and DRM_ERRORs on current drm-intel-nighly.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-21 10:07:55 -03:00
Paulo Zanoni
6f288749f4 tests/pm_pc8: remove sleep() call when setting up the environment
This sleep was added because sometimes we didn't reach PC8+
residencies, but it was still not enough to prevent the problem every
time, and it is really not needed most of the times. I have
investigated more and it seems that we only have to wait until after
some minutes have past since the machine booted. So just remove the
sleep for now since when you run each subtest in a separate process,
you end up having to sleep at every subtest.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-21 10:07:30 -03:00
Paulo Zanoni
c9524235dd tests/gen7_forcewake_mt: use -lpthread
Otherwise it fails to compile on my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-02-21 10:05:54 -03:00
Chris Wilson
3db29744f7 kms_flip: Try to make hang_gpu() robust against hanging the GPU
On a bad day, hanging the GPU may be terminal. Yet even if the GPU is
terminally wedged we expect modesetting (and pageflips) to continue.
That deserves to be a dedicated test, but in the meantime we should
strive to avoid falling over just because the code is not resilient.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21 11:39:45 +00:00
Chris Wilson
005d1dcc98 Add i915_pciids.h
This is a pure copy from the central location at
kernel/include/drm/i915_pciids.h
2014-02-20 13:42:25 +00:00
Chris Wilson
ff87c4183b tests: Add gen7_forcewake_mt
This is supposed to be snafu...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20 13:38:08 +00:00
Joao Santos
06189c6029 build: Skip kms_plane on Android
Skipping this test until we have Cairo in the build.

Signed-off-by: Joao Santos <joao.santos@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-19 14:42:54 +00:00
Damien Lespiau
e292e00de0 kms_pipe_crc_basic: Remove spurious inclusion of glib.h
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-18 14:17:10 +00:00
Damien Lespiau
1daafe2762 kms_plane: Remove spurious inclusion of glib.h
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-18 14:16:49 +00:00
Daniel Vetter
959783684e test/kms_flip: fix up igt logging conversion
Silly me ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 19:22:53 +01:00
Daniel Vetter
cef9b31a24 testdisplay: Allow to specify the dpms level
aka the jbarnes-me-harder mode

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 19:22:35 +01:00
Daniel Vetter
30cfde5822 testdisplay: implement dpms test
For those who wonder about the -j switch ... all the good ones have
been taken, so this is the Jesse-flag.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 19:16:49 +01:00
Daniel Vetter
b5b0aeb6a5 NEWS: Mention new logging support 2014-02-13 14:43:20 +01:00
Daniel Vetter
d1e318d23d tests/kms_flip: use igt logging
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 14:41:40 +01:00
Daniel Vetter
c88f898c57 tests/gem_seqno_wrap: use igt logging
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 14:41:40 +01:00
Daniel Vetter
46ec3ef1f8 test/pm_rps: use igt logging
Cc: Jeff McGee <jeff.mcgee@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 14:41:40 +01:00
Daniel Vetter
eebdf7f920 lib: (somewhat) structured logging support
Apparently there's a bit a need for more verbose output in testcases,
mostly for debugging purposes. At least gem_reset_stats and pm_rps
have a verbose mode.

On top of that we're currently not taking advantage of piglit's "warn"
state all that much. But I think it might be useful for testcases which
are notorious for some kinds of spurious failures, like e.g. the really
nasty timing checks in kms_flip. If we demote some of them to just
warnings we could run the overall tests more often.

Hence this patchs adds a new igt_log function with the three levels DEBUG,
INFO and WARN. Plus a bunch of convenience helpers to keep the test
code tidy.

The level can be set through an enviroment vairable IGT_LOG_LEVEL with
info being the default. Also tests can look at the selected log level in
case they want to run costly debug functions only when needed.

Comments highly welcome, I plan to roll this out over tests which can
use it (not all, imo that's too much churn) once we've settled on the
interfaces/semantics.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-13 14:41:40 +01:00
Zhao Yakui
60a24a22ba Assembler/bdw: Remove the unsupported cache agent for WRITE(...)
The Sampler/Constant cache is read-only. And it can't be used as
the target cache agent of WRITE message.

Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-02-13 07:53:04 +00:00
Thomas Wood
a2bf80fd84 tests: fix sub-test enumeration
Ensure sub-tests can be listed correctly by doing any test setup within
an igt_fixture block.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-12 17:45:10 +01:00
Daniel Vetter
ec3b1332f8 NEWS: Mention Damien's new helper library 2014-02-12 00:12:07 +01:00
Daniel Vetter
a036959f3e lib: Make igt_skip noreturn
This is a remnant from the subtest code before we had proper
fixture blocks. With those there's no no reason to have igt_skip
calls outside of fixtures or subtests, so we can assert this and
hence always jump out.

Suggested by Thomas Wood since static analyzers got confused about
this.

To check for fallout I've run all tests as non-root so that they'll
all skip. Only very little fallout resulted.

Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-12 00:07:19 +01:00
Daniel Vetter
0d1084fe3f lib: install exit handler only on success for prefault control
Otherwise we'll hit an igt_skip in the exit handler, which upsets
the new in_fixture||in_subtests checks.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-12 00:07:19 +01:00
Daniel Vetter
58633cfde4 test/gem_gtt_hog: bail out earlier
This way we properly skip instead of failing hard. Just result
polish when running on non-intel systems.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-12 00:07:19 +01:00
Daniel Vetter
36be04bdfb tests/gem_madvise: use correct main block
igt_simple_main doesn't enumerate subtests ...

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 23:52:43 +01:00
Daniel Vetter
3514872efe tests/gem_bad_ctx_exec: Properly wrap in igt_fixtures
Caught by the new nasty assert in igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 23:50:10 +01:00
Daniel Vetter
a86651fa24 tests/gem_close_race: Properly wrap init code in fixtures
Blows up otherwise if there's no intel gpu around.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 23:47:50 +01:00
Daniel Vetter
349ba5d3e1 lib: fix header include
drm/ path is for the headers from kernel sources, without when using
the pkgconfig libdrm version.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-11 23:37:20 +01:00