760 Commits

Author SHA1 Message Date
Daniel Vetter
9360df4ab3 tests/gem_linear|tiled_blits: convert to subtests
Finer granularity for nightly runs and regression reporting is always
nice.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-03 08:47:34 +02:00
Chris Wilson
bc388b54d4 drm_lib.sh: Be more precise in detecting the i915 /sys path
We need to be careful in case other devices grow an error file in the
future. The first step here is just to check the minor that corresponds
with the debugfs path found for the device
2013-07-03 08:17:18 +01:00
Chris Wilson
e50ae9596c tests/hangman: Be lenient towards a non-existent sysfs error state
As /sys/class/drm/cardX/error is a new interface for 3.11, we need to be
quiet when it does not exist or else we upset the automated tests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66533
2013-07-03 08:17:18 +01:00
Chris Wilson
ae452e327a tests/gem_(linear|tiled)_blits: Repeat whilst being interrupted
Since these two tests exercise a working set larger than aperture, they
require stalls which are prone to being interrupted - so interrupt them
and check that everything still works.
2013-07-02 11:29:26 +01:00
Daniel Vetter
faf2a0223c tests/drm_lib.sh: Don't die if the sysfs path can't be found
That just means that the sysfs error file isn't there.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-02 09:13:57 +02:00
Daniel Vetter
3f93e1bc74 test/drm_lib.sh: Updated sysfs error filename
I've forgotten to bikeshed that part ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-02 09:09:56 +02:00
Mika Kuoppala
857b464b34 tests/ZZ_hangman: Test both error_state interfaces
Test both debugfs and sysfs error_state interfaces.

v2: sysfs error_state not mandatory

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: Update sysfs file name.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-01 18:55:35 +02:00
Mika Kuoppala
6fd652ac1d tests: add i915_sfs_path
To access 'error_state' through sysfs.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-01 18:54:53 +02:00
Mika Kuoppala
3743a0b994 tests: rename debugfs base path to be more specific
In preparation to have sysfs entries used in scripts
rename to more specific name.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-07-01 18:54:40 +02:00
Chris Wilson
4541cbeba4 tests/kms_flip: Repeat all of the tests whilst being rudely interrupted
Once upon a time, our modesetting code used to fail if it was
interrupted. So lets make sure that never happens whilst flipping.
2013-07-01 12:52:43 +01:00
Daniel Vetter
64ff612b81 tests/gem_cpu_concurrent_blit: stop signal helper again
Not doing so totally upsets the piglit igt runner since we leave
a bunch of zombies behind.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-06-29 17:50:49 +02:00
Chris Wilson
13932d67de tests/gem_cpu_concurrent_blit: Restore lost intel_copy_bo()
Accidentally replaced the intel_copy_bo() with the set_bo() in the
"overwrite-source" in 4fd34977aff60f58cd955eb9c2d568d5fb824611 when
clearly I wanted to simply add the calls to set_bo() first.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29 17:19:35 +01:00
Chris Wilson
b1f23fe1d4 tests/gem_cpu_concurrent_blit: Undo debugging hack
Accidentally left in the hack to run the
"overwrite-source-interruptible" for only one loop, used whilst testing.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29 17:10:19 +01:00
Chris Wilson
4fd34977af test/gem_(cpu|gtt)_concurrent_blit: Move the set_bo() from create to the test
Hiding the initial set_bo() required for the "overwrite-source" tests
lead to a nice bit of hilarity as I missed repeating the initialisation
for the multiple loops of the interruptible version of
"overwrite-source".

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29 17:07:51 +01:00
Chris Wilson
4c6f2d4e0c tests/gem_(cpu|gtt)_concurrent_blit: Restore the old tests and add the new interruptible as new tests
Daniel preferred to keep the old tests intact lest we accidentally break
them, and to add the new interruptible tests as new subtests.

In the process also make sure the GPU is idle before starting each loop.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29 16:49:05 +01:00
Chris Wilson
95426dc206 tests/gem_(cpu|gtt)_concurrent_blit: Enable signals
In order to exercise the bug behind:

commit 22fd5ca947b58901927d100d2b1aa0f1672b3435
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jun 28 16:54:08 2013 +0100

    drm/i915: Only clear write-domains after a successful wait-seqno

we need to check for concurrent access with the potential to be
interrupted by a signal. The framework for doing so is already in place,
so just enable it and repeat the tests for longer to give better chance
of being interrupted at just the wrong moment.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-29 16:37:20 +01:00
Chris Wilson
ebfd01908f tests/gem_lut_handle: Quit when we hit ENOSPC
I'd been working under the falsehood that we would always generate an
error for an invalid reloc->target_handle before reserving any object.
However, only the execlist is checked up front for validity before
reservation so ENOSPC is a genuine error condition raised by the test.
Fix it so that we stop reporting that limit as a test failure.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
2013-06-27 19:41:52 +01:00
Chris Wilson
60e3930987 tests/gem_lut_handle: Simplify creation of broken handles
Limit the broken handles to UINT32_MAX-4096 so that we can be sure that
they do not alias with a valid handle.

References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 13:55:53 +01:00
Chris Wilson
6de9736394 tests/kms_flip: Suppress failure from setting mode
We may fail to set a mode if it fails some hidden constraints, such as
bandwidth on the third pipe. This is expected, so skip testing such
modes.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66111
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-24 12:06:00 +01:00
Chris Wilson
d2048819b9 kms_render: Skip unsupported display configurations
Certain modes may not be supported by certain combinations of pipes.
This is impossible to determine upfront, and we await an atomic
modesetting query operation. In the meantime, if we fail to set a mode,
just skip that test.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66000
2013-06-21 16:54:47 +01:00
Chris Wilson
e56754965f gem_lut_handle: Print some more information upon failure
References: https://bugs.freedesktop.org/show_bug.cgi?id=65391
2013-06-19 14:19:47 +01:00
Chris Wilson
9d8fc1957c gem_lut_handle: Avoid using a valid handle when testing BROKEN 2013-06-07 13:50:47 +01:00
Imre Deak
528b1f381c tests: add kms_render
Add a test going through all connectors/crtcs/modes/formats painting to
a front FB with CPU or painting to a back FB with CPU and blitting it
to the front FB.

Only formats understood by cairo are supported for now.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06 01:43:51 +03:00
Imre Deak
f68d964c57 lib: refactor kmstest_create_fb
Factor out parts that will be used by an upcoming patch adding
kmstest_create_fb2.

Also call the fb paint functions directly, there is not much
point in passing a function pointer for that.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06 01:43:51 +03:00
Imre Deak
bfb0cdd668 lib: add kmstest_get_connector_config
This is used by multiple test cases, so make it shared.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06 01:43:51 +03:00
Imre Deak
542a40c485 lib: add kmstest_cairo_printf_line
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
[v3: fix mode printing in paint_output_info() botched by debugging leftover :/ ]
2013-06-06 01:43:51 +03:00
Imre Deak
3a2aed1f30 lib: move connector_type_str and co to drmtest
These are used by multiple test cases, so make them shared.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
2013-06-06 01:43:50 +03:00
Chris Wilson
f1e9e300fa gem_lut_handle: Make the error checking explicit for LUT handling
What this test is interested in is the handling of the LUT for very
large arrays, irrespective of whether such batch are actually
executable. So adjust the pass/fail checks to be explicit in the error
they are looking for, so that we do not conflate memory/aperture
pressure as a failure in the LUT API.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65391
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-06-05 11:14:25 +01:00
Chris Wilson
2e1c11546a gem_reg_read: Only check errno after a definite error
As upon success, errno is invalid and may give spurious false results.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65157
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-05-30 08:40:43 +01:00
Imre Deak
7fcd94b286 kms_flip: add subtests for the DPMS OFF->modeset->flip sequence
Add a double buffer and a single buffer version of the above sequence,
to check if the modeset does a DPMS ON.

Tested on IVB, with and without the relevant kernel fix, got the
expected results.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22 18:18:28 +02:00
Imre Deak
404f353394 kms_flip: do a DPMS ON when exiting with error
Currently when exiting with error, we'll get stuck in a DPMS OFF state
if the error happens while we have DPMS OFF set in the test sequence.
This happens even though we switch back to text mode at exit. This might
be a bug in itself to be fixed later, but in any case we want a working
console, so do an explicit DPMS ON.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-22 18:18:28 +02:00
Damien Lespiau
eab0823e0e ddi_compute_wrpll: Do not use a double constant
Otherwise the expression will be promoted to a floating point
multiplication

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
3b79360642 ddi_compute_wrpll: Factor out a common expression
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
4897ac41da ddi_compute_wrpll: Rework the logic around r2 and n2 a bit
Let's not use the 2K variants of the frequencies it does not help
in anything here and the explanations are hopefuly more understandable
this way.

On top of that, I noticed that we can just compute the desired min/max
boundaries for r2 and n2, so use that instead of the two tests to
discard out of range values.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
bb1dfd5613 ddi_compute_wrpll: Fix the reference for 222525Khz and 296703Khz
Assume that the budget for those frequencies were tuned after the
reference table was created.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
a59b0cd01d ddi_compute_wrpll: Fix the reference table for 37762500Hz
The 5 was lost when stored in KHz.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
8cf09e5ed4 ddi_compute_wrpll: Code the reference frequencies in Hz
Because the reference frequencies were stored in KHz, we've lost
precision for 37762500Hz and the test is failing. Let's express the
reference frequencies in Hz then.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
0be2723c30 tools: Add a standalone tool to test the computation of r,n,p for WRPLLs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Daniel Vetter
3d9beff623 tests: fix script testlist
Oops. This has been broken since:

commit d798ab9c2a092a08e14c6f2dfb1777376ba407a8
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Dec 18 22:55:58 2012 +0100

    tests: add testcase to check igt runtime enviroment
2013-05-09 17:17:56 +02:00
Imre Deak
01b408e43a testdisplay: set VT graphics mode
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 21:00:52 +02:00
Imre Deak
0009a4af3d kms_flip: set VT graphics mode
This is one reason for some of the sporadic kms_flip failures.
One such is https://bugs.freedesktop.org/show_bug.cgi?id=59834.

v2:
- use unsigned long for KDSETMODE/KDGETMODE
- fix passing the parameter to KDGETMODE as it should be by value
- actually testing that it works..

v3:
- don't do an explicit DPMS_ON, only switch to graphics mode.

v4:
- use the newly added drmtest_set_vt_graphics_mode(), which will also
  take care of restoring the original mode. (Daniel)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 21:00:45 +02:00
Imre Deak
d2f7a66fee kms_flip: suppress uninitialized var warning
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-08 20:56:57 +02:00
Damien Lespiau
ec3e7a66f0 Update .gitignore files with the new tests and tools
Also sort them.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:31 +01:00
Damien Lespiau
6a82b68e36 build: Make grep silent when running make test
-q will prevent grep from writing to stdout and print "root" when make
test is running as root.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-08 13:34:21 +01:00
Zhong Li
a417ef7cc8 i-g-t: gem_dummy_reloc_loop.c: add vebox test case
Aside from adding VEBOX support, this test allows allows the "mixed"
test case variant to work on platforms that have 2 rings which was
previously not the case. To the best of my memory, this might therefore
impact G45, and Ironlake.

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: added commit message, remove num_rings = 1, s/LOCACL/LOCAL]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-03 17:53:57 -07:00
Zhong Li
8ddf84d129 i-g-t: check kernel enable rings or not
1. add functions check kernel enable a ring or not.
2. add function gem_get_num_rings() to check how many rings kernel has
enable.
3. gem_ring_sync_loop.c will call gem_get_num_rings() directly instead
of original static fucntion get_number_rings().

Signed-off-by: Zhong Li <zhong.li@intel.com>
[Ben: Wrapped commit message + whitespace fixes]
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-05-03 17:39:14 -07:00
Daniel Vetter
53d251ac23 tests/prime_udl: don't put dirt into stderr when skipping
It upset's QA's test runner.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-05-02 08:10:15 +02:00
Zhong Li
bafbbf1cc8 gem_exec_nop.c: add vebox test case
v2 (Ben):
Fixed whitespace,
s/HAS_BLT_RING/gem_has_vebox/
s/I915_EXEC_VEBOX/LOCAL_I915_EXEC_VEBOX

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-27 11:57:37 -07:00
Zhong Li
21e7e342c1 gem_cs_tlb.c: add vebox test case
v2 (Ben):
Fixed whitespace,
s/HAS_BLT_RING/gem_has_vebox/
s/I915_EXEC_VEBOX/LOCAL_I915_EXEC_VEBOX

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-27 11:57:30 -07:00
Zhong Li
b6fa628db0 gem_ring_sync_loop.c: fix an operator error
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-04-27 11:50:55 -07:00