[PATCH i-g-t] tests/core_hotunplug: Disable GPU reset
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Thu Sep 24 10:53:00 UTC 2020
Try to run the test with GPU reset disabled.
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik at linux.intel.com>
---
Trybot only submission, not intended for upstream.
tests/core_hotunplug.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 67e67627f..b97f04a37 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -313,6 +313,10 @@ static void node_healthcheck(struct hotunplug *priv, unsigned flags)
else
priv->failure = NULL;
+ if (gem_gpu_reset_enabled(fd_drm))
+ igt_assert(igt_params_set(fd_drm, "reset", "%d", 0));
+ igt_fail_on(gem_gpu_reset_enabled(fd_drm));
+
} else {
/* no device specific healthcheck, rely on reopen result */
priv->failure = NULL;
@@ -387,6 +391,12 @@ static void unbind_rebind(struct hotunplug *priv)
igt_assert_eq(priv->fd.drm, -1);
igt_assert_eq(priv->fd.drm_hc, -1);
+ priv->fd.drm = __drm_open_driver(DRIVER_ANY);
+ igt_assert_fd(priv->fd.drm);
+ igt_fail_on(gem_gpu_reset_enabled(priv->fd.drm));
+ priv->fd.drm = close(priv->fd.drm) ? -errno : -1;
+ igt_assert_eq(priv->fd.drm, -1);
+
driver_unbind(priv, "", 0);
driver_bind(priv, 0);
@@ -411,6 +421,7 @@ static void hotunbind_rebind(struct hotunplug *priv)
igt_assert_eq(priv->fd.drm, -1);
igt_assert_eq(priv->fd.drm_hc, -1);
priv->fd.drm = local_drm_open_driver(false, "", " for hot unbind");
+ igt_fail_on(gem_gpu_reset_enabled(priv->fd.drm));
driver_unbind(priv, "hot ", 0);
@@ -443,6 +454,7 @@ static void hotrebind_lateclose(struct hotunplug *priv)
igt_assert_eq(priv->fd.drm, -1);
igt_assert_eq(priv->fd.drm_hc, -1);
priv->fd.drm = local_drm_open_driver(false, "", " for hot rebind");
+ igt_fail_on(gem_gpu_reset_enabled(priv->fd.drm));
driver_unbind(priv, "hot ", 60);
@@ -494,6 +506,9 @@ igt_main
gem_quiescent_gpu(fd_drm);
igt_require_gem(fd_drm);
+ igt_assert(igt_params_save_and_set(fd_drm, "reset",
+ "%d", 0));
+ igt_fail_on(gem_gpu_reset_enabled(fd_drm));
/**
* FIXME: Unbinding the i915 driver on some Haswell
--
2.21.1
More information about the Intel-gfx-trybot
mailing list