summaryrefslogtreecommitdiff
path: root/tests/i915/sysfs_preempt_timeout.c
diff options
context:
space:
mode:
authorMatthew Brost <matthew.brost@intel.com>2021-10-05 09:47:46 -0700
committerAshutosh Dixit <ashutosh.dixit@intel.com>2021-11-11 08:43:02 -0800
commit93e3cdbea55741ddbd92c54ffbe07d40c743483e (patch)
tree873bfd268b61ddc51ea129492f980df6b5c0ba5a /tests/i915/sysfs_preempt_timeout.c
parenta37519a6dfe3e75a8d776c73bb69dee85de69847 (diff)
i915/sysfs_preempt_timeout: Update test to work with GuC submission
Increase reset timeout as resets can take a bit longer with GuC submission because an error capture is done and with a large GuC log (16 MB) these take a while. Don't run 'off' section as with GuC submission we don't handle dynamically changing the preemption timeout from 'off' to 'on' on a currently running context. This is not bug in GuC submission rather an architectural decision to not implement this as there is no user aside from IGTs. We don't run this section on any gen12+ platforms as we assume GuC submission on these platforms. v2: (Tvrtko) - Update comment why we are skipping the 'off' section Reviewed-by: John Harrison <John.C.Harrison@Intel.com> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Diffstat (limited to 'tests/i915/sysfs_preempt_timeout.c')
-rw-r--r--tests/i915/sysfs_preempt_timeout.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/i915/sysfs_preempt_timeout.c b/tests/i915/sysfs_preempt_timeout.c
index d176ae72..51503828 100644
--- a/tests/i915/sysfs_preempt_timeout.c
+++ b/tests/i915/sysfs_preempt_timeout.c
@@ -29,6 +29,7 @@
#include <sys/types.h>
#include <unistd.h>
+#include "igt.h"
#include "igt_params.h"
#include "drmtest.h"
#include "i915/gem.h"
@@ -41,7 +42,7 @@
#include "sw_sync.h"
#define ATTR "preempt_timeout_ms"
-#define RESET_TIMEOUT 50 /* milliseconds, at least one jiffie for kworker */
+#define RESET_TIMEOUT 1000 /* milliseconds, at long enough for an error capture */
static bool __enable_hangcheck(int dir, bool state)
{
@@ -254,6 +255,14 @@ static void test_off(int i915, int engine)
gem_quiescent_gpu(i915);
igt_require(enable_hangcheck(i915, false));
+ /*
+ * Not a supported behavior for GuC enabled platforms, assume GuC
+ * submission on gen12+. This isn't strickly true, e.g. TGL does not use
+ * GuC submission, but we are not really losing coverage as this test
+ * isn't not a UMD use case.
+ */
+ igt_require(intel_gen(intel_get_drm_devid(i915)) < 12);
+
igt_assert(igt_sysfs_scanf(engine, "class", "%u", &class) == 1);
igt_assert(igt_sysfs_scanf(engine, "instance", "%u", &inst) == 1);