[PATCH i-g-t 3/6] lib/igt_gt: Make igt_open_forcewake_handle() xe-compatible
Matt Roper
matthew.d.roper at intel.com
Fri Sep 20 17:17:10 UTC 2024
On Wed, Sep 18, 2024 at 09:36:26AM -0700, Lucas De Marchi wrote:
> 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>
Matches the name defined in the kernel.
Reviewed-by: Matt Roper <matthew.d.roper 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
>
--
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation
More information about the igt-dev
mailing list