summaryrefslogtreecommitdiff
path: root/tests/gem_eio.c
AgeCommit message (Collapse)Author
2017-03-21Restore "lib: Open debugfs files for the given DRM device"Chris Wilson
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring commit 301ad44cdf1b868b1ab89096721da91fa8541fdc Author: Tomeu Vizoso <tomeu.vizoso@collabora.com> Date: Thu Mar 2 10:37:11 2017 +0100 lib: Open debugfs files for the given DRM device with fixes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-21Revert "lib: Open debugfs files for the given DRM device"Tomeu Vizoso
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc. When a render-only device is opened and gem_quiescent_gpu is called, we need to use the debugfs dir for the master device instead. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
2017-03-21lib: Open debugfs files for the given DRM deviceTomeu Vizoso
When opening a DRM debugfs file, locate the right path based on the given DRM device FD. This is needed so, in setups with more than one DRM device, any operations on debugfs files affect the expected DRM device. v2: - rebased and fixed new API additions v3: - updated chamelium test, which was missed previously - use the minor of the device for the debugfs path, not the major - have a proper exit handler for calling igt_hpd_storm_reset with the right device fd. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by: Robert Foss <robert.foss@collabora.com> Acked-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-01-02igt: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_eio: Apply the cork to the execbufChris Wilson
git add failure, I pushed the incomplete test. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-18igt/gem_eio: Add inflight testChris Wilson
Since we can submit requests after becoming wedged, we need to test that we do handle that correctly. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-09-13igt/gem_busy: Prevent banning when running multiple hang testsChris 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-01-27lib: Share common __gem_execbuf()Chris Wilson
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-01-20tests: Drop the superfluous igt_require_hang_ring()Chris Wilson
As the hang injection now itself checks for validity before use, the tests don't need to do so themselves. Except in certain situations! If the test forks, it should do requirement checks before the fork (so that we don't anger the igt gods) and if the test plays around i915.reset then it needs to do an early igt_require_hang_ring() that is not affected by the changes to i915.reset. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-12-16tests/gem_eio: New ABI - no EIO even from wait_ioctlDaniel Vetter
So there's 3 competing proposals for what wait_ioctl should do wrt -EIO: - return -EIO when the gpu is wedged. Not terribly useful for userspace since it might race with a hang and then there's no guarantee that a subsequent execbuf won't end up in an -EIO. Terminally wedge really can only be reliably signalled at execbuf time, and userspace needs to cope with that (or decide not to bother). - EIO for any obj that suffered from a reset. This means big internal reorginazation in the kernel since currently we track reset stats per-ctx and not on the obj. That's also what arb robustness wants. We could do this, but this feels like new ABI territory with the usual userspace requirements and high hurdles. - No -EIO at all. Consistent with set_domain_ioctl and simplest to implement. Which is what this patch does. We can always opt to change this later on if there's a real need. To make the test really exercise this do a full wedged gpu hang, to make sure -EIO doesn't leak out at all. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
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-08-21lib: add a single include headerThomas Wood
Add a header that includes all the headers for the library. This allows reorganisation of the library without affecting programs using it and also simplifies the headers that need to be included to use the library. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-07-15igt/gem_eio: Waiting on a hung batch should report -EIOChris Wilson
If we are waiting on a handle, and its request is cancelled due to a hang, we should report that explicitly through the ABI. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-06-19igt: Add gem_eio for inducing expected EIOChris Wilson
A few entry points in the GEM API are expected to raise EIO if we encounter a wedged GPU. This testcase aims to do so by first injecting a GPU hang with GPU resets disabled (thus causing the GPU to become wedged) and then exercises the various API to check for the expected errors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>