529 Commits

Author SHA1 Message Date
Imre Deak
3a622b9784 fix warn in sysfs_{rc6, rps}*: ignoring return value of 'fscanf'
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:12 +02:00
Imre Deak
b614b4d648 fix warn in gem_readwrite: 'read/write' shadows a global declaration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:10 +02:00
Imre Deak
6456e75f0d fix warn: 'div' shadows a global declaration
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-10 15:59:02 +02:00
Daniel Vetter
1a83c0990a tests/gem_exec_big: fixups
- don't emit a self-modifying batch, the kernel doesn't like those
- also change the buffer size, to exercise all corner-cases of the
  sg_table stuff
2012-10-09 22:47:59 +02:00
Daniel Vetter
fa6b0208ab tests/gem_exec_big: add a reloc at the end of the big batch
Since that's the other place where the broken get_page blows up.

Actually it seems to only blow up on specific pages ...
2012-10-09 19:53:52 +02:00
Daniel Vetter
1431938c5c tests: add big batchbuffer test
... and use it in the hangman to stress the error_state capture a bit more.

Uncovered a bug in the obj->pages ->obj->sg_list rework.
2012-10-09 19:29:02 +02:00
Daniel Vetter
e5722bac9c tests: update .gitignore
I've thought I've fixed this, but looks like I've failed to commit.
2012-10-09 17:32:00 +02:00
Daniel Vetter
c9795c6dfe tests: add gem_cs_tlb
Should test tlb coherency, but somehow it fails to hit the bug I want
it to hit ... needs more work.
2012-10-09 17:30:59 +02:00
Daniel Vetter
a7787baccc tests/gem_cs_prefetch: clarify what it tests
I've forgotten ;-)
2012-10-09 15:51:13 +02:00
Daniel Vetter
dc5d76e2bf tests/flip_test: check -EBUSY and -EINVAL behaviour
We want -EBUSY for a pending flip and -EINVAL if the pipe is off
(either dpms off or completely off). With the small exception that
someone thought it would be funny to return -EBUSY when the crtc is
fully off.
2012-10-04 22:09:16 +02:00
Daniel Vetter
1422c22e89 tests/*storedw*: add subcases with more outstanding batches
Just in case this is better at hitting seqno signalling races ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-04 13:22:16 +02:00
Daniel Vetter
826326bc7c flip_test: fix timestamp order
When grabbing the timestamp after a flip, it has a decent chance to
actually be after the flip. Surprising.
2012-10-03 23:16:18 +02:00
Daniel Vetter
630dd4087d tests/gem_caching: only disable on vintage i965g/gm
Hooray for confusing macros!

Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03 19:01:30 +02:00
Daniel Vetter
2d431fd6b6 tests: add drm_threaded_access_tiled
This catches parallel access to bo->virtual causing sigbus

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
[danvet: applied some bikeshed
- changed prefix from drm_ to gem_, it's a kernel gem test
- added autohell magic to link with pthreads
- .gitignore entry
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-03 13:44:30 +02:00
Daniel Vetter
9965299cf3 flip_test: add an explicit flag for timing checks
We'll need this for the wait_vblank test cases.
2012-10-03 08:26:46 +02:00
Chris Wilson
aaa460951d gem_cpu_reloc: Do another pass explicitly moving to the CPU write domain
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:40:46 +01:00
Chris Wilson
99a0824669 gem_cpu_reloc: Use the mappable aperture size!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
217511012a gem_cpu_reloc: And run the test in reverse to check with already bound batches
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Chris Wilson
8b2c19da0b gem_cpu_reloc: Fix for running on SNB+
I work with these everyday and I still made a basic mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 21:05:29 +01:00
Daniel Vetter
43737163d3 flip_test: increase runtime of the plain flip to 15s
This ensures that we'll hit the stupid hpd poll handler in every run.

Also don't yell around about jitter for tv outputs ...
2012-10-02 19:45:52 +02:00
Daniel Vetter
400535e82f tests/flip_test: measure inter-frame ts jitter
Yell if it's wrong.

For some odd reason this blows up on my snb. And always on the same
o->count frame on the 2nd crtc ... And we have to thank the hpd poll
helper for that. Comment explaining this added, also made the error
non-fatal.
2012-10-02 19:39:17 +02:00
Daniel Vetter
87f7dccab6 flip_test: race against modesets, too
Even slower than dpms switching ;-)
2012-10-02 19:39:17 +02:00
Chris Wilson
ef45b44036 gem_wait_render_timeout: Fix SKIP return code
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 19:22:37 +01:00
Chris Wilson
3b9a76d2fa tests: Add gem_cpu_reloc
Attempt to stress test performing relocations whilst the batch is in the
CPU domain.

A freshly allocated buffer starts in the CPU domain, and the pwrite
should also be performed whilst in the CPU domain and so we should
execute the relocations within the CPU domain. If for any reason one of
those steps should land it in the GTT domain, we take the secondary
precaution of filling the mappable portion of the GATT.

In order to detect whether a relocation fails, we first fill a target
buffer with a sequence of invalid commands that would cause the GPU to
immediate hang, and then attempt to overwrite them with a legal, if
short, batchbuffer using a BLT. Then we come to execute the bo, if the
relocation fail and we either copy across all zeros or garbage, then the
GPU will hang.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02 17:35:01 +01:00
Daniel Vetter
d619a672df tests/flip_test: also test pannning with dummy load
Needs a bit more relaxed select timeout to work (which is not
required when testing dummy_load vs. dpms, since the dpms forces the
sync, not the select timeout).
2012-10-02 17:22:09 +02:00
Daniel Vetter
66fe119afd tests/flip_test: test interaction with panning
Since panning with set_crtc is synchronous, we need to stall for any
outstanding pageflips. This new testcase exercise that code. Unfortunately
we still need eyes to check whether we don't loose the offset :(
2012-10-02 17:17:40 +02:00
Daniel Vetter
3441ad29bf tests/flip_test: robustifications
- don't yell around about dropped frames on tv connectors (and explain
  why in a comment)
- wait a bit when using a test config that checks for dropped frames before
  starting. Also allow for 1% of fudge, this makes it reliably work
- make the dummy load more variable, took too long on older machines.
2012-10-02 17:01:06 +02:00
Daniel Vetter
cdad308a4b tests/flip_test: don't complain about timestamps in the future
those can happen due to the scanline vblank timestamp adjuster ...
2012-10-02 16:09:00 +02:00
Daniel Vetter
4c7fc65cb6 tests/flip_test: actually try to check what I want to check
/me sucks
2012-10-02 15:59:58 +02:00
Daniel Vetter
6b034a6fd6 tests/flip_test: check whether timestamp isn't in the past
This is mostly useful for when we add support for other clock sources,
e.g. clock_monotic, to check whether the kernel picked the right
clock.
2012-10-02 15:42:34 +02:00
Daniel Vetter
73af035c59 tests/flip_test: check whether the pageflip event took too long
We're suspecting that something is fishy with the event deliver/vblank
timestamp handling on gmch platforms. Unfortunately, this isn't it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-10-02 15:37:24 +02:00
Chris Wilson
f509d40fa9 flip_test: count the number of flips and check we don't drop any
In the basic case of just flipping between two buffers with no
additional work, we should neve drop a frame.
2012-10-02 13:31:33 +01:00
Daniel Vetter
93ea0182c4 tests/flip_test: re-enable disabled testcases
oops
2012-10-02 11:50:20 +02:00
Daniel Vetter
4701dacbc5 tests/flip_test: new testcase with a busy load before the flip
I've hoped that this would be good enough to hang pch platforms, but
it looks like those just complete the flip immediately on disabled pipes.
2012-10-02 10:33:13 +02:00
Daniel Vetter
3d4ebe9be3 fixup .gitignore for newly add sysfs_rps test 2012-10-02 10:32:25 +02:00
Chris Wilson
a65087a26e tests/flip_test: Revamp to demonstrate race with modeset/dpms and pageflips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-28 13:02:46 +01:00
Yi Sun
53895acbe2 Add option -o <number>, which can test only one specified mode.
Each mode line has a number just like '[i]'. So we can only test the specified mode with giving the number of mode to '-o' parameter.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-09-26 14:46:02 +02:00
Chris Wilson
d00f72a01b tests/module_reload: Silence warnings when unloaded shared modules
So long as we spit out critical errors during i915 reload, or detect any
oops the test will do its job.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55040
2012-09-18 14:06:14 +01:00
Ben Widawsky
0cedccc844 sysfs rps test added
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-09-14 12:39:20 -07:00
Chris Wilson
397cd4acd1 gem_gtt_speed: Add a test that caches the mmapping across iterations
Repeat the memset streaming performance test on the same mapping so that
we can factor out the overhead of establishing the GTT/CPU mmaps.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 15:05:34 +01:00
Chris Wilson
f256ada3b6 gem_gtt_speed: Use a memset() to test streaming performance
This make the reasonable assumption that the libc code for memset() can
saturate the memory bandwidth -- at any rate it should do better than
the copy.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-13 14:59:09 +01:00
Ben Widawsky
bc62567b77 clang: Fix static analysis warnings from clang
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:20:52 -07:00
Ben Widawsky
54ed938d39 clang: Fix warnings found through clang.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-08-30 14:19:10 -07:00
Chris Wilson
ac23daaa51 tests/gem_cacheing: Exercise snoop coherency
This is based on tests/gem_partial_pwrite_pread which aims to detect
incoherency between CPU reads and writes to a bo whilst using it as a
source and target for GPU writes.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-08-27 09:42:34 +01:00
Alan Coopersmith
1b5fd314fd Add --disable-nouveau option for platforms without nouveau support
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:32 +02:00
Alan Coopersmith
4cdfa8e9b7 flip_test: add cast to pacify Solaris Studio compiler
Fixes build error:
"flip_test.c", line 180: improper pointer/integer combination: op "="

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:27 +02:00
Alan Coopersmith
99fdba921e Fall back to CLOCK_MONOTONIC on systems without CLOCK_MONOTONIC_RAW
Solaris has not yet adopted this Linux extension

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-08-24 23:20:14 +02:00
Daniel Vetter
e40146878e Revert "tests: disable nouveau if unavailable"
This reverts commit dd8325323bfcca1f742e864ca7d87101a0d59936.

I like the patch from Alan Coopersmith with an explicit disable
option better.
2012-08-24 23:18:48 +02:00
Maarten Lankhorst
dd8325323b tests: disable nouveau if unavailable 2012-08-24 22:55:20 +02:00
Maarten Lankhorst
425940be1d tests/prime_nv_test: add missing call for test8 2012-08-24 22:50:42 +02:00