2056 Commits

Author SHA1 Message Date
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
Ben Widawsky
da4258529f 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>
2013-12-05 15:32:42 -08:00
Ben Widawsky
53b0c0431c 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>
2013-12-05 15:32:37 -08:00
Ben Widawsky
b23d73788a 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>
2013-12-05 15:32:22 -08:00
Ben Widawsky
ba0d651a01 gem_write_read_ring_switch: Missed gen8 BLT updates
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05 14:36:20 -08:00
Ben Widawsky
846a0f01b0 drm_vma_limiter_cached: Missed gen8 BLT updates
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-12-05 14:34:35 -08:00
Ben Widawsky
672911d714 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>
2013-12-05 14:30:14 -08:00
Daniel Vetter
40b586188c 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>
2013-12-05 15:50:43 +01:00
Daniel Vetter
1a95c710f9 lib: add gem_available_aperture_size helper
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-05 15:50:43 +01:00
Daniel Vetter
33ef528490 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>
2013-12-05 13:41:51 +01:00
Daniel Vetter
365f4812b1 tests: rename get_client_auth to have a core_ prefix
Also sort .gitignore.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-12-05 13:35:50 +01:00
Ville Syrjälä
28e4b34b3d 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>
2013-12-05 13:04:51 +02:00
Chon Ming Lee
0b67c0c421 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>
2013-12-05 13:04:36 +02:00
Chon Ming Lee
f5643c4a27 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>
2013-12-05 13:04:36 +02:00
Mika Kuoppala
6b18ef826f 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>
2013-12-04 16:45:28 +01:00
Mika Kuoppala
fb03ea7737 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>
2013-12-04 13:23:01 +01:00
Tvrtko Ursulin
ab7cbf9737 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>
2013-12-03 17:57:27 +01:00
Daniel Vetter
b34322fd15 Revert "test/gem_concurrent_blt"
This reverts commit aee0dcb1ec2075991d310dd6f3fb5e50160847d1.

Oops, accidentally commit a bit of wip changes.
2013-12-03 17:57:06 +01:00
Tvrtko Ursulin
139c72f38a 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>
2013-12-03 17:55:56 +01:00
Tvrtko Ursulin
4f990f3ad2 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>
2013-12-03 17:48:03 +01:00
Tvrtko Ursulin
b92b397d5e 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>
2013-12-03 17:08:03 +01:00
Daniel Vetter
aee0dcb1ec 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>
2013-12-03 16:32:52 +01:00
Daniel Vetter
26b336f811 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>
2013-12-03 13:07:28 +01:00
Chris Wilson
38354ec4d8 drmtest: Fix weird signage on errno
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-03 10:13:43 +00:00
Damien Lespiau
e7ec90a01c gitignore: Ignore kms_fbc_crc
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:35:45 +00:00
Damien Lespiau
8d7f00146c kms_fbc_crc: Remove unused variable
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:34:51 +00:00
Damien Lespiau
34f104aed7 rendercopy/bdw: Fix the 3DSTATE_STENCIL_BUFFER instruction length
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:33:37 +00:00
Damien Lespiau
09f144b649 rendercopy/bdw: Fix the 3DSTATE_HIER_DEPTH_BUFFER instruction length
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:33:37 +00:00
Damien Lespiau
e824fdd033 rendercopy/bdw: Fix the various 3DSTATE_CONSTANT_* instruction length
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:33:37 +00:00
Damien Lespiau
ffff68f08a rendercopy/bdw: Fix the STATE_SIP instruction length
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:33:37 +00:00
Damien Lespiau
b333d23e3a 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>
2013-11-28 14:33:37 +00:00
Damien Lespiau
b226f43fe8 intel_dump_decode: Actually parse the -d option
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-28 14:33:37 +00:00
Ville Syrjälä
6c9fcc42bb 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>
2013-11-27 16:21:28 +02:00
Ville Syrjälä
49f4860d5c 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>
2013-11-27 16:21:28 +02:00
Ville Syrjälä
525788a736 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>
2013-11-27 16:21:28 +02:00
Ville Syrjälä
725da6ee74 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>
2013-11-27 16:21:28 +02:00
Ville Syrjälä
3d371a7284 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>
2013-11-27 16:20:09 +02:00
Ville Syrjälä
e1e5856b3c 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>
2013-11-27 16:18:04 +02:00
Daniel Vetter
6720dd4b2c tests: Document exec naming convention for execbuf related tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-27 11:31:12 +01:00
Daniel Vetter
aa4ff912e3 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>
2013-11-27 11:14:19 +01:00
Paulo Zanoni
f6d9e160c9 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>
2013-11-26 11:37:25 -02:00
Paulo Zanoni
0df88f5e64 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>
2013-11-21 18:47:29 -02:00
Paulo Zanoni
78227101e2 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>
2013-11-21 17:36:57 -02:00
Paulo Zanoni
e9363973b1 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>
2013-11-21 15:11:21 -02:00
Mika Kuoppala
6de398888e 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>
2013-11-20 21:31:04 +01:00
Mika Kuoppala
2dd312cbb8 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>
2013-11-20 21:29:04 +01:00
Mika Kuoppala
0afe006eac 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>
2013-11-20 21:28:25 +01:00