summaryrefslogtreecommitdiff
path: root/lib/igt_gt.c
AgeCommit message (Collapse)Author
2016-03-17lib/igt_gt: Handle SIGINT whilst writing to i915_error_stateChris Wilson
Becareful in case we try and eat the error state whilst interrupts are being sent and repeat the write() until we finish uninterrupted. References: https://bugs.freedesktop.org/show_bug.cgi?id=94573 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-03lib/igt_gt: Replace asm clflush/mfence with __builtin_ia32 variantsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-03-01lib: move i915_wedged_set to ig_gt.cDaniele Ceraolo Spurio
Upcoming tests will call it to recover from bad states caused by hangcheck bugs.the function was renamed to igt_force_gpu_reset to have a naming closer to other hang-related functions in the same file. The value written to the debugfs has also been changed to -1; this makes no differences with the current implementation but copes with upcoming TDR changes (still under discussion) that should allow the resetting of a mask of rings. Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
2016-02-04tests/drv_hangman: Convert to using central list of enginesChris Wilson
Rather than encoding our own list of engines, use the common one for greater coverage. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27Add I915_EXEC_DEFAULT to list of known enginesChris Wilson
I dropped this from the list of rings for some tests when refactoring to a common array. Almost all of the tests should be run over the default exec engine to ensure ABI backwards compatiblity. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-27Extract array of execution enginesChris Wilson
A few tests wish to execute on every engine, so centralise the array of known engines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-25igt: Disable igt_clflush_range() implementation on ARM buildsEric Anholt
Daniel has suggested that I put vc4 testing into igt, since it's got the piglit integration and KMS coverage already. This gets the ccore building so that I can start writing tests. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
2016-01-22lib: Refactor common detection of missed interruptsChris Wilson
As we have the same function in a few places to read the debugfs/i915_ring_missed_irq file, move it to the core. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-20lib: Expand igt_hang_ring() to select target context and various optionsChris Wilson
Some potential callers want to inject a hang into a particular context, some want to trigger an actual ban and others may or may not want to capture the associated error state. Expand the hang injection interface to suit all. v2: Disable the new kernel API, but push to provide a missing piece of infrastucture to unbreak compilation. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-20lib: Always double check igt_require_hang_ring() on useChris Wilson
If we move the igt_require() into the hang injector, this makes simple test cases even more convenient. More complex test cases can always do their own precursory check before settting up the test. However, this does embed the assumption that the first context we are called from is safe (i.e no i915.enable_hangcheck/i915.reset interferrence). v2: A couple of environment variables to skip hang testing or to force hang injection even if the GPU cannot be reset. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-19igt/gem_mmap_wc: Test cpu mmap vs wc mmap coherencyChris Wilson
Similar to the cpu mmap vs gtt mmap coherency test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-04lib: igt_fork_hang_helper must be run in fixturesDaniel Vetter
Because it opens an intel-specific drm fd. Fixes crashes when running igt on no-intel. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-09-11convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocciMicah Fedke
Apply the new API to all call sites within the test suite using the following semantic patch: // Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls @@ identifier i =~ "\bdrm_open_any\b"; @@ - i() + drm_open_driver(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_master\b"; @@ - i() + drm_open_driver_master(DRIVER_INTEL) @@ identifier i =~ "\bdrm_open_any_render\b"; @@ - i() + drm_open_driver_render(DRIVER_INTEL) @@ identifier i =~ "\b__drm_open_any\b"; @@ - i() + __drm_open_driver(DRIVER_INTEL) Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08lib: various documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-06-27doc: Remove i-g-t/intel prefixes and capitalize section titlesDamien Lespiau
Looks better! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-15lib: Use HAS_GPU_RESET rather than opencode our guessChris Wilson
Uses kernel commit 49e4d842f0d0892c3d26c93a81b9f22c1467030e Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 15 12:23:48 2015 +0100 drm/i915: Report to userspace if we have a (presumed) working GPU reset to determine whether the kernel has a working GPU reset before injecting a hang (and so skip tests requring hang recovery if not available).
2015-04-26lib: Cache static queriesChris Wilson
We frequently check for device capabilities, for which we can safely assume that there is but one on a system and so cache the first query value and return it for all future queries. The benefit is to reduce dmesg debug spam which helps when either bringing up a test or trying to track down why a test fails. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-02-25lib: small documentation fixesThomas Wood
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-13lib/igt_gt: Document and consolidateDaniel Vetter
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>
2015-02-13lib/ioctls: make gem_context_set/get_param infallibleDaniel Vetter
We have separate require checks already, so these failing is a bug in the test logic. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/ioctl: api polish for gem_context_has_paramDaniel Vetter
Just push the igt_require down to align with the usual style. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13lib/gt: api polish for igt_can_hang_ringDaniel Vetter
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>
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>