These always need to pass for basic PM functionality.
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
"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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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@>
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>
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>
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>
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>
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>
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>