diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-12-11 13:27:49 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-01-20 13:15:38 +0000 |
commit | 19642c604bb0c987e6e0069974042a98d128b9fc (patch) | |
tree | bfdbbce907b15f0efeb3658be597defe128efcb8 /lib/igt_gt.h | |
parent | 92caf138f2d878429f91397120e215dcb524efac (diff) |
lib: Expand igt_hang_ring() to select target context and various options
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>
Diffstat (limited to 'lib/igt_gt.h')
-rw-r--r-- | lib/igt_gt.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/igt_gt.h b/lib/igt_gt.h index 4f8eff50..3d81ec95 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -30,9 +30,21 @@ void igt_require_hang_ring(int fd, int ring); typedef struct igt_hang_ring { unsigned handle; + unsigned ctx; unsigned ban; + unsigned flags; } igt_hang_ring_t; +#define HANG_POISON 0xc5c5c5c5 + +struct igt_hang_ring igt_hang_ctx(int fd, + uint32_t ctx, + int ring, + unsigned flags, + uint64_t *offset); +#define HANG_ALLOW_BAN 1 +#define HANG_ALLOW_CAPTURE 2 + struct igt_hang_ring igt_hang_ring(int fd, int ring); void igt_post_hang_ring(int fd, struct igt_hang_ring arg); |