921 Commits

Author SHA1 Message Date
Ben Widawsky
d8d114bca3 README: Add quick_dump info
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:22:00 -08:00
Ben Widawsky
1cce7eb21b quick_dump: Give dumper an AM_CONDITIONAL
It may sometimes be undesirable to build or install the quick dumper.
This was requested by Damien.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:22:00 -08:00
Ben Widawsky
1f2e037e8f quick_dump: Use the register access library
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:22:00 -08:00
Ben Widawsky
beb5de858d quick_dump: Connect libpciaccess and other utils
Make a register access library with sample to do register reads

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:21:55 -08:00
Ben Widawsky
6437eed930 quick_dump: SWIG chipset interface
This isn't strictly necessary it would have been easy enough to simply
convert intel_chipset.h but this should be nice prep work for directly
doing MMIO. It also serves as a nice review point.

It's demonstrated with an autodetect function in the script. That
autodetect has a hardcoded path that shouldn't be there, but it will go
away in the next patch when we can properly link in libpciaccess.

Thanks to Matt for helping whip the automake stuff into shape.

v2: Switch to $(top_srcdir)

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 18:21:17 -08:00
Ben Widawsky
508b5ce9a5 configure.ac: Add swig dependency
As far as I can tell (and recommended to me by Matt) taking these m4
extension macros from http://www.gnu.org/software/autoconf-archive/
doesn't require the project distribute GPL. I am a bit confused from
reading the license. I'd really hope someone can comment.

The only other solution would be to roll my on m4 macros, or figure out
a way to check that this autoconf-archive package is included from the
configure.ac.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
ebc918601e quick_dump: vlv support
This patch includes a patch from Jesse which removed a bunch of VLV
registers which were useless in my original RFC.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
b96821cb39 quick_dump: gen7 support
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
45cc039e31 quick_dump: gen6 support
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
ac1634e23c quick_dump: A dump utility different than reg_dumper
This is the base tool for quick dump. At it's heart, quick dump is
simply a basic text parsing thingie which plugs into intel-gpu-tools to
do something similar to intel_reg_dumper.

The format for the register definition files is very open, so it's just
something simple for now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
66ec9bd4e7 configure.ac: Move prime stuff to where it belongs
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 16:42:18 -08:00
Ben Widawsky
3a752a3d9a configure: slightly more standard --disable-tests
Cc: Julien Cristau <jcristau@debian.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-07 10:30:03 -08:00
Rodrigo Vivi
7c17072400 Build: Add --disable-tests configure flag to avoid tests build
Tests are still being built by default. However this request
came from OSVs in order to allow them to include i-g-t in their
distributions by default avoiding adding more and more dependencies
since we are improving and adding more and more tests.

v2: wait for Ben's spacing fixes and adjusted for new space rules.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-06 12:40:06 +01:00
Ben Widawsky
c75b8c60b5 configure.ac: Add vim magic modeline
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-05 10:06:29 -08:00
Ben Widawsky
90f0b3dcf3 configure.ac: Fix spacing
Almost all based on vim's config file type. It got it wrong in a few
places which were fixed by hand.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-05 10:06:29 -08:00
Mika Kuoppala
b8e5965e8f tests/gem_ctx_exec: properly test destroy_ctx ioctl
Call context destroy with proper ioctl number and
add test to verify that we can't post batchbuffers
with destroyed context.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-02-05 12:02:37 +01:00
Ben Widawsky
f5c3e5811e intel_gtt: Fix PTE offsets
Vincent sent me a patch which I think didn't go far enough.

Honestly, I don't even know what this tool does.

Reported-by: Cheah, Vincent Beng Keat <vincent.beng.keat.cheah@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-02-04 17:53:48 -08:00
Chris Wilson
f9c8e365e9 intel_error_decode: Don't barf on a malformed PCI ID line
Whoops, someone added UTS_RELEASE with no newline before PCI ID which
upsets our naive parser.
2013-02-04 21:42:21 +00:00
Jesse Barnes
34c66d0739 add more VLV PCI IDs
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2013-02-02 11:24:56 +01:00
Ville Syrjälä
8c4bb7022b kms_flip: Add flip-vs-modeset-vs-hang test
The flip-vs-modeset-vs-hang test will:
1. simulate a GPU hang
2. exec a nop batch
3. schedule a page flip
4. perform a modeset operation

With the current buggy kernel driver, the modeset operation will
hang indefinitely waiting for the flip to complete. Since the
rings are stopped, that will never happen. The current GPU reset
code doesn't play well with page flips either, so a GPU reset
won't fix things.

Once the kernel driver is fixed, the eventual GPU reset will
save the day.

The nop batch buffer is required only because the kernel can't
currently detect GPU hangs, unless there is at least one user
submitted request pending.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-30 16:06:29 +01:00
Ville Syrjälä
e1d1beb478 kms_flip: Make flip events optional
Pass an argument to do_page_flip() telling it whether to request flip
events.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-30 16:06:26 +01:00
Chris Wilson
fb7bc2e8d1 tests/gem_lut_handle: Limit testing LUT interface to recent kernels
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 15:10:29 +00:00
Chris Wilson
d5517a1301 tests/gem_lut_handle: Expand negative testing
Pass in lots of execs and relocs trying to trick the kernel into making
a mistake.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 15:05:20 +00:00
Chris Wilson
230d77f1d0 tests: Benchmark new API for using a LUT with the execbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 14:31:01 +00:00
Chris Wilson
ec2eac6d7b tests: Exercise new API for using a LUT with the execbuffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-17 14:30:43 +00:00
Yi Sun
cdd352df95 tests/testdisplay.c: Fix the issue which don't display anything until '-o' given.
Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-14 15:31:52 +01:00
Mika Kuoppala
c612481a19 tests/gem_seqno_wrap: skip if debugfs entry is not there
Return error code 77 to skip test if debugfs entry is not
available.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59116
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-08 12:20:44 +01:00
Chris Wilson
2d0a8e8545 tests: Add basic testing of gem_pin
Including exercising races versus interrupts.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-07 12:32:56 +00:00
Thomas Jarosch
cda8bee056 Fix out of bounds memory access
cppcheck reported:
[tools/intel_infoframes.c:836]: (error) Width 31 given in format string
(no. 1) is larger than destination buffer 'option[16]',
use %15s to prevent overflowing it.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-01-06 18:20:47 +01:00
Yi Sun
05bfbf4227 tests/testdisplay: Specify the display.
It can specify the display by the connector id which list as the first column of ./testdisplay -i.
E.g. command "./testdiplay -o 1,4" means setting number 4 mode line on the display with connector id 1.

v2. Specify the display by id which can be got from option '-i'

Signed-off-by: Yi Sun <yi.sun@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2012-12-27 14:38:55 +08:00
Mika Kuoppala
33f09f6954 tests/gem_seqno_wrap: adapt to new next_seqno debugfs interface
- adapt to use debugfs interface that can set seqno to arbitrary value
- fix dynamic buffer allocation

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-21 20:49:22 +01:00
Daniel Vetter
5825cf807e tests/prime_nv_pcopy: guard output for subtest listing 2012-12-20 23:30:33 +01:00
Dave Airlie
71ba0038db intel/udl tests;
basic test to share a BO, add as a udl framebuffer, and call the dirty
ioctl on it so we cause the vmapping to happen

[danvet: Snatched up from Dave's prime branch, ocd name and bikeshed
whitespace a bit.]
2012-12-20 23:31:32 +01:00
Daniel Vetter
d798ab9c2a tests: add testcase to check igt runtime enviroment
Now that we've abandonded the autohell testrunner, need to port this
over. Easiest is to just add another testcase ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-20 11:02:19 +01:00
Ville Syrjälä
f0546374a0 kms_flip: Add -lrt back
kms_flip doesn't build due to missing -lrt.

The build was broken due to a typo in this commit:

commit acdf7171264a5139caabb78127c9eef5080c0682
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat Dec 15 00:48:47 2012 +0100

    tests: s/flip_test/kms_flip

    OCD wins!

    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>

For some reason libudev.pc brings in -lrt as well, which probably
caused the typo to go unnoticed.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-18 16:04:25 +01:00
Daniel Vetter
cef68158dd tests/kms_flip: don't die on stdin input
Seems to be a leftover from fliptest ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-18 10:25:55 +01:00
Daniel Vetter
0af2b184ad lib: extract kmstest_get_pipe_from_crtc_id 2012-12-17 15:30:54 +01:00
Daniel Vetter
573d59dd14 tests/gem_flink: enable flink lifetime subtest
Somehow fumbled this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Daniel Vetter
acdf717126 tests: s/flip_test/kms_flip
OCD wins!

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Daniel Vetter
f56384c2c0 tests/flip_test: add flip vs. rmfb testcase
To check that the kernel doesn't fall over when tearing down a life
fb. Confirmed that it exercises the right codepath with printk.

Also fix an issue Imre introduced in

commit fe7fea0be3b5f418b76dc7834e73b31827484429
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Oct 16 04:09:43 2012 +0300

    flip_test: add event sequence number tracking

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Daniel Vetter
df41e1a6bb flip_test: recreate fb
... to test the latency of rmfb, getfb and addfb. Since if those still
can cause spikes, we have a problem.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Daniel Vetter
8ed0112f88 tests/flip_test: split out timestamp checks into subtest
This way we can still test basic pageflips on kernels with broken
locking while still failing when the timestamps/framecounts are wrong.

Also disable the delay check on analog tv, timings on those ports are
truely screwed-up

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-17 15:30:53 +01:00
Alan Coopersmith
f185699a4b tests/gem_seqno_wrap.c: include <signal.h> for definition of kill()
Fixes build failure on Solaris:
gem_seqno_wrap.c: In function ‘run_cmd’:
gem_seqno_wrap.c:328:3: error: implicit declaration of function ‘kill’ [-Werror=implicit-function-declaration]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-16 19:45:57 +01:00
Daniel Vetter
c2e05af353 tests/prime_nv_pcopy: convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2012-12-15 15:57:20 +01:00
Daniel Vetter
cc4eeb990f tests/prime_nv_tests: convert to subtests
And properly fail the failing ones - bloody hate it when the tests lie
to me ...
2012-12-15 15:30:19 +01:00
Rodrigo Vivi
c0a74d8d50 tools: intel_gpu_abrt bug report template.
checking if file has been generated and output a template for a good bug report
2012-12-13 18:15:38 +01:00
Rodrigo Vivi
3ab148331a tools: intel_gpu_abrt checking for root access
needed by other igt tools that are collecting more usefull information.
2012-12-13 18:15:34 +01:00
Rodrigo Vivi
616a4de567 tools: intel_gpu_abrt collecting more useful info 2012-12-13 18:15:32 +01:00
Rodrigo Vivi
7150a04124 tools: intel_gpu_abrt "get" function
A function to make it easy to collect any file or directory needed later.
2012-12-13 18:15:29 +01:00
Mika Kuoppala
a2452d68a0 tests/gem_seqno_wrap: dont sync when crossing half of seqno space
For seqno comparison to work they have to be less than UINT32_MAX/2
apart. So when crossing the half way of seqno space, be careful not
to sync anything as this causes gpu hangs. Do real test with
syncing only when we are about to wrap.

v2: Don't spam if no rendercopy was found, only warn once
2012-12-13 12:52:26 +01:00