1873 Commits

Author SHA1 Message Date
Chris Wilson
be9937b65c overlay: Drop unused mmap/comm events
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 18:48:28 +01:00
Chris Wilson
8cdb5bc5e8 overlay: Constify perf ringbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 18:24:39 +01:00
Chris Wilson
3e430a8b01 overlay: Fix wraparound handling of perf ringbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 18:09:40 +01:00
Chris Wilson
cc45a9a3db overlay: Primitive integration with perf
We can now record when a pageflip occurs by listening for the flip
tracepoint. Merely proof of principle at this point.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 17:42:14 +01:00
Chris Wilson
06c0cc0bb4 overlay: Show GPU waits
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 12:35:50 +01:00
Chris Wilson
f9a50de3dc Introduce intel-gpu-overlay
A realtime display of GPU activity. Note, this is just at the point of
minimum usability...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-17 11:21:51 +01:00
Ben Widawsky
7df9caeea1 quick_dump: add is_haswell()
This was missed beforehand.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-08-16 14:54:36 -07:00
Chris Wilson
0d320fdced gem_concurrent_blit: Purge the child bufmgr's cache
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 12:23:17 +01:00
Chris Wilson
6332994c26 drmtest: Squelch the rude interrupter
Stop printing the debugging information of how many times we emitted a
signal.
2013-08-16 12:23:00 +01:00
Chris Wilson
1b17cb9d04 gem_concurrent_blit: Fix the leak from the children.
As the children use the parent's fd, the kernel only has a single filp
for everyone. Therefore we cannot rely on the process termination
reaping the buffers we allocate for the children.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 11:26:00 +01:00
Chris Wilson
1ca607b458 gem_concurrent_blit: Share total num_buffers between all children
Apparently not all machines have more than 4GiB of RAM available.
Spoilsports.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68169
2013-08-16 09:52:43 +01:00
Xiang, Haihao
6229832935 assembler: error for the wrong syntax of SEND instruction on GEN6+
predicate SEND execsize dst sendleadreg payload directsrcoperand instoptions
   predicate SEND execsize dst sendleadreg payload imm32reg instoptions
   predicate SEND execsize dst sendleadreg payload sndopr imm32reg instoptions
   predicate SEND execsize dst sendleadreg payload exp directsrcoperand instoptions

The above four syntaxes are only used on legacy platforms which support implied move
from payload to dst.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-08-15 14:46:57 -07:00
Damien Lespiau
9d5e4fac20 gem_ctx_basic: Fix misc warnings
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-08-15 16:46:58 +01:00
Damien Lespiau
92aca3b19e intel_infoframes: Dump 3D_Ext_Data when using Side-by-side (half)
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-08-15 16:40:47 +01:00
Damien Lespiau
bc1cf77534 intel_infoframes: Add support for decoding HDMI VICs
The HDMI vendor infoframe can contain a HDMI VIC (as of HDMI 1.4, only
used for 4k formats).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
2013-08-15 16:40:02 +01:00
Daniel Vetter
e58891d0ae tests/prime: test dma-buf llseek support
This exercises a proposed patch from Christopher James Halse Rogers.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-15 14:01:10 +02:00
Daniel Vetter
79abed393f lib/drmtest: Use igt_assert in the do_ioctl/do_or_die helpers
abort results in "crash" test results in the piglit runner, igt gives
us neater output.

The downside is that we can now only use these in igt tests, but
that's already the case (and given their placement in drmtest.h their
intended use-case, too).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-15 14:01:10 +02:00
Daniel Vetter
610630622b tests/gem_ctx_basic: Use igt_require
... instead of threading the 77 return value through threads. Even
better would be to check for requirements in the single-threaded setup
part of the test, since now it's done by multiple threads in parallel
and will result in interleaved and multiplied output on stdout.
Whatever.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-15 13:47:15 +02:00
Chris Wilson
176011eea7 Add intel_framebuffer_dump
A simple utility to capture the currently active framebuffers and record
them as a png.
2013-08-15 10:58:31 +01:00
Daniel Vetter
f219889608 lib/drmtest: fix subtest output when skipping all tests
(null) isn't too nice ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 22:13:38 +02:00
Daniel Vetter
ec834c995f tests/prime_nv_api: fixup conversion goof-up
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 22:24:43 +02:00
Daniel Vetter
eab7a322ed tests/primve_nv_test: use igt_assert for checking
... and drop the int return argument of the tests.

Also:
- make nv_write_i915_cpu_mmap_read functional again by dropping the
  goto.
- add checks to i915_import_pread_pwrite

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 22:19:43 +02:00
Daniel Vetter
696c8f6434 lib/drmtest: documentation for igt_fixture
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 18:30:03 +02:00
Daniel Vetter
15c19229f4 lib/drmtest: add igt_subtest_name and use it in kms_flip
Useful when the testname is constructed with igt_subtest_f.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 18:03:09 +02:00
Daniel Vetter
b3880d3a96 tests: roll out igt_fixture
Also sprinkle igt_assert and igt_require over the setup code to clean
up code while at it. To avoid gcc getting upset about unitialized
variables just move them out of main as global data (where they always
get initialized to 0) - gcc can't see through our igt_fixture and
igt_subtest maze properly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 18:02:46 +02:00
Daniel Vetter
c3dd8a8c85 tests/gem_ctx_bad_exec: add subtest for vebox
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 17:11:49 +02:00
Daniel Vetter
2dbd998429 tests: Introduce igt_fixture
Just a tiny wrapper to protect global test setup/teardown code when
just listing subtests. Rolling this out over all tests with subtests
should allow us to generate the testlist with piglit as an
unpriviledged user on a non-intel system.

The aim here is to make our QA team happy who currently suffers from
this. Even more so for the prime tests since you need a system with
intel _and_ nouveau gpus to just be able to list tests.

Exemplary conversion with gem_concurrent_blt.c

Fixture is the same name other test suites like googletest use for
setup/teardown code used by multiple tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 17:04:56 +02:00
Daniel Vetter
f8c0dfe399 lib/drmtest: sprinkle documentation over igt_skip|fail|success|exit
And make the behaviour of igt_exit() a bit saner.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 16:52:08 +02:00
Daniel Vetter
a1ca8ef5b1 tests: use igt_exit() consistently with subtests
This is mostly important to get the SKIP reporting right, but I've
found a few stragglers that wanted to get converted over to the igt
result reporting completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 16:08:00 +02:00
Daniel Vetter
ec283d6a52 tests/gem_concurrent_blt: extract run wrappers
Functional programming ftw!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:18:37 +02:00
Daniel Vetter
9a4957a1b3 tests/gem_concurrent_blt: use the test helpers in the forked tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:10:52 +02:00
Daniel Vetter
5a598c9b2e tests/gem_concurrent_blt: refactor basic run modes a bit
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 15:08:05 +02:00
Daniel Vetter
43779e37b5 tests: merge gem_*_concurrent_blt together
Too much copy&pasting isn't good.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 14:50:50 +02:00
Daniel Vetter
f542b0970a lib/drmtest: Don't spoil stdout when listing tests
Oops.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 13:48:10 +02:00
Daniel Vetter
6234658063 tests: add igt_subtest_f for snprintf'ing testnames
Useful when stitching together combinatorial testnames.

v2:
- ## rules are just fun. We need 2 indirections to actually get
  __LINE__ to properly expand.
- Kill stray ; which botched the logic.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 13:47:47 +02:00
Daniel Vetter
1532af19d9 tests/gem_dummy_reloc_loop: use igt_skip
For tests with subtest we should use igt_skip to ensure that subtests
are always properly enumerated.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 12:17:51 +02:00
Daniel Vetter
c2d6773b25 tests/gem_write_read_ring_switch: use igt_exit and friends
And consolidate the gem_require_ring check a bit.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-14 12:17:51 +02:00
Chris Wilson
99431a4f06 gem_(cpu|prw)_concurrent_blit: Add contending processes
Blindly fixed conflicts:
	tests/gem_cpu_concurrent_blit.c
	tests/gem_prw_concurrent_blit.c
2013-08-14 11:08:27 +01:00
Chris Wilson
4f8c9a2c38 gem_write_read_ring_switch: Copy the missing igt_require
An oversight in the mass conversion to the new framework as the test was
called from two locations.

Ideally, the checks could be moved back to the caller and the framework
still work. This is just the patch of least resistence.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68091
2013-08-14 08:17:22 +01:00
Chris Wilson
6a746c82ab gem_exec_lut_handle: Use linear regression analysis
Simultaneously make the results more robust and compact by performing a
linear regression to compute the amount of time required to perform the
exec array walk and the relocations.
2013-08-14 00:03:35 +01:00
Daniel Vetter
629f48fa0e lib/drmtest: Don't run the rude interruptor when just listing subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 23:05:51 +02:00
Daniel Vetter
878ac4c3ab configure: require libdrm 2.4.45
We've started to use the VEBOX defines.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 20:07:32 +02:00
Daniel Vetter
8f5387eb99 tests: introduce igt_require
Since igt_skip has funny control flow we can abuse it and make it work
like a special kind of assert which automatically skips tests if a
requirement fails.

Note that in places where we have a less strict test which should
always succeed (e.g. ioctl works or isn't available) the igt_assert
should be place before the igt_require with the more strict
requirements. Otherwise we'll skip a test instead of properly failing
it.

Convert a few users of igt_skip over to igt_require to showcase its
use.

v2: s/gem_check_/gem_require_/ so that we consistently use "require"
to indicate magic check that can call igt_skip. Imo hiding the
igt_require for feature checks is ok, but for more traditional assert
like use cases an explicit igt_require might be better.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:15:18 +02:00
Daniel Vetter
5e25fcc285 tests: use igt_fail instead of exit(param != 0)
Mostly a sed job with too manual fixups:
- one case of using _exit instead of exit
- and one case which under some conditions use 77, so convert that
  check to an igt_skip.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:15:17 +02:00
Daniel Vetter
b30d95f33c tests: s/exit(77)/igt_skip()/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
c9d0378281 tests: s/exit(EXIT_SUCCESS)/igt_success()/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
a4cb8954b2 tests: s/exit(EXIT_FAILURE)/igt_fail(1)/
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
907377da0e tests/gem_readwrite: convert to subtests
A bit lazy since the read/write tests are all smashed together. But
since we have really evil partial write/read tests for coherency
checking that doesn't matter that much really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
ef9e64577d tests/gem_ctx_bad_exec: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00
Daniel Vetter
83440953e5 tests: s/assert/igt_assert
Just a wholesale rollout for now, we can refine later on.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-13 15:07:44 +02:00