12 Commits

Author SHA1 Message Date
Daniel Vetter
d8d1eab318 lib: igt_fork_hang_helper must be run in fixtures
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-12-04 16:33:58 +01:00
Micah Fedke
c81d293aed convert drm_open_any*() calls to drm_open_driver*(DRIVER_INTEL) calls with cocci
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-11 14:39:43 +01:00
Thomas Wood
f0381d1abe lib: various documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-09-08 16:15:16 +01:00
Damien Lespiau
6ebd8c2dc3 doc: Remove i-g-t/intel prefixes and capitalize section titles
Looks better!

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2015-06-27 16:04:07 +01:00
Chris Wilson
c83299d1fd lib: Use HAS_GPU_RESET rather than opencode our guess
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-06-15 16:05:07 +01:00
Chris Wilson
fb950bc17f lib: Cache static queries
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-04-26 12:18:15 +01:00
Thomas Wood
26f40811d7 lib: small documentation fixes
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-02-25 16:59:22 +00:00
Daniel Vetter
3cd45dec2e lib/igt_gt: Document and consolidate
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-13 09:35:36 +01:00
Daniel Vetter
8d21b39251 lib/ioctls: make gem_context_set/get_param infallible
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-13 09:35:35 +01:00
Daniel Vetter
c18b2d57a9 lib/ioctl: api polish for gem_context_has_param
Just push the igt_require down to align with the usual style.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2015-02-13 09:35:35 +01:00
Daniel Vetter
c66b2425e7 lib/gt: api polish for igt_can_hang_ring
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-02-13 09:35:35 +01:00
Chris Wilson
16bafdf5bf igt/gem_concurrent_blit: Inject hangs before verifying contents
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-07 17:35:14 +00:00