1788 Commits

Author SHA1 Message Date
Daniel Vetter
2096649053 lib/drmtest: fixup for the prefault rework
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-08 14:03:20 +02:00
Daniel Vetter
fbd64de6be lib/drmtest: Avoid calling exit handlers multiple times
- reset the count when forking
- don't add the same handler multiple times
- don't restore the exit signal handlers in the forked helper
  process
- reset the exit handler count once called to make sure we don't call
  it multiple times when dying
- don't wait for the signal helper if it's gone already

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-08 14:03:03 +02:00
Daniel Vetter
b3dadedd2e tests/gem_reloc_overflow: Add more checks
For reloc offsets and batch start/len. Doesn't quite fit into the test
subject at hand here, but meh.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +02:00
Daniel Vetter
44d4a3defb tests/gem_reloc_overflow: convert to subtests
More will come!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +02:00
Daniel Vetter
3c46789c8d tests/gem_exec_bad_domains: enable conflicting write domains test
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 15:27:14 +02:00
Imre Deak
4f496bafea lib: fix the fix for gen5 workaround emmision
Fix the regression introduced in

commit bfbe813f8fb587017c4e1d73c51395c2837eb395
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue May 29 22:14:06 2012 +0200

    lib: fix gen5 workaround emission

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-09-04 17:02:19 +03:00
Imre Deak
caf4608809 lib/intel_batchbuffer: remove code w/o effect
Introduced when refactoring the patch in

commit c1ee0bb53269ded7b79966d081518d689639bac7
Author: Imre Deak <imre.deak@intel.com>
Date:   Mon Jul 29 16:43:31 2013 +0300

    intel_batchbuffer: add support for non-32bit blt copies

No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-09-04 17:07:28 +03:00
Daniel Vetter
52221651ab tests/gem_pipe_control_store_loop: Add subtest for reused buffers
This exercises the slightly faulty kernel w/a that Eric fixed in

commit e844b990b1df9242bb91b7d490552f3198946838
Author: Eric Anholt <eric@anholt.net>
Date:   Tue Jul 31 15:35:01 2012 -0700

    drm/i915: Don't forget to apply SNB PIPE_CONTROL GTT workaround.

    If a buffer that was the target of a PIPE_CONTROL from userland was a
    reused one that hadn't been evicted which had not previously had this
    workaround applied, then the early return for a correct
    presumed_offset in this function meant we would not bind it into the
    GTT and the write would land somewhere else.

    Fixes reproducible failures with GL_EXT_timer_query usage in apitrace,
    and I also expect it to fix the intermittent OQ issues on snb that
    danvet's been working on.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=48019
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52932
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Carl Worth <cworth@cworth.org>
    Tested-by: Carl Worth <cworth@cworth.org>
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 14:08:10 +02:00
Daniel Vetter
0550092c9a tests: add missing igt_exit() calls
Forgotten while converting to subtests, then copy&pasted.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 13:25:28 +02:00
Daniel Vetter
5113df7891 lib/drmtest: add igt_skip_on macro
I've fumbled the logic inversion when converting to igt_require way
too often, so lets add something for dummies like me ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 13:19:42 +02:00
Daniel Vetter
1f9d201be4 tests: Update .gitignore
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 10:36:28 +02:00
Daniel Vetter
87c690f9e2 tests: add gem_persisten_relocs
This reproduces the 3.7 relocation regression ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-04 10:30:21 +02:00
Ben Widawsky
612252f3f9 intel_gtt: Raw PTE dumper mode
./tools/intel_gtt -d | head
GTT offset |                 PTEs
--------------------------------------------------------
  0x000000 | 0xe4005015 0xe2854015 0xe283e015 0xe283f015
  0x004000 | 0xe28ba015 0xe28bb015 0xe28b6015 0xe28b7015
  0x008000 | 0xe2828015 0xe2829015 0xe282a015 0xe282b015
  0x00c000 | 0xe2928015 0xe2929015 0xe292a015 0xe292b015
  0x010000 | 0xe2918015 0xe2919015 0xe291a015 0xe291b015
  0x014000 | 0xe291c015 0xe291d015 0xe291e015 0xe291f015
  0x018000 | 0xe2920015 0xe2921015 0xe2922015 0xe2923015
  0x01c000 | 0xe2924015 0xe2925015 0xe2926015 0xe2927015

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
c6f9bdc66f intel_gtt: Properly support gen6+ GTT PTEs
This finishes the objective in the last patch which was to actually deal
with physical addresses, and not the PTEs.

GEN6+ Provided support for physical addresses above 4GB. I'm not
actually sure what Ironlake supported, and don't feel like firing up the
timemachine.

v2: Add support for gen4, gen5, and haswell.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
8adfb5886d intel_gtt: Use function to get the physical address
The GTT PTEs that the tool is trying to compare is really about
addresses, and not the PTE itself. To accomplish this, make which
calculates the physical address we actually want.

This commit itself doesn't change any functionality; just the wording in
the code.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
a3276e9713 gem_vmap_blits: Demote warning to note
The warning that vmap isn't supported is useful, but it shouldn't get in
the way of developers (or distros) being able to use -Werror.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Ben Widawsky
c42f344b78 intel_reg_dumper: Silence GCC for uninitialized clock
GCC 4.8.1 seems to think clock may be uninitialized.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-09-03 15:31:14 -07:00
Daniel Vetter
7db283f930 tests/gem_reloc_vs_gpu: add thrashing tests
Using the i915_gem_drop_caches debugfs interface to thrash without
really thrashing.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 17:51:05 +02:00
Daniel Vetter
2c7166eb7a tests/gem_reloc_vs_gpu: add forked versions
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 15:19:30 +02:00
Daniel Vetter
f4b93781be lib/drmtest: use igt_require/assert in the prefault helpers 2013-09-03 15:19:30 +02:00
Daniel Vetter
e45b7d9474 tests/gem_reloc_vs_gpu: Add faulting reloc tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:59:13 +02:00
Daniel Vetter
225a91bc54 lib/drmtest: include sys/mman.h from drmtest.h
We need it for mmapping to get at PROT_READ|WRITE anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:38:29 +02:00
Daniel Vetter
9cc16e8afd lib/drmtest: extract gem_execbuf helper
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:37:14 +02:00
Daniel Vetter
bd59d60275 tests/gem_reloc_vs_gpu: add interruptible version
Exercise a bug where we've failed to propagate the error code
correctly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 08:58:20 +02:00
Chris Wilson
472c9dac03 kms_flip: Fix use of fb_width for PAN subtests
We need to be careful to remember that fb-width is not always the same
as hdisplay, since for panning we allocate a larger framebuffer. So fix
up the printfs to use hdisplay/vsisplay since that should be uniform
across the array.

Regression from
commit 919d68901187fa797a9b648fcf87c838fae22fa3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 29 15:33:53 2013 +0100

    kms_flips: Operate on an array of crtc

Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68832
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-02 13:53:29 +01:00
Daniel Vetter
6f118bf96a lib/drmtest: Improve output when igt_waitchildren fails
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-02 08:08:29 +02:00
Daniel Vetter
8eaa0982d0 test/gem_concurrent_blt: remove hack for testing igt_fork
Oops, this shouldn't have been committed ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68830
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-02 08:04:19 +02:00
Daniel Vetter
859159a272 tests/gem_tiled_swapping: fix igt_require conversion
I seem to be incompetent at logic ...

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68831
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-02 07:51:24 +02:00
Daniel Vetter
f73724c362 tests/gem_mmap_gtt: fix access checks
Reading manpages advisable ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-30 08:15:32 +02:00
Daniel Vetter
694bd81ed6 tests/gem_mmap_gtt: clarify access check checks a bit
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-30 08:13:05 +02:00
Daniel Vetter
a0aa8f1a2c lib/drmtest: Print info when children died due to signals
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 21:44:48 +02:00
Daniel Vetter
8f5d541620 tests/gem_evict_everything: add swapping and forked subtests
Much better at hitting the list corruption here on my machines
than what we have thus far.

Note that somehow I just can't reproduce the bug any more. No idea
why. But I guess it's time to simply push this pile out.

v2: Limit threads and rounds to something reasonable.

v3: Use igt_permute_array to avoid EINVAL due to duplicated bo.

v4:
- Add a variant of the forked tests with multiple drm fds.
- Tune the swapped forked tests a bit to complete in a reasonable
  amount of time.

v5: Add some memory pressure from the cpu by using cpu mmaps (which
directly hit shmem, so bypass gem completely).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 21:44:28 +02:00
Daniel Vetter
5fe116e913 tests/gem_evict_*: Fix leak in copy
This turned out to be the reason one one of my tests was hitting
the list corruption bug - we need a good deal more memory pressure.
So I'll now add a new testcase for that.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 18:18:33 +02:00
Daniel Vetter
fa06b0bce3 tests/gem_tiled_swapping: Use igt_require
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 18:18:33 +02:00
Daniel Vetter
cd1f220847 lib/drmtest: extract igt_fork from gem_concurrent_blt
Making sure that we correctly collect the exit codes from all children
is a bit a hassle. So add another magic igt codeblock for easy forking
and joining.

Note that children are (currently at least) not allowed to call igt_skip.
Add an assert to enforce this.

v2:
- Properly propagate the exit code.
- Fix the segfault.
- Add a child int and num_children paramter to the magic codeblock as
  suggested by Chris Wilson.
- Don't dump noise into stdout when a child thread fails, the parent
  will do that for us already.

v3: Now with some docs.

v4: Fixup igt_waitchildren to properly reset state so it can be used
again.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 18:18:33 +02:00
Chris Wilson
90a25055e3 kms_flip: Remove debugging leftovers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 18:04:11 +01:00
Chris Wilson
a60f930018 kms_flip: Set everything to zero to disable a CRTC
Just setting fb=0 is not enough as the kernel thinks userspace is
insane.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 18:04:11 +01:00
Chris Wilson
93550043ca kms_flip: Use the first mode if we find no matching modes for the crtc pair
We will check that we can set the mode on both crtcs before use, so
hopefully this will work...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 17:41:01 +01:00
Chris Wilson
865b7821e3 kms_flip: Hook up primary events for page-flips
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 17:41:01 +01:00
Chris Wilson
1f2b3e99f9 kms_flip: Run on pairs of connected outputs.
The goal is to flip the same framebuffer on a pair of CRTCs (clone mode)
and check that (a) the flip works in all combinations of workloads, and
(b) that we can hit the desired refresh rate under the simplest, most
ideal of conditions.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 16:19:41 +01:00
Chris Wilson
919d689011 kms_flips: Operate on an array of crtc
This should be no functional change as we operate on an array of
crtc[1]. Later we shall test clone mode across a number of crtc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 16:19:41 +01:00
Chris Wilson
d0ed912107 kms_flip: Exercise flip-vs-render
For machine with split BCS/RCS rings, we also need to test whether we
correctly wait upon outstanding render work before flipping and changing
modes. This should also serve to exercise the ring selection code for
flips.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 16:19:41 +01:00
Chris Wilson
59f134450d overlay: Increase idle timeout to 30s
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 13:33:58 +01:00
Chris Wilson
2b961d9573 overlay: Hide idle processes
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 13:33:58 +01:00
Chris Wilson
2f297ed2b7 overlay: Autohide Flip counter after a period of inactivity
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 13:33:58 +01:00
Chris Wilson
474ce5396e overlay: Monitor per-ring context switch rate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-29 13:33:58 +01:00
Chris Wilson
75ef36713a overlay: Make it easier to renice
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-28 14:04:27 +01:00
Chris Wilson
9bebbbc49b overlay: Generate unique name for snapshots
Since we no longer increment the counter every frame, we need to use a
timestamp instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-28 14:04:27 +01:00
Chris Wilson
a18023f678 overlay: Add number of running processes to CPU display
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 23:52:03 +01:00
Chris Wilson
11567e318e overlay: Include the core count in the cpu info line
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 17:51:51 +01:00