@@ -40,6 +40,7 @@
#include "intel_chipset.h"
#define LOCAL_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4
+#define LOCAL_CONTEXT_PARAM_WATCHDOG 0x6
/**
* SECTION:igt_gt
@@ -252,6 +253,12 @@ igt_hang_t igt_hang_ctx(int fd,
__gem_context_set_param(fd, ¶m);
}
+ if (flags & HANG_USE_WATCHDOG) {
+ param.param = LOCAL_CONTEXT_PARAM_WATCHDOG;
+ param.value = 70; // in ms
+ __gem_context_set_param(fd, ¶m);
+ }
+
ban = context_get_ban(fd, ctx);
if ((flags & HANG_ALLOW_BAN) == 0)
@@ -48,6 +48,7 @@ igt_hang_t igt_hang_ctx(int fd,
uint64_t *offset);
#define HANG_ALLOW_BAN BIT(0)
#define HANG_ALLOW_CAPTURE BIT(1)
+#define HANG_USE_WATCHDOG BIT(2)
igt_hang_t igt_hang_ring(int fd, int ring);
void igt_post_hang_ring(int fd, igt_hang_t arg);
Set a watchdog timeout value in a given context. Signed-off-by: Michel Thierry <michel.thierry@intel.com> --- lib/igt_gt.c | 7 +++++++ lib/igt_gt.h | 1 + 2 files changed, 8 insertions(+)