summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-10igt: Exercise the shrinkerChris Wilson
Introduce a new fork helper that spawns a process that just repeatedly calls i915_gem_shrink_all() and watch what happens as we try to use objects that have been shrunk. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10igt/gem_ringfill: Measure ringsize for quicker and deterministic testingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-10assembler/gen8_disasm.c: Remove unused m_mask_ctrlPetri Latvala
Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-03-10tests/testdisplay: Remove unused SPRITE_COLOR_KEYPetri Latvala
Unused since 99bdf4f0ff3e ("tests/testdisplay: Use cairo helpers to draw to plane") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
2017-03-10tools/intel_vbt_decode: Remove unused codePetri Latvala
efp_conn() and related have been unused since 86a546f6f798 ("tools/intel_bios_reader: Dump out more information from the child device structure") Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
2017-03-09aubdump: Support EXECBUFFER2_WRJason Ekstrand
2017-03-09igt/gem_exec_parse: add hang detectionChris Wilson
Because byt needs it... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-09lib: Fix hang detectorChris Wilson
The kill/signal became mismatched in commit d930b6493d93 ("lib: Add basic support for valgrind annotations.") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-09igt/evictions: Isolate the mlock check in a separate processChris Wilson
The initial mlock() is to check we can assigned all of memory to ourselves -- without the kernel killing us. Move that check to an isolated process so that we sacrifice the child. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-09Add the new tool for create GVT-g Linux guest based on KVMGTTerrence Xu
GVT-g (Intel® Graphics Virtualization Technology) is a full GPU virtualization solution with mediated pass-through support. This tool is for create basic Linux guest based on KVMGT with VFIO framework, it including create vgpu, create guest, check IP address, destroy guest, remove vgpu,check dmesg log, etc functions. v2: Treat this case as a free-standing tool, with detect & skip when it's not running on GVT-g capable platform or running without the required tools. v3: Make some optimizations: like "update the generate mac address scripts", "provide more useful information for end user", etc. v4: Miscellaneous cleanup (Petri) Signed-off-by: Terrence Xu <terrence.xu@intel.com> Signed-off-by: Benyu Xu <benyux.xu@intel.com> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
2017-03-08tests/gem_userptr_blits: subtests for MAP_FIXED mappings of regular BOMichał Winiarski
When the memory backing the userptr object is released by the user, but the BO itself is not closed, it's possible to trigger recursive deadlock caused by operations done on different BO mapped in that region. Testcases are simulating such behaviour by using MAP_FIXED mmap flag. Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
2017-03-08igt/gem_userptr_blits: Exercise boundary of GTT mmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt: Markup more tests that require GEMChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt/gem_madvise: Correct expected resultsChris Wilson
Trying to execbuf with a purged object is meant to fail. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08igt/gem_eio: Check we succeed in unwedging the driverChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-08tests: Add gem_spin_batchMika Kuoppala
Add gem_spin_batch to test that the dummyload infra is working properly. Can be also act as tool to force a single engine to be busy for controlled period of time. v2: plenty of igt-fu improvements (Chris) v3: nesting batches for more utilization, epsilon fun (Chris) v4: clear interrupts on start (Chris) Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-07lib/igt_gt: Remove duplicated PARAM_NO_ERROR_CAPTURE defineMichel Thierry
LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE exists in lib/ioctl_wrappers.h since commit 171b21d9f761 ("igt/gem_ctx_param: Update invalid parma number"). Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-03-07lib: Break poll loop to check for a missed signalChris Wilson
If our parent dies, so should we. Our parent should kill us before it exits, but just in case we escape, wake up periodically to check upon our parent. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-07lib: Check for dead parent first in hang detectorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-06igt/drv_missed_irq: remove redundant clear of missed interruptsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-06configure.ac: require libdrm >= 2.4.75 for I915_EXEC_FENCE_OUTJani Nikula
I915_EXEC_FENCE_OUT was added in libdrm commit a3d715ee14b2 ("Import uapi/i915_drm.h from v4.10-rc5-950-g152d5750dda9") and released in libdrm-2.4.75. Reviewed-by: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2017-03-01igt/kms_frontbuffer_tracking: Show the crtc index (pipe) not idChris Wilson
The pipe is of particular relevance when checking for FBC/PSR compatibility, and easier to understand than its KMS object id. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-01igt/gem_exec_latency: Measure ring sizeChris Wilson
Measure the ring size and limit the number of our batches to avoid stalling (and livelocks) by waiting upon queued batches. References: https://bugs.freedesktop.org/show_bug.cgi?id=99910 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-28tests/chamelium: Don't sleep so much in basic hpd testsLyude
Now that we can just disable HPD storm detection, there's no need to sleep between each hotplug cycle. Signed-off-by: Lyude <lyude@redhat.com>
2017-02-28lib/igt_debugfs: Add functions/tests for controlling/testing HPD storm logicLyude
Recently we added i915_hpd_storm_ctl into i915's debugfs directory, which allows us to control the thresholds i915 uses for detecting hotplug interrupt storms from userspace, along with the ability to entirely disable them. This adds some helper functions into IGT to enable making use of this feature, along with adding some chamelium tests for it. Signed-off-by: Lyude <lyude@redhat.com>
2017-02-27kms_properties: Ignore CRTC_ID for the legacy caseMaarten Lankhorst
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27tests/kms_atomic_transition: Add missing variable declarationDorota Czaplejewicz
Signed-off-by: Dorota Czaplejewicz <dorota.czaplejewicz@collabora.co.uk> Signed-off-by: Petri Latvala <petri.latvala@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27kms_atomic_transition: Add test for primary plane togging vs vblank.Maarten Lankhorst
When enabling atomic rmfb a bug was found where vblank waits were timing out. Add a testcase that tests if vblanks work regardless of primary plane visibility. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-27lib: Add basic support for valgrind annotations.Maarten Lankhorst
SIGRTMAX appears to be used by valgrind now for its internal tracking, so avoid it in the helpers. Also add some valgrind annotations in gem_mmap, to make sure that its accesses are tracked correctly. I've also added gem_munmap, but there are a lot of places that don't use it yet in tests/. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-02-24benchmarks/gem_latency: Fix compiler warningMika Kahola
Fix compiler warning about I915_EXEC_FENCE_OUT definition/redefinition as it is defined in libdrm/i915_drm.h:890:0 gem_latency.c:48:0: warning: "I915_EXEC_FENCE_OUT" redefined #define I915_EXEC_FENCE_OUT (1 << 17) ^ In file included from ../lib/intel_batchbuffer.h:6:0, from ../lib/drmtest.h:39, from ../lib/igt.h:27, from gem_latency.c:31: Signed-off-by: Mika Kahola <mika.kahola@intel.com>
2017-02-23overlay: Accommodate more enginesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23igt/drv_hangman: Fix checking of strcasecmp against expectationMichel Thierry
Comparing strcasecmp against a bool promotes the bool into an integer and not force strcasecmp to be a bool. Since strcasecmp can return negative or positive values for error (not a boolean!) we need to convert into a boolean before comparing against our expectation. Signed-off-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23igt/drv_hangman: Clear the error state by actually writing to sysfsChris Wilson
The call to igt_sysfs_set("") was trying to write the empty string, i.e. 0 bytes and so never made it to the kernel. Use igt_sysfs_write("", 1) instead to send the NUL byte to the error state in order for it to be cleared. Reported-by: Michel Thierry <michel.thierry@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23lib/sysfs: Explicit read/write lengthChris Wilson
Export a couple of routines to read/write an exact length, rather than a strring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-23igt/gem_exec_latency: Assert the relocations are correctChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22igt/drv_missed_irq: Enable fault injection!Chris Wilson
Fixes: 4c5ed71fa743 ("igt/drv_missed_irq: Clear pending IRQs before testing") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99909 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-22intel-ci: Exercise all basic relocation targetsChris Wilson
There are several possible relocation methods the kernel uses depending upon the placement and caching of the buffers. Lots of different code paths not being covered by BAT - expand the testing to cover them. Even though there are quite a few paths, individually they are each very fast. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-02-22igt: Start marking up GEM tests that require an alive GPU to functionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-21igt/gem_exec_scheduler: Fix test for context prioritiesChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99893 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-21lib/igt_kms: Remove redundant cursor codeBrian Starkey
The dynamic plane support means that there should never be gaps in the pipe->planes array. This means we should never need to move the cursor plane from the last slot to another. Remove the unnecessary code, and add an assert that makes sure nothing strange happened that broke the assignment logic. Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-21lib/igt_kms: Fix memory corruption when there's no cursor planeBrian Starkey
The dynamic plane support means that if there's no cursor plane, then there is no space in the pipe->planes array for it, and thus assigning a "drm_plane-less" plane is out-of-bounds and leads to heap corruption and later crashes. The "drm_plane-less" cursor plane isn't included in n_planes anyway, which means there's no way to ever access it/know that it's there - so just remove it entirely. Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-21lib/igt_kms: Fix possible out-of-bounds accessBrian Starkey
If there's no primary plane, pipe->plane_primary == -1, and the assert meant to check that it's valid will access pipe->planes[-1]. Fix that to check that pipe->plane_primary has been set instead. Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-21lib/igt_kms: Neaten up pipe->planes[] assignmentBrian Starkey
Remove a bunch of branches, functionally equivalent. Changes since v1: - Added back display->has_cursor_plane assignment Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-21lib/igt_kms: Fix drm_plane leakBrian Starkey
In the loop looking for planes on a pipe, we always want to free up the drm_plane afterwards. Fixes: 36656239ef96 lib/igt_kms: Implement dynamic plane count support Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-21kms_frontbuffer_tracking: Fix badstride test skipping with atomicAnder Conselvan de Oliveira
In the new atomic reality, the page flip in the end of the badstride test succeeds. That flip is to an fb which has a stride too large to allow FBC to be enabled. Adjust the test expectations accordingly. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
2017-02-20intel-ci: Test wait ioctl on a queued requestChris Wilson
Another bug found first in the wild... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Petri Latvala <petri.latvala@intel.com> Acked-by: Petri Latvala <petri.latvala@intel.com>
2017-02-20kms_atomic_transition: Initialize pipe_crcs to avoid segfaultBrian Starkey
igt_pipe_crc_new() is skipped for non-Intel devices, but the later calls to collect_crcs_mask() will attempt to retrieve CRC values if the pipe_crcs pointers are non-NULL. Zero-initialise pipe_crcs to avoid accessing garbage pointers on non-Intel devices. Signed-off-by: Brian Starkey <brian.starkey@arm.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
2017-02-19tools/intel_guc_logger: Fix the assert for the verbosity levelOscar Mateo
I guess no one has needed to change the verbosity level of the GuC logs. Signed-off-by: Oscar Mateo <oscar.mateo@intel.com> Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-02-17igt/gem_exec_reloc: Do basic tests of 4/8-byte aligned reloc.offsetsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-17lib/igt_kms: Fix regression on kms_plane_lowres testMika Kahola
kms_plane_lowres subtest pipe-C-tiling-none crashes when reading out number of crtc. This patch fixes the bug on crtc readout. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99653 Fixes: 9de635976c426b4c835083792c7d4d6e32aec615 ("lib/igt_kms: Avoid depencency on static plane count") Reviewed-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Mika Kahola <mika.kahola@intel.com>