1657 Commits

Author SHA1 Message Date
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
Chris Wilson
c6b26c5a40 overlay: Scale the CPU busy value by the numer of active cores
Having 100% always mean one processor fully utilised is much easier to
understand (than having to remember how many cores are on each machine
and scale appropriately).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 17:43:46 +01:00
Chris Wilson
177208b0d4 overlay: Tidy presentation of ring busy values
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 17:43:46 +01:00
Chris Wilson
b1d2a78a5d overlay: Restore the correct default font size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 15:43:38 +01:00
Chris Wilson
65d2481900 overlay: read rc6 status from perf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 15:23:10 +01:00
Chris Wilson
ddcd1b2ee5 overlay: Add support for multi-monitor positioning
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 14:26:22 +01:00
Chris Wilson
87b66f4cf0 overlay: Set the text color in case we do not have RC6
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 14:26:22 +01:00
Chris Wilson
396fa1b3f5 overlay: improve alignment of some labels
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 13:06:58 +01:00
Chris Wilson
d58aed18ee overlay: Read interrupts from perf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 12:31:13 +01:00
Chris Wilson
14614060b8 overlay: Read frequency from perf
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 12:31:13 +01:00
Chris Wilson
1c3fd70357 overlay: Read power from perf_events
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-27 12:31:13 +01:00
Chris Wilson
6ec1d2c0ae overlay: Align the process names in the memory table
And use a shade of gray to distinguish from the total instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-26 23:39:01 +01:00
Daniel Vetter
02c0d20fa8 lib/drmtest: restore in_fixture assert
I didn't really want to revert those, too ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 21:16:37 +02:00
Daniel Vetter
ad0f081f2b Revert "tests/gem_concurrent_blit: Fix segmentation fault"
This reverts commit 912a7d855600aadb937517ec5bab26bfd9b8953d.

Now fixed for real!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 20:55:54 +02:00
Daniel Vetter
8869e1e628 lib/drmtest: don't complete fixtures with a longjmp
Longjmp creates havoc with stack variables of the current stackframe.
And since fixtures should be used to set up such variables creating
havoc isn't a great idea. With this I can revert a bunch of
bogus patches I've done to paper over this by moving stack variables
to be global.

The same issue is actually a feature for subtest blocks since subtests
should be independant anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 20:55:54 +02:00
Daniel Vetter
cf93ba45b0 tests/gem_mmap_gtt: Add testcase for the vma access manager
Currently fails since the patches aren't merged yet.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 19:44:31 +02:00
Daniel Vetter
c2c0efc21a tests/gem_mmap: Convert to subtests
I wanted to write a testcase for gtt mmap access restriction checking
and only noticed after conversion to subtests that this here is for
cpu mmaps ;-)

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-26 19:44:31 +02:00
Imre Deak
86f60ee593 tests/kms_setmode: don't save/restore vt graphics for dry-run
Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-08-26 17:20:29 +03:00
Imre Deak
40cc4b8d10 lib/drmtest: fix handling of -h --help argument parsing
So far we handled -h or --help arguments properly only if the test
called igt_subtest_init_parse_opts(). Fix this for igt_subtest_init()
callers too. Make sure we still don't exit for any other
unknown options, which the caller may parse with a second getopt scan.

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-08-26 17:18:38 +03:00
Chris Wilson
04a4fae32e overlay: Trim the padding slightly
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-26 14:46:29 +01:00
Chris Wilson
908df374a9 overlay: Count number of semaphores used by each process
This required me to contract the per-process information considerably,
hopefully readability is not sacrificed too much.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-26 14:34:05 +01:00
Chris Wilson
1e65d5ac2f overlay: Allow simple positioning and resizing
Using window.size=<width>x<height> or window.size=<scale>% in
the config file, or --size=<scale>% or --size=<width>x<height>

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 23:44:35 +01:00
Chris Wilson
c9f0173764 overlay: Monitor interrupts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 20:14:13 +01:00
Chris Wilson
39f9812315 overlay: Detach from terminal
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 15:18:39 +01:00
Chris Wilson
d929102591 overlay: Add a raw kms output
For when you don't have any display server, use brute force.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 13:34:31 +01:00
Chris Wilson
20a25f5eaf overlay: Draw the cpu busy line on top of the waits
By drawing it behind the waits, it is obscured by the translucent waits.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 13:34:31 +01:00
Chris Wilson
a932c73ab7 overlay: simplify types for object counts for 32/64bit porting
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 13:34:31 +01:00
Chris Wilson
68c63ddd36 overlay: Expose sampling period/frequency as a user parameter
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25 13:34:31 +01:00
Daniel Vetter
09d9089ead tests/gem_evict_*: Add interruptible modes
Also I've stumbled over igt_fixture again. Somehow gcc loves to wreak
havoc with stack variables set up in igt_fixtures ... Duct-tape in the
form of moving fd out to global scope applied.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-23 22:32:29 +02:00
Chris Wilson
1b6480114e overlay: Fix power reading from debugfs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23 16:07:04 +01:00
Chris Wilson
b22e90bc8b overlay: Distinguish the root debugfs path and our dri node
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23 16:00:16 +01:00
Chris Wilson
9574cb1a3d overlay: Search for right debugfs path
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-23 15:53:01 +01:00