Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver
@ 2023-03-23  9:02 Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the " Mauro Carvalho Chehab
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2023-03-23  9:02 UTC (permalink / raw)
  To: igt-dev

From: Mauro Carvalho Chehab <mchehab@kernel.org>

It is interesting to let IGT to unload/reload the Xe driver,
as it can help CI to track track troubles.

Add support for it.

Test documentation:

	==================
	igt@xe_module_load
	==================
	
	:Category: Sofware building block
	:File: tests/xe/xe_module_load.c
	:Sub-category: driver
	:Summary: Tests the xe module loading
	:Test category: functionality test
	
	igt@xe_module_load@force-load
	=============================
	
	:Description: Load the Xe driver passing ``force_probe=*`` parameter
	:Run type: BAT
	
	
	igt@xe_module_load@load
	=======================
	
	:Description: Load the Xe driver
	:Run type: FULL
	
	
	igt@xe_module_load@unload
	=========================
	
	:Description: Unload the Xe driver
	:Run type: FULL
	
	
	igt@xe_module_load@reload
	=========================
	
	:Description: Reload the Xe driver
	:Run type: FULL
	
	
	igt@xe_module_load@reload-no-display
	====================================
	
	:Description: Reload the Xe driver passing ``enable_display=0`` parameter
	:Run type: FULL
	
	
	igt@xe_module_load@many-reload
	==============================
	
	:Description: Reload the Xe driver many times
	:Run type: FULL

---

v4:
- patch 1 broke on two patches, to reduce git diff, making
  easier to review;
- addressed some nitpicks on patch 4.

v3:
- no changes. Just rebased due to a merge conflict.

v2:

- added a patch (already submitted) to shut-up i915 trybot to
  try to run those tests when i915 driver is loaded;
- removed duplication of the unwanted drivers array and declare
  it as const with const strings;
- reordered includes and removed a duplication;
- did some cosmetic changes.

Mauro Carvalho Chehab (4):
  intel-ci: update blacklists to work with the Xe driver
  intel-ci: create a symlink for i915-blacklist.txt
  lib/igt_kmod: add support for Xe driver
  xe/xe_module_load: add a test to load/unload Xe driver

 lib/igt_kmod.c                           |  34 ++---
 lib/igt_kmod.h                           |  32 ++++-
 tests/intel-ci/blacklist.txt             | 130 +----------------
 tests/intel-ci/i915-blacklist.txt        | 133 ++++++++++++++++++
 tests/intel-ci/xe-blacklist.txt          |  21 +++
 tests/intel-ci/xe-fast-feedback.testlist |   3 +
 tests/meson.build                        |   1 +
 tests/xe/xe_module_load.c                | 172 +++++++++++++++++++++++
 8 files changed, 377 insertions(+), 149 deletions(-)
 mode change 100644 => 120000 tests/intel-ci/blacklist.txt
 create mode 100644 tests/intel-ci/i915-blacklist.txt
 create mode 100644 tests/intel-ci/xe-blacklist.txt
 create mode 100644 tests/xe/xe_module_load.c

-- 
2.39.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the Xe driver
  2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
@ 2023-03-23  9:02 ` Mauro Carvalho Chehab
  2023-03-23 12:57   ` Kamil Konieczny
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 2/4] intel-ci: create a symlink for i915-blacklist.txt Mauro Carvalho Chehab
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2023-03-23  9:02 UTC (permalink / raw)
  To: igt-dev

From: Mauro Carvalho Chehab <mchehab@kernel.org>

It doesn't make sense to run i915 tests with Xe driver and
vice-versa. Update testlists to make it clear.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 .../{blacklist.txt => i915-blacklist.txt}     |  4 ++++
 tests/intel-ci/xe-blacklist.txt               | 21 +++++++++++++++++++
 2 files changed, 25 insertions(+)
 rename tests/intel-ci/{blacklist.txt => i915-blacklist.txt} (97%)
 create mode 100644 tests/intel-ci/xe-blacklist.txt

diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/i915-blacklist.txt
similarity index 97%
rename from tests/intel-ci/blacklist.txt
rename to tests/intel-ci/i915-blacklist.txt
index 6e5cc43667cf..389a2acb7f44 100644
--- a/tests/intel-ci/blacklist.txt
+++ b/tests/intel-ci/i915-blacklist.txt
@@ -84,6 +84,10 @@ igt@kms_chamelium_frames@hdmi-.*-planes-random
 igt@vc4_.*
 igt@v3d_.*
 ###############################################
+# Intel Xe
+###############################################
+igt@xe/.*
+###############################################
 # AMD
 ###############################################
 igt@amdgpu/.*
diff --git a/tests/intel-ci/xe-blacklist.txt b/tests/intel-ci/xe-blacklist.txt
new file mode 100644
index 000000000000..986e91a67069
--- /dev/null
+++ b/tests/intel-ci/xe-blacklist.txt
@@ -0,0 +1,21 @@
+###############################################
+# Broadcom
+###############################################
+igt@vc4_.*
+igt@v3d_.*
+###############################################
+# Intel i915
+###############################################
+igt@i915/.*
+###############################################
+# AMD
+###############################################
+igt@amdgpu/.*
+###############################################
+# Panfrost
+###############################################
+igt@panfrost_.*
+###############################################
+# Qualcomm
+###############################################
+igt@msm_.*
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t v4 2/4] intel-ci: create a symlink for i915-blacklist.txt
  2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the " Mauro Carvalho Chehab
@ 2023-03-23  9:02 ` Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 3/4] lib/igt_kmod: add support for Xe driver Mauro Carvalho Chehab
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2023-03-23  9:02 UTC (permalink / raw)
  To: igt-dev

From: Mauro Carvalho Chehab <mchehab@kernel.org>

In order to avoid disrupts at exiting intel-ci tests, keep a
symlink to the i915 blacklist:

	i915-blacklist.txt -> blacklist.txt

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 tests/intel-ci/blacklist.txt | 1 +
 1 file changed, 1 insertion(+)
 create mode 120000 tests/intel-ci/blacklist.txt

diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/blacklist.txt
new file mode 120000
index 000000000000..e48e29e27f4e
--- /dev/null
+++ b/tests/intel-ci/blacklist.txt
@@ -0,0 +1 @@
+i915-blacklist.txt
\ No newline at end of file
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t v4 3/4] lib/igt_kmod: add support for Xe driver
  2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the " Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 2/4] intel-ci: create a symlink for i915-blacklist.txt Mauro Carvalho Chehab
@ 2023-03-23  9:02 ` Mauro Carvalho Chehab
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload " Mauro Carvalho Chehab
  2023-03-23  9:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for xe/xe_module_load: add a test to load/unload Xe driver (rev4) Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2023-03-23  9:02 UTC (permalink / raw)
  To: igt-dev

From: Mauro Carvalho Chehab <mchehab@kernel.org>

Change the kmod logic to also work with the Xe driver.

Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 lib/igt_kmod.c | 34 +++++++++++++++++-----------------
 lib/igt_kmod.h | 32 +++++++++++++++++++++++++++++---
 2 files changed, 46 insertions(+), 20 deletions(-)

diff --git a/lib/igt_kmod.c b/lib/igt_kmod.c
index 6d6ecf0187ed..ccf0063ca1b1 100644
--- a/lib/igt_kmod.c
+++ b/lib/igt_kmod.c
@@ -404,23 +404,23 @@ static void *strdup_realloc(char *origptr, const char *strdata)
 }
 
 /**
- * igt_i915_driver_load:
- * @opts: options to pass to i915 driver
+ * igt_intel_driver_load:
+ * @opts: options to pass to Intel driver
  *
- * Loads the i915 driver and its dependencies.
+ * Loads an Intel driver and its dependencies.
  *
  */
 int
-igt_i915_driver_load(const char *opts)
+igt_intel_driver_load(const char *opts, const char *driver)
 {
 	int ret;
 
 	if (opts)
-		igt_info("Reloading i915 with %s\n\n", opts);
+		igt_info("Reloading %s with %s\n\n", driver, opts);
 
-	ret = igt_kmod_load("i915", opts);
+	ret = igt_kmod_load(driver, opts);
 	if (ret) {
-		igt_debug("Could not load i915\n");
+		igt_debug("Could not load %s\n", driver);
 		return ret;
 	}
 
@@ -496,7 +496,7 @@ int igt_audio_driver_unload(char **who)
 	return igt_always_unload_audio_driver(who);
 }
 
-int __igt_i915_driver_unload(char **who)
+int __igt_intel_driver_unload(char **who, const char *driver)
 {
 	int ret;
 
@@ -530,11 +530,11 @@ int __igt_i915_driver_unload(char **who)
 		}
 	}
 
-	if (igt_kmod_is_loaded("i915")) {
-		ret = igt_kmod_unload("i915", 0);
+	if (igt_kmod_is_loaded(driver)) {
+		ret = igt_kmod_unload(driver, 0);
 		if (ret) {
 			if (who)
-				*who = strdup_realloc(*who, "i915");
+				*who = strdup_realloc(*who, driver);
 
 			return ret;
 		}
@@ -544,18 +544,18 @@ int __igt_i915_driver_unload(char **who)
 }
 
 /**
- * igt_i915_driver_unload:
+ * igt_intel_driver_unload:
  *
- * Unloads the i915 driver and its dependencies.
+ * Unloads an Intel driver and its dependencies.
  *
  */
 int
-igt_i915_driver_unload(void)
+igt_intel_driver_unload(const char *driver)
 {
 	char *who = NULL;
 	int ret;
 
-	ret = __igt_i915_driver_unload(&who);
+	ret = __igt_intel_driver_unload(&who, driver);
 	if (ret) {
 		igt_warn("Could not unload %s\n", who);
 		igt_kmod_list_loaded();
@@ -572,8 +572,8 @@ igt_i915_driver_unload(void)
 	igt_kmod_unload("drm_kms_helper", 0);
 	igt_kmod_unload("drm", 0);
 
-	if (igt_kmod_is_loaded("i915")) {
-		igt_warn("i915.ko still loaded!\n");
+	if (igt_kmod_is_loaded("driver")) {
+		igt_warn("%s.ko still loaded!\n", driver);
 		return -EBUSY;
 	}
 
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index f98dd29fb175..d05af4a69410 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -38,9 +38,35 @@ int igt_kmod_unload(const char *mod_name, unsigned int flags);
 
 int igt_audio_driver_unload(char **whom);
 
-int igt_i915_driver_load(const char *opts);
-int igt_i915_driver_unload(void);
-int __igt_i915_driver_unload(char **whom);
+int igt_intel_driver_load(const char *opts, const char *driver);
+int igt_intel_driver_unload(const char *driver);
+int __igt_intel_driver_unload(char **who, const char *driver);
+
+static inline int igt_i915_driver_load(const char *opts)
+{
+	return igt_intel_driver_load(opts, "i915");
+}
+
+static inline int igt_i915_driver_unload(void)
+{
+	return igt_intel_driver_unload("i915");
+}
+
+static inline int __igt_i915_driver_unload(char **whom)
+{
+	return __igt_intel_driver_unload(whom, "i915");
+};
+
+static inline int igt_xe_driver_load(const char *opts)
+{
+	return igt_intel_driver_load(opts, "xe");
+}
+
+
+static inline int igt_xe_driver_unload(void)
+{
+	return igt_intel_driver_unload("xe");
+}
 
 int igt_amdgpu_driver_load(const char *opts);
 int igt_amdgpu_driver_unload(void);
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload Xe driver
  2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
                   ` (2 preceding siblings ...)
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 3/4] lib/igt_kmod: add support for Xe driver Mauro Carvalho Chehab
@ 2023-03-23  9:02 ` Mauro Carvalho Chehab
  2023-03-23 11:24   ` Kamil Konieczny
  2023-03-23  9:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for xe/xe_module_load: add a test to load/unload Xe driver (rev4) Patchwork
  4 siblings, 1 reply; 8+ messages in thread
From: Mauro Carvalho Chehab @ 2023-03-23  9:02 UTC (permalink / raw)
  To: igt-dev

From: Mauro Carvalho Chehab <mchehab@kernel.org>

This is helpful to allow IGT to check if there are issues
during module load/unload.

Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 tests/intel-ci/xe-fast-feedback.testlist |   3 +
 tests/meson.build                        |   1 +
 tests/xe/xe_module_load.c                | 172 +++++++++++++++++++++++
 3 files changed, 176 insertions(+)
 create mode 100644 tests/xe/xe_module_load.c

diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
index 6525b1676b6f..3140d648833a 100644
--- a/tests/intel-ci/xe-fast-feedback.testlist
+++ b/tests/intel-ci/xe-fast-feedback.testlist
@@ -1,3 +1,6 @@
+# Should be the first test
+igt@xe_module_load@force-load
+
 igt@xe_compute@compute-square
 igt@xe_debugfs@base
 igt@xe_debugfs@gt
diff --git a/tests/meson.build b/tests/meson.build
index 2e62ff231416..9235d240fd85 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -256,6 +256,7 @@ xe_progs = [
 	'xe_huc_copy',
 	'xe_mmap',
 	'xe_mmio',
+	'xe_module_load',
 	'xe_noexec_ping_pong',
 	'xe_pm',
 	'xe_prime_self_import',
diff --git a/tests/xe/xe_module_load.c b/tests/xe/xe_module_load.c
new file mode 100644
index 000000000000..c2d43cc20532
--- /dev/null
+++ b/tests/xe/xe_module_load.c
@@ -0,0 +1,172 @@
+// SPDX-License-Identifier: MIT
+/*
+ * Copyright © 2023 Intel Corporation
+ */
+
+/**
+ * TEST: Tests the xe module loading
+ * Category: Sofware building block
+ * Sub-category: driver
+ * Test category: functionality test
+ */
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <libgen.h>
+
+#ifdef __linux__
+#include <linux/limits.h>
+#endif
+
+#include <signal.h>
+
+#include <sys/ioctl.h>
+#include <sys/utsname.h>
+
+#include "igt.h"
+
+#include "igt_aux.h"
+#include "igt_core.h"
+#include "igt_debugfs.h"
+#include "igt_kmod.h"
+#include "igt_sysfs.h"
+
+#define BAR_SIZE_SHIFT 20
+#define MIN_BAR_SIZE 256
+
+static void file_write(const char *ptr, size_t size, size_t nmemb,
+                       FILE *fp)
+{
+	int count;
+
+	count = fwrite(ptr, size, nmemb, fp);
+	if (count == size * nmemb)
+		return;
+
+	igt_debug("Can't update hda dynamic debug with : %s\n", ptr);
+}
+
+static void hda_dynamic_debug(bool enable)
+{
+	FILE *fp;
+	static const char snd_hda_intel_on[] = "module snd_hda_intel +pf";
+	static const char snd_hda_core_on[] = "module snd_hda_core +pf";
+
+	static const char snd_hda_intel_off[] = "module snd_hda_intel =_";
+	static const char snd_hda_core_off[] = "module snd_hda_core =_";
+
+	fp = fopen("/sys/kernel/debug/dynamic_debug/control", "w");
+	if (!fp) {
+		igt_debug("hda dynamic debug not available\n");
+		return;
+	}
+
+	if (enable) {
+		file_write(snd_hda_intel_on, 1, sizeof(snd_hda_intel_on), fp);
+		file_write(snd_hda_core_on, 1, sizeof(snd_hda_core_on), fp);
+	} else {
+		file_write(snd_hda_intel_off, 1, sizeof(snd_hda_intel_off), fp);
+		file_write(snd_hda_core_off, 1, sizeof(snd_hda_core_off), fp);
+	}
+
+	fclose(fp);
+}
+
+static void load_and_check_xe(const char *opts)
+{
+	int error;
+	int drm_fd;
+
+	hda_dynamic_debug(true);
+	error = igt_xe_driver_load(opts);
+	hda_dynamic_debug(false);
+
+	igt_assert_eq(error, 0);
+
+	/* driver is ready, check if it's bound */
+	drm_fd = __drm_open_driver(DRIVER_XE);
+	igt_fail_on_f(drm_fd < 0, "Cannot open the xe DRM driver after modprobing xe.\n");
+	close(drm_fd);
+}
+
+static const char * const unwanted_drivers[] = {
+	"xe",
+	"i915",
+	NULL
+};
+
+/**
+ * SUBTEST: force-load
+ * Description: Load the Xe driver passing ``force_probe=*`` parameter
+ * Run type: BAT
+ *
+ * SUBTEST: load
+ * Description: Load the Xe driver
+ * Run type: FULL
+ *
+ * SUBTEST: unload
+ * Description: Unload the Xe driver
+ * Run type: FULL
+ *
+ * SUBTEST: reload
+ * Description: Reload the Xe driver
+ * Run type: FULL
+ *
+ * SUBTEST: reload-no-display
+ * Description: Reload the Xe driver passing ``enable_display=0`` parameter
+ * Run type: FULL
+ *
+ * SUBTEST: many-reload
+ * Description: Reload the Xe driver many times
+ * Run type: FULL
+ */
+igt_main
+{
+	igt_describe("Check if xe and friends are not yet loaded, then load them.");
+	igt_subtest("load") {
+		for (int i = 0; unwanted_drivers[i] != NULL; i++) {
+			igt_skip_on_f(igt_kmod_is_loaded(unwanted_drivers[i]),
+				      "%s is already loaded\n", unwanted_drivers[i]);
+		}
+
+		load_and_check_xe(NULL);
+	}
+
+	igt_subtest("unload") {
+		igt_xe_driver_unload();
+	}
+
+	igt_subtest("force-load") {
+		for (int i = 0; unwanted_drivers[i] != NULL; i++) {
+			igt_skip_on_f(igt_kmod_is_loaded(unwanted_drivers[i]),
+				      "%s is already loaded\n", unwanted_drivers[i]);
+		}
+
+		load_and_check_xe("force_probe=*");
+	}
+
+	igt_subtest("reload-no-display") {
+		igt_xe_driver_unload();
+		load_and_check_xe("enable_display=0");
+	}
+
+	igt_subtest("many-reload") {
+		int i;
+
+		for (i = 0; i < 10; i++) {
+			igt_debug("reload cycle: %d\n", i);
+			igt_xe_driver_unload();
+			load_and_check_xe(NULL);
+			sleep(1);
+		}
+	}
+
+	igt_subtest("reload") {
+		igt_xe_driver_unload();
+		load_and_check_xe(NULL);
+
+		/* only default modparams, can leave module loaded */
+	}
+
+	/* Subtests should unload the module themselves if they use modparams */
+}
-- 
2.39.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [igt-dev] ✗ Fi.CI.BAT: failure for xe/xe_module_load: add a test to load/unload Xe driver (rev4)
  2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
                   ` (3 preceding siblings ...)
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload " Mauro Carvalho Chehab
@ 2023-03-23  9:38 ` Patchwork
  4 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2023-03-23  9:38 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 4022 bytes --]

== Series Details ==

Series: xe/xe_module_load: add a test to load/unload Xe driver (rev4)
URL   : https://patchwork.freedesktop.org/series/115511/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12903 -> IGTPW_8667
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_8667 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_8667, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/index.html

Participating hosts (36 -> 36)
------------------------------

  Additional (1): fi-pnv-d510 
  Missing    (1): fi-snb-2520m 

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_8667:

### IGT changes ###

#### Possible regressions ####

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1:
    - bat-dg2-8:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12903/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence@pipe-d-dp-1.html

  
Known issues
------------

  Here are the changes found in IGTPW_8667 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@i915_selftest@live@gt_lrc:
    - bat-rpls-2:         [PASS][3] -> [INCOMPLETE][4] ([i915#4983] / [i915#7913])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12903/bat-rpls-2/igt@i915_selftest@live@gt_lrc.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/bat-rpls-2/igt@i915_selftest@live@gt_lrc.html

  * igt@i915_selftest@live@reset:
    - bat-rpls-1:         [PASS][5] -> [ABORT][6] ([i915#4983])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12903/bat-rpls-1/igt@i915_selftest@live@reset.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/bat-rpls-1/igt@i915_selftest@live@reset.html

  * igt@kms_pipe_crc_basic@read-crc:
    - bat-dg2-11:         NOTRUN -> [SKIP][7] ([i915#5354])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/bat-dg2-11/igt@kms_pipe_crc_basic@read-crc.html

  * igt@kms_psr@primary_page_flip:
    - fi-pnv-d510:        NOTRUN -> [SKIP][8] ([fdo#109271]) +38 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/fi-pnv-d510/igt@kms_psr@primary_page_flip.html

  
#### Possible fixes ####

  * igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-1:
    - bat-dg2-8:          [FAIL][9] -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12903/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-1.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/bat-dg2-8/igt@kms_pipe_crc_basic@nonblocking-crc@pipe-d-dp-1.html

  
  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [i915#4983]: https://gitlab.freedesktop.org/drm/intel/issues/4983
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#7913]: https://gitlab.freedesktop.org/drm/intel/issues/7913


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_7211 -> IGTPW_8667

  CI-20190529: 20190529
  CI_DRM_12903: 08c3a5cb8ecc67b7251e5c2b127e8778cc4deab0 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_8667: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/index.html
  IGT_7211: c0cc1de7b2f4041ca68960362aa55f881d416bac @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

+igt@xe_module_load@force-load
+igt@xe_module_load@load
+igt@xe_module_load@many-reload
+igt@xe_module_load@reload
+igt@xe_module_load@reload-no-display
+igt@xe_module_load@unload

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_8667/index.html

[-- Attachment #2: Type: text/html, Size: 4866 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload Xe driver
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload " Mauro Carvalho Chehab
@ 2023-03-23 11:24   ` Kamil Konieczny
  0 siblings, 0 replies; 8+ messages in thread
From: Kamil Konieczny @ 2023-03-23 11:24 UTC (permalink / raw)
  To: igt-dev

On 2023-03-23 at 10:02:21 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> This is helpful to allow IGT to check if there are issues
> during module load/unload.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>

> ---
>  tests/intel-ci/xe-fast-feedback.testlist |   3 +
>  tests/meson.build                        |   1 +
>  tests/xe/xe_module_load.c                | 172 +++++++++++++++++++++++
>  3 files changed, 176 insertions(+)
>  create mode 100644 tests/xe/xe_module_load.c
> 
> diff --git a/tests/intel-ci/xe-fast-feedback.testlist b/tests/intel-ci/xe-fast-feedback.testlist
> index 6525b1676b6f..3140d648833a 100644
> --- a/tests/intel-ci/xe-fast-feedback.testlist
> +++ b/tests/intel-ci/xe-fast-feedback.testlist
> @@ -1,3 +1,6 @@
> +# Should be the first test
> +igt@xe_module_load@force-load
> +
>  igt@xe_compute@compute-square
>  igt@xe_debugfs@base
>  igt@xe_debugfs@gt
> diff --git a/tests/meson.build b/tests/meson.build
> index 2e62ff231416..9235d240fd85 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -256,6 +256,7 @@ xe_progs = [
>  	'xe_huc_copy',
>  	'xe_mmap',
>  	'xe_mmio',
> +	'xe_module_load',
>  	'xe_noexec_ping_pong',
>  	'xe_pm',
>  	'xe_prime_self_import',
> diff --git a/tests/xe/xe_module_load.c b/tests/xe/xe_module_load.c
> new file mode 100644
> index 000000000000..c2d43cc20532
> --- /dev/null
> +++ b/tests/xe/xe_module_load.c
> @@ -0,0 +1,172 @@
> +// SPDX-License-Identifier: MIT
> +/*
> + * Copyright © 2023 Intel Corporation
> + */
> +
> +/**
> + * TEST: Tests the xe module loading
> + * Category: Sofware building block
> + * Sub-category: driver
> + * Test category: functionality test
> + */
> +
> +#include <dirent.h>
> +#include <fcntl.h>
> +#include <libgen.h>
> +
> +#ifdef __linux__
> +#include <linux/limits.h>
> +#endif
> +
> +#include <signal.h>
> +
> +#include <sys/ioctl.h>
> +#include <sys/utsname.h>
> +
> +#include "igt.h"
> +
> +#include "igt_aux.h"
> +#include "igt_core.h"
> +#include "igt_debugfs.h"
> +#include "igt_kmod.h"
> +#include "igt_sysfs.h"
> +
> +#define BAR_SIZE_SHIFT 20
> +#define MIN_BAR_SIZE 256
> +
> +static void file_write(const char *ptr, size_t size, size_t nmemb,
> +                       FILE *fp)
> +{
> +	int count;
> +
> +	count = fwrite(ptr, size, nmemb, fp);
> +	if (count == size * nmemb)
> +		return;
> +
> +	igt_debug("Can't update hda dynamic debug with : %s\n", ptr);
> +}
> +
> +static void hda_dynamic_debug(bool enable)
> +{
> +	FILE *fp;
> +	static const char snd_hda_intel_on[] = "module snd_hda_intel +pf";
> +	static const char snd_hda_core_on[] = "module snd_hda_core +pf";
> +
> +	static const char snd_hda_intel_off[] = "module snd_hda_intel =_";
> +	static const char snd_hda_core_off[] = "module snd_hda_core =_";
> +
> +	fp = fopen("/sys/kernel/debug/dynamic_debug/control", "w");
> +	if (!fp) {
> +		igt_debug("hda dynamic debug not available\n");
> +		return;
> +	}
> +
> +	if (enable) {
> +		file_write(snd_hda_intel_on, 1, sizeof(snd_hda_intel_on), fp);
> +		file_write(snd_hda_core_on, 1, sizeof(snd_hda_core_on), fp);
> +	} else {
> +		file_write(snd_hda_intel_off, 1, sizeof(snd_hda_intel_off), fp);
> +		file_write(snd_hda_core_off, 1, sizeof(snd_hda_core_off), fp);
> +	}
> +
> +	fclose(fp);
> +}
> +
> +static void load_and_check_xe(const char *opts)
> +{
> +	int error;
> +	int drm_fd;
> +
> +	hda_dynamic_debug(true);
> +	error = igt_xe_driver_load(opts);
> +	hda_dynamic_debug(false);
> +
> +	igt_assert_eq(error, 0);
> +
> +	/* driver is ready, check if it's bound */
> +	drm_fd = __drm_open_driver(DRIVER_XE);
> +	igt_fail_on_f(drm_fd < 0, "Cannot open the xe DRM driver after modprobing xe.\n");
> +	close(drm_fd);
> +}
> +
> +static const char * const unwanted_drivers[] = {
> +	"xe",
> +	"i915",
> +	NULL
> +};
> +
> +/**
> + * SUBTEST: force-load
> + * Description: Load the Xe driver passing ``force_probe=*`` parameter
> + * Run type: BAT
> + *
> + * SUBTEST: load
> + * Description: Load the Xe driver
> + * Run type: FULL
> + *
> + * SUBTEST: unload
> + * Description: Unload the Xe driver
> + * Run type: FULL
> + *
> + * SUBTEST: reload
> + * Description: Reload the Xe driver
> + * Run type: FULL
> + *
> + * SUBTEST: reload-no-display
> + * Description: Reload the Xe driver passing ``enable_display=0`` parameter
> + * Run type: FULL
> + *
> + * SUBTEST: many-reload
> + * Description: Reload the Xe driver many times
> + * Run type: FULL
> + */
> +igt_main
> +{
> +	igt_describe("Check if xe and friends are not yet loaded, then load them.");
> +	igt_subtest("load") {
> +		for (int i = 0; unwanted_drivers[i] != NULL; i++) {
> +			igt_skip_on_f(igt_kmod_is_loaded(unwanted_drivers[i]),
> +				      "%s is already loaded\n", unwanted_drivers[i]);
> +		}
> +
> +		load_and_check_xe(NULL);
> +	}
> +
> +	igt_subtest("unload") {
> +		igt_xe_driver_unload();
> +	}
> +
> +	igt_subtest("force-load") {
> +		for (int i = 0; unwanted_drivers[i] != NULL; i++) {
> +			igt_skip_on_f(igt_kmod_is_loaded(unwanted_drivers[i]),
> +				      "%s is already loaded\n", unwanted_drivers[i]);
> +		}
> +
> +		load_and_check_xe("force_probe=*");
> +	}
> +
> +	igt_subtest("reload-no-display") {
> +		igt_xe_driver_unload();
> +		load_and_check_xe("enable_display=0");
> +	}
> +
> +	igt_subtest("many-reload") {
> +		int i;
> +
> +		for (i = 0; i < 10; i++) {
> +			igt_debug("reload cycle: %d\n", i);
> +			igt_xe_driver_unload();
> +			load_and_check_xe(NULL);
> +			sleep(1);
> +		}
> +	}
> +
> +	igt_subtest("reload") {
> +		igt_xe_driver_unload();
> +		load_and_check_xe(NULL);
> +
> +		/* only default modparams, can leave module loaded */
> +	}
> +
> +	/* Subtests should unload the module themselves if they use modparams */
> +}
> -- 
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the Xe driver
  2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the " Mauro Carvalho Chehab
@ 2023-03-23 12:57   ` Kamil Konieczny
  0 siblings, 0 replies; 8+ messages in thread
From: Kamil Konieczny @ 2023-03-23 12:57 UTC (permalink / raw)
  To: igt-dev

Hi Mauro,

On 2023-03-23 at 10:02:18 +0100, Mauro Carvalho Chehab wrote:
> From: Mauro Carvalho Chehab <mchehab@kernel.org>
> 
> It doesn't make sense to run i915 tests with Xe driver and
> vice-versa. Update testlists to make it clear.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
>  .../{blacklist.txt => i915-blacklist.txt}     |  4 ++++
>  tests/intel-ci/xe-blacklist.txt               | 21 +++++++++++++++++++
>  2 files changed, 25 insertions(+)
>  rename tests/intel-ci/{blacklist.txt => i915-blacklist.txt} (97%)
>  create mode 100644 tests/intel-ci/xe-blacklist.txt

imho we do not need symlink here but if you want to discuss it
please split this move to i915-blacklist.txt and 2/4 into
separate patchseries, so we will not block merging changes to
xe-blacklist.txt and adding igt@xe_.* to blacklist.txt

> 
> diff --git a/tests/intel-ci/blacklist.txt b/tests/intel-ci/i915-blacklist.txt
> similarity index 97%
> rename from tests/intel-ci/blacklist.txt
> rename to tests/intel-ci/i915-blacklist.txt
> index 6e5cc43667cf..389a2acb7f44 100644
> --- a/tests/intel-ci/blacklist.txt
> +++ b/tests/intel-ci/i915-blacklist.txt
> @@ -84,6 +84,10 @@ igt@kms_chamelium_frames@hdmi-.*-planes-random
>  igt@vc4_.*
>  igt@v3d_.*
>  ###############################################
> +# Intel Xe
> +###############################################
> +igt@xe/.*
-------- ^
There is no xe subdirectory with xe tests, all binaries are
named xe_* and are placed in build/tests/

This should be:

igt@xe_.*

> +###############################################
>  # AMD
>  ###############################################
>  igt@amdgpu/.*

See here, all amdgpu binaries are in this subfolder, so '/'
is used.

> diff --git a/tests/intel-ci/xe-blacklist.txt b/tests/intel-ci/xe-blacklist.txt
> new file mode 100644
> index 000000000000..986e91a67069
> --- /dev/null
> +++ b/tests/intel-ci/xe-blacklist.txt
> @@ -0,0 +1,21 @@
> +###############################################
> +# Broadcom
> +###############################################
> +igt@vc4_.*
> +igt@v3d_.*
> +###############################################
> +# Intel i915
> +###############################################
> +igt@i915/.*
---------- ^
Same here,

igt@i915_.*

Add also:

igt@gem.*
igt@gen.*

imho look at tests/i915, we should really put all that here
in alphabetical order and with regexp where possible to make
it as short as possible.

Regards,
Kamil

> +###############################################
> +# AMD
> +###############################################
> +igt@amdgpu/.*
> +###############################################
> +# Panfrost
> +###############################################
> +igt@panfrost_.*
> +###############################################
> +# Qualcomm
> +###############################################
> +igt@msm_.*
> -- 
> 2.39.2
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-23 12:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23  9:02 [igt-dev] [PATCH i-g-t v4 0/4] xe/xe_module_load: add a test to load/unload Xe driver Mauro Carvalho Chehab
2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 1/4] intel-ci: update blacklists to work with the " Mauro Carvalho Chehab
2023-03-23 12:57   ` Kamil Konieczny
2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 2/4] intel-ci: create a symlink for i915-blacklist.txt Mauro Carvalho Chehab
2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 3/4] lib/igt_kmod: add support for Xe driver Mauro Carvalho Chehab
2023-03-23  9:02 ` [igt-dev] [PATCH i-g-t v4 4/4] xe/xe_module_load: add a test to load/unload " Mauro Carvalho Chehab
2023-03-23 11:24   ` Kamil Konieczny
2023-03-23  9:38 ` [igt-dev] ✗ Fi.CI.BAT: failure for xe/xe_module_load: add a test to load/unload Xe driver (rev4) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox