[PATCH i-g-t 3/6] lib/igt_gt: Make igt_open_forcewake_handle() xe-compatible
Lucas De Marchi
lucas.demarchi at intel.com
Wed Sep 18 16:36:26 UTC 2024
xe uses a different file to hold forcewake. Make
igt_open_forcewake_handle() compatible.
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
lib/igt_gt.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lib/igt_gt.c b/lib/igt_gt.c
index d831d2448..c84368fbd 100644
--- a/lib/igt_gt.c
+++ b/lib/igt_gt.c
@@ -502,9 +502,17 @@ void igt_stop_hang_helper(void)
*/
int igt_open_forcewake_handle(int fd)
{
+ const char *fn;
+
if (getenv("IGT_NO_FORCEWAKE"))
return -1;
- return igt_debugfs_open(fd, "i915_forcewake_user", O_RDONLY);
+
+ if (is_xe_device(fd))
+ fn = "forcewake_all";
+ else
+ fn = "i915_forcewake_user";
+
+ return igt_debugfs_open(fd, fn, O_RDONLY);
}
#if defined(__x86_64__) || defined(__i386__)
--
2.46.1
More information about the igt-dev
mailing list