[igt-dev] [i-g-t V2 16/40] tests/i915/kms_cdclk: Add XE support

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Apr 25 06:49:29 UTC 2023


Add XE driver support for kms tests.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal at intel.com>
---
 tests/i915/kms_cdclk.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/i915/kms_cdclk.c b/tests/i915/kms_cdclk.c
index bb0036802..0f9b8dc58 100644
--- a/tests/i915/kms_cdclk.c
+++ b/tests/i915/kms_cdclk.c
@@ -65,6 +65,9 @@ static int get_current_cdclk_freq(int debugfs_fd)
 	 * Display specific clock frequency info is moved to i915_cdclk_info,
 	 * On older kernels if this debugfs is not found, fallback to read from
 	 * i915_frequency_info.
+	 *
+	 * FIXME: As of now, XE debugfs is still using i915 namespace, once the
+	 * Kernel changes are landed, update this to use the XE specific debugfs.
 	 */
 	res = igt_debugfs_simple_read(debugfs_fd, "i915_cdclk_info",
 				      buf, sizeof(buf));
@@ -368,7 +371,7 @@ igt_main
 	data_t data = {};
 
 	igt_fixture {
-		data.drm_fd = drm_open_driver_master(DRIVER_INTEL);
+		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
 		igt_require(data.drm_fd >= 0);
 		data.debugfs_fd = igt_debugfs_dir(data.drm_fd);
 		igt_require(data.debugfs_fd);
-- 
2.40.0



More information about the igt-dev mailing list