summaryrefslogtreecommitdiff
path: root/lib/igt_hwmon.c
diff options
context:
space:
mode:
authorBadal Nilawar <badal.nilawar@intel.com>2023-09-18 11:52:48 +0530
committerAnshuman Gupta <anshuman.gupta@intel.com>2023-10-05 13:33:12 +0530
commitd659127c6c91924d767c681947f780fc167e4db3 (patch)
treec1825d963c4ddc1aaae2032713d39ca9e3ed97b9 /lib/igt_hwmon.c
parent2eb58faf82d3cd5e2e74154a7319cff56eb40762 (diff)
tests/intel/hwmon: Scale hwmon tests to support xe kmd
Scale hwmon tests to support xe kmd. v2: s/||/&&. [Riana] Cc: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Badal Nilawar <badal.nilawar@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Diffstat (limited to 'lib/igt_hwmon.c')
-rw-r--r--lib/igt_hwmon.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/igt_hwmon.c b/lib/igt_hwmon.c
index 309019d69..f37ced2d9 100644
--- a/lib/igt_hwmon.c
+++ b/lib/igt_hwmon.c
@@ -66,7 +66,10 @@ int igt_hwmon_open(int device)
{
char path[PATH_MAX];
- if (!is_i915_device(device) || !igt_hwmon_path(device, path, "i915"))
+ if (!is_intel_device(device))
+ return -1;
+
+ if (!igt_hwmon_path(device, path, "i915") && !igt_hwmon_path(device, path, "xe"))
return -1;
return open(path, O_RDONLY);