Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 i-g-t] tests/xe_exec_threads: Make hang tests reset domain aware
@ 2024-04-02 12:22 Tejas Upadhyay
  2024-04-02 12:15 ` ✗ CI.Patch_applied: failure for " Patchwork
  2024-04-02 19:40 ` [PATCH V2 i-g-t] " Matt Roper
  0 siblings, 2 replies; 18+ messages in thread
From: Tejas Upadhyay @ 2024-04-02 12:22 UTC (permalink / raw)
  To: igt-dev; +Cc: intel-xe, Matthew Brost, Tejas Upadhyay

RCS/CCS are dependent engines as they are sharing reset
domain. Whenever there is reset from CCS, all the exec queues
running on RCS are victimised mainly on Lunarlake.

Lets skip parallel execution on CCS with RCS.

It helps in fixing following errors:
1. Test assertion failure function test_legacy_mode, file, Failed assertion: data[i].data == 0xc0ffee

2.Test assertion failure function xe_exec, file ../lib/xe/xe_ioctl.c, Failed assertion: __xe_exec(fd, exec) == 0, error: -125 != 0

Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
---
 tests/intel/xe_exec_threads.c | 26 +++++++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_exec_threads.c b/tests/intel/xe_exec_threads.c
index 8083980f9..31af61dc9 100644
--- a/tests/intel/xe_exec_threads.c
+++ b/tests/intel/xe_exec_threads.c
@@ -710,6 +710,17 @@ static void *thread(void *data)
 	return NULL;
 }
 
+static bool is_engine_contexts_victimized(int fd, unsigned int flags)
+{
+	if (!IS_LUNARLAKE(intel_get_drm_devid(fd)))
+		return false;
+
+	if (flags & HANG)
+		return true;
+
+	return false;
+}
+
 /**
  * SUBTEST: threads-%s
  * Description: Run threads %arg[1] test with multi threads
@@ -955,9 +966,13 @@ static void threads(int fd, int flags)
 	bool go = false;
 	int n_threads = 0;
 	int gt;
+	bool has_rcs = false;
 
-	xe_for_each_engine(fd, hwe)
+	xe_for_each_engine(fd, hwe) {
+		if (hwe->engine_class == DRM_XE_ENGINE_CLASS_RENDER)
+			has_rcs = true;
 		++n_engines;
+	}
 
 	if (flags & BALANCER) {
 		xe_for_each_gt(fd, gt)
@@ -990,6 +1005,15 @@ static void threads(int fd, int flags)
 	}
 
 	xe_for_each_engine(fd, hwe) {
+		/* RCS/CCS sharing reset domain hence dependent engines.
+		 * When CCS is doing reset, all the contexts of RCS are
+		 * victimized, so skip the compute engine avoiding
+		 * parallel execution with RCS
+		 */
+		if (has_rcs && hwe->engine_class == DRM_XE_ENGINE_CLASS_COMPUTE &&
+		    is_engine_contexts_victimized(fd, flags))
+			continue;
+
 		threads_data[i].mutex = &mutex;
 		threads_data[i].cond = &cond;
 #define ADDRESS_SHIFT	39
-- 
2.25.1


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

end of thread, other threads:[~2024-04-23 13:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 12:22 [PATCH V2 i-g-t] tests/xe_exec_threads: Make hang tests reset domain aware Tejas Upadhyay
2024-04-02 12:15 ` ✗ CI.Patch_applied: failure for " Patchwork
2024-04-02 19:40 ` [PATCH V2 i-g-t] " Matt Roper
2024-04-02 20:55   ` Lucas De Marchi
2024-04-03  5:35     ` Upadhyay, Tejas
2024-04-04 23:22       ` John Harrison
2024-04-04 23:45         ` John Harrison
2024-04-05  4:42           ` Upadhyay, Tejas
2024-04-05  4:47         ` Upadhyay, Tejas
2024-04-05 18:15           ` John Harrison
2024-04-05 23:33             ` Matthew Brost
2024-04-05 23:42               ` John Harrison
2024-04-08  5:23                 ` Upadhyay, Tejas
2024-04-08 12:00                   ` Upadhyay, Tejas
2024-04-10 19:22                     ` John Harrison
2024-04-11  5:12                       ` Upadhyay, Tejas
2024-04-11  5:37                         ` Upadhyay, Tejas
2024-04-23 13:06                       ` Upadhyay, Tejas

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