platform/upstream/intel-gpu-tools.git
10 years agotests/kms_flip: don't leak the connector when setting DPMS
Paulo Zanoni [Mon, 30 Dec 2013 13:27:57 +0000 (11:27 -0200)]
tests/kms_flip: don't leak the connector when setting DPMS

Caught by Valgrind.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agodrmtest: don't leak memory when parsing the arguments
Paulo Zanoni [Mon, 30 Dec 2013 13:20:39 +0000 (11:20 -0200)]
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>
10 years agoNEWS updates
Daniel Vetter [Tue, 7 Jan 2014 07:14:33 +0000 (08:14 +0100)]
NEWS updates

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agointel_error_decode: Factor out common decoding code
Damien Lespiau [Mon, 16 Dec 2013 11:28:39 +0000 (11:28 +0000)]
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>
10 years agoconfigure.ac: Fix shader debugger for real
Ben Widawsky [Fri, 3 Jan 2014 05:33:57 +0000 (19:33 -1000)]
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>
10 years agokmstest: Fix up lifetimes of cairo objects
Chris Wilson [Mon, 30 Dec 2013 17:48:43 +0000 (17:48 +0000)]
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>
10 years agoconfigure.ac: Fixup conditional shader debugger
Ben Widawsky [Mon, 30 Dec 2013 18:41:43 +0000 (10:41 -0800)]
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>
10 years agoconfigure.ac: Remove GEN4ASM define
Ben Widawsky [Mon, 30 Dec 2013 18:32:06 +0000 (10:32 -0800)]
configure.ac: Remove GEN4ASM define

This was a leftover hunk that got accidently merged.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_exec_blit: gen8 updates for blit
Ben Widawsky [Tue, 24 Dec 2013 21:12:31 +0000 (13:12 -0800)]
gem_exec_blit: gen8 updates for blit

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoshader-debugger: Use in tree gen4asm
Ben Widawsky [Sat, 21 Dec 2013 05:15:16 +0000 (21:15 -0800)]
shader-debugger: Use in tree gen4asm

Reported-by: Patrick McMunn <doctorwhoguy@gmail.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agoREADME: Fix spelling fail
Daniel Vetter [Fri, 20 Dec 2013 15:56:14 +0000 (16:56 +0100)]
README: Fix spelling fail

Thanks to Jani for spotting this.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoREADME: Document how to avoid Waffle with piglit
Daniel Vetter [Fri, 20 Dec 2013 14:49:59 +0000 (15:49 +0100)]
README: Document how to avoid Waffle with piglit

Suggested by Paulo.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: check if we can't become DRM master
Paulo Zanoni [Mon, 16 Dec 2013 20:47:39 +0000 (18:47 -0200)]
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>
10 years agobuild: Create version and config information files in Android
Oscar Mateo [Fri, 13 Dec 2013 20:48:24 +0000 (20:48 +0000)]
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>
10 years agotests/gem_close_race: Adapt the test for Full PPGTT
Oscar Mateo [Fri, 13 Dec 2013 16:24:37 +0000 (16:24 +0000)]
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>
10 years agolib: Include the necessary stdint.h in gen6_render.h
Damien Lespiau [Fri, 13 Dec 2013 12:53:31 +0000 (12:53 +0000)]
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>
10 years agotests: Document the Makefile variables a bit better
Daniel Vetter [Thu, 12 Dec 2013 21:46:18 +0000 (22:46 +0100)]
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>
10 years agotests/gem_reset_stats: add reverse order in close-pending-fork
Mika Kuoppala [Tue, 10 Dec 2013 08:50:48 +0000 (10:50 +0200)]
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>
10 years agotests: Move gem_reset_stats to the right place
Daniel Vetter [Thu, 12 Dec 2013 08:26:58 +0000 (09:26 +0100)]
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>
10 years agotests/kms_setmode: avoid 2 connectors on the same encoder
Paulo Zanoni [Tue, 3 Dec 2013 17:03:02 +0000 (15:03 -0200)]
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>
10 years agokms_flip: consolidate run_test_on_{crtc,crtc_pair}
Imre Deak [Tue, 10 Dec 2013 13:33:07 +0000 (15:33 +0200)]
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>
10 years agokms_flip: keep drm_fd open for the dpms restore exit handler
Imre Deak [Tue, 10 Dec 2013 12:00:19 +0000 (14:00 +0200)]
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>
10 years agokms_flip: fix seq_step for 2xcrtc subtests
Imre Deak [Mon, 9 Dec 2013 15:28:50 +0000 (17:28 +0200)]
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>
10 years agorendercopy/bdw: Fix length of a bunch of zeroed out packets.
Kenneth Graunke [Tue, 10 Dec 2013 07:29:36 +0000 (23:29 -0800)]
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>
10 years agorendercopy/bdw: Emit 3DSTATE_WM_HZ_OP.
Kenneth Graunke [Tue, 10 Dec 2013 07:29:35 +0000 (23:29 -0800)]
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>
10 years agoignore version.h
Daniel Vetter [Tue, 10 Dec 2013 09:30:59 +0000 (10:30 +0100)]
ignore version.h

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: roll out igt_simple_init/igt_simple_main
Daniel Vetter [Tue, 10 Dec 2013 09:18:32 +0000 (10:18 +0100)]
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>
10 years agotests: gem_close_race has subtests!
Daniel Vetter [Tue, 10 Dec 2013 08:58:28 +0000 (09:58 +0100)]
tests: gem_close_race has subtests!

Oops.

v2: Found more.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: igt_simple_main/init for subtest-less tests
Daniel Vetter [Tue, 10 Dec 2013 08:41:48 +0000 (09:41 +0100)]
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>
10 years agolib: print uname information in the version string
Daniel Vetter [Tue, 10 Dec 2013 08:26:08 +0000 (09:26 +0100)]
lib: print uname information in the version string

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: Add host platform to version string
Daniel Vetter [Tue, 10 Dec 2013 08:23:44 +0000 (09:23 +0100)]
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>
10 years agointel-gpu-tools: Version information
Ben Widawsky [Sat, 7 Dec 2013 04:35:29 +0000 (20:35 -0800)]
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>
10 years agolib: Always print errno in igt assert/require macros
Daniel Vetter [Tue, 10 Dec 2013 07:07:11 +0000 (08:07 +0100)]
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>
10 years agotests/gem_media_fill: Remove unnecessary include
Tvrtko Ursulin [Fri, 6 Dec 2013 12:38:49 +0000 (12:38 +0000)]
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>
10 years agotests: add pm_lpsp
Paulo Zanoni [Tue, 3 Dec 2013 21:44:45 +0000 (19:44 -0200)]
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>
10 years agolib: rename some power well bit names
Paulo Zanoni [Tue, 3 Dec 2013 18:44:08 +0000 (16:44 -0200)]
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>
10 years agoassembler/bdw: Update write(...)
Xiang, Haihao [Fri, 6 Dec 2013 01:16:58 +0000 (09:16 +0800)]
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>
10 years agolib: make igt_pipe_crc_start never fail
Daniel Vetter [Fri, 6 Dec 2013 09:48:25 +0000 (10:48 +0100)]
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>
10 years agolib: add igt_pipe_crc_check
Daniel Vetter [Fri, 6 Dec 2013 09:47:10 +0000 (10:47 +0100)]
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>
10 years agotests: drm_open_any doesn't fail
Daniel Vetter [Fri, 6 Dec 2013 09:45:49 +0000 (10:45 +0100)]
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>
10 years agogitignore: Ignore gem_media_fill
Damien Lespiau [Fri, 6 Dec 2013 13:02:51 +0000 (13:02 +0000)]
gitignore: Ignore gem_media_fill

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Set Instruction Buffer size Modify Enable to 1
Xiang, Haihao [Fri, 6 Dec 2013 08:54:45 +0000 (16:54 +0800)]
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>
10 years agolib: Clean the batch buffer store after reset
Xiang, Haihao [Fri, 6 Dec 2013 08:54:44 +0000 (16:54 +0800)]
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>
10 years agotests/gem_reset_stats: document the new subtest a bit better
Daniel Vetter [Fri, 6 Dec 2013 07:39:31 +0000 (08:39 +0100)]
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>
10 years agotests/gem_media_fill: the assembly code for the shader used in the case
Xiang, Haihao [Mon, 2 Dec 2013 04:52:08 +0000 (12:52 +0800)]
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>
10 years agotests/gem_media_fill: add support for gen7
Xiang, Haihao [Mon, 2 Dec 2013 04:49:14 +0000 (12:49 +0800)]
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>
10 years agotests/gem_media_fill: add support for gen8
Xiang, Haihao [Mon, 2 Dec 2013 04:36:15 +0000 (12:36 +0800)]
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>
10 years agotests: add gem_media_fill
Xiang, Haihao [Fri, 29 Nov 2013 05:47:31 +0000 (13:47 +0800)]
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>
10 years agogem_exec_faulting_reloc: Update gen8 BLT cmds
Ben Widawsky [Fri, 6 Dec 2013 00:02:52 +0000 (16:02 -0800)]
gem_exec_faulting_reloc: Update gen8 BLT cmds

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogen8 rendercpy: temporarily disable
Ben Widawsky [Thu, 5 Dec 2013 23:35:01 +0000 (15:35 -0800)]
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>
10 years agoKill XY_COLOR_BLT_CMD
Ben Widawsky [Thu, 5 Dec 2013 23:00:44 +0000 (15:00 -0800)]
Kill XY_COLOR_BLT_CMD

Since we now always want a length for this command, and we've created a
non-length variant, remove the #define to prevent further foot shooting.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_reloc_vs_gpu: Update for gen8 BLT cmds
Ben Widawsky [Thu, 5 Dec 2013 22:44:23 +0000 (14:44 -0800)]
gem_reloc_vs_gpu: Update for gen8 BLT cmds

NOTE: Some subtests are still failing, but I haven't found the bug yet.
At least this should help QA meanwhile.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_persistent_relocs: Update for gen8 BLT cmds
Ben Widawsky [Thu, 5 Dec 2013 22:44:23 +0000 (14:44 -0800)]
gem_persistent_relocs: Update for gen8 BLT cmds

NOTE: Some subtests are still failing, but I haven't found the bug yet.
At least this should help QA meanwhile.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_write_read_ring_switch: Missed gen8 BLT updates
Ben Widawsky [Thu, 5 Dec 2013 22:36:20 +0000 (14:36 -0800)]
gem_write_read_ring_switch: Missed gen8 BLT updates

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agodrm_vma_limiter_cached: Missed gen8 BLT updates
Ben Widawsky [Thu, 5 Dec 2013 22:34:35 +0000 (14:34 -0800)]
drm_vma_limiter_cached: Missed gen8 BLT updates

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_pipe_control_store_loop: BDW update
Ben Widawsky [Thu, 5 Dec 2013 22:14:35 +0000 (14:14 -0800)]
gem_pipe_control_store_loop: BDW update

I've opted to not use the PIPE_CONTROL w/a for now. I am unclear if it
is actually required (the test does pass).

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests/gem_ctx_exec: Add eviction test
Daniel Vetter [Thu, 5 Dec 2013 14:49:58 +0000 (15:49 +0100)]
tests/gem_ctx_exec: Add eviction test

It didn't pan out at all since atm we don't evict context objects. But
maybe it's useful for when that happens.

v2: Actually test eviction. Took a while to figure that one out.

And indeed the testcase now fails because we don't evict the previous
context as we should.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: add gem_available_aperture_size helper
Daniel Vetter [Thu, 5 Dec 2013 14:50:18 +0000 (15:50 +0100)]
lib: add gem_available_aperture_size helper

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/core_get_client_auth: new subtests for always authenticated
Daniel Vetter [Thu, 5 Dec 2013 12:41:51 +0000 (13:41 +0100)]
tests/core_get_client_auth: new subtests for always authenticated

This exercise the bug fixed in

commit 1020dc6990168a5081ffad620c440e220f05b460
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 29 08:55:57 2013 +0000

    drm: Do not drop root privileges for a fancier younger process

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: rename get_client_auth to have a core_ prefix
Daniel Vetter [Thu, 5 Dec 2013 12:35:50 +0000 (13:35 +0100)]
tests: rename get_client_auth to have a core_ prefix

Also sort .gitignore.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoquick_dump: Restore execture permission on quick_dump.py
Ville Syrjälä [Thu, 5 Dec 2013 11:01:58 +0000 (13:01 +0200)]
quick_dump: Restore execture permission on quick_dump.py

quick_dump.py execute permission was accidentally lost in:

 commit d56697233699844db9262a9a056b62b24b69dd39
 Author: Mengdong Lin <mengdong.lin@intel.com>
 Date:   Sun Aug 25 23:07:22 2013 -0400

    quick_dump/bdw: support Broadwell in device auto-detection

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agoUpdate dpio read/write to take in extra PHY parameter.
Chon Ming Lee [Wed, 4 Dec 2013 12:44:33 +0000 (20:44 +0800)]
Update dpio read/write to take in extra PHY parameter.

The extra parameter is for future platform.

Signed-off-by: Chon Ming Lee <chon.ming.lee@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotools/quick_dump: Update Baytrail DPIO names to reflect to the driver change.
Chon Ming Lee [Wed, 4 Dec 2013 12:44:32 +0000 (20:44 +0800)]
tools/quick_dump: Update Baytrail DPIO names to reflect to the driver change.

DPIO name still using old name.  Change it according to the driver name.

Signed-off-by: Chon Ming Lee <chon.ming.lee@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests/gem_reset_stats: add close-pending-fork
Mika Kuoppala [Wed, 4 Dec 2013 14:39:09 +0000 (16:39 +0200)]
tests/gem_reset_stats: add close-pending-fork

This triggers use after free oops on request->batch_obj when
going through the rings and setting reset status on requests,
after a gpu hang.

v2: Streamlined the test and added comments (Daniel)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib/drmtest: Fix filedesc leak on gem_quiescent_gpu
Mika Kuoppala [Tue, 26 Nov 2013 07:26:17 +0000 (09:26 +0200)]
lib/drmtest: Fix filedesc leak on gem_quiescent_gpu

to not run out of filedescs as some tests call gem_quiescent_gpu
directly.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoRevert "lib/drmtest: ducttape over fork race"
Tvrtko Ursulin [Tue, 3 Dec 2013 16:44:54 +0000 (16:44 +0000)]
Revert "lib/drmtest: ducttape over fork race"

This reverts commit a031a1bf93b828585e7147f06145fc5030814547.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Conflicts:
lib/drmtest.c
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoRevert "test/gem_concurrent_blt"
Daniel Vetter [Tue, 3 Dec 2013 16:57:06 +0000 (17:57 +0100)]
Revert "test/gem_concurrent_blt"

This reverts commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1.

Oops, accidentally commit a bit of wip changes.

10 years agodrmtest: Avoid wrong PID/TID after clone races
Tvrtko Ursulin [Tue, 3 Dec 2013 16:44:55 +0000 (16:44 +0000)]
drmtest: Avoid wrong PID/TID after clone races

Various C library implementations have various races with regards
to caching getpid() or TID inside pthread_kill() implementations.

For example see clone(2) glibc man page and pthread_kill
Bionic C library source.

Work around that by making sure correct PID/TGID and TID values
are retrieved from the kernel when re-raising the signal. It
can be delivered immediately after the clone system call while C
library cached copies have not yet been updated.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agobuild: Skip kms_fbc_crc on Android
Tvrtko Ursulin [Tue, 3 Dec 2013 15:35:41 +0000 (15:35 +0000)]
build: Skip kms_fbc_crc on Android

We do not have GLib there so it does not build.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agobuild: Make sure asserts are enabled for tests
Tvrtko Ursulin [Tue, 3 Dec 2013 15:09:57 +0000 (15:09 +0000)]
build: Make sure asserts are enabled for tests

Tests depend on assertions being enabled since they can, and do,
contain actual test steps. They are also mandatory for ensuring
sane test case behaviour.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotest/gem_concurrent_blt
Daniel Vetter [Tue, 3 Dec 2013 15:32:52 +0000 (16:32 +0100)]
test/gem_concurrent_blt

Limit working set size also with available ram.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72255
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: Don't put functional code into asserts
Daniel Vetter [Tue, 3 Dec 2013 12:07:28 +0000 (13:07 +0100)]
lib: Don't put functional code into asserts

Android apparently compiles with NDEBUG. Which is strongly advised
against, since the big pile of asserts mostly check correct usage of
the helper code in testcases.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agodrmtest: Fix weird signage on errno
Chris Wilson [Tue, 3 Dec 2013 10:12:37 +0000 (10:12 +0000)]
drmtest: Fix weird signage on errno

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogitignore: Ignore kms_fbc_crc
Damien Lespiau [Thu, 28 Nov 2013 14:35:45 +0000 (14:35 +0000)]
gitignore: Ignore kms_fbc_crc

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_fbc_crc: Remove unused variable
Damien Lespiau [Thu, 28 Nov 2013 14:34:51 +0000 (14:34 +0000)]
kms_fbc_crc: Remove unused variable

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction length
Damien Lespiau [Fri, 22 Nov 2013 18:14:26 +0000 (18:14 +0000)]
rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction length

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction length
Damien Lespiau [Fri, 22 Nov 2013 18:12:35 +0000 (18:12 +0000)]
rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction length

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length
Damien Lespiau [Fri, 22 Nov 2013 18:11:03 +0000 (18:11 +0000)]
rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agorendercopy/bdw: Fix the STATE_SIP instruction length
Damien Lespiau [Fri, 22 Nov 2013 17:36:54 +0000 (17:36 +0000)]
rendercopy/bdw: Fix the STATE_SIP instruction length

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agointel_dump_decode: Support the INTEL_DEVID_OVERRIDE env variable
Damien Lespiau [Fri, 22 Nov 2013 17:29:02 +0000 (17:29 +0000)]
intel_dump_decode: Support the INTEL_DEVID_OVERRIDE env variable

This is the one that already works in libdrm, so don't disappoint people
coming with expectations.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agointel_dump_decode: Actually parse the -d option
Damien Lespiau [Fri, 22 Nov 2013 17:24:52 +0000 (17:24 +0000)]
intel_dump_decode: Actually parse the -d option

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
10 years agokms_fbc_crc: Add a CRC based FBC test
Ville Syrjälä [Sat, 9 Nov 2013 18:58:27 +0000 (20:58 +0200)]
kms_fbc_crc: Add a CRC based FBC test

kms_fbc_crc will perform various write operations to the scanout buffer
whilc FBC is enabled. CRC checks will be used to make sure the
modifcations to scanout buffer are detected.

The operations include:
 - page flip
 - GTT mmap
 - CPU mmap
 - blit
 - rendercopy
 - context switch + rendercopy
 - combination of a page flip and each operation listed above

v2: Use gem_sw_finish instead of drmModeDirtyFB after CPU access
v3: Drop pwrite tests, call gem_bo_busy() after rendering, drop
    set_domain() calls after mmap access, wait for 2 vblanks

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Add gem_bo_busy
Ville Syrjälä [Mon, 25 Nov 2013 15:31:13 +0000 (17:31 +0200)]
lib: Add gem_bo_busy

Move gem_bo_busy() from gem_wait_render_timeout.c to lib.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Add gem_sw_finish()
Ville Syrjälä [Fri, 22 Nov 2013 20:33:21 +0000 (22:33 +0200)]
lib: Add gem_sw_finish()

Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish()

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agorendercopy: Pass context to rendercopy functions
Ville Syrjälä [Thu, 21 Nov 2013 17:05:17 +0000 (19:05 +0200)]
rendercopy: Pass context to rendercopy functions

rendercopy does the batch buffer flush internally, so if we want
to use it with multiple contexts, we need to pass the context
in from caller.

v2: Modify rendercopy_gen8 as well

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agokms_cursor_crc: Fix crc readout after a subtest failure
Ville Syrjälä [Fri, 22 Nov 2013 21:46:32 +0000 (23:46 +0200)]
kms_cursor_crc: Fix crc readout after a subtest failure

If a subtest fails, it'll leave the pipe CRC file open, which will
prevent subsequent subtests from opening the file. Make sure the file
is cloesed before trying to open it again.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agolib: Fix pipe_crc->ctl_fd assert
Ville Syrjälä [Thu, 21 Nov 2013 17:48:51 +0000 (19:48 +0200)]
lib: Fix pipe_crc->ctl_fd assert

Use the correct fd in the assert().

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
10 years agotests: Document exec naming convention for execbuf related tests
Daniel Vetter [Wed, 27 Nov 2013 10:31:12 +0000 (11:31 +0100)]
tests: Document exec naming convention for execbuf related tests

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: Document per-ring naming conventions
Daniel Vetter [Wed, 27 Nov 2013 10:14:19 +0000 (11:14 +0100)]
tests: Document per-ring naming conventions

Inspired by the recent pile of tests for the CS, which doesn't split
up the tests into per-ring subtests.

Cc: bradley.d.volkin@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: add "resuming" state
Paulo Zanoni [Tue, 26 Nov 2013 13:32:33 +0000 (11:32 -0200)]
tests/pm_pc8: add "resuming" state

This one was missing. For some reason we never really detected it on
our test suite. I checked the Kernel source and now we should be fine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: try to reuse FBs when possible
Paulo Zanoni [Thu, 21 Nov 2013 20:19:07 +0000 (18:19 -0200)]
tests/pm_pc8: try to reuse FBs when possible

Instead of creating a new FB every time we need one, create a cache of
FBs and reuse whenever possible. That means we'll create at most two
FBs, and reuse them hundreds and hundreds of times.

The kmstest_paint_test_pattern function takes about 1-2 seconds to
run, and we'll avoid it whenever we reuse the FB.

This makes the time taken to run the modeset-lpsp-stress subtest go
from 2:29 to 1:29.

A full "time ./pm_pc8 --quick" goes from 8:14 to 6:27.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: try harder to reach PC8+ residencies
Paulo Zanoni [Thu, 21 Nov 2013 19:32:42 +0000 (17:32 -0200)]
tests/pm_pc8: try harder to reach PC8+ residencies

If we want to actually reach PC8+ states, we need to properly
configure all the devices on the system to allow this. This function
will try to setup the things we know we need, but won't scream in case
anything fails: we don't know which devices are present on your
machine, so we can't really expect anything, just try to help with the
more common problems.

Another reason for this commit is that I got tired of having to
readjust the runtime PM policies every time I reboot my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: rename some subtests
Paulo Zanoni [Thu, 21 Nov 2013 17:09:58 +0000 (15:09 -0200)]
tests/pm_pc8: rename some subtests

Due to copy/paste error, we had 3 subtests called gem-execbuf-stress.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gem_reset_stats: check non root access to reset_stats
Mika Kuoppala [Wed, 20 Nov 2013 14:58:17 +0000 (16:58 +0200)]
tests/gem_reset_stats: check non root access to reset_stats

Getting global reset count needs to be tested with root and
non root access.

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: stop rings after injecting hang
Mika Kuoppala [Wed, 20 Nov 2013 14:58:16 +0000 (16:58 +0200)]
tests/gem_reset_stats: stop rings after injecting hang

To make driver report a simulated hang in dmesg.

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>
10 years agotests/gem_reset_stats: add support for BDW+
Mika Kuoppala [Wed, 20 Nov 2013 14:58:15 +0000 (16:58 +0200)]
tests/gem_reset_stats: add support for BDW+

For BDW+, there BATCH_BUFFER_START is 3 * 32bits in length and
length needs to be encoded into the opcode.

Suggested-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: More macros!
Daniel Vetter [Wed, 20 Nov 2013 15:07:30 +0000 (16:07 +0100)]
tests/gem_reset_stats: More macros!

Instead of freaking out about negating the skip condition and punting
I could have remembered that I've solved this already ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotools/reg_dumper: Add FW_BLC regs
Daniel Vetter [Wed, 20 Nov 2013 09:58:55 +0000 (10:58 +0100)]
tools/reg_dumper: Add FW_BLC regs

Debugging watermark issues on gen2/3 without them is hard ...

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/gem_reset_stats: Use macros a bit more
Daniel Vetter [Sun, 17 Nov 2013 16:29:10 +0000 (17:29 +0100)]
tests/gem_reset_stats: Use macros a bit more

Just demonstration really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agogitignore: Ignore gem_reset_stats
Damien Lespiau [Fri, 15 Nov 2013 07:03:33 +0000 (07:03 +0000)]
gitignore: Ignore gem_reset_stats

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>