2060 Commits

Author SHA1 Message Date
Jesse Barnes
e5839d240a tests/kms_flip: add basic tests for flip, flip vs dpms, and flip modeset v2
Simple variants that don't do multiple output or interruptible testing.

v2: add vblank variant, remove duplication (Daniel)

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
5134f2c96d tests/pm_rpm: mark RTE and D3 tests as basic
These always need to pass for basic PM functionality.

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
68d1b532fa tests/pm_backlight: mark simple test as basic
We should be able to adjust the backlight and observe changes in sysfs.

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
ec4b76872d tests/kms_addfb: mark simple fb creation tests as basic v2
We should always be able to create simple and tiled objects.

v2: make the whole test basic (Daniel)
    add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
503420944d tests/gem_tiled_pread: mark normal tests as basic v2
These simple tests should always pass.

v2: drop pwrite variant as it's more of a stress test (Daniel)
    add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
5001640718 tests/gem_pread/pwrite: mark normal tests as basic
These should always pass.

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
c51c1ed776 tests/gem_mmap_gtt: mark basic access and copy tests as basic v2
These ones should always pass and are fairly quick.

v2: add more tests (Daniel)

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:33 -07:00
Jesse Barnes
90c47b2947 tests/gem_mmap: mark basic object creation tests as basic
We should be able to create small and moderate sized objects quickly and
without errors.

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:27:30 -07:00
Jesse Barnes
b0d8d73d8b tests/drv_getparams: mark EU and subslice fetch as basic v2
Fundamental and simple functionality.

v2: make whole test basic (Daniel)
    add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Jesse Barnes
e920d719b2 tests/gem_flink, prime_self_import: mark flink and prime tests as basic v2
They're testing basic functionality and don't involve stress or race
induction.

v2: use gem_flink and prime_self_import tests instead (Daniel)
    add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Jesse Barnes
dc9505a405 tests/drv_module_reload_basic: use linear_blits after module_reload for sanity check
Reduces runtime a lot...

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Jesse Barnes
4409c83284 tests/drv_module_reload: rename drv_module_reload to include in BATs
Absolutely-acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Jesse Barnes
0679702150 tests/gem_storedw_loop: add new store_dword test to unify per-ring ones v2
There was a lot of duplication going on...  Mark as basic while we're at
it as these should never fail.

v2: add to .gitignore

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-14 09:26:12 -07:00
Chris Wilson
d568f69d5d igt/gem_mmap: Add one more extra large bo
Daniel complained that all the tests in gem_mmap.c were too quick. This
one aims to rectify that by double checking that if we mmap a buffer
larger enough to force swapping, everything still works.

Also fix the test to exercise the different object sizes!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-08-14 14:08:05 +01:00
Paulo Zanoni
c049096eb6 kms_frontbuffer_tracking: don't test SPR or CUR on multidraw
The goal of the multidraw subtest is to check if alternating drawing
methods can somehow break the feature. The plane we're drawing to
really shouldn't matter here - we have other tests to make sure
drawing on the different planes works correctly. So after this patch
we'll only run the multidraw subtest for the primary plane, not for
sprite and cursors anymore.

This makes "--no-edp --fbc-only --1p-only" go from 2m29s to 1m40s on
my machine.

Of course, we can still run these tests with the --show-hidden flag.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-13 10:08:33 -03:00
Paulo Zanoni
78d076268c kms_frontbuffer_tracking: don't test CUR or SPR planes on FBS_SHARED
We already tested these planes for FBS_INDIVIDUAL, and there are no
reasons to believe those planes will behave differently under
FBS_SHARED, so save some time avoiding potentially useless tests.

This makes "--no-edp --fbc-only --1p-only" go from 2m49s to 2m29s on
my machine.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-13 10:07:56 -03:00
Derek Morton
d524a964fc benckmarks/Android.mk: Fix building benchmarks for Android
The commit "benchmarks: Do not install to system-wide bin/" changed
the benchmark file list from bin_PROGRAMS to benchmarks_PROGRAMS.
However Android.mk was not updated, resulting in IGT failing to
build for Android.
This commit adds that change. It also adds LOCAL_MODULE_PATH to
specify where the built benchmarks should be put.

v2: I discovered that the existing definitions of LOCAL_MODULE_PATH
were creating what should have been an invalid path. Not sure how it
was ever working previously, but fixed now.

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-13 11:28:22 +01:00
Thomas Wood
8a7c386f0a tests: update .gitignore
Add missing entry to .gitignore and sort alphabetically.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-12 16:33:58 +01:00
Ville Syrjälä
a149fb238a tests/gem_pwrite_snooped: Verify set_caching vs. pwrite clflush behaviour
The test does the following
1. set_domain src GTT
2. set_caching src NONE
3. pwrite src
4. set_caching src CACHED
5. blt src->dst
6. pread dst
7. verify data matches

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-08-12 16:24:51 +03:00
Ville Syrjälä
62426feec5 tests/kms_pwrite_crc: Use drmModeSetPlane() instead of igt_plane_set_fb()
igt_plane_set_fb()+igt_display_commit() have too much overhead, and that
causes the cache to get flushed before we flip, making the test
useless, at least on machines with small LLC. Switch to
drmModeSetPlane() to reduce the chance that the cache gets flushed
before we grab the crc.

Still nowhere near 100% reliable on my IVB laptop with 3 MiB LLC,
but at least it can now hit the problem occasioanally. My desktop
IVB with 8 MiB LLC seems to hit it rather reliably.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2015-08-12 16:24:50 +03:00
Daniel Vetter
adfc294384 tests: Document ABI extension catchers
Our invalid-flags/params testcases are meant to catch abi extensions
by just testing for the next available flag/param. Unfortunately we
need that since without those we forgot to write testcases for these
new flags way too often :(

But it's not entirely clear why this is, so document this trick with
comments.

Also gem_wait wasn't this paranoid, so change the testcase to be so.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-08-12 14:46:46 +02:00
Daniel Vetter
5b0a8433fd lib/core: Add igt_reset_timeout
Convenience wrapper suggested by Chris for igt_set_timeout(0, NULL).

v2: While at it add an empty line in kms_flip to make
set/reset_timeout a visual block.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-08-12 14:46:46 +02:00
Daniel Vetter
370c989723 lib/core: Add optional reason for timeout failure
"Timed out" isn't a terribly informative message, allow users to set
something more informative. Inspired by a request from Jesse.

Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-08-12 14:46:40 +02:00
David Weinehall
24617ef82a tests/gem_ctx_param_basic: support NO_ZEROMAP
Signed-off-by: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-08-12 14:42:46 +02:00
Jesse Barnes
db0f28aee8 Revert "tests/gem_ctx_param_basic: fix invalid params"
This reverts commit 0b45b0746f45deea11670a8b2c949776bbbef55c.

We want to check against our local copy of the params so we can at least
potentially catch new flag additions.

Requested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06 14:35:34 -07:00
Jesse Barnes
0b45b0746f tests/gem_ctx_param_basic: fix invalid params
Use -1 as the invalid param since we've added more since this test was
created, causing expected EINVAL failures to return an unexpected error
code.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2015-08-06 13:17:48 -07:00
Paulo Zanoni
995f2738ad lib: add igt_debugfs_read()
A helpful function for when you want to read a whole debugfs file to a
string and don't want to worry about opening and closing file
descriptors and asserting buffer sizes.

We've been using this already for kms_frontbuffer_tracking and
kms_fbcon_fbt, so the only test with new code here is kms_fbc_crc.

Also notice that for kms_fbc_crc we had to increase the buffer size
since the file can sometimes be bigger than 64 bytes - depending on
the reason why FBC is disabled.

Of course, there are probably many other programs we can patch, but
I'm not doing this now.

v2: Add the macro to wrap sizeof() (Daniel).
v3: Add documentation for the macro too (Daniel).

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05 17:30:58 -03:00
Paulo Zanoni
ffd7321c70 kms_frontbuffer_tracking: use the dirty ioctl after MMAP_WC calls
We can't add this to igt_draw since igt_draw doesn't care whether it's
writing on a frontbuffer or not.

PS: the ENOSYS is for Kernels without the patch implementing the
IOCTL.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05 17:21:48 -03:00
Paulo Zanoni
cd33b47a47 tests/gem_mmap_wc: don't fail if the Kernel is too old for the getparam flag
Just don't check the drmIoctl() return code: the "if (val)" should be
enough to prevent any problems.

v2: Don't SKIP, just proceed (Chris).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89739
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-08-05 17:18:45 -03:00
Daniel Vetter
6bd42ce9c7 tests/kms_addfb: Add testcass for garbage in unused planes
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-07-30 20:45:46 +02:00
Chris Wilson
0591af9c76 igt/gem_streaming_writes: Reorder setting EXEC_OBJECT_WRITE
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90944
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-28 20:12:03 +01:00
Chris Wilson
40ebf95163 igt/gem_streaming_writes: Bind into the GTT early
If we are using a streaming GGTT write into the source, we need to
trigger an early fault in order to obtain a mappable offset. This is
required when later we start reserving execbuf object top-down to try
and avoid mappable space!

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-28 19:01:41 +01:00
Michał Winiarski
d49a868378 tests/drm_import_export: Add tests for prime/flink sharing races
It is possible to race between unreference of the underlying BO and
importing it from prime_fd/name. Verify that the behaviour of libdrm
is consistent for prime/flink.

v2: more comments in source file, dropped extra whitespace

Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-24 15:55:18 +01:00
Michał Winiarski
fdefdd48f6 tests/gem_reg_read: Extend and check for valid 36b counter
When reading the timestamp register with single 64b read, we are observing
invalid values on x86_64:

    [f = valid counter value | X = garbage]

    i386:   0x0000000fffffffff
    x86_64: 0xffffffffXXXXXXXX

Test checks if the counter is moving and increasing.
Add a check to see if we can use (reg | 1) flag to get a proper 36b timestamp,
shifting the value on x86_64 if we can't.

v2: More iterations of monotonic test, comments, minor fixups (Chris)
v3: Skip tests if reg_read is not supported

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-07-16 13:06:13 +01:00
Chris Wilson
32c898849b igt/gem_eio: Waiting on a hung batch should report -EIO
If we are waiting on a handle, and its request is cancelled due to a
hang, we should report that explicitly through the ABI.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-07-15 22:09:54 +01:00
Paulo Zanoni
7f952bd976 kms_frontbuffer_tracking: don't keep debugfs open
Make the code smaller and simpler, also ready for when we move
debugfs_read() to lib/.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 15:21:26 -03:00
Paulo Zanoni
1048aa9aa5 tests: add kms_fbcon_fbt
This test should test the interactions between fbcon and the
frontbuffer tracking infrastructure.

Right now the PSR test fails, but as soon as we merge the following
kernel patches, the test wills tart passing:
 - drm/i915: PSR: Flush means invalidate + flush
 - drm/i915: fbdev restore mode needs to invalidate frontbuffer
 - drm/i915: fbdev_set_par reliably invalidating frontbuffer

I didn't want to make this a subtest of kms_frontbuffer_tracking just
because when I wrote it, I really didn't have in mind the fact that
someone might just close the DRM fd in the middle of a subtest.

After this commit we'll have a little bit of duplicated code among
tests. I'll clean this up later.

v2:
  - Refactor the code a little bit.
  - Add the suspend subtests.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 15:20:57 -03:00
Paulo Zanoni
7c5a218cc3 kms_frontbuffer_tracking: implement suspend subtest
Make sure we survive suspend/resume.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 13:06:41 -03:00
Paulo Zanoni
1c389f69f0 kms_frontbuffer_tracking: allow passing a NULL pattern
So we don't need to initialize CRCs we won't use. This makes the
modesetfrombusy and badstride tests a little faster.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 13:06:08 -03:00
Paulo Zanoni
91f097aefa kms_frontbuffer_tracking: simplify subtest enumeration
Just a small bikeshed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 13:05:40 -03:00
Paulo Zanoni
04d1311fc3 kms_frontbuffer_tracking: add farfromfence subtest
Make sure we notice in case our crtc->y handling is still wrong.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 13:05:12 -03:00
Paulo Zanoni
cb3861a9e3 kms_frontbuffer_tracking: implement badstride test
Test strides that are either completely invalid or just result in
disabled FBC.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 13:04:23 -03:00
Paulo Zanoni
4deb562659 configure: require libdrm >= 2.4.55
And drop the now unnecessary universal plane definitions. The 2.4.55
version is already quite old, so we should be fine.

Thanks to Thomas Wood for quickly spotting this.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@>
2015-07-14 12:52:09 -03:00
Paulo Zanoni
19e4632407 kms_frontbuffer_tracking: only force std_1024_mode on HSW
Since on BDW the big modes work fine, I want to test them without
having to recompile the test every time. Let's make std_1024_mode part
of opt.small_modes.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:35:05 -03:00
Paulo Zanoni
a7cfd224ba kms_frontbuffer_tracking: remove enum feature_status
After the last commit, it's not really needed anymore, so let's get
rid of it: less code lines and less non-standard enums.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:34:43 -03:00
Paulo Zanoni
775fd77715 kms_frontbuffer_tracking: improve checks for disabled features
Make sure the features are disabled and stay disabled. Otherwise we
could just wrongly think they are disabled while they are just in the
process of being enabled.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:34:23 -03:00
Paulo Zanoni
ca97e78455 kms_frontbuffer_tracking: rename enum fbs
I tried explaining these to people twice and realized how bad the
current naming was. Let's hope the new one is better.

The downside is that the tests were renamed and patches mentioning
them can't be fixed.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:34:02 -03:00
Paulo Zanoni
b0427442f9 kms_frontbuffer_tracking: add different ways to flip
So we can make sure all code paths are properly exercised and lead to
proper frontbuffer tracking.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:33:41 -03:00
Paulo Zanoni
a1d4b553a7 kms_frontbuffer_tracking: fix fullscreen subtest assertions
Only really assert FBC_DISABLED in case the primary plane is actually
disabled. If the sprite plane is covering the whole screen but the
primary plane is still enabled, FBC can remain enabled.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:33:14 -03:00
Paulo Zanoni
344dab22e9 kms_frontbuffer_tracking: avoid huge strides during normal operation
We want to restrict huge strides to the yet-to-be-implemented
stride-size-specific subtest.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2015-07-14 11:32:53 -03:00