profile/extras/intel-gpu-tools.git
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>
10 years agotests: More bdw fallout
Daniel Vetter [Thu, 14 Nov 2013 23:10:52 +0000 (00:10 +0100)]
tests: More bdw fallout

This time misplaced parens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests: More bdw fallout
Daniel Vetter [Thu, 14 Nov 2013 22:15:37 +0000 (23:15 +0100)]
tests: More bdw fallout

10 years agotests/pm_pc8: add --quick option
Paulo Zanoni [Thu, 14 Nov 2013 16:53:15 +0000 (14:53 -0200)]
tests/pm_pc8: add --quick option

Not meant to be used on the QA cycles, but by developers who just want
to quickly check things while doing development. Reduces the total
time from 27 minutes to 6 minutes on my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add some more stress tests
Paulo Zanoni [Thu, 14 Nov 2013 15:59:49 +0000 (13:59 -0200)]
tests/pm_pc8: add some more stress tests

I was suspecting some problems just happen if we have a bigger wait
than the current ones we have, so add a new WAIT_EXTRA flag just to
see if the problems really happen. Also, add support for the wait
flags on the gem stress tests, and use them.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: remove compare_registers subtest
Paulo Zanoni [Thu, 14 Nov 2013 15:50:06 +0000 (13:50 -0200)]
tests/pm_pc8: remove compare_registers subtest

It's not executed by default, and it's completely relying on Haswell
registers and on internal knowledge of how the Kernel is supposed to
work. Since we plan to test generic runtime PM on all supported
platforms, maintaining this test so it works on all those platforms
will be a pain. We already have some ideas on how to verify registers
that must stay at specific values from inside the Kernel, so let's
kill this test and wait until the proper Kernel code gets merged.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: rename some variables
Paulo Zanoni [Thu, 14 Nov 2013 15:40:52 +0000 (13:40 -0200)]
tests/pm_pc8: rename some variables

Since we're not only testing PC8 anymore, we're resting "PM", rename
some variables from something_pc8 to something_suspend, just to make
it not-so-confusing.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases
Paulo Zanoni [Thu, 14 Nov 2013 15:35:43 +0000 (13:35 -0200)]
tests/pm_pc8: fix debugfs-forcewake-user for PC8-only cases

We don't wake up from forcewake when we only have PC8, but not runtime
PM, so make the test pass.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: check for PC8 status, not residency in most cases
Paulo Zanoni [Tue, 12 Nov 2013 19:04:50 +0000 (17:04 -0200)]
tests/pm_pc8: check for PC8 status, not residency in most cases

If you really want to reach the PC8+ states and consequently get PC8+
residency, you need to properly configure all the devices on your
machine to allow PC8+, not just graphics. The current code for PC8
checks for PC8+ residency everywhere, so if you have a machine that's
not properly configured you'll fail every test. OTOH, even if your
machine can't reach the PC8+ states, it will still try to enable and
disable PC8, so we can try to test the feature even if we're never
really reaching the PC8+ states. Also, if your machine does allow PC8+
residencies, but some other driver/program decides to keep the machine
busy while you're running the test suite, you'll also get failures
which you shouldn't be getting.

Based on the arguments above, I'm changing most of the subtests to
only check for the PC8 status reported by sysfs (enabled/disabled),
not check real PC8+ residency. I also added two tests that should
check for PC8+ residency, so we will stil be able to diagnose badly
configured machines.

As a bonus, we won't sleep for full 5 seconds every time we expect PC8
to be disabled: we'll just read i915_pc8_status, which quickly gives
the result we're expecting. Considering how many modeset stress
subtests we have in the program, we'll save a *lot* of time with this
change.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/pm_pc8: add support for runtime PM
Paulo Zanoni [Tue, 12 Nov 2013 15:24:38 +0000 (13:24 -0200)]
tests/pm_pc8: add support for runtime PM

We try to detect if we have runtime PM or if we just have PC8. In case
there's runtime PM, the functions that wait will wait for the runtime
PM status reported by the sysfs file instead of waiting for PC8
residencies to move.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
10 years agotests/gem_cs_prefetch: Fix bdw damage
Daniel Vetter [Thu, 14 Nov 2013 14:50:07 +0000 (15:50 +0100)]
tests/gem_cs_prefetch: Fix bdw damage

v2: Fix more.

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agolib: adjust oom_score
Daniel Vetter [Mon, 11 Nov 2013 22:04:11 +0000 (23:04 +0100)]
lib: adjust oom_score

This way the igt test will always be killed first (hopefully),
preventing mayhem when one of the memory thrashing tests treatens to
take down the entire system.

To avoid any burden on test writers we adjust the oom score on
drm_open, any of the fork helpers and subtest init. That should cover
everything.

v2: Fix it up.

Cc: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agoNEWS: Make testing requirements official
Daniel Vetter [Thu, 14 Nov 2013 10:08:13 +0000 (11:08 +0100)]
NEWS: Make testing requirements official

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
10 years agotests/pm_pc8: Fix invalid pointer-to-integer casting
Chris Wilson [Thu, 14 Nov 2013 09:47:47 +0000 (09:47 +0000)]
tests/pm_pc8: Fix invalid pointer-to-integer casting

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71592
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
10 years agogem_cs_prefetch: more gen8 integration fallout
Ben Widawsky [Thu, 14 Nov 2013 02:23:06 +0000 (18:23 -0800)]
gem_cs_prefetch: more gen8 integration fallout

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agogem_evict_*: Fix batch lengths, broken on gen8 integration
Ben Widawsky [Wed, 13 Nov 2013 21:28:17 +0000 (13:28 -0800)]
gem_evict_*: Fix batch lengths, broken on gen8 integration

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
10 years agotests: add gem_reset_stats
Mika Kuoppala [Tue, 12 Nov 2013 17:58:16 +0000 (19:58 +0200)]
tests: add gem_reset_stats

v2: check the ioctl pad and flag parameters

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agoNEWS: Android.mk updates!
Daniel Vetter [Tue, 12 Nov 2013 11:18:33 +0000 (12:18 +0100)]
NEWS: Android.mk updates!

11 years agobuild: New Android makefiles
Oscar Mateo [Tue, 12 Nov 2013 11:50:45 +0000 (11:50 +0000)]
build: New Android makefiles

These form the basis of the new Android build system.

v2: As suggested by Daniel Vetter, modify compilation flags to
not error on return-type and not warn on sign-compare.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/igt_display: workaround a name conflict in Android
Oscar Mateo [Tue, 12 Nov 2013 11:50:44 +0000 (11:50 +0000)]
lib/igt_display: workaround a name conflict in Android

PLANE_A/PLANE_B are used by libdrm's i915_drm.h in Android.

v2: Changes suggested by Daniel Vetter and Damien Lespiau:
- Pimp up comment with a FIXME.
- Reword commit message.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib/drmtest: Get the correct basename() under Android
Oscar Mateo [Tue, 12 Nov 2013 11:50:43 +0000 (11:50 +0000)]
lib/drmtest: Get the correct basename() under Android

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agobuild: Fix assorted compilation warnings
Oscar Mateo [Tue, 12 Nov 2013 11:50:42 +0000 (11:50 +0000)]
build: Fix assorted compilation warnings

As these files are compiled for every test, the warnings cluttered
the Android build completely.

v2: As suggested by Daniel Vetter, drop some of the fixes and fix
the compilation flags instead.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/gem_vmap_blits: Finish extracting gem_read
Oscar Mateo [Tue, 12 Nov 2013 11:50:41 +0000 (11:50 +0000)]
tests/gem_vmap_blits: Finish extracting gem_read

It seems something escaped this commit:

commit bd5cf9a07d17ce91dfaa3aa12d3f2c93815f0489
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Jan 10 15:37:53 2012 +0100

    lib/drmtest: extract gem_read

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agotests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid)
Oscar Mateo [Tue, 12 Nov 2013 11:50:40 +0000 (11:50 +0000)]
tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid)

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agorendercopy: Remove rendercopy.c
Oscar Mateo [Tue, 12 Nov 2013 11:50:39 +0000 (11:50 +0000)]
rendercopy: Remove rendercopy.c

Move scratch_buf_write_to_png() to its only user, gem_render_copy.c.
This makes the cairo dependencies easier to handle from the Android
perspective, but if there is a good reason why this file exists I can
try to handle it differently.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agolib: Move kms stuff from drmtest.c over to igt_kms.c
Oscar Mateo [Tue, 12 Nov 2013 11:50:38 +0000 (11:50 +0000)]
lib: Move kms stuff from drmtest.c over to igt_kms.c

This makes cairo dependencies easier to handle. Otherwise, we
would have to litter drmtest all over with "#ifndef ANDROID"

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
[danvet: Add missing _GNU_SOURCE to igt_kms.c and missing include to
intel_sprite_on.c]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agobuild: Move logic to tests/Makefile.am and away from Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:37 +0000 (11:50 +0000)]
build: Move logic to tests/Makefile.am and away from Makefile.sources

Makefile.sources is just a listing with all the sources, and the logic
to use these sources goes into either Makefile.am (automake) or
Android.mk (make).

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agobuild: Fix missing "\" in tests/Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:36 +0000 (11:50 +0000)]
build: Fix missing "\" in tests/Makefile.sources

Noticed by Damien Lespiau.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agobuild: list all test/tool/lib source files in their own Makefile.sources
Oscar Mateo [Tue, 12 Nov 2013 11:50:35 +0000 (11:50 +0000)]
build: list all test/tool/lib source files in their own Makefile.sources

In this way, all source files are listed in Makefile.sources and included
from Makefile.am, thus enabling the reuse from Android makefiles.

Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
11 years agogitignore: Ignore the newly introduced pm_psr
Damien Lespiau [Mon, 11 Nov 2013 22:38:36 +0000 (22:38 +0000)]
gitignore: Ignore the newly introduced pm_psr

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agogem_storedw_batches_loop: Fix for real this time
Ben Widawsky [Mon, 11 Nov 2013 21:21:58 +0000 (13:21 -0800)]
gem_storedw_batches_loop: Fix for real this time

Last patch to fix the breakage when adding gen8 had bugs in the reloc
offset, and size field.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"
Oscar Mateo [Mon, 11 Nov 2013 15:36:55 +0000 (15:36 +0000)]
tests/drv_suspend: Replace "&> /dev/null" with "> /dev/null 2>&1"

Some shells do not understand "&>". For instance, my Ubuntu 12.04
machine has /bin/sh pointing to dash, which makes a mess out of
"&>" (to the point that the helper processes cannot be killed).

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
11 years agogem_linear_blits: Fix blit command length
Ben Widawsky [Mon, 11 Nov 2013 17:44:13 +0000 (09:44 -0800)]
gem_linear_blits: Fix blit command length

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agotests/pm_pc8: reorganize main function
Paulo Zanoni [Fri, 8 Nov 2013 21:33:08 +0000 (19:33 -0200)]
tests/pm_pc8: reorganize main function

Split the tests into categories. There are too many tests, it's
getting harder to locate the ones we need.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: add some GEM tests
Paulo Zanoni [Fri, 8 Nov 2013 21:19:35 +0000 (19:19 -0200)]
tests/pm_pc8: add some GEM tests

These are more complete tests than the previous test_batch() one. We
test CPU/GTT mmaps, pread/pwrite and batch buffers.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: remove "batch" and "stress-test" subtests
Paulo Zanoni [Fri, 8 Nov 2013 21:03:24 +0000 (19:03 -0200)]
tests/pm_pc8: remove "batch" and "stress-test" subtests

They use a bad BLT command and don't check its result. The next patch
will add proper GEM tests that contain commands that work and code
that checks if the command is really working.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: add debugfs/sysfs tests
Paulo Zanoni [Fri, 8 Nov 2013 20:29:57 +0000 (18:29 -0200)]
tests/pm_pc8: add debugfs/sysfs tests

They don't really exercise any particular special code path for PC8,
but the runtime D3 code will touch these code paths, so we'll need the
tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: add modeset-lpsp-stress
Paulo Zanoni [Fri, 8 Nov 2013 19:09:43 +0000 (17:09 -0200)]
tests/pm_pc8: add modeset-lpsp-stress

It's the only one we were missing form the possible combinations.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: extract i2c_subtest_check_environment
Paulo Zanoni [Fri, 8 Nov 2013 19:07:59 +0000 (17:07 -0200)]
tests/pm_pc8: extract i2c_subtest_check_environment

Just to make it more organized and consistent with the other tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: return void on test_i2c
Paulo Zanoni [Fri, 8 Nov 2013 19:05:00 +0000 (17:05 -0200)]
tests/pm_pc8: return void on test_i2c

And do the assertion in the code line that actually verifies the
condition we need. Makes it easier to debug failed tests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agotests/pm_pc8: move teardown_environment next to setup_environment
Paulo Zanoni [Fri, 8 Nov 2013 19:00:40 +0000 (17:00 -0200)]
tests/pm_pc8: move teardown_environment next to setup_environment

So I can add/remove/verify code more easily.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
11 years agogem_cpu_reloc: Fixed botched BLIT conversion
Ben Widawsky [Fri, 8 Nov 2013 07:03:04 +0000 (23:03 -0800)]
gem_cpu_reloc: Fixed botched BLIT conversion

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_evict_alignment: Skip on GEN8 for now
Ben Widawsky [Fri, 8 Nov 2013 07:05:01 +0000 (23:05 -0800)]
gem_evict_alignment: Skip on GEN8 for now

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
11 years agogem_evict_everything: Fix broken blit generalization
Ben Widawsky [Fri, 8 Nov 2013 06:59:25 +0000 (22:59 -0800)]
gem_evict_everything: Fix broken blit generalization

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>