From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A9FB10E636 for ; Fri, 15 Sep 2023 14:38:33 +0000 (UTC) From: Badal Nilawar To: igt-dev@lists.freedesktop.org Date: Fri, 15 Sep 2023 20:15:29 +0530 Message-Id: <20230915144529.2983667-1-badal.nilawar@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t] tests/intel/hwmon: Scale hwmon tests to support xe kmd List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: Scale hwmon tests to support xe kmd Cc: Ashutosh Dixit Signed-off-by: Badal Nilawar --- lib/igt_hwmon.c | 5 ++++- tests/intel/{i915_hwmon.c => intel_hwmon.c} | 10 +++++----- tests/meson.build | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) rename tests/intel/{i915_hwmon.c => intel_hwmon.c} (89%) diff --git a/lib/igt_hwmon.c b/lib/igt_hwmon.c index 309019d69..ad5a388dd 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); diff --git a/tests/intel/i915_hwmon.c b/tests/intel/intel_hwmon.c similarity index 89% rename from tests/intel/i915_hwmon.c rename to tests/intel/intel_hwmon.c index 48ed9f3b7..1cc9cd399 100644 --- a/tests/intel/i915_hwmon.c +++ b/tests/intel/intel_hwmon.c @@ -9,11 +9,11 @@ #include "igt_hwmon.h" #include "igt_sysfs.h" /** - * TEST: i915 hwmon - * Description: Tests for i915 hwmon + * TEST: intel hwmon + * Description: Tests for intel hwmon * Feature: hwmon * Run type: FULL - * Test category: GEM_Legacy + * Test category: functionality * * SUBTEST: hwmon-read * Description: Verify we can read all hwmon attributes @@ -22,7 +22,7 @@ * Description: Verify writable hwmon attributes */ -IGT_TEST_DESCRIPTION("Tests for i915 hwmon"); +IGT_TEST_DESCRIPTION("Tests for intel hwmon"); static void hwmon_read(int hwm) { @@ -79,7 +79,7 @@ igt_main int fd, hwm; igt_fixture { - fd = drm_open_driver_master(DRIVER_INTEL); + fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE); hwm = igt_hwmon_open(fd); igt_require(hwm >= 0); } diff --git a/tests/meson.build b/tests/meson.build index 31492bf7b..cf5c8a2fa 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -84,6 +84,7 @@ test_progs = [ intel_i915_xe_progs = [ 'api_intel_allocator', + 'intel_hwmon', ] intel_i915_progs = [ @@ -218,7 +219,6 @@ intel_i915_progs = [ 'i915_getparams_basic', 'i915_pm_freq_api', 'i915_hangman', - 'i915_hwmon', 'i915_module_load', 'i915_pciid', 'i915_pipe_stress', -- 2.25.1