2434 Commits

Author SHA1 Message Date
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
Daniel Vetter
4fd0458be2 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>
2013-11-20 16:07:30 +01:00
Daniel Vetter
3c55a7df57 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>
2013-11-20 11:00:17 +01:00
Daniel Vetter
ff193614b2 tests/gem_reset_stats: Use macros a bit more
Just demonstration really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-17 17:31:19 +01:00
Damien Lespiau
36786e4a04 gitignore: Ignore gem_reset_stats
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-11-15 07:03:33 +00:00
Daniel Vetter
b5bfdbb1ad tests: More bdw fallout
This time misplaced parens.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-15 00:10:52 +01:00
Daniel Vetter
df5e880bea tests: More bdw fallout 2013-11-14 23:31:43 +01:00
Paulo Zanoni
f7abef6618 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>
2013-11-14 19:59:50 -02:00
Paulo Zanoni
4826546746 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>
2013-11-14 19:59:44 -02:00
Paulo Zanoni
4fa9dde799 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>
2013-11-14 19:59:37 -02:00
Paulo Zanoni
a8610a4776 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>
2013-11-14 19:59:30 -02:00
Paulo Zanoni
19c8d5f4ff 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>
2013-11-14 19:59:23 -02:00
Paulo Zanoni
63e4dafb32 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>
2013-11-14 19:59:16 -02:00
Paulo Zanoni
a4e96a95ca 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>
2013-11-14 19:59:09 -02:00
Daniel Vetter
e39f2dbf98 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>
2013-11-14 18:14:38 +01:00
Daniel Vetter
2d1119dfc0 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>
2013-11-14 18:14:38 +01:00
Daniel Vetter
4697cf4286 NEWS: Make testing requirements official
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-11-14 11:08:13 +01:00
Chris Wilson
217bd8d55e 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>
2013-11-14 09:48:24 +00:00
Ben Widawsky
c37e9cf0c4 gem_cs_prefetch: more gen8 integration fallout
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-13 18:23:06 -08:00
Ben Widawsky
9ef6769366 gem_evict_*: Fix batch lengths, broken on gen8 integration
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
2013-11-13 13:30:26 -08:00
Mika Kuoppala
1ff7427578 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>
2013-11-13 11:55:26 +01:00
Daniel Vetter
e046c31f45 NEWS: Android.mk updates! 2013-11-12 12:18:33 +01:00
Oscar Mateo
76c78c0aae 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>
2013-11-12 12:16:31 +01:00