[igt-dev] [PATCH i-g-t 1/1] tests/i915/pxp: PXP debugfs path promoted to global
Alan Previn
alan.previn.teres.alexis at intel.com
Wed Dec 14 23:28:19 UTC 2022
As per recent kernel side update in preparation for
MTL, PXP is not a global i915 subsystem so let's update
the debugfs path to try both the legacy and new paths
before we fail.
Signed-off-by: Alan Previn <alan.previn.teres.alexis at intel.com>
---
tests/i915/gem_pxp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/i915/gem_pxp.c b/tests/i915/gem_pxp.c
index ffad9b5a..cd402c7c 100644
--- a/tests/i915/gem_pxp.c
+++ b/tests/i915/gem_pxp.c
@@ -848,6 +848,14 @@ static void trigger_pxp_debugfs_forced_teardown(int i915)
char str[32];
fd = igt_debugfs_open(i915, "gt/pxp/terminate_state", O_RDWR);
+ /*
+ * At MTL onwards, we promoted PXP to be a global i915 subsystem,
+ * so try again with a top-level path if we failed at the gt path.
+ * If we still fail, then we assert out.
+ */
+ if (fd < 0)
+ fd = igt_debugfs_open(i915, "pxp/terminate_state", O_RDWR);
+
igt_assert_f(fd >= 0, "Can't open pxp termination debugfs\n");
ret = snprintf(str, sizeof(str), "0x1");
igt_assert(ret > 2 && ret < sizeof(str));
base-commit: c001793d5f22deb01918b6ba52af829794582df1
--
2.34.1
More information about the igt-dev
mailing list