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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Antonio Argenziano <antonio.argenziano@xxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux