2102 Commits

Author SHA1 Message Date
Paulo Zanoni
02ad7e04dd tests/kms_flip: don't leak the connector when setting DPMS
Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:04 -02:00
Paulo Zanoni
329faeccf7 drmtest: don't leak memory when parsing the arguments
Found this while investigating memory leaks on kms_flip. Detected by
Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-01-07 09:57:03 -02:00
Daniel Vetter
bb40494671 NEWS updates
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-01-07 08:14:33 +01:00
Damien Lespiau
1d2ef9553a intel_error_decode: Factor out common decoding code
4 pieces of code were looking very similar. Let's factor out a common
function in the not so unlikely case we need to tweak that code.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-01-06 13:40:21 +00:00
Ben Widawsky
01eeab9448 configure.ac: Fix shader debugger for real
I tried to get fancy before, but ended up pushing something which I
didn't test. Keep the thing simple and stupid, and just make it work.

Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2014-01-02 20:10:01 -10:00
Chris Wilson
164d9d26ac kmstest: Fix up lifetimes of cairo objects
cairo_t is the short lived drawing context, whereas cairo_surface_t is
the heavyweight object that persists and is also tied to underlying GEM
objects. So make the kmstest API reflect the different weights and fix
the lifetime and underlying object reference leaks.

Based on the fix by Paulo Zanoni.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-31 12:30:30 +00:00
Ben Widawsky
9d6cfa6b59 configure.ac: Fixup conditional shader debugger
The original patch was incomplete. Testing no assembler build is a pain
for me. Sorry for the mess.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-30 10:41:43 -08:00
Ben Widawsky
3ed4b5bd11 configure.ac: Remove GEN4ASM define
This was a leftover hunk that got accidently merged.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-30 10:32:06 -08:00
Ben Widawsky
72fe2b6414 gem_exec_blit: gen8 updates for blit
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-24 13:12:31 -08:00
Ben Widawsky
94b2b861f5 shader-debugger: Use in tree gen4asm
Reported-by: Patrick McMunn <doctorwhoguy@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-20 21:15:16 -08:00
Daniel Vetter
4f28614777 README: Fix spelling fail
Thanks to Jani for spotting this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-20 16:56:14 +01:00
Daniel Vetter
fd6c66c4a2 README: Document how to avoid Waffle with piglit
Suggested by Paulo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-20 15:49:59 +01:00
Paulo Zanoni
2a71bff317 tests/pm_pc8: check if we can't become DRM master
QA reported a failure that I believe happened because we couldn't
become DRM master, so add code that checks for this and prints a nice
error message.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-16 18:51:39 -02:00
Oscar Mateo
62e1cbc634 build: Create version and config information files in Android
Also, skip the compilation of pm_lpsp in Android (uses Cairo)

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-13 21:38:05 +01:00
Oscar Mateo
4eae05f03b tests/gem_close_race: Adapt the test for Full PPGTT
With Full PPGTT, each new fd creates a new context and thus a new
PPGTT, so we have to reduce the number of simultaneous fds or face
OOM problems. For every new PPGTT, its PDEs are stored in the GGTT
which imposes a limit of 1024 new contexts. We want to leave at
least 1/4 of the GGTT available for "important" stuff like scanout
buffers, so never open more than 768 fds.

v2: Unconditionally use the lower limit, as suggested by Daniel
Vetter

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-13 17:49:13 +01:00
Damien Lespiau
be14c7bb04 lib: Include the necessary stdint.h in gen6_render.h
Instead of assuming someone else will do it.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-13 15:04:07 +00:00
Daniel Vetter
16531069f6 tests: Document the Makefile variables a bit better
Also, this is a test for the patchwork hook.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-12 22:48:25 +01:00
Mika Kuoppala
a68937ca3b tests/gem_reset_stats: add reverse order in close-pending-fork
Use own copy of gem_quiescent_gpu() so that test still works
if it gets changed. Further improve the test by posting a batch
to rings in reverse order.

Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-12 11:59:47 +01:00
Daniel Vetter
826c4effe6 tests: Move gem_reset_stats to the right place
Binaries should only be added to the HANG target if they're completely
broken. If they just cause a recoverable gpu hang as part of the test
then they need to be somewhere else.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-12 09:28:17 +01:00
Paulo Zanoni
36f017dfd1 tests/kms_setmode: avoid 2 connectors on the same encoder
Don't try to set modes on two connectors that share the same encoder.
That will just fail.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68463
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-11 13:36:02 -02:00
Imre Deak
13ef9e8d54 kms_flip: consolidate run_test_on_{crtc,crtc_pair}
No functional change.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 15:46:00 +02:00
Imre Deak
1ac94b50af kms_flip: keep drm_fd open for the dpms restore exit handler
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161

Signed-off-by: Imre Deak <imre.deak@intel.com>
2013-12-10 14:07:37 +02:00
Imre Deak
2c6c4cf2a1 kms_flip: fix seq_step for 2xcrtc subtests
This also raises the absolute wait-for-vblank sequence step from 5 to
10, just to make it consistent with the corresponding 1x subtests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69161
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 14:07:37 +02:00
Kenneth Graunke
f034817b40 rendercopy/bdw: Fix length of a bunch of zeroed out packets.
A bunch of packets were too short.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Damien Lespiau <damien.lespiau@intel.com>
2013-12-10 11:37:19 +00:00
Kenneth Graunke
fdbdc7f325 rendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.
We don't want depth/stencil fast clears or HiZ resolves; we want normal
drawing.  Without this, the pixel pipeline doesn't work.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Damien Lespiau <damien.lespiau@intel.com>
2013-12-10 11:36:23 +00:00
Daniel Vetter
8cd3a9d543 ignore version.h
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 10:30:59 +01:00
Daniel Vetter
dda85fb108 tests: roll out igt_simple_init/igt_simple_main
Also use igt_skip a bit more to simplify some of the tests.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 10:18:32 +01:00
Daniel Vetter
ce1a9f918e tests: gem_close_race has subtests!
Oops.

v2: Found more.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 09:58:28 +01:00
Daniel Vetter
ef9745b7fa lib: igt_simple_main/init for subtest-less tests
Atm only used to print the version information.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 09:41:48 +01:00
Daniel Vetter
f1c4ec936c lib: print uname information in the version string
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 09:26:08 +01:00
Daniel Vetter
831a47196d lib: Add host platform to version string
This is import on systems where we compile 32bit tests that run on
64bit platforms.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 09:23:44 +01:00
Ben Widawsky
8c33e9ad11 intel-gpu-tools: Version information
Provide two arguments version, and verbose, which allow printing from an
arbitrary igt test. It will show system information (from build time,
not runtime), as well as the git SHA being used.

This will help reduce errors when people try to reproduce problems.

As an example if I want to verify someone is running the correct version
of a test, I could ask them to do:
bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --verbose
gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT
Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux)
Time to exec x 1:		 35.000µs (ring=render)
Time to exec x 2:		 28.000µs (ring=render)
Time to exec x 4:		 20.000µs (ring=render)
Time to exec x 8:		 14.625µs (ring=render)
Time to exec x 16:		 11.188µs (ring=render)
Time to exec x 32:		 11.125µs (ring=render)
Time to exec x 64:		 10.328µs (ring=render)
Time to exec x 128:		 10.172µs (ring=render)
Time to exec x 256:		 10.234µs (ring=render)
Time to exec x 512:		 10.232µs (ring=render)
Time to exec x 1024:		 10.121µs (ring=render)
Time to exec x 2048:		 10.151µs (ring=render)
Time to exec x 4096:		 11.474µs (ring=render)
Time to exec x 8192:		  9.432µs (ring=render)
Time to exec x 16384:		  6.003µs (ring=render)
Time to exec x 32768:		  5.029µs (ring=render)
Time to exec x 65536:		  4.206µs (ring=render)
Time to exec x 131072:		  3.630µs (ring=render)
Subtest render: SUCCESS

--verbose is provided for completeness, but doesn't seem too useful at
the moement.

bwidawsk@ironside ~/intel-gfx/intel-gpu-tools (master)$ sudo ./tests/gem_exec_nop --version
gem_exec_nop-git-3c5423b (Linux ironside 3.12.0-1-ARCH #1 SMP PREEMPT
Wed Nov 6 09:06:27 CET 2013 x86_64 GNU/Linux)

I've put version.h in the root directory so that any subdir can access
it. I've added the tests usage since it's immediately useful, and done
easily via Daniels igt infrastructure work.

v2:
- Always print the version number.
- We want to print uname at runtime.
- Also prefix the i-g-t release version.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 09:23:40 +01:00
Daniel Vetter
ea8c086919 lib: Always print errno in igt assert/require macros
Useful to figure out why things have failed.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-10 08:07:11 +01:00
Tvrtko Ursulin
3c5423b9a7 tests/gem_media_fill: Remove unnecessary include
Causes trouble for Android builds.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 17:16:10 +01:00
Paulo Zanoni
ef0931724f tests: add pm_lpsp
QA has asked me "How can we make sure LPSP is working?". Now, instead
of writing big paragraphs, I can just answer "make sure pm_lpsp
works".

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-06 13:11:14 -02:00
Paulo Zanoni
d5cdee95d5 lib: rename some power well bit names
I did the same change in the Kernel a few months ago. This should help
not getting confused about which bit does what.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2013-12-06 13:10:36 -02:00
Xiang, Haihao
3906a50ede assembler/bdw: Update write(...)
write(...) is used for Render Target Write and Media Block Write.
The two message types no longer share the same cache agent on GEN8,
So a parameter is needed for cache agent. The 4th parameter of write()
is used for write commit bit which has been removed since GEN7. Hence
we can re-use the 4th parameter as cache agent on GEN8

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06 14:01:42 +00:00
Daniel Vetter
a4d3a6c013 lib: make igt_pipe_crc_start never fail
It's what callers expect - pipe_crc_new is the function where
we pass a potential failure back to callers.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 14:51:14 +01:00
Daniel Vetter
c1b7e722da lib: add igt_pipe_crc_check
No need to duplicate this all over the place.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 14:51:14 +01:00
Daniel Vetter
3e37eb3c6c tests: drm_open_any doesn't fail
Or more precisely: It already has an igt_require. So we cant ditch it
from tests.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 14:51:14 +01:00
Damien Lespiau
5b3edb6152 gitignore: Ignore gem_media_fill
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06 13:02:51 +00:00
Xiang, Haihao
adbd83cdc3 rendercopy/bdw: Set Instruction Buffer size Modify Enable to 1
Otherwise it may result in GPU hang

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06 13:01:25 +00:00
Xiang, Haihao
4570e1b3de lib: Clean the batch buffer store after reset
Otherwise the stale data in the buffer

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-12-06 13:00:22 +00:00
Daniel Vetter
509850bf48 tests/gem_reset_stats: document the new subtest a bit better
I wanted to add this to Mika's original patch but forgot to git add.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-06 08:39:31 +01:00
Xiang, Haihao
5f40b23cfa tests/gem_media_fill: the assembly code for the shader used in the case
The code is for reference only

v2: Fixed the source register used for the send with EOT
    Fixed the posted destination operand for the send with EOT

v3: Fixed the cache agent used in media_block_write message on GEN8

Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06 15:11:10 +08:00
Xiang, Haihao
c683569725 tests/gem_media_fill: add support for gen7
v2: Fixed the source register used for the send with EOT
    Fixed the posted destination operand for the send with EOT

Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06 15:11:08 +08:00
Xiang, Haihao
bd384c2ba3 tests/gem_media_fill: add support for gen8
v2: Fixed the source register used for the send with EOT
    Fixed the posted destination operand for the send with EOT

v3: Workaround: Insert MEDIA_STATE_FLUSH after MEDIA_OBJECT.
    Fixed the cache agent used in media_block_write message
    Set Instruction Buffer size Modify Enable to 1, otherwise it may result in GPU hang

Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06 15:11:05 +08:00
Xiang, Haihao
641267dd73 tests: add gem_media_fill
It is to check whether media pipeline on render ring works. Codes
are copied and modified from the rendercopy case which uses 3D pipeline.
However media pipeline is simpler than 3D pipeline and there is few changes
between gen6,gen7 and gen8

Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2013-12-06 15:11:03 +08:00
Ben Widawsky
8ac7b93b21 gem_exec_faulting_reloc: Update gen8 BLT cmds
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05 16:28:20 -08:00
Ben Widawsky
e41928e6c9 gen8 rendercpy: temporarily disable
We don't yet have this working, and the excessive hangs are annoying.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05 15:35:01 -08:00