summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2015-01-20kms_plane: Add test that suspends/resumes before getting crcAnder Conselvan de Oliveira
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>
2015-01-19igt/drv_module_reload: Check more carefully for a live driverChris Wilson
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>
2015-01-15lib: remove unnecessary checks on the drm_open_any return valueThomas Wood
drm_open_any always returns a valid file descriptor, so there is no need to check the return value. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-01-15igt/gem_tiled_swapping: Cycle through the bo a couple of timesChris Wilson
In order to exercise coherency across swapin/swapout of the same bo, explicitly loop over all bo a couple of times. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-15igt/gem_mmap_wc/set-cache-level: Exercise set-cache-level WARNingChris Wilson
With the introduction of mmap(wc) and its unbound GTT write domain, we can now hit the warning inside set-cache-level, complaining about the failure to do correct cpu cache tracking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-14igt/gem_exec_big: Don't try to repeatedly munmap(NULL)Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-13igt/gem_mmap_wc: Reorder gem_close()Chris Wilson
Unlike a GTT mmap, a WC mmap does not have a direct reference to the object, only to the backing storage. If we want to control the domain correctly for mmap(wc), we have to keep the bo reference around. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88356 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-12igt/gem_exec_big: Use mmap(wc) to speed up verificationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-12igt/gem_exec_big: Also test a large batch with a large number of relocsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-09igt/gem_exec_big: Increase stressChris Wilson
We should be able to execute batches up to the full GTT size (give or take fragmentation), so let's try! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_evict_(alignment|everything): contend with GPU hangsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_reloc_vs_hang: Inject hangs!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_pread_after_blit: Inject hangs!Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-07igt/gem_concurrent_blit: Inject hangs before verifying contentsChris Wilson
After setting up the copy operations, add a hanging batch. This should mean that we complete the copy and the compare then races against the GEM reset. Hopefully, this will catch driver bugs where the target object is no longer accessible after the hang. Note: hang injection is disabled until the required kernel interface is completed. But there are useful additional tests here... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06igt/gem_ctx_thrash: Tweak resource limitsChris Wilson
On some systems (ok, most systems!) we may need to enlarge the allowed number of open files in order to create enough fd to fill the aperture. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87572 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-01-06Skip MADV_DOFORK & MADV_DONTFORK calls on OS'es that don't support themAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Use pthread calls instead of raw syscalls on non-Linux systemsAlan Coopersmith
Raw system calls aren't portable to other kernels. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06Solaris needs to #include <sys/kd.h> instead of <linux/kd.h>Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Add the invalid flags subtestAkash Goel
A new subtest added to validate the new version of gem_mmap ioctl, for creating the wc mappings, on yet to be supported flags. v2: Removed the flags checking for older kernels (Daniel) Signed-off-by: Akash Goel <akash.goel@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_concurrent_blit: Exercise wc mappingsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_fence_upload: Add comparison against wc mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_gtt_speed: compare against WC mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_tiled_wc: Exercise wc mmaps with swizzlingChris Wilson
This exercises both the wc mmappings and the extended get_tiling ioctl. 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. We then check that the contents of the object are tiled and swizzled correctly when viewed through a wc mmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-01-06igt/gem_mmap_wc: Exercise mmap(wc) interfaceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-18igt/gem_ctx_thrash/threads: Allow bo resuseChris Wilson
We already allocate enough objects to thrash the ppGTT VMs, so allow us to reuse the batch buffers for some efficiency gains and through the contention more towards the ctx->vm. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18igt/gem_ctx_thread/processes: Serialise after forking childrenChris Wilson
Play nice, especially with the subtest, and wait for the children to exit before finishing the test. If we don't we end up with a fork bomb for some unknown reason... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-18igt/gem_ctx_thrash: Boost workloadsChris Wilson
Now that we are no longer busy-spinning inside random(), we can spend more time exercising i915.ko Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17igt: Add gem_ctx_thrash to fill the GGTT with contextsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-17tests/gem_exec_blt: Add subtest that uses dumb buffersDaniel Vetter
Just to make sure this keeps working since a patch to WARN_ON using dumb buffers in execbuf was accidentally merged. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-12-12Android.mk: replace std=c99 with std=gnu99Tim Gore
The android makefiles were passing the -std=c99 flag to the compiler which disables the typeof keyword. This causes a build fail for a recent addition to igt_aux.h. Change this to -std=gnu99, which is the flag used in the linux build Signed-off-by: Tim Gore <tim.gore@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11lib: add a function to lock memory into RAMThomas Wood
Add a function to lock memory into RAM and use it in the gem_tiled_swapping test to reduce the amount of allocated memory required to force swapping. This also reduces the amount of time required for the test to complete, since the data set is smaller. The following durations were recorded with gem_tiled_swapping on a haswell system before the change: Subtest non-threaded: SUCCESS (55.889s) Subtest threaded: SUCCESS (810.532s) and after: Subtest non-threaded: SUCCESS (11.804s) Subtest threaded: SUCCESS (268.336s) v2: add various assertions and requirements and make sure gem_tiled_swapping works on systems with less RAM (Daniel Vetter) v3: fix allocation size calculation Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-11tests/gem_tiled_swapping: use igt_info logging wrapperThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-10tests: replace 3D test imagesThomas Wood
Use images with a smaller file size, created by saving the left and right stereo output of glxgears. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-09tests/kms_cursor_crc: Restore the valid pipe/connector combo checkVille Syrjälä
The valid pipe/connector combo check was lost in commit 57259d714d3fe1170cf931af72648219856a9918 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Nov 24 16:08:32 2014 +0100 lib/igt_debugfs: Don't setup crc in _new Restore it to make the test again useful on CHV. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcsVille Syrjälä
Report SKIP only if none of the pipe/connector combos worked, instead of trying to report for each pipe separately. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-09drv_hangman: Remove unused functionDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-09kms_cursor_crc: Remove value to 'return' in a void functionDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-08tests/kms_flip: Target the back buffer with the dummy loadVille Syrjälä
Aim the dummy load to the current back buffer instead if the front buffer. Assuming the idea is to get the next flip to be stuck behind the dummy load? Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08tests/kms_flip: Calibrate the dummy load delay in kms_flipVille Syrjälä
Try to tune the dummy load to ~1 second. The calibration happens the first time dummy load is generated. v2: Actually do the number of ops intended and calibrate to 1 second and not 2 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08tests/kms_flip: Use fixed size (2kx2k) buffers for dummy loadVille Syrjälä
Make the dummy load independent of the display resolution by using a two fixed size dummy bos to generate the load. As a final step do another copy from one of the dummy bos to the fb to make sure there's a dependency between the dummy load and any subsequent operation on the fb. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08tests/kms_flip: Refactor blit codeVille Syrjälä
Pull the code to emit a single blit to a separate function. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08tests: Run lib/igt.cocciVille Syrjälä
Found some open coded min()/max()/swap() macros. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
2014-12-08tests/pm_rps: vlv: round middle point to freq supported by HWImre Deak
When setting the calculated middle frequency value the test assumes that the HW/kernel rounds this value according to a 50MHz step value. This is not so at least on VLV/CHV, on my B0 BYT-M for example this step value is 22MHz, so there the test will fail. To fix this get the nearest supported value by setting the target frequency as a min or max frequency and read it back. The kernel will round the returned value to the nearest supported. v2: - remove the 50MHz rounding that was done for non-VLV platforms, the new way of rounding should provide the correct value for all platforms (Ville) Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08tests/pm_rps: vlv: load gpu for idle min/max testsImre Deak
When changing the sysfs GT min/max frequencies, the kernel won't explicitly change the current frequency, unless it becomes out of bound based on the new min/max values. The test happens to work on non-VLV platforms because on those the kernel resets the current frequency unconditionally (to adjust the RPS interrupt mask as a side-effect) and that will lead to an RPS interrupt setting the minimum frequency. To fix this load the GPU after decreasing the min frequency and before checking the current frequency. This should set the current frequency to the minimum. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08tests/pm_rps: vlv: wait for freq to settleImre Deak
At least on VLV when forcing a new GT frequency by writing to the min/max freq sysfs entries the kernel doesn't wait until the new frequency settles, so the subsequent readback check might fail. To fix this wait until the current frequency is between the min/max values using a 10ms timeout. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Imre Deak <imre.deak@intel.com>
2014-12-08igt/drm_read: Require that pipe 0 is activeChris Wilson
As we require a pipe enabled to generate vblanks, the first step is to then to check that pipe 0 is active or else skip the test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-05igt/drm_read: Abuse read(drm)Chris Wilson
Check that the more obvious userspace error conditions are handled by the kernel, ideally without loss of data. These include nonblocking waits, passing invalid buffers and passing buffers of the incorrect length. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-12-04gem_bad_reloc: Don't flip-flop between SKIP and PASSDamien Lespiau
Here is a cheap way for this test to give consistent results. This doesn't change the usefulness of this test, hopefully. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85270 Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2014-12-04tests: add gem_gpgpu_fill to .gitignoreThomas Wood
gem_gpgpu_fill was added in commit 4ec8479 (tests: Add gem_gpgpu_fill), but wasn't added to .gitignore. Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2014-12-04lib: remove igt_edid.hThomas Wood
This has been replaced by igt_kms_get_base_edid(). Signed-off-by: Thomas Wood <thomas.wood@intel.com>