summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-08-08tests/pm_rpm: add wait_for_suspended() calls to test_one_planePaulo Zanoni
Make sure we do all operations while really runtime suspended, so we can actually test things. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07tests/pm_rpm: add subtests for fencesPaulo Zanoni
Daniel thought fences were not surviving runtime PM on DPMS, so we wrote this test to check. The good news is that the test passed, so there's no need for a Kernel patch, at least on the Kernel I tested. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07igt_kms: add kmstest_unset_all_crtcs()Paulo Zanoni
Both pm_rpm.c and pm_lpsp.c call it "disable_all_screens", but let's give it a name that better describes what the implementation does. v2: Rename to kmstest_unset_all_crtcs (Daniel). Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07tests/pm_rpm: use kmstest_get_property()Paulo Zanoni
So we can reduce the code size. v2: Rebase after the rename to kmstest_get_property. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-08-07tests/pm_rpm: add subtests for planes and cursorsPaulo Zanoni
These tests should trigger WARNs on Kernels that don't have the most recent fixes. v2: - Merge both the cursor and planes patches into one so it's easier to update them. - Extend the tests a little bit to exercise fences. - Fix bug found by Matt to enable the test to run on older Kernels Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-07-31testdisplay: ignore invalid subtest optionsThomas Wood
testdisplay does not have any subtests and should therefore exit with the appropriate exit code if the --list-subtests or --run-subtest options are used. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-30Update .gitignore filesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-30testdisplay: set a non-zero exit code if getopt detected an errorThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-29tests/gem_ringfill: add interruptible modeDaniel Vetter
Should be useful to test intel_ring_begin restart behaviour a bit. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-29testdisplay: Destroy the cairo context once the fb is paintedDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-27igt/pm_rps: Fix assertion in load_helper_stopChris Wilson
The load_helper isn't killed by the signal, but it exits gracefully. So update the assertion to check for the successful exit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-25testdisplay: only set terminal attributes when in foreground process groupThomas Wood
The Piglit test runner for intel-gpu-tools creates a new process group for the test processes, so attempting to set terminal attributes causes the process to receive SIGTTOU and be stopped. Since the test is not run interactively in this case, the issue can be avoided by not setting terminal attributes if the process is not in the foreground process group. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-25intel-gpu-tools: add sys/wait.h to pm_rps.cTim Gore
commit 745945546f7366a413a3a51a37f90caa3a227b1d breaks the build under Android because some of the macros used in pm_rps.c are defined in sys/wait.h which is not included. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-24igt_core: Refactor igt_stop_helper() to use igt_wait_helper()Chris Wilson
Reduce code duplication as the igt_stop_helper can reuse igt_wait_helper() to replace its own waiting routine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-24igt/gem_userptr_blits: Fix multi-threaded mm stress testerTvrtko Ursulin
Two parts to the fix: 1. Do not use pthread_cancel since not available on Android. 2. Do not assert in the thread since that does not get propagated to the process. Rather pass out any failures so we know test did not work as expected. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Tim Gore <tim.gore@intel.com> Reviewed-by: Tim Gore <tim.gore@intel.com>
2014-07-24igt/gem_userptr_blits: Fix forked access testTvrtko Ursulin
copy() blit helper assumes a certain object size much larger than a page size. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23tests/pm_rpm: Convert to new optparsingDaniel Vetter
Thomas missed the add-hoc parameter parsing in here, which did break things for Paulo since the core now fails for unknown options. Convert them over to the new infrastructure, which has the nice upside that we can remove the comments and put them into the usage available with --help. Cc: Thomas Wood <thomas.wood@intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-23lib/drm_lib.sh: Bare-bones long option parsingDaniel Vetter
Just enough to stay compatible with simple subtests. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-23tests: Move root check to lib/drm_lib.shDaniel Vetter
All tests want that anyway. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-23build: improve version.h generationThomas Wood
Move version.h generation into lib/Makefile.sources so that it can be shared between the Autotools and Android build systems. Also make sure the "updating version.h" message is only displayed when version.h actually changes and remove unnecessary includes of version.h. This also includes changes from Tvrtko Ursulin to prevent a build from within the git repository failing when git is not available. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
2014-07-23tests: convert simple tests to use igt_simple_init_parse_optsThomas Wood
Convert simple tests to use igt_simple_init_parse_opts if they require extra options. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-23tests: remove unused getopt header includesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-07-21igt/gem_userptr_blits: New tests, old issuesChris Wilson
Introduce a new test to keep that we clean up on process exit (if the userptr is busy or it has been gtt mmapped). This revealed a few bugs in the existing tests so clean those up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-19igt/kms_flip: Skip if headlessChris Wilson
If there are no connectors, we cannot perform any pageflips and so we have nothing to test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73640&list_id=446828 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17tests/pm_rpm: add dpms-mode-unset{,-non}-lpsp subtestsPaulo Zanoni
These tests currently trigger WARNs on our Kernel. Let's make sure we fix the bug and it never comes back. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-07-15lib/igt.cocci: Add s/assert/igt_assert/Daniel Vetter
People use it way too often, and it upsets the test library. The only valid places to use this is of igt infrastructure self-tests where you need to check something _without_ all the other abi use checks igt_fail and friends do. For those tests just #define an internal assert to hide it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-15tests/gem_userptr_blits: PolishDaniel Vetter
- Drop return values for test functions - we rely on the implicit control flow from igt_ checks. - Don't use assert directly, this upsets the test flow logic (and results in a CRASH result instead of FAIL). Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-15tests/gem_userptr_blits: Race between object creation and multi-threaded mm opsTvrtko Ursulin
Userptr v23 was not thread safe against memory map operations and object creation from separate threads. MMU notifier callback would get triggered on a partially constructed object causing a NULL pointer dereference. This test excercises that path a bit. In my testing it would trigger it every time and easily, but unfortunately a test pass here does not guarantee the absence of the race. v2: Added explicit cancellation point and removed the stop flag. Use only igt_assert(). Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14tests: Move gem_render_copy_redux to the list of multi-subtests testsDamien Lespiau
Can we find a way to fix those for good? My preference goes to not having that single/multi split but always have a test being a list of one or more subtests. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-14lib: Add argc/argv to igt_simple_initDaniel Vetter
There's a pile of ideas around to add generally useful options like --debug to all igt tests. Or unify the runtime behaviour between simple and subtest tests a bit more. The first step to get there is to add argc/argv to igt_simple_init so that we can get at the argument list. Cc: Tim Gore <tim.gore@intel.com> Cc: Thomas Wood <thomas.wood@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14intel-gpu-tools: Dont build kms_force_connector if no cairoTim Gore
kms_force_connector is a new test that requires cairo. I have added it to the list of tests not to build on Android unless ANDROID_HAS_CAIRO is set. Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-14igt/gem_userptr_blits: Add missing RAM check before coherency testsChris Wilson
-ENOCOFFE. References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-14igt/gem_userptr_blits: Add missing RAM check before coherency testsChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=79237 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-12igt/gem_close_race: Increase GPU loadChris Wilson
Increate the GPU load slightly, but mitigate the CPU overhead from clflushing by keeping the object alive using flink. This has also the side-effect of magnifying the desired busy-close race. References: https://bugs.freedesktop.org/show_bug.cgi?id=71029 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11igt/gem_close_race: Trim object sizeChris Wilson
The challenge here is to race GPU activity versus the gem_close. Using a large objects makes the window of GPU activity larger - except on !llc systems we then incur massive overhead from clflush, likely destroying any race (due to mutex contention). And that mutex contention is amplified by the number of cores - bad news for Baytrail. Give up and make the objects smaller and hope that the test is run frequently enough to catch the race. References: https://bugs.freedesktop.org/show_bug.cgi?id=71029 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11igt/gem_tiled_swapping: Speed up slightlyChris Wilson
The exercise is moving tiled objects in and out of swap. They are moved en-block and we test them all, therefore we can randomly test different bytes from each buffer to have reasonable coverage of all tiles. This shifts the bulk of the work from checking the tiled bo to kswapd. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11lib/igt.cocci: Add stanza for for_each_pipeDaniel Vetter
Damien dodged this ... Also run the script while at it. v2: Don't just capture identifiers for pipe, but also expressions. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-07-11lib: Extract gem_get_tiling() from a couple of tests.Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Use the igt_kms enum to encode the plane rotationDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove unnecessary includesDamien Lespiau
Turns out we didn't need most of them. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Always use the primary plane to compute the reference CRCDamien Lespiau
Trying to disable the primary planes isn't exactly working at the moment. W/A it until it works. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Document the two steps in prepare_crtc()Damien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Don't compile the test on Android with no cairo supportDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Add the test to .gitignoreDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Properly paint the whole frame bufferDamien Lespiau
The -1 meant we weren't properly filling the whole fb. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Don't commit with no fb set upDamien Lespiau
prepare_crtc() was trying to commit a display state without any fb to scan out... Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Allow the sprite test to run even without universal planesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: No need to test for NULL before freeing the pipe CRC objectDamien Lespiau
igt_pipe_crc_free() does that check already. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove plane from the stateDamien Lespiau
having everythin in the data_t structure makes it hard to understand what should be set when. Replace that by explicit function parameters. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-07-11kms_rotation_crc: Remove the sleep(2)Damien Lespiau
One can inspect the output of the igt_kms API by setting IGT_DISPLAY_WAIT_AT_COMMIT=1. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>