Just a few basic tests to make sure fb modifiers can be used and
behave sanely when mixed with the old set_tiling API.
v2:
* Review feedback from Daniel Vetter:
1. Move cap detection into the subtest so skipping works.
2. Added some gtkdoc comments.
3. Two more test cases.
4. Removed unused parts for now.
v3:
* Removed two tests which do not make sense any more after the
fb modifier rewrite.
v4:
* Moved gtkdoc comments into .c file.
* Moved all initialization into fixtures.
* Rebased for fb modifier changes.
v5:
* Added bad modifier subtest.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Change the formatting asserts into requires and add the contents into
the debug log.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89525
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
i915 was using the main atomic 'disable plane' to turn off sprite planes
during a CRTC disable. This was problematic because it modified the
plane state, preventing us from recovering the original state later.
One such case was that during a DPMS OFF followed by a DPMS ON, any
sprite planes would not be restored properly.
Let's add a test that toggles DPMS off and on and ensures that the CRC
remains the same (i.e., planes are successfully restored unchanged).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The user should be able to specify a negative timeout to indefinitely
wait upon a bo becoming idle.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
So convert from uint64_t to int64_t. The distinction becomes important
when you realise what test we were missing...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
The gem_render_tiled_blits test tends to get oom killed
on low memory (< 4GB) Android systems. This is because the
test tries to allocate (sysinfo.totalram * 9 / 10) in
buffer objects and the remaining 10% of memory is not
always enough for the Android system.
A similar issue with gem_render_linear_blits was resolved
by creating several subtests. A "basic" subtest that uses
minimal memory buffers to test the basic operation, and
two stress tests which are skipped if there is insufficient
memory. The first stress test uses more memory than the
graphics apperture and the second uses enough to ensure
that swap space is used (if present).
This patch makes the same changes to gem_render_tiled_blits.
v2: Following comments from Daniel Vetter:
a) Use igt_main macro instead of "open coding", and
b) cull some leading spaces
Signed-off-by: Tim Gore <tim.gore@intel.com>
The gem_render_linear_blits test tends to get oom killed
on low memory (< 4GB) Android systems. This is because the
test tries to allocate (sysinfo.totalram * 9 / 10) in
buffer objects and the remaining 10% of memory is not
always enough for the Android system.
After a discussion with Chris Wilson I have split this
test into a "basic" and an "apperture-thrash" subtest,
in the same way as gem_linear_blits. The basic test
uses just two buffer objects and the apperture-thrash
test is skipped if there is insuffiecient memory.
v2: Following comment from Chris Wilson:
a) Remove the command line option for count.
b) Add a third subtest to ensure swap is tested
v3: Replace some leading spaces with tabs
v4: Follwing comment from Daniel Vetter:
a) Use igt_main macro instead of "open coding", and
b) cull some more leading spaces
Signed-off-by: Tim Gore <tim.gore@intel.com>
The only thing the kernel can do is pin the buffers, which essentially
means no swapped tiled objects.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
We fail to detect some VGA monitors using our I2C method, leading to
bug reports from QA. If you look at the dmesg of these cases, you'll
see the Kernel complaining about EDID reading mostly FFs and then
disabling bit-mangling. Since we don't want to reimplement everything
the Kernel does, let's just accept the fact that some VGA outputs
won't be properly detected.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84273
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
This way the debug output in case of failures is nicer since we dump
the entire test condition.
Also replace one open-coded igt_assert_eq.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
We've been leaking the framebuffers that get created inside the
legacy -> universal cursor compatibility layer and nobody noticed. Add
an i-g-t test to check debugfs and ensure we end up the same number of
framebuffers we started with after performing cursor operations.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
The bare "Test requirement: modes" message is too cryptic, I had to go and
read the source code to understand the missing requirement.
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Added new media_rc6_residency_subtest for chv & vlv.
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
With current code we are not considering the RC6 residency during sysfs
read. This is causing test to fail due to incorrect residency_accuracy check
This patch consider code time spent for accuracy check
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Renaming tests massively confuses QA's test result tracking and
blacklisting. So except when really good reasons are around we
shouldn't do it.
Here I think just adding the -hibernat suffix and leaving test names
unchanged is enough.
Cc: David Weinehall <david.weinehall@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Remove a file accidentally added in commit 6f582f7 (tests: Add
gem_ctx_param_basic).
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Remove options from argv that have been handled by getopt to allow
additional non-option parameters to be processed in the test application.
This fixes issues when using options such as --debug with tests that accept
additional non-option parameters.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Gen8 Onwards use 48 bit addressing for src and dst base
addresses. This patch fixes this for destination base address.
Signed-off-by: Praveen Paneri <praveen.paneri@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
intel-gpu-tools currently has a bunch of tests for suspend,
but currently none (that I could find) for hibernate.
Attached is a rudimentary patch to add said test. It does so
by repurposing the drv_suspend driver to handle both suspend
and hibernate, since the difference is miniscule.
I decided to split the suspend/autoresume functions in
igt_aux.c though, to be able to leave the igt_system_uspend_autoresume()
function unchanged (the other option would be to
introduce a boolean function argument and have that
decide what parameters to pass to rtcwake).
The timeout passed to rtcwake probably needs tuning (it might
even need to be dynamically adjusted, since the time hibernation takes
varies wildly depending on the amount of non-cache memory in use).
Signed-off-by: David Weinehall <david.weinehall@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
We shouldn't use the contents of data.display to determine which pipes
to run subtests on since this structure is initialized in an igt_fixture
and won't contain any useful data when enumerating subtests (i.e.,
--list-subtests won't return anything).
Instead, just assume we have three pipes in the main loop and ensure
that each subtest will skip if we don't really have that many.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Also move forcewake and stop_rings code from igt_debugfs to igt_gt
since it fits better. And move the hang injection fork helpers from
igt_aux to igt_gt, too.
Also push the intel_gen call into igt_hang_ring while at it.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Duplication just means it gets out of sync.
Also update they keyword list in the Makefile, not everything was listed.
And add a new "invalid" keyword.
While at it update NEWS.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
I've forgotten to do this in
commit e4753d2d96fbb88077e70820793137f45f02c9ba
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Mon Sep 29 14:42:33 2014 +0200
tests/gem_wait_render_timeout: Convert to subtests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
It collides with the subtest naming convention glossary entry for swap.
Which makes the docbook xml stuff unhappy.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Yeah, historically grown but we should try to be somewhat consistent.
It helps with filtering testcases.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This way the igt_require for the ctx support is hit before we've
launched a bazillion threads and need to wait until they're all done.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
We've missed them, and the kernel isn't nasty enough and forgot to
check them. To add these tests convert the existing create/destroy
tests over to subtests.
v2: Do the basic create/destroy in ctx_bad_destroy in a fixture
so that all the tests skip properly.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Boring ioctl validation. Luckily no gaps found while doing it.
v2: git add ftw!
v3: Fixes:
- args->size is an outparam for get, adjust test.
- Pick an invalid param, not an invalid ioctl number ... tsk.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
A bit more invasive since getting rid off all the places meant
to flatten some of the control flow with implicit igt_require.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Align with common igt library style:
- Push the igt_require into the function.
- Push the intel_gen into the function.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
As of kernel commit
commit a679064a7e9e8799177a64a31668a34a1bc6a4f1
Author: Matt Roper <matthew.d.roper@intel.com>
Date: Fri Jan 30 16:22:37 2015 -0800
drm/i915: Switch planes from transitional helpers to full atomic helpers
the kernel now checks for cursor coordinates that would result in
integer overflow and returns -ERANGE, similar to the checking that was
already done for other plane types. We update kms_cursor_crc here to
reflect this small behavior change:
* Check for success at extreme boundary conditions INT_MAX-{width,height}
rather than INT_MAX
* Add new check for success at SHRT_MAX; if the driver were to
internally use short values and overflow, we could have the cursor
reappear on the screen.
* Add a test for failure with proper error code at INT_MAX-{width,height}+1
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
It was possible for invalidate range start mmu notifier callback to race
with releasing userptr object. If the object is released prior to
taking a spinlock in the callback, we'll encounter a null pointer
dereference.
v2: Moved expressions inside igt_assert(), added mem barrier (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
A previous commit:
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
introduced a regression for drm object leak checking. A following commit:
commit 8741c2289f17e9bcb740a01cad4764a71c918eea
Author: Mika Kuoppala <mika.kuoppala@intel.com>
Date: Wed May 7 16:46:19 2014 +0300
tests/gem_flink_race,prime_self_import: fix object counts
fixed the regression for some cases but missed the export-vs-gem_close-race
subtest. Note that test behaviour depends on whether the subtest is run as
part of the whole prime_self_import test (fail), or as a single subtest (pass).
Using execlists on Gen8+ reverses the pass/fail due to lazy context allocation
which is presumably why this has now been noticed.
This commit applies the same fix to the export-vs-gem_close-race subtest.
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87627
Signed-off-by: Thomas Daniel <thomas.daniel@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
A last moment "tidification" in
commit 5e9fac54918e424d928bc15b90e4c65d4cfdd356
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Thu Jan 22 07:52:09 2015 +0000
igt/gem_tiled_wc: Fix! Finish!
wreaked havoc again.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88816
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
v2: add more tests to address Daniel's comments(Zhipeng)
Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
It helps when testing whether tiled data read back through a linear
mmaping to first tile the data. And not repeatedly unmapping the linear
map stops it from segfaulting.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88686
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This adds a test that does a suspend/resume cycle between configuring
a plane and getting the crc value for the pipe. The intention is to
test if the user requested stated is restored properly, instead of
being clobbered by the state read out from the hardware.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
As drm_open_any() now quietly fails if there is no driver, this
nullifies the effectiviness of using gem_exec_nop as the test for a good
reload. Combine with gem_alive (and guarantee that gem_alive can detect
a dead driver, putting lie to
commit 032f30cb38bb03562ee7fde19cd278b1d8ac31a9
Author: Thomas Wood <thomas.wood@intel.com>
Date: Tue Jan 13 13:33:57 2015 +0000
lib: remove unnecessary checks on the drm_open_any return value
) first.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88573
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>