summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2014-12-04tests: Add gem_gpgpu_fillZhenyu Wang
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-04lib: rename igt_media_fillfunc_t typedef to igt_fillfunc_tZhenyu Wang
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-01tests/drv_hangman: remove check for other drm clientsTim Gore
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-01tests/Android.mk: Add kms_pwrite_crc to cairo test listTim Gore
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-01tests/kms_flip: Fix assert about vblank wait durationVille Syrjälä
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-11-28tests/gem_ring_sync_copy: reduce memory usageTim Gore
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-25tests: use subtests in gem_tiled_swappingThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-24lib/igt_debugfs: Don't setup crc in _newDaniel Vetter
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-18tests/kms_render: gen2/3 can't do 10bpcDaniel Vetter
So skip those. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86236 Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-18tests/prime_self_import: Track leaked objects accuratelyDaniel Vetter
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-17lib/os: Push simulation test down into intel_require_memoryDaniel Vetter
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-17lib/os: Pust igt_require into memory check functionDaniel Vetter
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-14igt/gem_tiled_blits: Require that we do the full testChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-14igt/gem_linear_blits: Require that we do the full testChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-14tests/pm_rpm: add gem-evict-pwrite subtestImre Deak
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-13tests/kms_pwrite_crc: Add pwrite vs display coherency testVille Syrjälä
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-13tests/kms_flip: add a timeout for the nonblocking-read testThomas Wood
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-12tests/gem_exec_parse: Go OCD about C-style commentsDaniel Vetter
Cc: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-12tests/gem_madvise: set execbuf.batch_len before doing an execbufBrad Volkin
The command parser's batch_len optimization causes the parser to reject this batch as not having an MI_BATCH_BUFFER_END because the length was not set correctly. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-12tests/gem_exec_parse: fix batch_len setting for cmd-crossing-pageBrad Volkin
The size of the batch buffer passed to the kernel is significantly larger than the size of the batch buffer passed to the function. A proposed optimization as part of the batch copy kernel series is to use batch_len for the copy and parse operations, which leads to a false "batch without MI_BATCH_BUFFER_END" failure for this test. To fix this, modify the test to set batch_start_offset and batch_len such that they define the range of actual commands in the batch, including a few of the surrounding nops for alignment purposes. v2: update batch_start_offset as well Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-12tests: ensure the script based tests are included in the distributionThomas Wood
TESTS_scripts was accidentally removed from EXTRA_DIST in commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-11tests/gem_reset_stats: add defer-hangcheck testMika Kuoppala
to see if one can fool hangcheck by keeping non hanging ring busy v2: break from loop instead of return (Daniel Vetter) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-11-06tests: use igt_debugfs where possibleThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06tests/drm_lib.sh: add a "--help-description" optionThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06testdisplay: add a test descriptionThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06docs: add some test descriptionsThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06testdiplay: add a "--help" optionThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-06testdisplay: ensure invalid long option exit status is non-zeroThomas Wood
The optopt variable is not set if an invalid long option is used, so check the current option character instead. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-11-05tests/drv_hangman: skip a few asserts when using the cmd parserBrad Volkin
This test has a few checks that batch buffer addresses in the error state match the expected address for the userspace supplied batch. But the batch buffer copy piece of the command parser means that the logged addresses are actually _supposed_ to be different. So skip just those checks. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-11-04tests: Remove spurious binaries from gem_tiled_wb commitChris Wilson
commit c45216b26d223ffd7f68c5794870214445a64b5c Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Nov 4 07:30:57 2014 +0000 igt/gem_tiled_wb: Exercise CPU mmaps with swizzling brought along a few interlopers.
2014-11-04tests/prime_nv_test: Skip cpu mmap testcaseDaniel Vetter
It's not implemented yet, so no point in running the test really. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68638 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-11-04igt/gem_tiled_wb: Remove extraneous mmap(wc) requirementChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04igt/gem_tiled_wb: Exercise CPU mmaps with swizzlingChris Wilson
This exercises the the extended get_tiling ioctl in order to determine proper swizzling for direct access to objects through WB. 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. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04ioctl_wrappers: Pass in offset to CPU mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-11-04igt/gem_linear_blits: Add sufficient RAM checkChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=85834 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-29build: fix distcheckThomas Wood
Fix distcheck issues introduced by commit 685e577 (Move library selftests to lib/tests). Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-10-29tests: Reenable testdisplayDaniel Vetter
This seems to have been accidentally disabled in commit 982f7eb238a0898c456e0574dee7c4507738d75f Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Aug 29 15:19:57 2014 +0100 Prepare for 64bit relocation addresses Apparently no one noticed. Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29tests/testdisplay: Fix test status check fumbleDaniel Vetter
This is a regression from 4306538d1d3f60877866c39c9ca953cc5e541dae is the first bad commit commit 4306538d1d3f60877866c39c9ca953cc5e541dae Author: Daniel Vetter <daniel.vetter@ffwll.ch> AuthorDate: Thu Oct 2 11:18:20 2014 +0200 Commit: Daniel Vetter <daniel.vetter@ffwll.ch> CommitDate: Thu Oct 2 11:34:55 2014 +0200 tests: Sprinkle missing igt_exit() where needed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85582 Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-29Move library selftests to lib/testsDaniel Vetter
Again they're not really igt testcases so are in the way of running spatch unconditionally. Move them someplace else. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-29Move watermark code from tests to toolsDaniel Vetter
They're now igt tests, and so if you blindly run lib/igt.cocci with spatch on tests/*c they get mangled. Move them away, but still keep them as noinst targets. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-10-27tests/pm_rpm: add system-suspend-{execbuf,modeset} subtestsPaulo Zanoni
We were having a problem where the system-suspend test was passing, but then the next test - gem-execbuf-stress - was failing because of bugs caused by the suspend subtest. So add a single test that emulates the same problem, and another test that just sets a mode after resume. This way, we should be reproducing the problem even if you don't run the tests in the order they are defined. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-26skl_ddb_allocation: Respect the minimum number of blocksDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-10-24tests/kms_flip: Make flip-vs-panning-vs-hang change DSPSURFVille Syrjälä
Make sure DSPSURF will change during the panning operation in flip-vs-panning-vs-hang. This will now test agains bugs between the kernel's mmio vs. CS flip race handling and GPU resets. If the kernel is buggy if will fail to notice that the panning operation changed the base address before the GPU reset had a chance to deal with the pending page flips, and so the flip would never complete due to DSPSURFLIVE not matching the expected value. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-24igt/gem_userptr_blits/dmabuf: Map the right pointer for !llcChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=85354#c2 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-23tests/gem_workarounds: adapt to constant wa list from driverMika Kuoppala
Driver now returns the constant values that were set once on ring initialization time. Extend the simple interface check to all gens (i915_wa_registers needs to be present). Due to delay when render context is visible on cpu side, wait gpu to execute something on default context to get rid of undeterministic behaviour by sometimes getting all ones. Cc: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2014-10-23tests/*: lib/igt.cocci found something!Daniel Vetter
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-23kms_rotation_crc: Add test for cursor rotation (v2)Sonika Jindal
v2: Slight rebasing onto latest i-g-t codebase (Matt). Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-23igt/gem_userptr_blits/dmabuf: Provide partial coverage on !llc platformsChris Wilson
Without LLC, we cannot assume coherency between system RAM and the GTT. If we try to use the GTT with snooped memory, the machine may lock up, so the kernel prevents us from doing so, causing the test to fail. However, we still do want to verify that we can access the userptr through a dmabuf, so just check that we can make a copy from it using the GPU and ignore the GTT cross-checking. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85354 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-10-22lib/igt_aux: move audio RPM code to igt_setup_runtime_pm()Paulo Zanoni
If we don't enable audio runtime PM, the audio driver won't release its reference, the refcount won't ever become zero, so we will never actually runtime suspend. So move this code from pm_rpm.c to igt_aux.c, so kms_flip - and any other IGT test case using RPM - can benefit from it. Previously, if you ran pm_rpm before running the other tests - or if you just didn't have snd_hda_intel loaded - you wouldn't notice this bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78893 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2014-10-21tests/gem_exec_parse: test for chained batch buffersBrad Volkin
libva makes extensive use of chained batch buffers. The batch buffer copy portion of the command parser has the potential to break chained batches, so add a simple test to make sure that doesn't happen. Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>