1959 Commits

Author SHA1 Message Date
Chris Wilson
d95736906d igt/gem_fence_upload: Add comparison against wc mmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06 09:29:45 +01:00
Chris Wilson
58865891ba igt/gem_gtt_speed: compare against WC mmaps
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06 09:29:45 +01:00
Chris Wilson
e70c789909 igt/gem_tiled_wc: Exercise wc mmaps with swizzling
This exercises both the wc mmappings and the extended get_tiling ioctl.
Userspace cannot handle bit17 swizzling through wc mmaps (because bit17
requires swizzling based on the actual physical address of the page -
which is unknown to userspace) and so we need an extended get_tiling
ioctl to report the actual as well as the logical swizzling on an
object. We then check that the contents of the object are tiled and
swizzled correctly when viewed through a wc mmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06 09:29:45 +01:00
Chris Wilson
a464fb758e igt/gem_mmap_wc: Exercise mmap(wc) interface
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06 09:29:45 +01:00
Chris Wilson
c537cdb08e igt/gem_ctx_thrash/threads: Allow bo resuse
We already allocate enough objects to thrash the ppGTT VMs, so allow us
to reuse the batch buffers for some efficiency gains and through the
contention more towards the ctx->vm.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 16:22:59 +00:00
Chris Wilson
4bde754349 igt/gem_ctx_thread/processes: Serialise after forking children
Play nice, especially with the subtest, and wait for the children to
exit before finishing the test. If we don't we end up with a fork bomb
for some unknown reason...

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 16:22:59 +00:00
Chris Wilson
9f389d00cf igt/gem_ctx_thrash: Boost workloads
Now that we are no longer busy-spinning inside random(), we can spend
more time exercising i915.ko

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18 11:49:11 +00:00
Chris Wilson
959a7db668 igt: Add gem_ctx_thrash to fill the GGTT with contexts
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17 11:32:15 +00:00
Daniel Vetter
739790d7ed tests/gem_exec_blt: Add subtest that uses dumb buffers
Just to make sure this keeps working since a patch to WARN_ON using
dumb buffers in execbuf was accidentally merged.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-17 09:05:10 +01:00
Tim Gore
a11117e42f Android.mk: replace std=c99 with std=gnu99
The android makefiles were passing the -std=c99 flag to the
compiler which disables the typeof keyword. This causes a
build fail for a recent addition to igt_aux.h.
Change this to -std=gnu99, which is the flag used in the
linux build

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-12 12:18:22 +00:00
Thomas Wood
42b02c284e lib: add a function to lock memory into RAM
Add a function to lock memory into RAM and use it in the
gem_tiled_swapping test to reduce the amount of allocated memory
required to force swapping. This also reduces the amount of time
required for the test to complete, since the data set is smaller.

The following durations were recorded with gem_tiled_swapping on a
haswell system before the change:

  Subtest non-threaded: SUCCESS (55.889s)
  Subtest threaded: SUCCESS (810.532s)

and after:

  Subtest non-threaded: SUCCESS (11.804s)
  Subtest threaded: SUCCESS (268.336s)

v2: add various assertions and requirements and make sure
    gem_tiled_swapping works on systems with less RAM (Daniel Vetter)

v3: fix allocation size calculation

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11 17:57:03 +00:00
Thomas Wood
85b74d5c14 tests/gem_tiled_swapping: use igt_info logging wrapper
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11 11:50:22 +00:00
Thomas Wood
16f1506ff6 tests: replace 3D test images
Use images with a smaller file size, created by saving the left and
right stereo output of glxgears.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10 17:11:35 +00:00
Ville Syrjälä
5d46f68eab tests/kms_cursor_crc: Restore the valid pipe/connector combo check
The valid pipe/connector combo check was lost in
 commit 57259d714d3fe1170cf931af72648219856a9918
 Author: Daniel Vetter <daniel.vetter@ffwll.ch>
 Date:   Mon Nov 24 16:08:32 2014 +0100

    lib/igt_debugfs: Don't setup crc in _new

Restore it to make the test again useful on CHV.

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09 22:35:36 +02:00
Ville Syrjälä
b6f68c10b4 tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs
Report SKIP only if none of the pipe/connector combos worked, instead of
trying to report for each pipe separately.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09 20:41:18 +02:00
Damien Lespiau
01153e7d5f drv_hangman: Remove unused function
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-09 17:10:42 +00:00
Damien Lespiau
d49ef76e98 kms_cursor_crc: Remove value to 'return' in a void function
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-09 17:07:22 +00:00
Ville Syrjälä
f333981e1a tests/kms_flip: Target the back buffer with the dummy load
Aim the dummy load to the current back buffer instead if the front
buffer. Assuming the idea is to get the next flip to be stuck behind
the dummy load?

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
092682a3e5 tests/kms_flip: Calibrate the dummy load delay in kms_flip
Try to tune the dummy load to ~1 second. The calibration happens the
first time dummy load is generated.

v2: Actually do the number of ops intended and
    calibrate to 1 second and not 2

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
b0cb1e1f9d tests/kms_flip: Use fixed size (2kx2k) buffers for dummy load
Make the dummy load independent of the display resolution by using a
two fixed size dummy bos to generate the load. As a final step do
another copy from one of the dummy bos to the fb to make sure there's
a dependency between the dummy load and any subsequent operation on
the fb.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
21db302c9b tests/kms_flip: Refactor blit code
Pull the code to emit a single blit to a separate function.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Ville Syrjälä
8032f526ef tests: Run lib/igt.cocci
Found some open coded min()/max()/swap() macros.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08 19:26:39 +02:00
Imre Deak
b32b5327a2 tests/pm_rps: vlv: round middle point to freq supported by HW
When setting the calculated middle frequency value the test assumes that
the HW/kernel rounds this value according to a 50MHz step value. This is
not so at least on VLV/CHV, on my B0 BYT-M for example this step value
is 22MHz, so there the test will fail.

To fix this get the nearest supported value by setting the target
frequency as a min or max frequency and read it back. The kernel will
round the returned value to the nearest supported.

v2:
- remove the 50MHz rounding that was done for non-VLV platforms, the new
  way of rounding should provide the correct value for all platforms
  (Ville)

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:59 +02:00
Imre Deak
f70afed4c7 tests/pm_rps: vlv: load gpu for idle min/max tests
When changing the sysfs GT min/max frequencies, the kernel won't
explicitly change the current frequency, unless it becomes out of bound
based on the new min/max values. The test happens to work on non-VLV
platforms because on those the kernel resets the current frequency
unconditionally (to adjust the RPS interrupt mask as a side-effect) and
that will lead to an RPS interrupt setting the minimum frequency.

To fix this load the GPU after decreasing the min frequency and before
checking the current frequency. This should set the current frequency to
the minimum.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:54 +02:00
Imre Deak
aabf2d0952 tests/pm_rps: vlv: wait for freq to settle
At least on VLV when forcing a new GT frequency by writing to the
min/max freq sysfs entries the kernel doesn't wait until the new
frequency settles, so the subsequent readback check might fail. To fix
this wait until the current frequency is between the min/max values
using a 10ms timeout.

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08 12:36:28 +02:00
Chris Wilson
470071d4ab igt/drm_read: Require that pipe 0 is active
As we require a pipe enabled to generate vblanks, the first step is to
then to check that pipe 0 is active or else skip the test.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-08 07:58:13 +00:00
Chris Wilson
819e68f2ed igt/drm_read: Abuse read(drm)
Check that the more obvious userspace error conditions are handled by
the kernel, ideally without loss of data. These include nonblocking
waits, passing invalid buffers and passing buffers of the incorrect
length.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05 14:34:33 +00:00
Damien Lespiau
88ff1cec3a gem_bad_reloc: Don't flip-flop between SKIP and PASS
Here is a cheap way for this test to give consistent results. This
doesn't change the usefulness of this test, hopefully.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-04 16:48:06 +00:00
Thomas Wood
b3cce757b5 tests: add gem_gpgpu_fill to .gitignore
gem_gpgpu_fill was added in commit 4ec8479 (tests: Add gem_gpgpu_fill),
but wasn't added to .gitignore.

Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
8d82e5b5ef lib: remove igt_edid.h
This has been replaced by igt_kms_get_base_edid().

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
304c874b58 tests: use base edid
Use the base edid for testing, which includes several different display
modes.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
43da3e706b tests/kms_force_connector: split into subtests
v2: fix the initial mode count

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Thomas Wood
b2ac2642a9 tests: add more test descriptions
Add more test descriptions based on exiting comments.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04 16:07:55 +00:00
Zhenyu Wang
4ec8479c53 tests: Add gem_gpgpu_fill
This is simply a copy of gem_media_fill but using new
GPGPU fill operation.

v2: Use general fill func pointer.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-12-04 10:17:24 +08:00
Zhenyu Wang
106f0bf965 lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_t
This makes fill function more general to prepare for other
fill method using GPGPU pipeline.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
2014-12-04 10:17:12 +08:00
Tim Gore
4e5c16c17e tests/drv_hangman: remove check for other drm clients
This test will not run on Android as the coreu service
remains running even after the android system is stopped.
Coreu is a client of drm and when the test finds this it
fails an assert.
Coreu is started by the init process and there is no
tidy, non invasive way to stop it (init just restarts it).
Coreu isn't doing anything and would not be expected to
interfere with this test. In addition, all the other
igt tests just rely on the user/test script to ensure
that there are no other drm clients, so this test can
do the same. On Android we must rely on coreu being
dormant when this test runs.

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-01 18:09:35 +01:00
Tim Gore
77b52f1881 tests/Android.mk: Add kms_pwrite_crc to cairo test list
kms_pwrite_crc was recently added and requires cairo, so
add this to the list of tests to exclude if cairo is not
avaiable

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-01 13:53:00 +00:00
Ville Syrjälä
e06a7448d8 tests/kms_flip: Fix assert about vblank wait duration
If we wait for one vblank, we may end up returning almost immediately,
so trying to assert anything but >0 about the minimum duration is
bogus.

Instead wait for two vblanks and then we can assert that we should have
be blocked for at least one frame. And move the upper bound to a little
over two frames to match.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79050
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-01 13:18:15 +02:00
Tim Gore
ddf0f09776 tests/gem_ring_sync_copy: reduce memory usage
gem_ring_sync_copy uses a lot of memory and gets OOM killed on smaller
systems (eg android devices).  Most of the allocation is for "busy work"
to keep the render rings busy and for this we can just re-use the same
few buffers over and over. This enables the test to be run on low end
devices.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-11-28 16:02:04 +00:00
Thomas Wood
3bebf3dd01 tests: use subtests in gem_tiled_swapping
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-25 14:03:40 +00:00
Daniel Vetter
57259d714d lib/igt_debugfs: Don't setup crc in _new
The problem is that this causes writes to registers, and if the pipe
is off they might go nowhere (e.g. when runtime pm is enabled).
Furthermore we can only really check once the modeset setup is done,
but again most tests set up the CRC structure before calling
igt_commit and friends. We could add crc restore support to the
kernel's rpm code, but that will end up being rather invasive and
fragile hard-to-test code.

Now originally this was needed back when CRC support wasn't available
everywhere. But that's fixed now.

So given all this just drop that sanity check and make sure that we
only touch the debugfs file (and so the hw state) when we know the
pipe is running in the desired configuration.

A complementary kernel patch will try to catch offenders by returning
-EIO if the pipe is off.

v2: Forgot to git add one hunk.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86092
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-24 16:29:27 +01:00
Daniel Vetter
d8078911f6 tests/kms_render: gen2/3 can't do 10bpc
So skip those.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86236
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-18 15:17:43 +01:00
Daniel Vetter
08f0e1c625 tests/prime_self_import: Track leaked objects accurately
drm_open_any keeps a buffer handle around for the cleanup sync work,
so we can only grab the buffer count after the latst drm_open_any
call. Otherwise we'll detect a fake leak.

This broke in

commit 2f2c491cf3167befe7c79e4b17afb4f6284dfc84
Author: Mika Kuoppala <mika.kuoppala@intel.com>
Date:   Fri Mar 28 10:52:46 2014 +0200

    lib/drmtest: don't dup quiescent fd

since that additional open drm fd keeps a gem object for the default
context around. Hence why this also only blows up on gen6+ - earlier
platforms don't have hw context support.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79821
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-18 13:55:29 +01:00
Daniel Vetter
16f99ee419 lib/os: Push simulation test down into intel_require_memory
This has the upside that we'll never forget to add it to thrashing
tests. But we'll also never miss to move it when adding basic
functionality tests to existing binaries. Chris already started this
refining work in e.g.

commit d77eda6614a1955717f224be023dedf74eb7735d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Nov 14 07:45:40 2014 +0000

    igt/gem_linear_blits: Require that we do the full test

by moving igt_skip_on_simulation into subtests.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17 15:12:52 +01:00
Daniel Vetter
a535cdedfb lib/os: Pust igt_require into memory check function
More in line with the usual igt pattern and simplifies the code -
every called just wrapped it in igt_require.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-17 14:43:33 +01:00
Chris Wilson
f674a1f61f igt/gem_tiled_blits: Require that we do the full test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-14 09:17:01 +00:00
Chris Wilson
d77eda6614 igt/gem_linear_blits: Require that we do the full test
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-14 09:17:01 +00:00
Imre Deak
b35b1505f7 tests/pm_rpm: add gem-evict-pwrite subtest
This triggers a device suspended WARN in the kernel in
gen6_ggtt_insert_entries() while calling the GEM pwrite ioctl.

The sequence is suggested by Daniel.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-14 00:18:30 +02:00
Ville Syrjälä
f12ed83058 tests/kms_pwrite_crc: Add pwrite vs display coherency test
Add a test to verify that pwriting to a future scanout buffer works
correctly. The specific problem occurs when the buffer is already
UC/WT before the pwrite, not the current scanout buffer, and not
currently in the CPU write domain. With the buggy kernel no clflush
will be performed after the pwrite, and hence we end up with cache
dirt on the display.

The problem only affects LLC platforms (non-LLC would clflush anyway
after pwrite), but we can let the test run on all platforms.

v2: Fix typos in commit message and add to .gitignore

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-11-13 18:40:18 +02:00
Thomas Wood
f6aa80ca18 tests/kms_flip: add a timeout for the nonblocking-read test
kms_flip/nonblocking-read will block indefinitely if it fails, so
introduce a timeout to indicate test failure.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85718
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-13 14:27:57 +00:00