From 140a67c13aad2595ee6c72e41d14d35a793158b5 Mon Sep 17 00:00:00 2001 From: Antonio Argenziano Date: Tue, 10 Jul 2018 16:45:26 -0700 Subject: lib/gt: Make use of dummyload library to create recursive batch An hanging batch is nothing more than a spinning batch that never gets stopped, so re-use the routines implemented in dummyload.c. v2: Let caller decide spin loop size v3: Only use loose loops for hangs (Chris) v4: No requires v5: Free the spinner v6: Chamelium exists. Signed-off-by: Antonio Argenziano #v3 Signed-off-by: Chris Wilson Reviewed-by: Antonio Argenziano --- lib/igt_gt.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/igt_gt.h') diff --git a/lib/igt_gt.h b/lib/igt_gt.h index d44b7552..54e95da9 100644 --- a/lib/igt_gt.h +++ b/lib/igt_gt.h @@ -25,6 +25,7 @@ #define IGT_GT_H #include "igt_debugfs.h" +#include "igt_dummyload.h" #include "igt_core.h" #include "i915_drm.h" @@ -32,7 +33,7 @@ void igt_require_hang_ring(int fd, int ring); typedef struct igt_hang { - unsigned handle; + igt_spin_t *spin; unsigned ctx; unsigned ban; unsigned flags; @@ -43,11 +44,7 @@ void igt_disallow_hang(int fd, igt_hang_t arg); #define HANG_POISON 0xc5c5c5c5 -igt_hang_t igt_hang_ctx(int fd, - uint32_t ctx, - int ring, - unsigned flags, - uint64_t *offset); +igt_hang_t igt_hang_ctx(int fd, uint32_t ctx, int ring, unsigned flags); #define HANG_ALLOW_BAN 1 #define HANG_ALLOW_CAPTURE 2 -- cgit v1.2.3