[Intel-gfx] [PATCH i-g-t 5/5] igt_hang_ctx: Add preemptible parameter

Antonio Argenziano antonio.argenziano at intel.com
Thu Dec 7 22:48:23 UTC 2017


This patch adds a parameter to make the hanging context conditionally
pre-emptible.

Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
---
 lib/igt_gt.c | 2 +-
 lib/igt_gt.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index 614fd83b..a36e5506 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -296,7 +296,7 @@ igt_hang_t igt_hang_ctx(int fd, igt_hang_opt_t opts)
 	emit_recursive_batch(&spin, fd, (igt_spin_opt_t){
 			.ctx = opts.ctx,
 			.engine =  opts.ring,
-			.preemptible = false});
+			.preemptible = opts.preemptible});
 
 	if (opts.offset)
 		*opts.offset = spin.gtt_offset;
diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index 3f3e2d96..17fcee33 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -42,6 +42,7 @@ typedef struct igt_hang_opt {
 	int ring;
 	unsigned flags;
 	uint64_t *offset;
+	bool preemptible;
 } igt_hang_opt_t;
 
 igt_hang_t igt_allow_hang(int fd, unsigned ctx, unsigned flags);
-- 
2.14.2



More information about the Intel-gfx mailing list