Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching
@ 2026-01-14 22:49 Gustavo Sousa
  2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

This series adds several improvements to RTP code around rule matching
logic.

It first starts with making sure there is a cleaner separation of
responsibilities when it comes to the generic kunit testing for RTP.
Then it goes on to improve rule matching code by making the parsing
logic more robust and restructuring the code to resemble a formal
grammar and make it easier to add future extensions.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
Gustavo Sousa (6):
      drm/xe/rtp: Write kunit test cases specific for rule matching
      drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases
      drm/xe/rtp: Do not break parsing when missing context
      drm/xe/rtp: Extract rule_match_item()
      drm/xe/rtp: Fully parse the ruleset
      drm/xe/rtp: Implement a structured parser for rule matching

 drivers/gpu/drm/xe/tests/xe_rtp.c      |  38 ++++
 drivers/gpu/drm/xe/tests/xe_rtp_test.c | 303 +++++++++++++++++++-------------
 drivers/gpu/drm/xe/tests/xe_rtp_test.h |  24 +++
 drivers/gpu/drm/xe/xe_rtp.c            | 307 +++++++++++++++++++--------------
 4 files changed, 431 insertions(+), 241 deletions(-)
---
base-commit: 733664f1edf3c01cc68e6dd0bbdb135158a98a1d
change-id: 20260114-rtp-rule-parser-ac01472acdeb

Best regards,
--  
Gustavo Sousa <gustavo.sousa@intel.com>


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

* [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-01-14 22:57   ` Gustavo Sousa
  2026-02-10 22:03   ` Matt Roper
  2026-01-14 22:49 ` [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases Gustavo Sousa
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

The kunit test cases for the RTP framework are currently separated into
those that validate xe_rtp_process_to_sr() and those that validate
xe_rtp_process().  In both of them, we also have mixed stuff to validate
rule matching functionality, which should rather be done in a separate
test case group.

Let's create such a group, specific for validating rule matching, and
also add an initial set of cases.  In an upcoming change, we will do a
cleanup of the other groups by migrating those cases intended for rule
matching to this new group.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_rtp.c      |  38 +++++++++
 drivers/gpu/drm/xe/tests/xe_rtp_test.c | 141 +++++++++++++++++++++++++++++++++
 drivers/gpu/drm/xe/tests/xe_rtp_test.h |  24 ++++++
 drivers/gpu/drm/xe/xe_rtp.c            |  55 +++++++++----
 4 files changed, 242 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_rtp.c b/drivers/gpu/drm/xe/tests/xe_rtp.c
new file mode 100644
index 000000000000..b3a8b75936d1
--- /dev/null
+++ b/drivers/gpu/drm/xe/tests/xe_rtp.c
@@ -0,0 +1,38 @@
+// SPDX-License-Identifier: GPL-2.0 AND MIT
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#include "tests/xe_rtp_test.h"
+
+#include <kunit/visibility.h>
+
+/**
+ * xe_rtp_rule_matches - Check if a set of RTP rule set match against the
+ *			 device/GT/hwe
+ * @xe: The xe device
+ * @gt: The GT struct (may be NULL)
+ * @hwe: The hw_engine  (may be NULL)
+ * @rules: The array of rules to match against
+ * @n_rules: Number of items in @rules
+ * @err: Pointer (may be NULL) to set error number.
+ *
+ * This parses the set of rules and check if they match against the passed
+ * parameters.
+ *
+ * If passed, @err is updated with a non-zero negative error number or zero if
+ * no errors were found during the parsing/evaluation of rules.
+ *
+ * Returns true if there is a match and false if there is no match or if an
+ * error was found.
+ */
+bool xe_rtp_rule_matches(const struct xe_device *xe,
+			 struct xe_gt *gt,
+			 struct xe_hw_engine *hwe,
+			 const struct xe_rtp_rule *rules,
+			 unsigned int n_rules,
+			 int *err)
+{
+	return rule_matches_with_err(xe, gt, hwe, rules, n_rules, err);
+}
+EXPORT_SYMBOL_IF_KUNIT(xe_rtp_rule_matches);
diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
index d2255a59e58f..c3fea547da32 100644
--- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
@@ -19,6 +19,7 @@
 #include "xe_pci_test.h"
 #include "xe_reg_sr.h"
 #include "xe_rtp.h"
+#include "xe_rtp_test.h"
 
 #define REGULAR_REG1	XE_REG(1)
 #define REGULAR_REG2	XE_REG(2)
@@ -31,6 +32,14 @@
 #undef XE_REG_MCR
 #define XE_REG_MCR(...)     XE_REG(__VA_ARGS__, .mcr = 1)
 
+struct rtp_rules_test_case {
+	const char *name;
+	bool expected_match;
+	int expected_err;
+	const struct xe_rtp_rule *rules;
+	u8 n_rules;
+};
+
 struct rtp_to_sr_test_case {
 	const char *name;
 	struct xe_reg expected_reg;
@@ -60,6 +69,130 @@ static bool match_no(const struct xe_device *xe, const struct xe_gt *gt,
 	return false;
 }
 
+static const struct rtp_rules_test_case rtp_rules_cases[] = {
+	/*
+	 * Single rules.
+	 *
+	 * TODO: Include other types of rules as well: GRAPHICS_VERSION(),
+	 * MEDIA_VERSION(), etc.
+	 */
+	{
+		.name = "no",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_no)),
+	},
+	{
+		.name = "yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes)),
+	},
+
+	/* Conjunctions with 2 operands. */
+	{
+		.name = "no-and-no",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_no), FUNC(match_no)),
+	},
+	{
+		.name = "no-and-yes",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes)),
+	},
+	{
+		.name = "yes-and-no",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_yes), FUNC(match_no)),
+	},
+	{
+		.name = "yes-and-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes)),
+	},
+
+	/* Disjunctions with 2 operands. */
+	{
+		.name = "no-or-no",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_no)),
+	},
+	{
+		.name = "no-or-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_yes)),
+	},
+	{
+		.name = "yes-or-no",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_no)),
+	},
+	{
+		.name = "yes-or-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_yes)),
+	},
+
+	/* Conjunction and disjunctions. */
+	{
+		.name = "no-yes-or-no-yes",
+		.expected_match = false,
+		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
+			     FUNC(match_yes), FUNC(match_no)),
+	},
+	{
+		.name = "no-yes-or-yes-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
+			     FUNC(match_yes), FUNC(match_yes)),
+	},
+	{
+		.name = "yes-yes-or-no-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
+			     FUNC(match_no), FUNC(match_yes)),
+	},
+	{
+		.name = "yes-yes-or-yes-yes",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
+			     FUNC(match_yes), FUNC(match_yes)),
+	},
+	{
+		.name = "no-no-or-yes-or-no",
+		.expected_match = true,
+		XE_RTP_RULES(FUNC(match_no), FUNC(match_no), OR,
+			     FUNC(match_yes), OR,
+			     FUNC(match_no)),
+	},
+
+	/* Syntax errors. */
+	{
+		.name = "or",
+		.expected_match = false,
+		.expected_err = -EINVAL,
+		XE_RTP_RULES(OR),
+	},
+	{
+		.name = "or-anything",
+		.expected_match = false,
+		.expected_err = -EINVAL,
+		XE_RTP_RULES(OR, FUNC(match_yes)),
+	},
+};
+
+static void xe_rtp_rules_tests(struct kunit *test)
+{
+	const struct rtp_rules_test_case *param = test->param_value;
+	struct xe_device *xe = test->priv;
+	struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt;
+	int err;
+	bool match;
+
+	match = xe_rtp_rule_matches(xe, gt, NULL, param->rules, param->n_rules, &err);
+
+	KUNIT_EXPECT_EQ(test, match, param->expected_match);
+	KUNIT_EXPECT_EQ(test, err, param->expected_err);
+}
+
 static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
 	{
 		.name = "coalesce-same-reg",
@@ -488,6 +621,13 @@ static void xe_rtp_process_tests(struct kunit *test)
 	KUNIT_EXPECT_EQ(test, active, param->expected_active);
 }
 
+static void rtp_rules_desc(const struct rtp_rules_test_case *t, char *desc)
+{
+	strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
+}
+
+KUNIT_ARRAY_PARAM(rtp_rules, rtp_rules_cases, rtp_rules_desc);
+
 static void rtp_to_sr_desc(const struct rtp_to_sr_test_case *t, char *desc)
 {
 	strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
@@ -533,6 +673,7 @@ static void xe_rtp_test_exit(struct kunit *test)
 }
 
 static struct kunit_case xe_rtp_tests[] = {
+	KUNIT_CASE_PARAM(xe_rtp_rules_tests, rtp_rules_gen_params),
 	KUNIT_CASE_PARAM(xe_rtp_process_to_sr_tests, rtp_to_sr_gen_params),
 	KUNIT_CASE_PARAM(xe_rtp_process_tests, rtp_gen_params),
 	{}
diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.h b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
new file mode 100644
index 000000000000..0579c1522424
--- /dev/null
+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 AND MIT */
+/*
+ * Copyright © 2026 Intel Corporation
+ */
+
+#ifndef _XE_RTP_TEST_H_
+#define _XE_RTP_TEST_H_
+
+#include <linux/types.h>
+#include <kunit/test.h>
+
+struct xe_device;
+struct xe_gt;
+struct xe_hw_engine;
+struct xe_rtp_rule;
+
+bool xe_rtp_rule_matches(const struct xe_device *xe,
+			 struct xe_gt *gt,
+			 struct xe_hw_engine *hwe,
+			 const struct xe_rtp_rule *rules,
+			 unsigned int n_rules,
+			 int *err);
+
+#endif
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index ed509b1c8cfc..e955df6c22ca 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -30,16 +30,20 @@ static bool has_samedia(const struct xe_device *xe)
 	return xe->info.media_verx100 >= 1300;
 }
 
-static bool rule_matches(const struct xe_device *xe,
-			 struct xe_gt *gt,
-			 struct xe_hw_engine *hwe,
-			 const struct xe_rtp_rule *rules,
-			 unsigned int n_rules)
+static bool rule_matches_with_err(const struct xe_device *xe,
+				  struct xe_gt *gt,
+				  struct xe_hw_engine *hwe,
+				  const struct xe_rtp_rule *rules,
+				  unsigned int n_rules,
+				  int *err)
 {
 	const struct xe_rtp_rule *r;
 	unsigned int i, rcount = 0;
 	bool match;
 
+	if (err)
+		*err = 0;
+
 	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
 		switch (r->match_type) {
 		case XE_RTP_MATCH_OR:
@@ -58,14 +62,14 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.graphics_verx100 == r->ver_start &&
 				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.graphics_verx100 >= r->ver_start &&
 				xe->info.graphics_verx100 <= r->ver_end &&
@@ -73,13 +77,13 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.graphics_verx100 == r->ver_start;
 			break;
 		case XE_RTP_MATCH_GRAPHICS_STEP:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.step.graphics >= r->step_start &&
 				xe->info.step.graphics < r->step_end &&
@@ -87,14 +91,14 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.media_verx100 == r->ver_start &&
 				(!has_samedia(xe) || xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.media_verx100 >= r->ver_start &&
 				xe->info.media_verx100 <= r->ver_end &&
@@ -102,7 +106,7 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_MEDIA_STEP:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.step.media >= r->step_start &&
 				xe->info.step.media < r->step_end &&
@@ -110,7 +114,7 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
 			if (drm_WARN_ON(&xe->drm, !gt))
-				return false;
+				goto error;
 
 			match = xe->info.media_verx100 == r->ver_start;
 			break;
@@ -122,13 +126,13 @@ static bool rule_matches(const struct xe_device *xe,
 			break;
 		case XE_RTP_MATCH_ENGINE_CLASS:
 			if (drm_WARN_ON(&xe->drm, !hwe))
-				return false;
+				goto error;
 
 			match = hwe->class == r->engine_class;
 			break;
 		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
 			if (drm_WARN_ON(&xe->drm, !hwe))
-				return false;
+				goto error;
 
 			match = hwe->class != r->engine_class;
 			break;
@@ -160,9 +164,24 @@ static bool rule_matches(const struct xe_device *xe,
 
 done:
 	if (drm_WARN_ON(&xe->drm, !rcount))
-		return false;
+		goto error;
 
 	return true;
+
+error:
+	if (err)
+		*err = -EINVAL;
+
+	return false;
+}
+
+static bool rule_matches(const struct xe_device *xe,
+			 struct xe_gt *gt,
+			 struct xe_hw_engine *hwe,
+			 const struct xe_rtp_rule *rules,
+			 unsigned int n_rules)
+{
+	return rule_matches_with_err(xe, gt, hwe, rules, n_rules, NULL);
 }
 
 static void rtp_add_sr_entry(const struct xe_rtp_action *action,
@@ -385,3 +404,7 @@ bool xe_rtp_match_has_flat_ccs(const struct xe_device *xe,
 {
 	return xe->info.has_flat_ccs;
 }
+
+#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
+#include "tests/xe_rtp.c"
+#endif

-- 
2.52.0


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

* [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
  2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-02-10 22:06   ` Matt Roper
  2026-01-14 22:49 ` [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context Gustavo Sousa
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

The kunit test cases for the RTP framework are currently separated into
three groups:

(1) rtp_rules_cases:
    Those to verify rule matching logic.

(2) rtp_to_sr_cases:
    Those to verify generation of save/restore tables from RTP tables.

(3) rtp_cases
    Those to verify processing of RTP tables without save/restore action
    associated, which are used for OOB workarounds.

Today we have some cases in (2) and (3) that are actually meant to
verify rule matching logic.  Now that we have (1), let's cleanup (2)
and (3) so that they become focused on their main objectives.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_rtp_test.c | 122 ++-------------------------------
 1 file changed, 6 insertions(+), 116 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
index c3fea547da32..b2286dd9d92a 100644
--- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
@@ -234,80 +234,6 @@ static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
 			{}
 		},
 	},
-	{
-		.name = "match-or",
-		.expected_reg = REGULAR_REG1,
-		.expected_set_bits = REG_BIT(0) | REG_BIT(1) | REG_BIT(2),
-		.expected_clr_bits = REG_BIT(0) | REG_BIT(1) | REG_BIT(2),
-		.expected_active = BIT(0) | BIT(1) | BIT(2),
-		.expected_count_sr_entries = 1,
-		.entries = (const struct xe_rtp_entry_sr[]) {
-			{ XE_RTP_NAME("first"),
-			  XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_no)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
-			},
-			{ XE_RTP_NAME("middle"),
-			  XE_RTP_RULES(FUNC(match_no), FUNC(match_no), OR,
-				       FUNC(match_yes), OR,
-				       FUNC(match_no)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
-			},
-			{ XE_RTP_NAME("last"),
-			  XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_yes)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(2)))
-			},
-			{ XE_RTP_NAME("no-match"),
-			  XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_no)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(3)))
-			},
-			{}
-		},
-	},
-	{
-		.name = "match-or-xfail",
-		.expected_reg = REGULAR_REG1,
-		.expected_count_sr_entries = 0,
-		.entries = (const struct xe_rtp_entry_sr[]) {
-			{ XE_RTP_NAME("leading-or"),
-			  XE_RTP_RULES(OR, FUNC(match_yes)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
-			},
-			{ XE_RTP_NAME("trailing-or"),
-			  /*
-			   * First condition is match_no, otherwise the failure
-			   * wouldn't really trigger as RTP stops processing as
-			   * soon as it has a matching set of rules
-			   */
-			  XE_RTP_RULES(FUNC(match_no), OR),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
-			},
-			{ XE_RTP_NAME("no-or-or-yes"),
-			  XE_RTP_RULES(FUNC(match_no), OR, OR, FUNC(match_yes)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(2)))
-			},
-			{}
-		},
-	},
-	{
-		.name = "no-match-no-add-multiple-rules",
-		.expected_reg = REGULAR_REG1,
-		.expected_set_bits = REG_BIT(0),
-		.expected_clr_bits = REG_BIT(0),
-		.expected_active = BIT(0),
-		.expected_count_sr_entries = 1,
-		/* Don't coalesce second entry due to one of the rules */
-		.entries = (const struct xe_rtp_entry_sr[]) {
-			{ XE_RTP_NAME("basic-1"),
-			  XE_RTP_RULES(FUNC(match_yes)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
-			},
-			{ XE_RTP_NAME("basic-2"),
-			  XE_RTP_RULES(FUNC(match_yes), FUNC(match_no)),
-			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
-			},
-			{}
-		},
-	},
 	{
 		.name = "two-regs-two-entries",
 		.expected_reg = REGULAR_REG1,
@@ -535,33 +461,15 @@ static const struct rtp_test_case rtp_cases[] = {
 		},
 	},
 	{
-		.name = "inactive-1st_or_active-inactive",
+		.name = "inactive-active-inactive",
 		.expected_active = BIT(1),
 		.entries = (const struct xe_rtp_entry[]) {
 			{ XE_RTP_NAME("r1"),
 			  XE_RTP_RULES(FUNC(match_no)),
 			},
-			{ XE_RTP_NAME("r2_or_conditions"),
-			  XE_RTP_RULES(FUNC(match_yes), OR,
-				       FUNC(match_no), OR,
-				       FUNC(match_no)) },
-			{ XE_RTP_NAME("r3"),
-			  XE_RTP_RULES(FUNC(match_no)),
-			},
-			{}
-		},
-	},
-	{
-		.name = "inactive-2nd_or_active-inactive",
-		.expected_active = BIT(1),
-		.entries = (const struct xe_rtp_entry[]) {
-			{ XE_RTP_NAME("r1"),
-			  XE_RTP_RULES(FUNC(match_no)),
+			{ XE_RTP_NAME("r2"),
+			  XE_RTP_RULES(FUNC(match_yes)),
 			},
-			{ XE_RTP_NAME("r2_or_conditions"),
-			  XE_RTP_RULES(FUNC(match_no), OR,
-				       FUNC(match_yes), OR,
-				       FUNC(match_no)) },
 			{ XE_RTP_NAME("r3"),
 			  XE_RTP_RULES(FUNC(match_no)),
 			},
@@ -569,33 +477,15 @@ static const struct rtp_test_case rtp_cases[] = {
 		},
 	},
 	{
-		.name = "inactive-last_or_active-inactive",
-		.expected_active = BIT(1),
+		.name = "inactive-inactive-inactive",
+		.expected_active = 0,
 		.entries = (const struct xe_rtp_entry[]) {
 			{ XE_RTP_NAME("r1"),
 			  XE_RTP_RULES(FUNC(match_no)),
 			},
-			{ XE_RTP_NAME("r2_or_conditions"),
-			  XE_RTP_RULES(FUNC(match_no), OR,
-				       FUNC(match_no), OR,
-				       FUNC(match_yes)) },
-			{ XE_RTP_NAME("r3"),
-			  XE_RTP_RULES(FUNC(match_no)),
-			},
-			{}
-		},
-	},
-	{
-		.name = "inactive-no_or_active-inactive",
-		.expected_active = 0,
-		.entries = (const struct xe_rtp_entry[]) {
-			{ XE_RTP_NAME("r1"),
+			{ XE_RTP_NAME("r2"),
 			  XE_RTP_RULES(FUNC(match_no)),
 			},
-			{ XE_RTP_NAME("r2_or_conditions"),
-			  XE_RTP_RULES(FUNC(match_no), OR,
-				       FUNC(match_no), OR,
-				       FUNC(match_no)) },
 			{ XE_RTP_NAME("r3"),
 			  XE_RTP_RULES(FUNC(match_no)),
 			},

-- 
2.52.0


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

* [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
  2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
  2026-01-14 22:49 ` [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-02-10 22:20   ` Matt Roper
  2026-01-14 22:49 ` [PATCH 4/6] drm/xe/rtp: Extract rule_match_item() Gustavo Sousa
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

With the current implementation, the RTP framework will cause parsing of
the rule set to be interrupted if one rule requires a context item (gt
or hwe) that is missing (i.e. when the value is NULL).

This is arguably a semantic error instead of a syntactic one, meaning
that RTP should not interrupt parsing the rules.  With the current
behavior, we would miss detecting other errors that could appear in the
remaining rules and could also prevent valid rules joined by "OR" from
being evaluated.

Make sure that we do not stop parsing the rule set when detecting
missing context and let's add rtp_rules_test_cases to reflect that.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_rtp_test.c | 28 ++++++++++++++++
 drivers/gpu/drm/xe/xe_rtp.c            | 60 ++++++++++++++++++++++------------
 2 files changed, 68 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
index b2286dd9d92a..19c7142b2fe4 100644
--- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
@@ -177,6 +177,34 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
 		.expected_err = -EINVAL,
 		XE_RTP_RULES(OR, FUNC(match_yes)),
 	},
+
+	/* No match because hwe is NULL. */
+	{
+		.name = "engine-class",
+		.expected_match = false,
+		XE_RTP_RULES(ENGINE_CLASS(RENDER)),
+	},
+
+	/*
+	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
+	 * expect a match.
+	 */
+	{
+		.name = "engine-class-or-yes",
+		.expected_match = true,
+		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, FUNC(match_yes)),
+	},
+
+	/*
+	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
+	 * expect a syntax error.
+	 */
+	{
+		.name = "engine-class-or-or-yes",
+		.expected_match = false,
+		.expected_err = -EINVAL,
+		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, OR, FUNC(match_yes)),
+	},
 };
 
 static void xe_rtp_rules_tests(struct kunit *test)
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index e955df6c22ca..e0bed5ac1369 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -61,60 +61,76 @@ static bool rule_matches_with_err(const struct xe_device *xe,
 				xe->info.subplatform == r->subplatform;
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.graphics_verx100 == r->ver_start &&
 				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.graphics_verx100 >= r->ver_start &&
 				xe->info.graphics_verx100 <= r->ver_end &&
 				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.graphics_verx100 == r->ver_start;
 			break;
 		case XE_RTP_MATCH_GRAPHICS_STEP:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.step.graphics >= r->step_start &&
 				xe->info.step.graphics < r->step_end &&
 				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.media_verx100 == r->ver_start &&
 				(!has_samedia(xe) || xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.media_verx100 >= r->ver_start &&
 				xe->info.media_verx100 <= r->ver_end &&
 				(!has_samedia(xe) || xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_MEDIA_STEP:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.step.media >= r->step_start &&
 				xe->info.step.media < r->step_end &&
 				(!has_samedia(xe) || xe_gt_is_media_type(gt));
 			break;
 		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
-			if (drm_WARN_ON(&xe->drm, !gt))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !gt)) {
+				match = false;
+				break;
+			}
 
 			match = xe->info.media_verx100 == r->ver_start;
 			break;
@@ -125,14 +141,18 @@ static bool rule_matches_with_err(const struct xe_device *xe,
 			match = xe->info.is_dgfx;
 			break;
 		case XE_RTP_MATCH_ENGINE_CLASS:
-			if (drm_WARN_ON(&xe->drm, !hwe))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !hwe)) {
+				match = false;
+				break;
+			}
 
 			match = hwe->class == r->engine_class;
 			break;
 		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
-			if (drm_WARN_ON(&xe->drm, !hwe))
-				goto error;
+			if (drm_WARN_ON(&xe->drm, !hwe)) {
+				match = false;
+				break;
+			}
 
 			match = hwe->class != r->engine_class;
 			break;

-- 
2.52.0


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

* [PATCH 4/6] drm/xe/rtp: Extract rule_match_item()
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (2 preceding siblings ...)
  2026-01-14 22:49 ` [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-02-10 22:24   ` Matt Roper
  2026-01-14 22:49 ` [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset Gustavo Sousa
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

The currently logic in rule_matches() mixes individual rule matching
with the logic necessary for handling OR operations.  Let's simplify
rule_matches() to focus on the latter by extracting individual rule
matching into a separate function called rule_match_item().

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/xe_rtp.c | 205 +++++++++++++++++++-------------------------
 1 file changed, 88 insertions(+), 117 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index e0bed5ac1369..dabc2e74e2ce 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -30,6 +30,90 @@ static bool has_samedia(const struct xe_device *xe)
 	return xe->info.media_verx100 >= 1300;
 }
 
+static bool rule_match_item(const struct xe_device *xe,
+			    struct xe_gt *gt,
+			    struct xe_hw_engine *hwe,
+			    const struct xe_rtp_rule *r)
+{
+	switch (r->match_type) {
+	case XE_RTP_MATCH_PLATFORM:
+		return xe->info.platform == r->platform;
+	case XE_RTP_MATCH_SUBPLATFORM:
+		return xe->info.platform == r->platform &&
+			xe->info.subplatform == r->subplatform;
+	case XE_RTP_MATCH_GRAPHICS_VERSION:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.graphics_verx100 == r->ver_start &&
+			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.graphics_verx100 >= r->ver_start &&
+			xe->info.graphics_verx100 <= r->ver_end &&
+			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.graphics_verx100 == r->ver_start;
+	case XE_RTP_MATCH_GRAPHICS_STEP:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.step.graphics >= r->step_start &&
+			xe->info.step.graphics < r->step_end &&
+			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_MEDIA_VERSION:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.media_verx100 == r->ver_start &&
+			(!has_samedia(xe) || xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.media_verx100 >= r->ver_start &&
+			xe->info.media_verx100 <= r->ver_end &&
+			(!has_samedia(xe) || xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_MEDIA_STEP:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.step.media >= r->step_start &&
+			xe->info.step.media < r->step_end &&
+			(!has_samedia(xe) || xe_gt_is_media_type(gt));
+	case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
+		if (drm_WARN_ON(&xe->drm, !gt))
+			return false;
+
+		return xe->info.media_verx100 == r->ver_start;
+	case XE_RTP_MATCH_INTEGRATED:
+		return !xe->info.is_dgfx;
+	case XE_RTP_MATCH_DISCRETE:
+		return xe->info.is_dgfx;
+	case XE_RTP_MATCH_ENGINE_CLASS:
+		if (drm_WARN_ON(&xe->drm, !hwe))
+			return false;
+
+		return hwe->class == r->engine_class;
+	case XE_RTP_MATCH_NOT_ENGINE_CLASS:
+		if (drm_WARN_ON(&xe->drm, !hwe))
+			return false;
+
+		return hwe->class != r->engine_class;
+	case XE_RTP_MATCH_FUNC:
+		return r->match_func(xe, gt, hwe);
+	default:
+		drm_warn(&xe->drm, "Invalid RTP match %u\n",
+			 r->match_type);
+		return false;
+	}
+}
+
 static bool rule_matches_with_err(const struct xe_device *xe,
 				  struct xe_gt *gt,
 				  struct xe_hw_engine *hwe,
@@ -39,133 +123,22 @@ static bool rule_matches_with_err(const struct xe_device *xe,
 {
 	const struct xe_rtp_rule *r;
 	unsigned int i, rcount = 0;
-	bool match;
 
 	if (err)
 		*err = 0;
 
 	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
-		switch (r->match_type) {
-		case XE_RTP_MATCH_OR:
+		if (r->match_type == XE_RTP_MATCH_OR)
 			/*
 			 * This is only reached if a complete set of
 			 * rules passed or none were evaluated. For both cases,
 			 * shortcut the other rules and return the proper value.
 			 */
 			goto done;
-		case XE_RTP_MATCH_PLATFORM:
-			match = xe->info.platform == r->platform;
-			break;
-		case XE_RTP_MATCH_SUBPLATFORM:
-			match = xe->info.platform == r->platform &&
-				xe->info.subplatform == r->subplatform;
-			break;
-		case XE_RTP_MATCH_GRAPHICS_VERSION:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.graphics_verx100 == r->ver_start &&
-				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.graphics_verx100 >= r->ver_start &&
-				xe->info.graphics_verx100 <= r->ver_end &&
-				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.graphics_verx100 == r->ver_start;
-			break;
-		case XE_RTP_MATCH_GRAPHICS_STEP:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.step.graphics >= r->step_start &&
-				xe->info.step.graphics < r->step_end &&
-				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_MEDIA_VERSION:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.media_verx100 == r->ver_start &&
-				(!has_samedia(xe) || xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.media_verx100 >= r->ver_start &&
-				xe->info.media_verx100 <= r->ver_end &&
-				(!has_samedia(xe) || xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_MEDIA_STEP:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.step.media >= r->step_start &&
-				xe->info.step.media < r->step_end &&
-				(!has_samedia(xe) || xe_gt_is_media_type(gt));
-			break;
-		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
-			if (drm_WARN_ON(&xe->drm, !gt)) {
-				match = false;
-				break;
-			}
-
-			match = xe->info.media_verx100 == r->ver_start;
-			break;
-		case XE_RTP_MATCH_INTEGRATED:
-			match = !xe->info.is_dgfx;
-			break;
-		case XE_RTP_MATCH_DISCRETE:
-			match = xe->info.is_dgfx;
-			break;
-		case XE_RTP_MATCH_ENGINE_CLASS:
-			if (drm_WARN_ON(&xe->drm, !hwe)) {
-				match = false;
-				break;
-			}
-
-			match = hwe->class == r->engine_class;
-			break;
-		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
-			if (drm_WARN_ON(&xe->drm, !hwe)) {
-				match = false;
-				break;
-			}
-
-			match = hwe->class != r->engine_class;
-			break;
-		case XE_RTP_MATCH_FUNC:
-			match = r->match_func(xe, gt, hwe);
-			break;
-		default:
-			drm_warn(&xe->drm, "Invalid RTP match %u\n",
-				 r->match_type);
-			match = false;
-		}
 
-		if (!match) {
+		if (rule_match_item(xe, gt, hwe, r)) {
+			rcount++;
+		} else {
 			/*
 			 * Advance rules until we find XE_RTP_MATCH_OR to check
 			 * if there's another set of conditions to check
@@ -177,8 +150,6 @@ static bool rule_matches_with_err(const struct xe_device *xe,
 				return false;
 
 			rcount = 0;
-		} else {
-			rcount++;
 		}
 	}
 

-- 
2.52.0


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

* [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (3 preceding siblings ...)
  2026-01-14 22:49 ` [PATCH 4/6] drm/xe/rtp: Extract rule_match_item() Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-02-10 22:34   ` Matt Roper
  2026-01-14 22:49 ` [PATCH 6/6] drm/xe/rtp: Implement a structured parser for rule matching Gustavo Sousa
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

The function rule_matches() short-circuits evaluation of the implicit
conjunctions (each substring of rules not containing OR) and the
explicit disjunctions (implicit conjunctions joined by OR). In other
words:

  - in a conjunction, once a rule evaluate to false, we skip to the next
    OR (if any) to evaluate the next conjunction;
  - in a disjunction, once a conjunction evaluates to true, we return
    true and skip evaluating all the remaining rules.

While this behavior results in a correct logical value, it has the
side-effect that rule set does not get fully "parsed", allowing
incomplete constructs like (rule1, OR) to evaluate to true when rule1 is
true.  We should treat such constructs as invalid and treat them the
same way we do for stuff like (OR, rule1).

As such, update rule_matches() to "parse" the whole rule set, and that
while keeping the short-circuit aspect of evaluation.

Let's also update the kunit test to include instances of those
incomplete constructs to reflect this change.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/tests/xe_rtp_test.c | 12 +++++++
 drivers/gpu/drm/xe/xe_rtp.c            | 61 +++++++++++++++++++---------------
 2 files changed, 46 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
index 19c7142b2fe4..f0122553644e 100644
--- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
@@ -177,6 +177,18 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
 		.expected_err = -EINVAL,
 		XE_RTP_RULES(OR, FUNC(match_yes)),
 	},
+	{
+		.name = "anything-or",
+		.expected_match = false,
+		.expected_err = -EINVAL,
+		XE_RTP_RULES(FUNC(match_yes), OR),
+	},
+	{
+		.name = "anything-or-or-anything",
+		.expected_match = false,
+		.expected_err = -EINVAL,
+		XE_RTP_RULES(FUNC(match_yes), OR, OR, FUNC(match_yes)),
+	},
 
 	/* No match because hwe is NULL. */
 	{
diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index dabc2e74e2ce..55df9c16a3cc 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -123,47 +123,54 @@ static bool rule_matches_with_err(const struct xe_device *xe,
 {
 	const struct xe_rtp_rule *r;
 	unsigned int i, rcount = 0;
+	bool parse_only = false;
+	bool match = false;
 
 	if (err)
 		*err = 0;
 
 	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
-		if (r->match_type == XE_RTP_MATCH_OR)
-			/*
-			 * This is only reached if a complete set of
-			 * rules passed or none were evaluated. For both cases,
-			 * shortcut the other rules and return the proper value.
-			 */
-			goto done;
+		if (r->match_type == XE_RTP_MATCH_OR) {
+			if (drm_WARN_ON(&xe->drm, !rcount)) {
+				parse_only = true;
+				match = false;
+				if (err)
+					*err = -EINVAL;
+			} else if (match) {
+				parse_only = true;
+			}
+
+			rcount = 0;
+
+			continue;
+		}
+
+		rcount++;
+
+		if (parse_only || !rule_match_item(xe, gt, hwe, r)) {
+			if (!parse_only)
+				match = false;
 
-		if (rule_match_item(xe, gt, hwe, r)) {
-			rcount++;
-		} else {
 			/*
 			 * Advance rules until we find XE_RTP_MATCH_OR to check
 			 * if there's another set of conditions to check
 			 */
-			while (++i < n_rules && rules[i].match_type != XE_RTP_MATCH_OR)
-				;
-
-			if (i >= n_rules)
-				return false;
-
-			rcount = 0;
+			while (i + 1 < n_rules && rules[i + 1].match_type != XE_RTP_MATCH_OR) {
+				i++;
+				rcount++;
+			}
+		} else {
+			match = true;
 		}
 	}
 
-done:
-	if (drm_WARN_ON(&xe->drm, !rcount))
-		goto error;
-
-	return true;
-
-error:
-	if (err)
-		*err = -EINVAL;
+	if (drm_WARN_ON(&xe->drm, !rcount)) {
+		match = false;
+		if (err)
+			*err = -EINVAL;
+	}
 
-	return false;
+	return match;
 }
 
 static bool rule_matches(const struct xe_device *xe,

-- 
2.52.0


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

* [PATCH 6/6] drm/xe/rtp: Implement a structured parser for rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (4 preceding siblings ...)
  2026-01-14 22:49 ` [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset Gustavo Sousa
@ 2026-01-14 22:49 ` Gustavo Sousa
  2026-01-14 22:56 ` ✗ CI.checkpatch: warning for drm/xe/rtp: Miscellaneous improvements to " Patchwork
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:49 UTC (permalink / raw)
  To: intel-xe; +Cc: Gustavo Sousa

The current unwritten grammar for RTP rules is as follows:

          rules = disjunction;
    disjunction = conjunction { "OR" conjunction };
    conjunction = single_rule { single_rule }
                              /* AND operator is implicit */;
    single_rule = ? GRAPHICS_VERSION(...), MEDIA_VERSION(...),
                     FUNC(...), etc ?;

While rule_matches() currently works for the grammar above, it doesn't
easily resemble it.  Let's replace it with an implementation that is
structured in a way to resemble the grammar.

Such a new implementation, although a bit more verbose, is arguably
easier to reason about and to adapt to any extension we do to the
grammer in the future.

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
---
 drivers/gpu/drm/xe/xe_rtp.c | 134 ++++++++++++++++++++++++++++----------------
 1 file changed, 85 insertions(+), 49 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
index 55df9c16a3cc..1e3d89e1f2a5 100644
--- a/drivers/gpu/drm/xe/xe_rtp.c
+++ b/drivers/gpu/drm/xe/xe_rtp.c
@@ -30,11 +30,28 @@ static bool has_samedia(const struct xe_device *xe)
 	return xe->info.media_verx100 >= 1300;
 }
 
-static bool rule_match_item(const struct xe_device *xe,
-			    struct xe_gt *gt,
-			    struct xe_hw_engine *hwe,
-			    const struct xe_rtp_rule *r)
+struct rule_match_ctx {
+	const struct xe_device *xe;
+	struct xe_gt *gt;
+	struct xe_hw_engine *hwe;
+	const struct xe_rtp_rule *rules;
+	const unsigned int n_rules;
+	unsigned int head;
+	int err;
+};
+
+static bool rule_is_item(const struct xe_rtp_rule *r)
+{
+	return r->match_type != XE_RTP_MATCH_OR;
+}
+
+static bool rule_match_item(struct rule_match_ctx *match_ctx)
 {
+	const struct xe_device *xe = match_ctx->xe;
+	struct xe_gt *gt = match_ctx->gt;
+	struct xe_hw_engine *hwe = match_ctx->hwe;
+	const struct xe_rtp_rule *r = &match_ctx->rules[match_ctx->head];
+
 	switch (r->match_type) {
 	case XE_RTP_MATCH_PLATFORM:
 		return xe->info.platform == r->platform;
@@ -114,65 +131,84 @@ static bool rule_match_item(const struct xe_device *xe,
 	}
 }
 
-static bool rule_matches_with_err(const struct xe_device *xe,
-				  struct xe_gt *gt,
-				  struct xe_hw_engine *hwe,
-				  const struct xe_rtp_rule *rules,
-				  unsigned int n_rules,
-				  int *err)
+/*
+ * Match a conjunctive set of rules (rules joined by an implicit "AND").
+ *
+ * Once one item evaluates to false, the remaining items are not evaluated
+ * anymore.  Nevetheless, all rules are consumed to allow detecting syntax
+ * errors.
+ */
+static bool rule_match_and(struct rule_match_ctx *match_ctx, bool parse_only)
 {
-	const struct xe_rtp_rule *r;
-	unsigned int i, rcount = 0;
-	bool parse_only = false;
-	bool match = false;
+	bool match = true;
+	unsigned int count = 0;
 
-	if (err)
-		*err = 0;
+	while (match_ctx->head < match_ctx->n_rules &&
+	       rule_is_item(&match_ctx->rules[match_ctx->head])) {
+		if (!parse_only)
+			match = rule_match_item(match_ctx);
 
-	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
-		if (r->match_type == XE_RTP_MATCH_OR) {
-			if (drm_WARN_ON(&xe->drm, !rcount)) {
-				parse_only = true;
-				match = false;
-				if (err)
-					*err = -EINVAL;
-			} else if (match) {
-				parse_only = true;
-			}
+		if (!match)
+			parse_only = true;
 
-			rcount = 0;
+		match_ctx->head++;
+		count++;
+	}
 
-			continue;
-		}
+	if (drm_WARN_ON(&match_ctx->xe->drm, !count))
+		match_ctx->err = -EINVAL;
 
-		rcount++;
+	return match;
+}
 
-		if (parse_only || !rule_match_item(xe, gt, hwe, r)) {
-			if (!parse_only)
-				match = false;
+/*
+ * Match a disjunctive set of rules (subset of rules joined by
+ * "XE_RTP_MATCH_OR").
+ *
+ * Once one subset evaluates to true, the remaining items are not evaluated
+ * anymore. Nevetheless, all rules are consumed to allow detecting syntax
+ * errors.
+ */
+static bool rule_match_or(struct rule_match_ctx *match_ctx)
+{
+	bool match = rule_match_and(match_ctx, false);
 
-			/*
-			 * Advance rules until we find XE_RTP_MATCH_OR to check
-			 * if there's another set of conditions to check
-			 */
-			while (i + 1 < n_rules && rules[i + 1].match_type != XE_RTP_MATCH_OR) {
-				i++;
-				rcount++;
-			}
-		} else {
-			match = true;
-		}
-	}
+	while (match_ctx->head < match_ctx->n_rules &&
+	       match_ctx->rules[match_ctx->head].match_type == XE_RTP_MATCH_OR) {
+		/* Consume XE_RTP_MATCH_OR. */
+		match_ctx->head++;
 
-	if (drm_WARN_ON(&xe->drm, !rcount)) {
-		match = false;
-		if (err)
-			*err = -EINVAL;
+		match = rule_match_and(match_ctx, match);
 	}
 
 	return match;
 }
 
+static bool rule_matches_with_err(const struct xe_device *xe,
+				  struct xe_gt *gt,
+				  struct xe_hw_engine *hwe,
+				  const struct xe_rtp_rule *rules,
+				  unsigned int n_rules,
+				  int *err)
+{
+	struct rule_match_ctx match_ctx = {
+		.xe = xe,
+		.gt = gt,
+		.hwe = hwe,
+		.rules = rules,
+		.n_rules = n_rules,
+	};
+	bool match = rule_match_or(&match_ctx);
+
+	if (err)
+		*err = match_ctx.err;
+
+	if (drm_WARN_ON(&xe->drm, match_ctx.err))
+		return false;
+
+	return match;
+}
+
 static bool rule_matches(const struct xe_device *xe,
 			 struct xe_gt *gt,
 			 struct xe_hw_engine *hwe,

-- 
2.52.0


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

* ✗ CI.checkpatch: warning for drm/xe/rtp: Miscellaneous improvements to rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (5 preceding siblings ...)
  2026-01-14 22:49 ` [PATCH 6/6] drm/xe/rtp: Implement a structured parser for rule matching Gustavo Sousa
@ 2026-01-14 22:56 ` Patchwork
  2026-01-14 22:57 ` ✓ CI.KUnit: success " Patchwork
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2026-01-14 22:56 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

== Series Details ==

Series: drm/xe/rtp: Miscellaneous improvements to rule matching
URL   : https://patchwork.freedesktop.org/series/160111/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
ee83616c430ce70bd254bd2774d143a5733c8666
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 26f219749411e3887b93861ab0bb226f48e812a6
Author: Gustavo Sousa <gustavo.sousa@intel.com>
Date:   Wed Jan 14 19:49:56 2026 -0300

    drm/xe/rtp: Implement a structured parser for rule matching
    
    The current unwritten grammar for RTP rules is as follows:
    
              rules = disjunction;
        disjunction = conjunction { "OR" conjunction };
        conjunction = single_rule { single_rule }
                                  /* AND operator is implicit */;
        single_rule = ? GRAPHICS_VERSION(...), MEDIA_VERSION(...),
                         FUNC(...), etc ?;
    
    While rule_matches() currently works for the grammar above, it doesn't
    easily resemble it.  Let's replace it with an implementation that is
    structured in a way to resemble the grammar.
    
    Such a new implementation, although a bit more verbose, is arguably
    easier to reason about and to adapt to any extension we do to the
    grammer in the future.
    
    Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
+ /mt/dim checkpatch 733664f1edf3c01cc68e6dd0bbdb135158a98a1d drm-intel
1c254a2d3cae drm/xe/rtp: Write kunit test cases specific for rule matching
-:20: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#20: 
new file mode 100644

total: 0 errors, 1 warnings, 0 checks, 368 lines checked
d335263a721d drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases
4bda76858802 drm/xe/rtp: Do not break parsing when missing context
59abe5f04f4a drm/xe/rtp: Extract rule_match_item()
4a3ffdb8306b drm/xe/rtp: Fully parse the ruleset
26f219749411 drm/xe/rtp: Implement a structured parser for rule matching



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

* ✓ CI.KUnit: success for drm/xe/rtp: Miscellaneous improvements to rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (6 preceding siblings ...)
  2026-01-14 22:56 ` ✗ CI.checkpatch: warning for drm/xe/rtp: Miscellaneous improvements to " Patchwork
@ 2026-01-14 22:57 ` Patchwork
  2026-01-14 23:30 ` ✓ Xe.CI.BAT: " Patchwork
  2026-01-15  4:53 ` ✗ Xe.CI.Full: failure " Patchwork
  9 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2026-01-14 22:57 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

== Series Details ==

Series: drm/xe/rtp: Miscellaneous improvements to rule matching
URL   : https://patchwork.freedesktop.org/series/160111/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[22:56:01] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:56:05] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:56:37] Starting KUnit Kernel (1/1)...
[22:56:37] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:56:37] ================== guc_buf (11 subtests) ===================
[22:56:37] [PASSED] test_smallest
[22:56:37] [PASSED] test_largest
[22:56:37] [PASSED] test_granular
[22:56:37] [PASSED] test_unique
[22:56:37] [PASSED] test_overlap
[22:56:37] [PASSED] test_reusable
[22:56:37] [PASSED] test_too_big
[22:56:37] [PASSED] test_flush
[22:56:37] [PASSED] test_lookup
[22:56:37] [PASSED] test_data
[22:56:37] [PASSED] test_class
[22:56:37] ===================== [PASSED] guc_buf =====================
[22:56:37] =================== guc_dbm (7 subtests) ===================
[22:56:37] [PASSED] test_empty
[22:56:37] [PASSED] test_default
[22:56:37] ======================== test_size  ========================
[22:56:37] [PASSED] 4
[22:56:37] [PASSED] 8
[22:56:37] [PASSED] 32
[22:56:37] [PASSED] 256
[22:56:37] ==================== [PASSED] test_size ====================
[22:56:37] ======================= test_reuse  ========================
[22:56:37] [PASSED] 4
[22:56:37] [PASSED] 8
[22:56:37] [PASSED] 32
[22:56:37] [PASSED] 256
[22:56:37] =================== [PASSED] test_reuse ====================
[22:56:37] =================== test_range_overlap  ====================
[22:56:37] [PASSED] 4
[22:56:37] [PASSED] 8
[22:56:37] [PASSED] 32
[22:56:37] [PASSED] 256
[22:56:37] =============== [PASSED] test_range_overlap ================
[22:56:37] =================== test_range_compact  ====================
[22:56:37] [PASSED] 4
[22:56:37] [PASSED] 8
[22:56:37] [PASSED] 32
[22:56:37] [PASSED] 256
[22:56:37] =============== [PASSED] test_range_compact ================
[22:56:37] ==================== test_range_spare  =====================
[22:56:37] [PASSED] 4
[22:56:37] [PASSED] 8
[22:56:37] [PASSED] 32
[22:56:37] [PASSED] 256
[22:56:37] ================ [PASSED] test_range_spare =================
[22:56:37] ===================== [PASSED] guc_dbm =====================
[22:56:37] =================== guc_idm (6 subtests) ===================
[22:56:37] [PASSED] bad_init
[22:56:37] [PASSED] no_init
[22:56:37] [PASSED] init_fini
[22:56:37] [PASSED] check_used
[22:56:37] [PASSED] check_quota
[22:56:37] [PASSED] check_all
[22:56:37] ===================== [PASSED] guc_idm =====================
[22:56:37] ================== no_relay (3 subtests) ===================
[22:56:37] [PASSED] xe_drops_guc2pf_if_not_ready
[22:56:37] [PASSED] xe_drops_guc2vf_if_not_ready
[22:56:37] [PASSED] xe_rejects_send_if_not_ready
[22:56:37] ==================== [PASSED] no_relay =====================
[22:56:37] ================== pf_relay (14 subtests) ==================
[22:56:37] [PASSED] pf_rejects_guc2pf_too_short
[22:56:37] [PASSED] pf_rejects_guc2pf_too_long
[22:56:37] [PASSED] pf_rejects_guc2pf_no_payload
[22:56:37] [PASSED] pf_fails_no_payload
[22:56:37] [PASSED] pf_fails_bad_origin
[22:56:37] [PASSED] pf_fails_bad_type
[22:56:37] [PASSED] pf_txn_reports_error
[22:56:37] [PASSED] pf_txn_sends_pf2guc
[22:56:37] [PASSED] pf_sends_pf2guc
[22:56:37] [SKIPPED] pf_loopback_nop
[22:56:37] [SKIPPED] pf_loopback_echo
[22:56:37] [SKIPPED] pf_loopback_fail
[22:56:37] [SKIPPED] pf_loopback_busy
[22:56:37] [SKIPPED] pf_loopback_retry
[22:56:37] ==================== [PASSED] pf_relay =====================
[22:56:37] ================== vf_relay (3 subtests) ===================
[22:56:37] [PASSED] vf_rejects_guc2vf_too_short
[22:56:37] [PASSED] vf_rejects_guc2vf_too_long
[22:56:37] [PASSED] vf_rejects_guc2vf_no_payload
[22:56:37] ==================== [PASSED] vf_relay =====================
[22:56:37] ================ pf_gt_config (6 subtests) =================
[22:56:37] [PASSED] fair_contexts_1vf
[22:56:37] [PASSED] fair_doorbells_1vf
[22:56:37] [PASSED] fair_ggtt_1vf
[22:56:37] ====================== fair_contexts  ======================
[22:56:37] [PASSED] 1 VF
[22:56:37] [PASSED] 2 VFs
[22:56:37] [PASSED] 3 VFs
[22:56:37] [PASSED] 4 VFs
[22:56:37] [PASSED] 5 VFs
[22:56:37] [PASSED] 6 VFs
[22:56:37] [PASSED] 7 VFs
[22:56:37] [PASSED] 8 VFs
[22:56:37] [PASSED] 9 VFs
[22:56:37] [PASSED] 10 VFs
[22:56:37] [PASSED] 11 VFs
[22:56:37] [PASSED] 12 VFs
[22:56:37] [PASSED] 13 VFs
[22:56:37] [PASSED] 14 VFs
[22:56:37] [PASSED] 15 VFs
[22:56:37] [PASSED] 16 VFs
[22:56:37] [PASSED] 17 VFs
[22:56:37] [PASSED] 18 VFs
[22:56:37] [PASSED] 19 VFs
[22:56:37] [PASSED] 20 VFs
[22:56:37] [PASSED] 21 VFs
[22:56:37] [PASSED] 22 VFs
[22:56:37] [PASSED] 23 VFs
[22:56:37] [PASSED] 24 VFs
[22:56:37] [PASSED] 25 VFs
[22:56:37] [PASSED] 26 VFs
[22:56:37] [PASSED] 27 VFs
[22:56:37] [PASSED] 28 VFs
[22:56:37] [PASSED] 29 VFs
[22:56:37] [PASSED] 30 VFs
[22:56:37] [PASSED] 31 VFs
[22:56:37] [PASSED] 32 VFs
[22:56:37] [PASSED] 33 VFs
[22:56:37] [PASSED] 34 VFs
[22:56:37] [PASSED] 35 VFs
[22:56:37] [PASSED] 36 VFs
[22:56:37] [PASSED] 37 VFs
[22:56:37] [PASSED] 38 VFs
[22:56:37] [PASSED] 39 VFs
[22:56:37] [PASSED] 40 VFs
[22:56:37] [PASSED] 41 VFs
[22:56:37] [PASSED] 42 VFs
[22:56:37] [PASSED] 43 VFs
[22:56:37] [PASSED] 44 VFs
[22:56:37] [PASSED] 45 VFs
[22:56:37] [PASSED] 46 VFs
[22:56:37] [PASSED] 47 VFs
[22:56:37] [PASSED] 48 VFs
[22:56:37] [PASSED] 49 VFs
[22:56:37] [PASSED] 50 VFs
[22:56:37] [PASSED] 51 VFs
[22:56:37] [PASSED] 52 VFs
[22:56:37] [PASSED] 53 VFs
[22:56:37] [PASSED] 54 VFs
[22:56:37] [PASSED] 55 VFs
[22:56:37] [PASSED] 56 VFs
[22:56:37] [PASSED] 57 VFs
[22:56:37] [PASSED] 58 VFs
[22:56:37] [PASSED] 59 VFs
[22:56:37] [PASSED] 60 VFs
[22:56:37] [PASSED] 61 VFs
[22:56:37] [PASSED] 62 VFs
[22:56:37] [PASSED] 63 VFs
[22:56:37] ================== [PASSED] fair_contexts ==================
[22:56:37] ===================== fair_doorbells  ======================
[22:56:37] [PASSED] 1 VF
[22:56:37] [PASSED] 2 VFs
[22:56:37] [PASSED] 3 VFs
[22:56:37] [PASSED] 4 VFs
[22:56:37] [PASSED] 5 VFs
[22:56:37] [PASSED] 6 VFs
[22:56:37] [PASSED] 7 VFs
[22:56:37] [PASSED] 8 VFs
[22:56:37] [PASSED] 9 VFs
[22:56:37] [PASSED] 10 VFs
[22:56:37] [PASSED] 11 VFs
[22:56:37] [PASSED] 12 VFs
[22:56:37] [PASSED] 13 VFs
[22:56:37] [PASSED] 14 VFs
[22:56:37] [PASSED] 15 VFs
[22:56:37] [PASSED] 16 VFs
[22:56:37] [PASSED] 17 VFs
[22:56:37] [PASSED] 18 VFs
[22:56:37] [PASSED] 19 VFs
[22:56:37] [PASSED] 20 VFs
[22:56:37] [PASSED] 21 VFs
[22:56:37] [PASSED] 22 VFs
[22:56:37] [PASSED] 23 VFs
[22:56:37] [PASSED] 24 VFs
[22:56:37] [PASSED] 25 VFs
[22:56:37] [PASSED] 26 VFs
[22:56:37] [PASSED] 27 VFs
[22:56:37] [PASSED] 28 VFs
[22:56:37] [PASSED] 29 VFs
[22:56:37] [PASSED] 30 VFs
[22:56:37] [PASSED] 31 VFs
[22:56:37] [PASSED] 32 VFs
[22:56:37] [PASSED] 33 VFs
[22:56:37] [PASSED] 34 VFs
[22:56:37] [PASSED] 35 VFs
[22:56:37] [PASSED] 36 VFs
[22:56:37] [PASSED] 37 VFs
[22:56:37] [PASSED] 38 VFs
[22:56:37] [PASSED] 39 VFs
[22:56:37] [PASSED] 40 VFs
[22:56:37] [PASSED] 41 VFs
[22:56:37] [PASSED] 42 VFs
[22:56:37] [PASSED] 43 VFs
[22:56:37] [PASSED] 44 VFs
[22:56:37] [PASSED] 45 VFs
[22:56:37] [PASSED] 46 VFs
[22:56:37] [PASSED] 47 VFs
[22:56:37] [PASSED] 48 VFs
[22:56:37] [PASSED] 49 VFs
[22:56:37] [PASSED] 50 VFs
[22:56:37] [PASSED] 51 VFs
[22:56:37] [PASSED] 52 VFs
[22:56:37] [PASSED] 53 VFs
[22:56:37] [PASSED] 54 VFs
[22:56:37] [PASSED] 55 VFs
[22:56:37] [PASSED] 56 VFs
[22:56:37] [PASSED] 57 VFs
[22:56:37] [PASSED] 58 VFs
[22:56:37] [PASSED] 59 VFs
[22:56:37] [PASSED] 60 VFs
[22:56:37] [PASSED] 61 VFs
[22:56:37] [PASSED] 62 VFs
[22:56:37] [PASSED] 63 VFs
[22:56:37] ================= [PASSED] fair_doorbells ==================
[22:56:37] ======================== fair_ggtt  ========================
[22:56:37] [PASSED] 1 VF
[22:56:37] [PASSED] 2 VFs
[22:56:37] [PASSED] 3 VFs
[22:56:37] [PASSED] 4 VFs
[22:56:37] [PASSED] 5 VFs
[22:56:37] [PASSED] 6 VFs
[22:56:37] [PASSED] 7 VFs
[22:56:37] [PASSED] 8 VFs
[22:56:37] [PASSED] 9 VFs
[22:56:37] [PASSED] 10 VFs
[22:56:37] [PASSED] 11 VFs
[22:56:37] [PASSED] 12 VFs
[22:56:37] [PASSED] 13 VFs
[22:56:37] [PASSED] 14 VFs
[22:56:37] [PASSED] 15 VFs
[22:56:37] [PASSED] 16 VFs
[22:56:37] [PASSED] 17 VFs
[22:56:37] [PASSED] 18 VFs
[22:56:37] [PASSED] 19 VFs
[22:56:37] [PASSED] 20 VFs
[22:56:37] [PASSED] 21 VFs
[22:56:37] [PASSED] 22 VFs
[22:56:37] [PASSED] 23 VFs
[22:56:37] [PASSED] 24 VFs
[22:56:37] [PASSED] 25 VFs
[22:56:37] [PASSED] 26 VFs
[22:56:37] [PASSED] 27 VFs
[22:56:37] [PASSED] 28 VFs
[22:56:37] [PASSED] 29 VFs
[22:56:37] [PASSED] 30 VFs
[22:56:37] [PASSED] 31 VFs
[22:56:37] [PASSED] 32 VFs
[22:56:37] [PASSED] 33 VFs
[22:56:37] [PASSED] 34 VFs
[22:56:37] [PASSED] 35 VFs
[22:56:37] [PASSED] 36 VFs
[22:56:37] [PASSED] 37 VFs
[22:56:37] [PASSED] 38 VFs
[22:56:37] [PASSED] 39 VFs
[22:56:37] [PASSED] 40 VFs
[22:56:37] [PASSED] 41 VFs
[22:56:37] [PASSED] 42 VFs
[22:56:37] [PASSED] 43 VFs
[22:56:37] [PASSED] 44 VFs
[22:56:37] [PASSED] 45 VFs
[22:56:37] [PASSED] 46 VFs
[22:56:37] [PASSED] 47 VFs
[22:56:37] [PASSED] 48 VFs
[22:56:37] [PASSED] 49 VFs
[22:56:37] [PASSED] 50 VFs
[22:56:37] [PASSED] 51 VFs
[22:56:37] [PASSED] 52 VFs
[22:56:37] [PASSED] 53 VFs
[22:56:37] [PASSED] 54 VFs
[22:56:37] [PASSED] 55 VFs
[22:56:37] [PASSED] 56 VFs
[22:56:37] [PASSED] 57 VFs
[22:56:37] [PASSED] 58 VFs
[22:56:37] [PASSED] 59 VFs
[22:56:37] [PASSED] 60 VFs
[22:56:37] [PASSED] 61 VFs
[22:56:37] [PASSED] 62 VFs
[22:56:37] [PASSED] 63 VFs
[22:56:37] ==================== [PASSED] fair_ggtt ====================
[22:56:37] ================== [PASSED] pf_gt_config ===================
[22:56:37] ===================== lmtt (1 subtest) =====================
[22:56:37] ======================== test_ops  =========================
[22:56:37] [PASSED] 2-level
[22:56:37] [PASSED] multi-level
[22:56:37] ==================== [PASSED] test_ops =====================
[22:56:37] ====================== [PASSED] lmtt =======================
[22:56:37] ================= pf_service (11 subtests) =================
[22:56:37] [PASSED] pf_negotiate_any
[22:56:37] [PASSED] pf_negotiate_base_match
[22:56:37] [PASSED] pf_negotiate_base_newer
[22:56:37] [PASSED] pf_negotiate_base_next
[22:56:37] [SKIPPED] pf_negotiate_base_older
[22:56:37] [PASSED] pf_negotiate_base_prev
[22:56:37] [PASSED] pf_negotiate_latest_match
[22:56:37] [PASSED] pf_negotiate_latest_newer
[22:56:37] [PASSED] pf_negotiate_latest_next
[22:56:37] [SKIPPED] pf_negotiate_latest_older
[22:56:37] [SKIPPED] pf_negotiate_latest_prev
[22:56:37] =================== [PASSED] pf_service ====================
[22:56:37] ================= xe_guc_g2g (2 subtests) ==================
[22:56:37] ============== xe_live_guc_g2g_kunit_default  ==============
[22:56:37] ========= [SKIPPED] xe_live_guc_g2g_kunit_default ==========
[22:56:37] ============== xe_live_guc_g2g_kunit_allmem  ===============
[22:56:37] ========== [SKIPPED] xe_live_guc_g2g_kunit_allmem ==========
[22:56:37] =================== [SKIPPED] xe_guc_g2g ===================
[22:56:37] =================== xe_mocs (2 subtests) ===================
[22:56:37] ================ xe_live_mocs_kernel_kunit  ================
[22:56:37] =========== [SKIPPED] xe_live_mocs_kernel_kunit ============
[22:56:37] ================ xe_live_mocs_reset_kunit  =================
[22:56:37] ============ [SKIPPED] xe_live_mocs_reset_kunit ============
[22:56:37] ==================== [SKIPPED] xe_mocs =====================
[22:56:37] ================= xe_migrate (2 subtests) ==================
[22:56:37] ================= xe_migrate_sanity_kunit  =================
[22:56:37] ============ [SKIPPED] xe_migrate_sanity_kunit =============
[22:56:37] ================== xe_validate_ccs_kunit  ==================
[22:56:37] ============= [SKIPPED] xe_validate_ccs_kunit ==============
[22:56:37] =================== [SKIPPED] xe_migrate ===================
[22:56:37] ================== xe_dma_buf (1 subtest) ==================
[22:56:37] ==================== xe_dma_buf_kunit  =====================
[22:56:37] ================ [SKIPPED] xe_dma_buf_kunit ================
[22:56:37] =================== [SKIPPED] xe_dma_buf ===================
[22:56:37] ================= xe_bo_shrink (1 subtest) =================
[22:56:37] =================== xe_bo_shrink_kunit  ====================
[22:56:37] =============== [SKIPPED] xe_bo_shrink_kunit ===============
[22:56:37] ================== [SKIPPED] xe_bo_shrink ==================
[22:56:37] ==================== xe_bo (2 subtests) ====================
[22:56:37] ================== xe_ccs_migrate_kunit  ===================
[22:56:37] ============== [SKIPPED] xe_ccs_migrate_kunit ==============
[22:56:37] ==================== xe_bo_evict_kunit  ====================
[22:56:37] =============== [SKIPPED] xe_bo_evict_kunit ================
[22:56:37] ===================== [SKIPPED] xe_bo ======================
[22:56:37] ==================== args (13 subtests) ====================
[22:56:37] [PASSED] count_args_test
[22:56:37] [PASSED] call_args_example
[22:56:37] [PASSED] call_args_test
[22:56:37] [PASSED] drop_first_arg_example
[22:56:37] [PASSED] drop_first_arg_test
[22:56:37] [PASSED] first_arg_example
[22:56:37] [PASSED] first_arg_test
[22:56:37] [PASSED] last_arg_example
[22:56:37] [PASSED] last_arg_test
[22:56:37] [PASSED] pick_arg_example
[22:56:37] [PASSED] if_args_example
[22:56:37] [PASSED] if_args_test
[22:56:37] [PASSED] sep_comma_example
[22:56:37] ====================== [PASSED] args =======================
[22:56:37] =================== xe_pci (3 subtests) ====================
[22:56:37] ==================== check_graphics_ip  ====================
[22:56:37] [PASSED] 12.00 Xe_LP
[22:56:37] [PASSED] 12.10 Xe_LP+
[22:56:37] [PASSED] 12.55 Xe_HPG
[22:56:37] [PASSED] 12.60 Xe_HPC
[22:56:37] [PASSED] 12.70 Xe_LPG
[22:56:37] [PASSED] 12.71 Xe_LPG
[22:56:37] [PASSED] 12.74 Xe_LPG+
[22:56:37] [PASSED] 20.01 Xe2_HPG
[22:56:37] [PASSED] 20.02 Xe2_HPG
[22:56:37] [PASSED] 20.04 Xe2_LPG
[22:56:37] [PASSED] 30.00 Xe3_LPG
[22:56:37] [PASSED] 30.01 Xe3_LPG
[22:56:37] [PASSED] 30.03 Xe3_LPG
[22:56:37] [PASSED] 30.04 Xe3_LPG
[22:56:37] [PASSED] 30.05 Xe3_LPG
[22:56:37] [PASSED] 35.11 Xe3p_XPC
[22:56:37] ================ [PASSED] check_graphics_ip ================
[22:56:37] ===================== check_media_ip  ======================
[22:56:37] [PASSED] 12.00 Xe_M
[22:56:37] [PASSED] 12.55 Xe_HPM
[22:56:37] [PASSED] 13.00 Xe_LPM+
[22:56:37] [PASSED] 13.01 Xe2_HPM
[22:56:37] [PASSED] 20.00 Xe2_LPM
[22:56:37] [PASSED] 30.00 Xe3_LPM
[22:56:37] [PASSED] 30.02 Xe3_LPM
[22:56:37] [PASSED] 35.00 Xe3p_LPM
[22:56:37] [PASSED] 35.03 Xe3p_HPM
[22:56:37] ================= [PASSED] check_media_ip ==================
[22:56:37] =================== check_platform_desc  ===================
[22:56:37] [PASSED] 0x9A60 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A68 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A70 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A40 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A49 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A59 (TIGERLAKE)
[22:56:37] [PASSED] 0x9A78 (TIGERLAKE)
[22:56:37] [PASSED] 0x9AC0 (TIGERLAKE)
[22:56:37] [PASSED] 0x9AC9 (TIGERLAKE)
[22:56:37] [PASSED] 0x9AD9 (TIGERLAKE)
[22:56:37] [PASSED] 0x9AF8 (TIGERLAKE)
[22:56:37] [PASSED] 0x4C80 (ROCKETLAKE)
[22:56:37] [PASSED] 0x4C8A (ROCKETLAKE)
[22:56:37] [PASSED] 0x4C8B (ROCKETLAKE)
[22:56:37] [PASSED] 0x4C8C (ROCKETLAKE)
[22:56:37] [PASSED] 0x4C90 (ROCKETLAKE)
[22:56:37] [PASSED] 0x4C9A (ROCKETLAKE)
[22:56:37] [PASSED] 0x4680 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4682 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4688 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x468A (ALDERLAKE_S)
[22:56:37] [PASSED] 0x468B (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4690 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4692 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4693 (ALDERLAKE_S)
[22:56:37] [PASSED] 0x46A0 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46A1 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46A2 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46A3 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46A6 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46A8 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46AA (ALDERLAKE_P)
[22:56:37] [PASSED] 0x462A (ALDERLAKE_P)
[22:56:37] [PASSED] 0x4626 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x4628 (ALDERLAKE_P)
stty: 'standard input': Inappropriate ioctl for device
[22:56:37] [PASSED] 0x46B0 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46B1 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46B2 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46B3 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46C0 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46C1 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46C2 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46C3 (ALDERLAKE_P)
[22:56:37] [PASSED] 0x46D0 (ALDERLAKE_N)
[22:56:37] [PASSED] 0x46D1 (ALDERLAKE_N)
[22:56:37] [PASSED] 0x46D2 (ALDERLAKE_N)
[22:56:37] [PASSED] 0x46D3 (ALDERLAKE_N)
[22:56:37] [PASSED] 0x46D4 (ALDERLAKE_N)
[22:56:37] [PASSED] 0xA721 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7A1 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7A9 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7AC (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7AD (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA720 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7A0 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7A8 (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7AA (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA7AB (ALDERLAKE_P)
[22:56:37] [PASSED] 0xA780 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA781 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA782 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA783 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA788 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA789 (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA78A (ALDERLAKE_S)
[22:56:37] [PASSED] 0xA78B (ALDERLAKE_S)
[22:56:37] [PASSED] 0x4905 (DG1)
[22:56:37] [PASSED] 0x4906 (DG1)
[22:56:37] [PASSED] 0x4907 (DG1)
[22:56:37] [PASSED] 0x4908 (DG1)
[22:56:37] [PASSED] 0x4909 (DG1)
[22:56:37] [PASSED] 0x56C0 (DG2)
[22:56:37] [PASSED] 0x56C2 (DG2)
[22:56:37] [PASSED] 0x56C1 (DG2)
[22:56:37] [PASSED] 0x7D51 (METEORLAKE)
[22:56:37] [PASSED] 0x7DD1 (METEORLAKE)
[22:56:37] [PASSED] 0x7D41 (METEORLAKE)
[22:56:37] [PASSED] 0x7D67 (METEORLAKE)
[22:56:37] [PASSED] 0xB640 (METEORLAKE)
[22:56:37] [PASSED] 0x56A0 (DG2)
[22:56:37] [PASSED] 0x56A1 (DG2)
[22:56:37] [PASSED] 0x56A2 (DG2)
[22:56:37] [PASSED] 0x56BE (DG2)
[22:56:37] [PASSED] 0x56BF (DG2)
[22:56:37] [PASSED] 0x5690 (DG2)
[22:56:37] [PASSED] 0x5691 (DG2)
[22:56:37] [PASSED] 0x5692 (DG2)
[22:56:37] [PASSED] 0x56A5 (DG2)
[22:56:37] [PASSED] 0x56A6 (DG2)
[22:56:37] [PASSED] 0x56B0 (DG2)
[22:56:37] [PASSED] 0x56B1 (DG2)
[22:56:37] [PASSED] 0x56BA (DG2)
[22:56:37] [PASSED] 0x56BB (DG2)
[22:56:37] [PASSED] 0x56BC (DG2)
[22:56:37] [PASSED] 0x56BD (DG2)
[22:56:37] [PASSED] 0x5693 (DG2)
[22:56:37] [PASSED] 0x5694 (DG2)
[22:56:37] [PASSED] 0x5695 (DG2)
[22:56:37] [PASSED] 0x56A3 (DG2)
[22:56:37] [PASSED] 0x56A4 (DG2)
[22:56:37] [PASSED] 0x56B2 (DG2)
[22:56:37] [PASSED] 0x56B3 (DG2)
[22:56:37] [PASSED] 0x5696 (DG2)
[22:56:37] [PASSED] 0x5697 (DG2)
[22:56:37] [PASSED] 0xB69 (PVC)
[22:56:37] [PASSED] 0xB6E (PVC)
[22:56:37] [PASSED] 0xBD4 (PVC)
[22:56:37] [PASSED] 0xBD5 (PVC)
[22:56:37] [PASSED] 0xBD6 (PVC)
[22:56:37] [PASSED] 0xBD7 (PVC)
[22:56:37] [PASSED] 0xBD8 (PVC)
[22:56:37] [PASSED] 0xBD9 (PVC)
[22:56:37] [PASSED] 0xBDA (PVC)
[22:56:37] [PASSED] 0xBDB (PVC)
[22:56:37] [PASSED] 0xBE0 (PVC)
[22:56:37] [PASSED] 0xBE1 (PVC)
[22:56:37] [PASSED] 0xBE5 (PVC)
[22:56:37] [PASSED] 0x7D40 (METEORLAKE)
[22:56:37] [PASSED] 0x7D45 (METEORLAKE)
[22:56:37] [PASSED] 0x7D55 (METEORLAKE)
[22:56:37] [PASSED] 0x7D60 (METEORLAKE)
[22:56:37] [PASSED] 0x7DD5 (METEORLAKE)
[22:56:37] [PASSED] 0x6420 (LUNARLAKE)
[22:56:37] [PASSED] 0x64A0 (LUNARLAKE)
[22:56:37] [PASSED] 0x64B0 (LUNARLAKE)
[22:56:37] [PASSED] 0xE202 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE209 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE20B (BATTLEMAGE)
[22:56:37] [PASSED] 0xE20C (BATTLEMAGE)
[22:56:37] [PASSED] 0xE20D (BATTLEMAGE)
[22:56:37] [PASSED] 0xE210 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE211 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE212 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE216 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE220 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE221 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE222 (BATTLEMAGE)
[22:56:37] [PASSED] 0xE223 (BATTLEMAGE)
[22:56:37] [PASSED] 0xB080 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB081 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB082 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB083 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB084 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB085 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB086 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB087 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB08F (PANTHERLAKE)
[22:56:37] [PASSED] 0xB090 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB0A0 (PANTHERLAKE)
[22:56:37] [PASSED] 0xB0B0 (PANTHERLAKE)
[22:56:37] [PASSED] 0xFD80 (PANTHERLAKE)
[22:56:37] [PASSED] 0xFD81 (PANTHERLAKE)
[22:56:37] [PASSED] 0xD740 (NOVALAKE_S)
[22:56:37] [PASSED] 0xD741 (NOVALAKE_S)
[22:56:37] [PASSED] 0xD742 (NOVALAKE_S)
[22:56:37] [PASSED] 0xD743 (NOVALAKE_S)
[22:56:37] [PASSED] 0xD744 (NOVALAKE_S)
[22:56:37] [PASSED] 0xD745 (NOVALAKE_S)
[22:56:37] [PASSED] 0x674C (CRESCENTISLAND)
[22:56:37] =============== [PASSED] check_platform_desc ===============
[22:56:37] ===================== [PASSED] xe_pci ======================
[22:56:37] =================== xe_rtp (3 subtests) ====================
[22:56:37] =================== xe_rtp_rules_tests  ====================
[22:56:37] [PASSED] no
[22:56:37] [PASSED] yes
[22:56:37] [PASSED] no-and-no
[22:56:37] [PASSED] no-and-yes
[22:56:37] [PASSED] yes-and-no
[22:56:37] [PASSED] yes-and-yes
[22:56:37] [PASSED] no-or-no
[22:56:37] [PASSED] no-or-yes
[22:56:37] [PASSED] yes-or-no
[22:56:37] [PASSED] yes-or-yes
[22:56:37] [PASSED] no-yes-or-no-yes
[22:56:37] [PASSED] no-yes-or-yes-yes
[22:56:37] [PASSED] yes-yes-or-no-yes
[22:56:37] [PASSED] yes-yes-or-yes-yes
[22:56:37] [PASSED] no-no-or-yes-or-no
[22:56:37] [PASSED] or
[22:56:37] [PASSED] or-anything
[22:56:37] [PASSED] anything-or
[22:56:37] [PASSED] anything-or-or-anything
[22:56:37] [PASSED] engine-class
[22:56:37] [PASSED] engine-class-or-yes
[22:56:37] [PASSED] engine-class-or-or-yes
[22:56:37] =============== [PASSED] xe_rtp_rules_tests ================
[22:56:37] =============== xe_rtp_process_to_sr_tests  ================
[22:56:37] [PASSED] coalesce-same-reg
[22:56:37] [PASSED] no-match-no-add
[22:56:37] [PASSED] two-regs-two-entries
[22:56:37] [PASSED] clr-one-set-other
[22:56:37] [PASSED] set-field
[22:56:37] [PASSED] conflict-duplicate
[22:56:37] [PASSED] conflict-not-disjoint
[22:56:37] [PASSED] conflict-reg-type
[22:56:37] =========== [PASSED] xe_rtp_process_to_sr_tests ============
[22:56:37] ================== xe_rtp_process_tests  ===================
[22:56:37] [PASSED] active1
[22:56:37] [PASSED] active2
[22:56:37] [PASSED] active-inactive
[22:56:37] [PASSED] inactive-active
[22:56:37] [PASSED] inactive-active-inactive
[22:56:37] [PASSED] inactive-inactive-inactive
[22:56:37] ============== [PASSED] xe_rtp_process_tests ===============
[22:56:37] ===================== [PASSED] xe_rtp ======================
[22:56:37] ==================== xe_wa (1 subtest) =====================
[22:56:37] ======================== xe_wa_gt  =========================
[22:56:37] [PASSED] TIGERLAKE B0
[22:56:37] [PASSED] DG1 A0
[22:56:37] [PASSED] DG1 B0
[22:56:37] [PASSED] ALDERLAKE_S A0
[22:56:37] [PASSED] ALDERLAKE_S B0
[22:56:37] [PASSED] ALDERLAKE_S C0
[22:56:37] [PASSED] ALDERLAKE_S D0
[22:56:37] [PASSED] ALDERLAKE_P A0
[22:56:37] [PASSED] ALDERLAKE_P B0
[22:56:37] [PASSED] ALDERLAKE_P C0
[22:56:37] [PASSED] ALDERLAKE_S RPLS D0
[22:56:37] [PASSED] ALDERLAKE_P RPLU E0
[22:56:37] [PASSED] DG2 G10 C0
[22:56:37] [PASSED] DG2 G11 B1
[22:56:37] [PASSED] DG2 G12 A1
[22:56:37] [PASSED] METEORLAKE 12.70(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:56:37] [PASSED] METEORLAKE 12.71(Xe_LPG) A0 13.00(Xe_LPM+) A0
[22:56:37] [PASSED] METEORLAKE 12.74(Xe_LPG+) A0 13.00(Xe_LPM+) A0
[22:56:37] [PASSED] LUNARLAKE 20.04(Xe2_LPG) A0 20.00(Xe2_LPM) A0
[22:56:37] [PASSED] LUNARLAKE 20.04(Xe2_LPG) B0 20.00(Xe2_LPM) A0
[22:56:37] [PASSED] BATTLEMAGE 20.01(Xe2_HPG) A0 13.01(Xe2_HPM) A1
[22:56:37] [PASSED] PANTHERLAKE 30.00(Xe3_LPG) A0 30.00(Xe3_LPM) A0
[22:56:37] ==================== [PASSED] xe_wa_gt =====================
[22:56:37] ====================== [PASSED] xe_wa ======================
[22:56:37] ============================================================
[22:56:37] Testing complete. Ran 529 tests: passed: 511, skipped: 18
[22:56:37] Elapsed time: 36.358s total, 4.248s configuring, 31.589s building, 0.471s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[22:56:37] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:56:39] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:57:04] Starting KUnit Kernel (1/1)...
[22:57:04] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:57:04] ============ drm_test_pick_cmdline (2 subtests) ============
[22:57:04] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[22:57:04] =============== drm_test_pick_cmdline_named  ===============
[22:57:04] [PASSED] NTSC
[22:57:04] [PASSED] NTSC-J
[22:57:04] [PASSED] PAL
[22:57:04] [PASSED] PAL-M
[22:57:04] =========== [PASSED] drm_test_pick_cmdline_named ===========
[22:57:04] ============== [PASSED] drm_test_pick_cmdline ==============
[22:57:04] == drm_test_atomic_get_connector_for_encoder (1 subtest) ===
[22:57:04] [PASSED] drm_test_drm_atomic_get_connector_for_encoder
[22:57:04] ==== [PASSED] drm_test_atomic_get_connector_for_encoder ====
[22:57:04] =========== drm_validate_clone_mode (2 subtests) ===========
[22:57:04] ============== drm_test_check_in_clone_mode  ===============
[22:57:04] [PASSED] in_clone_mode
[22:57:04] [PASSED] not_in_clone_mode
[22:57:04] ========== [PASSED] drm_test_check_in_clone_mode ===========
[22:57:04] =============== drm_test_check_valid_clones  ===============
[22:57:04] [PASSED] not_in_clone_mode
[22:57:04] [PASSED] valid_clone
[22:57:04] [PASSED] invalid_clone
[22:57:04] =========== [PASSED] drm_test_check_valid_clones ===========
[22:57:04] ============= [PASSED] drm_validate_clone_mode =============
[22:57:04] ============= drm_validate_modeset (1 subtest) =============
[22:57:04] [PASSED] drm_test_check_connector_changed_modeset
[22:57:04] ============== [PASSED] drm_validate_modeset ===============
[22:57:04] ====== drm_test_bridge_get_current_state (2 subtests) ======
[22:57:04] [PASSED] drm_test_drm_bridge_get_current_state_atomic
[22:57:04] [PASSED] drm_test_drm_bridge_get_current_state_legacy
[22:57:04] ======== [PASSED] drm_test_bridge_get_current_state ========
[22:57:04] ====== drm_test_bridge_helper_reset_crtc (3 subtests) ======
[22:57:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic
[22:57:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_atomic_disabled
[22:57:04] [PASSED] drm_test_drm_bridge_helper_reset_crtc_legacy
[22:57:04] ======== [PASSED] drm_test_bridge_helper_reset_crtc ========
[22:57:04] ============== drm_bridge_alloc (2 subtests) ===============
[22:57:04] [PASSED] drm_test_drm_bridge_alloc_basic
[22:57:04] [PASSED] drm_test_drm_bridge_alloc_get_put
[22:57:04] ================ [PASSED] drm_bridge_alloc =================
[22:57:04] ================== drm_buddy (8 subtests) ==================
[22:57:04] [PASSED] drm_test_buddy_alloc_limit
[22:57:04] [PASSED] drm_test_buddy_alloc_optimistic
[22:57:04] [PASSED] drm_test_buddy_alloc_pessimistic
[22:57:04] [PASSED] drm_test_buddy_alloc_pathological
[22:57:04] [PASSED] drm_test_buddy_alloc_contiguous
[22:57:04] [PASSED] drm_test_buddy_alloc_clear
[22:57:04] [PASSED] drm_test_buddy_alloc_range_bias
[22:57:05] [PASSED] drm_test_buddy_fragmentation_performance
[22:57:05] ==================== [PASSED] drm_buddy ====================
[22:57:05] ============= drm_cmdline_parser (40 subtests) =============
[22:57:05] [PASSED] drm_test_cmdline_force_d_only
[22:57:05] [PASSED] drm_test_cmdline_force_D_only_dvi
[22:57:05] [PASSED] drm_test_cmdline_force_D_only_hdmi
[22:57:05] [PASSED] drm_test_cmdline_force_D_only_not_digital
[22:57:05] [PASSED] drm_test_cmdline_force_e_only
[22:57:05] [PASSED] drm_test_cmdline_res
[22:57:05] [PASSED] drm_test_cmdline_res_vesa
[22:57:05] [PASSED] drm_test_cmdline_res_vesa_rblank
[22:57:05] [PASSED] drm_test_cmdline_res_rblank
[22:57:05] [PASSED] drm_test_cmdline_res_bpp
[22:57:05] [PASSED] drm_test_cmdline_res_refresh
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[22:57:05] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[22:57:05] [PASSED] drm_test_cmdline_res_margins_force_on
[22:57:05] [PASSED] drm_test_cmdline_res_vesa_margins
[22:57:05] [PASSED] drm_test_cmdline_name
[22:57:05] [PASSED] drm_test_cmdline_name_bpp
[22:57:05] [PASSED] drm_test_cmdline_name_option
[22:57:05] [PASSED] drm_test_cmdline_name_bpp_option
[22:57:05] [PASSED] drm_test_cmdline_rotate_0
[22:57:05] [PASSED] drm_test_cmdline_rotate_90
[22:57:05] [PASSED] drm_test_cmdline_rotate_180
[22:57:05] [PASSED] drm_test_cmdline_rotate_270
[22:57:05] [PASSED] drm_test_cmdline_hmirror
[22:57:05] [PASSED] drm_test_cmdline_vmirror
[22:57:05] [PASSED] drm_test_cmdline_margin_options
[22:57:05] [PASSED] drm_test_cmdline_multiple_options
[22:57:05] [PASSED] drm_test_cmdline_bpp_extra_and_option
[22:57:05] [PASSED] drm_test_cmdline_extra_and_option
[22:57:05] [PASSED] drm_test_cmdline_freestanding_options
[22:57:05] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[22:57:05] [PASSED] drm_test_cmdline_panel_orientation
[22:57:05] ================ drm_test_cmdline_invalid  =================
[22:57:05] [PASSED] margin_only
[22:57:05] [PASSED] interlace_only
[22:57:05] [PASSED] res_missing_x
[22:57:05] [PASSED] res_missing_y
[22:57:05] [PASSED] res_bad_y
[22:57:05] [PASSED] res_missing_y_bpp
[22:57:05] [PASSED] res_bad_bpp
[22:57:05] [PASSED] res_bad_refresh
[22:57:05] [PASSED] res_bpp_refresh_force_on_off
[22:57:05] [PASSED] res_invalid_mode
[22:57:05] [PASSED] res_bpp_wrong_place_mode
[22:57:05] [PASSED] name_bpp_refresh
[22:57:05] [PASSED] name_refresh
[22:57:05] [PASSED] name_refresh_wrong_mode
[22:57:05] [PASSED] name_refresh_invalid_mode
[22:57:05] [PASSED] rotate_multiple
[22:57:05] [PASSED] rotate_invalid_val
[22:57:05] [PASSED] rotate_truncated
[22:57:05] [PASSED] invalid_option
[22:57:05] [PASSED] invalid_tv_option
[22:57:05] [PASSED] truncated_tv_option
[22:57:05] ============ [PASSED] drm_test_cmdline_invalid =============
[22:57:05] =============== drm_test_cmdline_tv_options  ===============
[22:57:05] [PASSED] NTSC
[22:57:05] [PASSED] NTSC_443
[22:57:05] [PASSED] NTSC_J
[22:57:05] [PASSED] PAL
[22:57:05] [PASSED] PAL_M
[22:57:05] [PASSED] PAL_N
[22:57:05] [PASSED] SECAM
[22:57:05] [PASSED] MONO_525
[22:57:05] [PASSED] MONO_625
[22:57:05] =========== [PASSED] drm_test_cmdline_tv_options ===========
[22:57:05] =============== [PASSED] drm_cmdline_parser ================
[22:57:05] ========== drmm_connector_hdmi_init (20 subtests) ==========
[22:57:05] [PASSED] drm_test_connector_hdmi_init_valid
[22:57:05] [PASSED] drm_test_connector_hdmi_init_bpc_8
[22:57:05] [PASSED] drm_test_connector_hdmi_init_bpc_10
[22:57:05] [PASSED] drm_test_connector_hdmi_init_bpc_12
[22:57:05] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[22:57:05] [PASSED] drm_test_connector_hdmi_init_bpc_null
[22:57:05] [PASSED] drm_test_connector_hdmi_init_formats_empty
[22:57:05] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[22:57:05] === drm_test_connector_hdmi_init_formats_yuv420_allowed  ===
[22:57:05] [PASSED] supported_formats=0x9 yuv420_allowed=1
[22:57:05] [PASSED] supported_formats=0x9 yuv420_allowed=0
[22:57:05] [PASSED] supported_formats=0x3 yuv420_allowed=1
[22:57:05] [PASSED] supported_formats=0x3 yuv420_allowed=0
[22:57:05] === [PASSED] drm_test_connector_hdmi_init_formats_yuv420_allowed ===
[22:57:05] [PASSED] drm_test_connector_hdmi_init_null_ddc
[22:57:05] [PASSED] drm_test_connector_hdmi_init_null_product
[22:57:05] [PASSED] drm_test_connector_hdmi_init_null_vendor
[22:57:05] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[22:57:05] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[22:57:05] [PASSED] drm_test_connector_hdmi_init_product_valid
[22:57:05] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[22:57:05] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[22:57:05] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[22:57:05] ========= drm_test_connector_hdmi_init_type_valid  =========
[22:57:05] [PASSED] HDMI-A
[22:57:05] [PASSED] HDMI-B
[22:57:05] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[22:57:05] ======== drm_test_connector_hdmi_init_type_invalid  ========
[22:57:05] [PASSED] Unknown
[22:57:05] [PASSED] VGA
[22:57:05] [PASSED] DVI-I
[22:57:05] [PASSED] DVI-D
[22:57:05] [PASSED] DVI-A
[22:57:05] [PASSED] Composite
[22:57:05] [PASSED] SVIDEO
[22:57:05] [PASSED] LVDS
[22:57:05] [PASSED] Component
[22:57:05] [PASSED] DIN
[22:57:05] [PASSED] DP
[22:57:05] [PASSED] TV
[22:57:05] [PASSED] eDP
[22:57:05] [PASSED] Virtual
[22:57:05] [PASSED] DSI
[22:57:05] [PASSED] DPI
[22:57:05] [PASSED] Writeback
[22:57:05] [PASSED] SPI
[22:57:05] [PASSED] USB
[22:57:05] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[22:57:05] ============ [PASSED] drmm_connector_hdmi_init =============
[22:57:05] ============= drmm_connector_init (3 subtests) =============
[22:57:05] [PASSED] drm_test_drmm_connector_init
[22:57:05] [PASSED] drm_test_drmm_connector_init_null_ddc
[22:57:05] ========= drm_test_drmm_connector_init_type_valid  =========
[22:57:05] [PASSED] Unknown
[22:57:05] [PASSED] VGA
[22:57:05] [PASSED] DVI-I
[22:57:05] [PASSED] DVI-D
[22:57:05] [PASSED] DVI-A
[22:57:05] [PASSED] Composite
[22:57:05] [PASSED] SVIDEO
[22:57:05] [PASSED] LVDS
[22:57:05] [PASSED] Component
[22:57:05] [PASSED] DIN
[22:57:05] [PASSED] DP
[22:57:05] [PASSED] HDMI-A
[22:57:05] [PASSED] HDMI-B
[22:57:05] [PASSED] TV
[22:57:05] [PASSED] eDP
[22:57:05] [PASSED] Virtual
[22:57:05] [PASSED] DSI
[22:57:05] [PASSED] DPI
[22:57:05] [PASSED] Writeback
[22:57:05] [PASSED] SPI
[22:57:05] [PASSED] USB
[22:57:05] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[22:57:05] =============== [PASSED] drmm_connector_init ===============
[22:57:05] ========= drm_connector_dynamic_init (6 subtests) ==========
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_init
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_init_null_ddc
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_init_not_added
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_init_properties
[22:57:05] ===== drm_test_drm_connector_dynamic_init_type_valid  ======
[22:57:05] [PASSED] Unknown
[22:57:05] [PASSED] VGA
[22:57:05] [PASSED] DVI-I
[22:57:05] [PASSED] DVI-D
[22:57:05] [PASSED] DVI-A
[22:57:05] [PASSED] Composite
[22:57:05] [PASSED] SVIDEO
[22:57:05] [PASSED] LVDS
[22:57:05] [PASSED] Component
[22:57:05] [PASSED] DIN
[22:57:05] [PASSED] DP
[22:57:05] [PASSED] HDMI-A
[22:57:05] [PASSED] HDMI-B
[22:57:05] [PASSED] TV
[22:57:05] [PASSED] eDP
[22:57:05] [PASSED] Virtual
[22:57:05] [PASSED] DSI
[22:57:05] [PASSED] DPI
[22:57:05] [PASSED] Writeback
[22:57:05] [PASSED] SPI
[22:57:05] [PASSED] USB
[22:57:05] = [PASSED] drm_test_drm_connector_dynamic_init_type_valid ==
[22:57:05] ======== drm_test_drm_connector_dynamic_init_name  =========
[22:57:05] [PASSED] Unknown
[22:57:05] [PASSED] VGA
[22:57:05] [PASSED] DVI-I
[22:57:05] [PASSED] DVI-D
[22:57:05] [PASSED] DVI-A
[22:57:05] [PASSED] Composite
[22:57:05] [PASSED] SVIDEO
[22:57:05] [PASSED] LVDS
[22:57:05] [PASSED] Component
[22:57:05] [PASSED] DIN
[22:57:05] [PASSED] DP
[22:57:05] [PASSED] HDMI-A
[22:57:05] [PASSED] HDMI-B
[22:57:05] [PASSED] TV
[22:57:05] [PASSED] eDP
[22:57:05] [PASSED] Virtual
[22:57:05] [PASSED] DSI
[22:57:05] [PASSED] DPI
[22:57:05] [PASSED] Writeback
[22:57:05] [PASSED] SPI
[22:57:05] [PASSED] USB
[22:57:05] ==== [PASSED] drm_test_drm_connector_dynamic_init_name =====
[22:57:05] =========== [PASSED] drm_connector_dynamic_init ============
[22:57:05] ==== drm_connector_dynamic_register_early (4 subtests) =====
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_early_on_list
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_early_defer
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_early_no_init
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_early_no_mode_object
[22:57:05] ====== [PASSED] drm_connector_dynamic_register_early =======
[22:57:05] ======= drm_connector_dynamic_register (7 subtests) ========
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_on_list
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_no_defer
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_no_init
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_mode_object
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_sysfs
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_sysfs_name
[22:57:05] [PASSED] drm_test_drm_connector_dynamic_register_debugfs
[22:57:05] ========= [PASSED] drm_connector_dynamic_register ==========
[22:57:05] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[22:57:05] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[22:57:05] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[22:57:05] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[22:57:05] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[22:57:05] ========== drm_test_get_tv_mode_from_name_valid  ===========
[22:57:05] [PASSED] NTSC
[22:57:05] [PASSED] NTSC-443
[22:57:05] [PASSED] NTSC-J
[22:57:05] [PASSED] PAL
[22:57:05] [PASSED] PAL-M
[22:57:05] [PASSED] PAL-N
[22:57:05] [PASSED] SECAM
[22:57:05] [PASSED] Mono
[22:57:05] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[22:57:05] [PASSED] drm_test_get_tv_mode_from_name_truncated
[22:57:05] ============ [PASSED] drm_get_tv_mode_from_name ============
[22:57:05] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[22:57:05] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[22:57:05] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[22:57:05] [PASSED] VIC 96
[22:57:05] [PASSED] VIC 97
[22:57:05] [PASSED] VIC 101
[22:57:05] [PASSED] VIC 102
[22:57:05] [PASSED] VIC 106
[22:57:05] [PASSED] VIC 107
[22:57:05] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[22:57:05] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[22:57:05] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[22:57:05] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[22:57:05] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[22:57:05] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[22:57:05] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[22:57:05] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[22:57:05] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[22:57:05] [PASSED] Automatic
[22:57:05] [PASSED] Full
[22:57:05] [PASSED] Limited 16:235
[22:57:05] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[22:57:05] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[22:57:05] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[22:57:05] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[22:57:05] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[22:57:05] [PASSED] RGB
[22:57:05] [PASSED] YUV 4:2:0
[22:57:05] [PASSED] YUV 4:2:2
[22:57:05] [PASSED] YUV 4:4:4
[22:57:05] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[22:57:05] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[22:57:05] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[22:57:05] ============= drm_damage_helper (21 subtests) ==============
[22:57:05] [PASSED] drm_test_damage_iter_no_damage
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_src_moved
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_not_visible
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[22:57:05] [PASSED] drm_test_damage_iter_no_damage_no_fb
[22:57:05] [PASSED] drm_test_damage_iter_simple_damage
[22:57:05] [PASSED] drm_test_damage_iter_single_damage
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_outside_src
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_src_moved
[22:57:05] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[22:57:05] [PASSED] drm_test_damage_iter_damage
[22:57:05] [PASSED] drm_test_damage_iter_damage_one_intersect
[22:57:05] [PASSED] drm_test_damage_iter_damage_one_outside
[22:57:05] [PASSED] drm_test_damage_iter_damage_src_moved
[22:57:05] [PASSED] drm_test_damage_iter_damage_not_visible
[22:57:05] ================ [PASSED] drm_damage_helper ================
[22:57:05] ============== drm_dp_mst_helper (3 subtests) ==============
[22:57:05] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[22:57:05] [PASSED] Clock 154000 BPP 30 DSC disabled
[22:57:05] [PASSED] Clock 234000 BPP 30 DSC disabled
[22:57:05] [PASSED] Clock 297000 BPP 24 DSC disabled
[22:57:05] [PASSED] Clock 332880 BPP 24 DSC enabled
[22:57:05] [PASSED] Clock 324540 BPP 24 DSC enabled
[22:57:05] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[22:57:05] ============== drm_test_dp_mst_calc_pbn_div  ===============
[22:57:05] [PASSED] Link rate 2000000 lane count 4
[22:57:05] [PASSED] Link rate 2000000 lane count 2
[22:57:05] [PASSED] Link rate 2000000 lane count 1
[22:57:05] [PASSED] Link rate 1350000 lane count 4
[22:57:05] [PASSED] Link rate 1350000 lane count 2
[22:57:05] [PASSED] Link rate 1350000 lane count 1
[22:57:05] [PASSED] Link rate 1000000 lane count 4
[22:57:05] [PASSED] Link rate 1000000 lane count 2
[22:57:05] [PASSED] Link rate 1000000 lane count 1
[22:57:05] [PASSED] Link rate 810000 lane count 4
[22:57:05] [PASSED] Link rate 810000 lane count 2
[22:57:05] [PASSED] Link rate 810000 lane count 1
[22:57:05] [PASSED] Link rate 540000 lane count 4
[22:57:05] [PASSED] Link rate 540000 lane count 2
[22:57:05] [PASSED] Link rate 540000 lane count 1
[22:57:05] [PASSED] Link rate 270000 lane count 4
[22:57:05] [PASSED] Link rate 270000 lane count 2
[22:57:05] [PASSED] Link rate 270000 lane count 1
[22:57:05] [PASSED] Link rate 162000 lane count 4
[22:57:05] [PASSED] Link rate 162000 lane count 2
[22:57:05] [PASSED] Link rate 162000 lane count 1
[22:57:05] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[22:57:05] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[22:57:05] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[22:57:05] [PASSED] DP_POWER_UP_PHY with port number
[22:57:05] [PASSED] DP_POWER_DOWN_PHY with port number
[22:57:05] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[22:57:05] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[22:57:05] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[22:57:05] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[22:57:05] [PASSED] DP_QUERY_PAYLOAD with port number
[22:57:05] [PASSED] DP_QUERY_PAYLOAD with VCPI
[22:57:05] [PASSED] DP_REMOTE_DPCD_READ with port number
[22:57:05] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[22:57:05] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[22:57:05] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[22:57:05] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[22:57:05] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[22:57:05] [PASSED] DP_REMOTE_I2C_READ with port number
[22:57:05] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[22:57:05] [PASSED] DP_REMOTE_I2C_READ with transactions array
[22:57:05] [PASSED] DP_REMOTE_I2C_WRITE with port number
[22:57:05] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[22:57:05] [PASSED] DP_REMOTE_I2C_WRITE with data array
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[22:57:05] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[22:57:05] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[22:57:05] ================ [PASSED] drm_dp_mst_helper ================
[22:57:05] ================== drm_exec (7 subtests) ===================
[22:57:05] [PASSED] sanitycheck
[22:57:05] [PASSED] test_lock
[22:57:05] [PASSED] test_lock_unlock
[22:57:05] [PASSED] test_duplicates
[22:57:05] [PASSED] test_prepare
[22:57:05] [PASSED] test_prepare_array
[22:57:05] [PASSED] test_multiple_loops
[22:57:05] ==================== [PASSED] drm_exec =====================
[22:57:05] =========== drm_format_helper_test (17 subtests) ===========
[22:57:05] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[22:57:05] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[22:57:05] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[22:57:05] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[22:57:05] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[22:57:05] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[22:57:05] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[22:57:05] ============= drm_test_fb_xrgb8888_to_bgr888  ==============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========= [PASSED] drm_test_fb_xrgb8888_to_bgr888 ==========
[22:57:05] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[22:57:05] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[22:57:05] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[22:57:05] ============== drm_test_fb_xrgb8888_to_mono  ===============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[22:57:05] ==================== drm_test_fb_swab  =====================
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ================ [PASSED] drm_test_fb_swab =================
[22:57:05] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[22:57:05] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[22:57:05] [PASSED] single_pixel_source_buffer
[22:57:05] [PASSED] single_pixel_clip_rectangle
[22:57:05] [PASSED] well_known_colors
[22:57:05] [PASSED] destination_pitch
[22:57:05] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[22:57:05] ================= drm_test_fb_clip_offset  =================
[22:57:05] [PASSED] pass through
[22:57:05] [PASSED] horizontal offset
[22:57:05] [PASSED] vertical offset
[22:57:05] [PASSED] horizontal and vertical offset
[22:57:05] [PASSED] horizontal offset (custom pitch)
[22:57:05] [PASSED] vertical offset (custom pitch)
[22:57:05] [PASSED] horizontal and vertical offset (custom pitch)
[22:57:05] ============= [PASSED] drm_test_fb_clip_offset =============
[22:57:05] =================== drm_test_fb_memcpy  ====================
[22:57:05] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[22:57:05] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[22:57:05] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[22:57:05] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[22:57:05] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[22:57:05] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[22:57:05] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[22:57:05] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[22:57:05] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[22:57:05] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[22:57:05] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[22:57:05] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[22:57:05] =============== [PASSED] drm_test_fb_memcpy ================
[22:57:05] ============= [PASSED] drm_format_helper_test ==============
[22:57:05] ================= drm_format (18 subtests) =================
[22:57:05] [PASSED] drm_test_format_block_width_invalid
[22:57:05] [PASSED] drm_test_format_block_width_one_plane
[22:57:05] [PASSED] drm_test_format_block_width_two_plane
[22:57:05] [PASSED] drm_test_format_block_width_three_plane
[22:57:05] [PASSED] drm_test_format_block_width_tiled
[22:57:05] [PASSED] drm_test_format_block_height_invalid
[22:57:05] [PASSED] drm_test_format_block_height_one_plane
[22:57:05] [PASSED] drm_test_format_block_height_two_plane
[22:57:05] [PASSED] drm_test_format_block_height_three_plane
[22:57:05] [PASSED] drm_test_format_block_height_tiled
[22:57:05] [PASSED] drm_test_format_min_pitch_invalid
[22:57:05] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[22:57:05] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[22:57:05] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[22:57:05] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[22:57:05] [PASSED] drm_test_format_min_pitch_two_plane
[22:57:05] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[22:57:05] [PASSED] drm_test_format_min_pitch_tiled
[22:57:05] =================== [PASSED] drm_format ====================
[22:57:05] ============== drm_framebuffer (10 subtests) ===============
[22:57:05] ========== drm_test_framebuffer_check_src_coords  ==========
[22:57:05] [PASSED] Success: source fits into fb
[22:57:05] [PASSED] Fail: overflowing fb with x-axis coordinate
[22:57:05] [PASSED] Fail: overflowing fb with y-axis coordinate
[22:57:05] [PASSED] Fail: overflowing fb with source width
[22:57:05] [PASSED] Fail: overflowing fb with source height
[22:57:05] ====== [PASSED] drm_test_framebuffer_check_src_coords ======
[22:57:05] [PASSED] drm_test_framebuffer_cleanup
[22:57:05] =============== drm_test_framebuffer_create  ===============
[22:57:05] [PASSED] ABGR8888 normal sizes
[22:57:05] [PASSED] ABGR8888 max sizes
[22:57:05] [PASSED] ABGR8888 pitch greater than min required
[22:57:05] [PASSED] ABGR8888 pitch less than min required
[22:57:05] [PASSED] ABGR8888 Invalid width
[22:57:05] [PASSED] ABGR8888 Invalid buffer handle
[22:57:05] [PASSED] No pixel format
[22:57:05] [PASSED] ABGR8888 Width 0
[22:57:05] [PASSED] ABGR8888 Height 0
[22:57:05] [PASSED] ABGR8888 Out of bound height * pitch combination
[22:57:05] [PASSED] ABGR8888 Large buffer offset
[22:57:05] [PASSED] ABGR8888 Buffer offset for inexistent plane
[22:57:05] [PASSED] ABGR8888 Invalid flag
[22:57:05] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[22:57:05] [PASSED] ABGR8888 Valid buffer modifier
[22:57:05] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[22:57:05] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] NV12 Normal sizes
[22:57:05] [PASSED] NV12 Max sizes
[22:57:05] [PASSED] NV12 Invalid pitch
[22:57:05] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[22:57:05] [PASSED] NV12 different  modifier per-plane
[22:57:05] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[22:57:05] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] NV12 Modifier for inexistent plane
[22:57:05] [PASSED] NV12 Handle for inexistent plane
[22:57:05] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[22:57:05] [PASSED] YVU420 Normal sizes
[22:57:05] [PASSED] YVU420 Max sizes
[22:57:05] [PASSED] YVU420 Invalid pitch
[22:57:05] [PASSED] YVU420 Different pitches
[22:57:05] [PASSED] YVU420 Different buffer offsets/pitches
[22:57:05] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[22:57:05] [PASSED] YVU420 Valid modifier
[22:57:05] [PASSED] YVU420 Different modifiers per plane
[22:57:05] [PASSED] YVU420 Modifier for inexistent plane
[22:57:05] [PASSED] YUV420_10BIT Invalid modifier(DRM_FORMAT_MOD_LINEAR)
[22:57:05] [PASSED] X0L2 Normal sizes
[22:57:05] [PASSED] X0L2 Max sizes
[22:57:05] [PASSED] X0L2 Invalid pitch
[22:57:05] [PASSED] X0L2 Pitch greater than minimum required
[22:57:05] [PASSED] X0L2 Handle for inexistent plane
[22:57:05] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[22:57:05] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[22:57:05] [PASSED] X0L2 Valid modifier
[22:57:05] [PASSED] X0L2 Modifier for inexistent plane
[22:57:05] =========== [PASSED] drm_test_framebuffer_create ===========
[22:57:05] [PASSED] drm_test_framebuffer_free
[22:57:05] [PASSED] drm_test_framebuffer_init
[22:57:05] [PASSED] drm_test_framebuffer_init_bad_format
[22:57:05] [PASSED] drm_test_framebuffer_init_dev_mismatch
[22:57:05] [PASSED] drm_test_framebuffer_lookup
[22:57:05] [PASSED] drm_test_framebuffer_lookup_inexistent
[22:57:05] [PASSED] drm_test_framebuffer_modifiers_not_supported
[22:57:05] ================= [PASSED] drm_framebuffer =================
[22:57:05] ================ drm_gem_shmem (8 subtests) ================
[22:57:05] [PASSED] drm_gem_shmem_test_obj_create
[22:57:05] [PASSED] drm_gem_shmem_test_obj_create_private
[22:57:05] [PASSED] drm_gem_shmem_test_pin_pages
[22:57:05] [PASSED] drm_gem_shmem_test_vmap
[22:57:05] [PASSED] drm_gem_shmem_test_get_sg_table
[22:57:05] [PASSED] drm_gem_shmem_test_get_pages_sgt
[22:57:05] [PASSED] drm_gem_shmem_test_madvise
[22:57:05] [PASSED] drm_gem_shmem_test_purge
[22:57:05] ================== [PASSED] drm_gem_shmem ==================
[22:57:05] === drm_atomic_helper_connector_hdmi_check (27 subtests) ===
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[22:57:05] ====== drm_test_check_broadcast_rgb_cea_mode_yuv420  =======
[22:57:05] [PASSED] Automatic
[22:57:05] [PASSED] Full
[22:57:05] [PASSED] Limited 16:235
[22:57:05] == [PASSED] drm_test_check_broadcast_rgb_cea_mode_yuv420 ===
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[22:57:05] [PASSED] drm_test_check_disable_connector
[22:57:05] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[22:57:05] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_rgb
[22:57:05] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_yuv420
[22:57:05] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv422
[22:57:05] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback_ignore_yuv420
[22:57:05] [PASSED] drm_test_check_driver_unsupported_fallback_yuv420
[22:57:05] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[22:57:05] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[22:57:05] [PASSED] drm_test_check_output_bpc_dvi
[22:57:05] [PASSED] drm_test_check_output_bpc_format_vic_1
[22:57:05] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[22:57:05] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[22:57:05] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[22:57:05] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[22:57:05] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[22:57:05] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[22:57:05] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[22:57:05] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[22:57:05] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[22:57:05] [PASSED] drm_test_check_broadcast_rgb_value
[22:57:05] [PASSED] drm_test_check_bpc_8_value
[22:57:05] [PASSED] drm_test_check_bpc_10_value
[22:57:05] [PASSED] drm_test_check_bpc_12_value
[22:57:05] [PASSED] drm_test_check_format_value
[22:57:05] [PASSED] drm_test_check_tmds_char_value
[22:57:05] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[22:57:05] = drm_atomic_helper_connector_hdmi_mode_valid (4 subtests) =
[22:57:05] [PASSED] drm_test_check_mode_valid
[22:57:05] [PASSED] drm_test_check_mode_valid_reject
[22:57:05] [PASSED] drm_test_check_mode_valid_reject_rate
[22:57:05] [PASSED] drm_test_check_mode_valid_reject_max_clock
[22:57:05] === [PASSED] drm_atomic_helper_connector_hdmi_mode_valid ===
[22:57:05] ================= drm_managed (2 subtests) =================
[22:57:05] [PASSED] drm_test_managed_release_action
[22:57:05] [PASSED] drm_test_managed_run_action
[22:57:05] =================== [PASSED] drm_managed ===================
[22:57:05] =================== drm_mm (6 subtests) ====================
[22:57:05] [PASSED] drm_test_mm_init
[22:57:05] [PASSED] drm_test_mm_debug
[22:57:05] [PASSED] drm_test_mm_align32
[22:57:05] [PASSED] drm_test_mm_align64
[22:57:05] [PASSED] drm_test_mm_lowest
[22:57:05] [PASSED] drm_test_mm_highest
[22:57:05] ===================== [PASSED] drm_mm ======================
[22:57:05] ============= drm_modes_analog_tv (5 subtests) =============
[22:57:05] [PASSED] drm_test_modes_analog_tv_mono_576i
[22:57:05] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[22:57:05] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[22:57:05] [PASSED] drm_test_modes_analog_tv_pal_576i
[22:57:05] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[22:57:05] =============== [PASSED] drm_modes_analog_tv ===============
[22:57:05] ============== drm_plane_helper (2 subtests) ===============
[22:57:05] =============== drm_test_check_plane_state  ================
[22:57:05] [PASSED] clipping_simple
[22:57:05] [PASSED] clipping_rotate_reflect
[22:57:05] [PASSED] positioning_simple
[22:57:05] [PASSED] upscaling
[22:57:05] [PASSED] downscaling
[22:57:05] [PASSED] rounding1
[22:57:05] [PASSED] rounding2
[22:57:05] [PASSED] rounding3
[22:57:05] [PASSED] rounding4
[22:57:05] =========== [PASSED] drm_test_check_plane_state ============
[22:57:05] =========== drm_test_check_invalid_plane_state  ============
[22:57:05] [PASSED] positioning_invalid
[22:57:05] [PASSED] upscaling_invalid
[22:57:05] [PASSED] downscaling_invalid
[22:57:05] ======= [PASSED] drm_test_check_invalid_plane_state ========
[22:57:05] ================ [PASSED] drm_plane_helper =================
[22:57:05] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[22:57:05] ====== drm_test_connector_helper_tv_get_modes_check  =======
[22:57:05] [PASSED] None
[22:57:05] [PASSED] PAL
[22:57:05] [PASSED] NTSC
[22:57:05] [PASSED] Both, NTSC Default
[22:57:05] [PASSED] Both, PAL Default
[22:57:05] [PASSED] Both, NTSC Default, with PAL on command-line
[22:57:05] [PASSED] Both, PAL Default, with NTSC on command-line
[22:57:05] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[22:57:05] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[22:57:05] ================== drm_rect (9 subtests) ===================
[22:57:05] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[22:57:05] [PASSED] drm_test_rect_clip_scaled_not_clipped
[22:57:05] [PASSED] drm_test_rect_clip_scaled_clipped
[22:57:05] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[22:57:05] ================= drm_test_rect_intersect  =================
[22:57:05] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[22:57:05] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[22:57:05] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[22:57:05] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[22:57:05] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[22:57:05] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[22:57:05] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[22:57:05] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[22:57:05] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[22:57:05] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[22:57:05] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[22:57:05] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[22:57:05] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[22:57:05] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[22:57:05] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[22:57:05] ============= [PASSED] drm_test_rect_intersect =============
[22:57:05] ================ drm_test_rect_calc_hscale  ================
[22:57:05] [PASSED] normal use
[22:57:05] [PASSED] out of max range
[22:57:05] [PASSED] out of min range
[22:57:05] [PASSED] zero dst
[22:57:05] [PASSED] negative src
[22:57:05] [PASSED] negative dst
[22:57:05] ============ [PASSED] drm_test_rect_calc_hscale ============
[22:57:05] ================ drm_test_rect_calc_vscale  ================
[22:57:05] [PASSED] normal use
stty: 'standard input': Inappropriate ioctl for device
[22:57:05] [PASSED] out of max range
[22:57:05] [PASSED] out of min range
[22:57:05] [PASSED] zero dst
[22:57:05] [PASSED] negative src
[22:57:05] [PASSED] negative dst
[22:57:05] ============ [PASSED] drm_test_rect_calc_vscale ============
[22:57:05] ================== drm_test_rect_rotate  ===================
[22:57:05] [PASSED] reflect-x
[22:57:05] [PASSED] reflect-y
[22:57:05] [PASSED] rotate-0
[22:57:05] [PASSED] rotate-90
[22:57:05] [PASSED] rotate-180
[22:57:05] [PASSED] rotate-270
[22:57:05] ============== [PASSED] drm_test_rect_rotate ===============
[22:57:05] ================ drm_test_rect_rotate_inv  =================
[22:57:05] [PASSED] reflect-x
[22:57:05] [PASSED] reflect-y
[22:57:05] [PASSED] rotate-0
[22:57:05] [PASSED] rotate-90
[22:57:05] [PASSED] rotate-180
[22:57:05] [PASSED] rotate-270
[22:57:05] ============ [PASSED] drm_test_rect_rotate_inv =============
[22:57:05] ==================== [PASSED] drm_rect =====================
[22:57:05] ============ drm_sysfb_modeset_test (1 subtest) ============
[22:57:05] ============ drm_test_sysfb_build_fourcc_list  =============
[22:57:05] [PASSED] no native formats
[22:57:05] [PASSED] XRGB8888 as native format
[22:57:05] [PASSED] remove duplicates
[22:57:05] [PASSED] convert alpha formats
[22:57:05] [PASSED] random formats
[22:57:05] ======== [PASSED] drm_test_sysfb_build_fourcc_list =========
[22:57:05] ============= [PASSED] drm_sysfb_modeset_test ==============
[22:57:05] ================== drm_fixp (2 subtests) ===================
[22:57:05] [PASSED] drm_test_int2fixp
[22:57:05] [PASSED] drm_test_sm2fixp
[22:57:05] ==================== [PASSED] drm_fixp =====================
[22:57:05] ============================================================
[22:57:05] Testing complete. Ran 624 tests: passed: 624
[22:57:05] Elapsed time: 27.510s total, 1.710s configuring, 25.379s building, 0.374s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/ttm/tests/.kunitconfig
[22:57:05] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[22:57:06] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
[22:57:16] Starting KUnit Kernel (1/1)...
[22:57:16] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[22:57:16] ================= ttm_device (5 subtests) ==================
[22:57:16] [PASSED] ttm_device_init_basic
[22:57:16] [PASSED] ttm_device_init_multiple
[22:57:16] [PASSED] ttm_device_fini_basic
[22:57:16] [PASSED] ttm_device_init_no_vma_man
[22:57:16] ================== ttm_device_init_pools  ==================
[22:57:16] [PASSED] No DMA allocations, no DMA32 required
[22:57:16] [PASSED] DMA allocations, DMA32 required
[22:57:16] [PASSED] No DMA allocations, DMA32 required
[22:57:16] [PASSED] DMA allocations, no DMA32 required
[22:57:16] ============== [PASSED] ttm_device_init_pools ==============
[22:57:16] =================== [PASSED] ttm_device ====================
[22:57:16] ================== ttm_pool (8 subtests) ===================
[22:57:16] ================== ttm_pool_alloc_basic  ===================
[22:57:16] [PASSED] One page
[22:57:16] [PASSED] More than one page
[22:57:16] [PASSED] Above the allocation limit
[22:57:16] [PASSED] One page, with coherent DMA mappings enabled
[22:57:16] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:57:16] ============== [PASSED] ttm_pool_alloc_basic ===============
[22:57:16] ============== ttm_pool_alloc_basic_dma_addr  ==============
[22:57:16] [PASSED] One page
[22:57:16] [PASSED] More than one page
[22:57:16] [PASSED] Above the allocation limit
[22:57:16] [PASSED] One page, with coherent DMA mappings enabled
[22:57:16] [PASSED] Above the allocation limit, with coherent DMA mappings enabled
[22:57:16] ========== [PASSED] ttm_pool_alloc_basic_dma_addr ==========
[22:57:16] [PASSED] ttm_pool_alloc_order_caching_match
[22:57:16] [PASSED] ttm_pool_alloc_caching_mismatch
[22:57:16] [PASSED] ttm_pool_alloc_order_mismatch
[22:57:16] [PASSED] ttm_pool_free_dma_alloc
[22:57:16] [PASSED] ttm_pool_free_no_dma_alloc
[22:57:16] [PASSED] ttm_pool_fini_basic
[22:57:16] ==================== [PASSED] ttm_pool =====================
[22:57:16] ================ ttm_resource (8 subtests) =================
[22:57:16] ================= ttm_resource_init_basic  =================
[22:57:16] [PASSED] Init resource in TTM_PL_SYSTEM
[22:57:16] [PASSED] Init resource in TTM_PL_VRAM
[22:57:16] [PASSED] Init resource in a private placement
[22:57:16] [PASSED] Init resource in TTM_PL_SYSTEM, set placement flags
[22:57:16] ============= [PASSED] ttm_resource_init_basic =============
[22:57:16] [PASSED] ttm_resource_init_pinned
[22:57:16] [PASSED] ttm_resource_fini_basic
[22:57:16] [PASSED] ttm_resource_manager_init_basic
[22:57:16] [PASSED] ttm_resource_manager_usage_basic
[22:57:16] [PASSED] ttm_resource_manager_set_used_basic
[22:57:16] [PASSED] ttm_sys_man_alloc_basic
[22:57:16] [PASSED] ttm_sys_man_free_basic
[22:57:16] ================== [PASSED] ttm_resource ===================
[22:57:16] =================== ttm_tt (15 subtests) ===================
[22:57:16] ==================== ttm_tt_init_basic  ====================
[22:57:16] [PASSED] Page-aligned size
[22:57:16] [PASSED] Extra pages requested
[22:57:16] ================ [PASSED] ttm_tt_init_basic ================
[22:57:16] [PASSED] ttm_tt_init_misaligned
[22:57:16] [PASSED] ttm_tt_fini_basic
[22:57:16] [PASSED] ttm_tt_fini_sg
[22:57:16] [PASSED] ttm_tt_fini_shmem
[22:57:16] [PASSED] ttm_tt_create_basic
[22:57:16] [PASSED] ttm_tt_create_invalid_bo_type
[22:57:16] [PASSED] ttm_tt_create_ttm_exists
[22:57:16] [PASSED] ttm_tt_create_failed
[22:57:16] [PASSED] ttm_tt_destroy_basic
[22:57:16] [PASSED] ttm_tt_populate_null_ttm
[22:57:16] [PASSED] ttm_tt_populate_populated_ttm
[22:57:16] [PASSED] ttm_tt_unpopulate_basic
[22:57:16] [PASSED] ttm_tt_unpopulate_empty_ttm
[22:57:16] [PASSED] ttm_tt_swapin_basic
[22:57:16] ===================== [PASSED] ttm_tt ======================
[22:57:16] =================== ttm_bo (14 subtests) ===================
[22:57:16] =========== ttm_bo_reserve_optimistic_no_ticket  ===========
[22:57:16] [PASSED] Cannot be interrupted and sleeps
[22:57:16] [PASSED] Cannot be interrupted, locks straight away
[22:57:16] [PASSED] Can be interrupted, sleeps
[22:57:16] ======= [PASSED] ttm_bo_reserve_optimistic_no_ticket =======
[22:57:16] [PASSED] ttm_bo_reserve_locked_no_sleep
[22:57:16] [PASSED] ttm_bo_reserve_no_wait_ticket
[22:57:16] [PASSED] ttm_bo_reserve_double_resv
[22:57:16] [PASSED] ttm_bo_reserve_interrupted
[22:57:16] [PASSED] ttm_bo_reserve_deadlock
[22:57:16] [PASSED] ttm_bo_unreserve_basic
[22:57:16] [PASSED] ttm_bo_unreserve_pinned
[22:57:16] [PASSED] ttm_bo_unreserve_bulk
[22:57:16] [PASSED] ttm_bo_fini_basic
[22:57:16] [PASSED] ttm_bo_fini_shared_resv
[22:57:16] [PASSED] ttm_bo_pin_basic
[22:57:16] [PASSED] ttm_bo_pin_unpin_resource
[22:57:16] [PASSED] ttm_bo_multiple_pin_one_unpin
[22:57:16] ===================== [PASSED] ttm_bo ======================
[22:57:16] ============== ttm_bo_validate (21 subtests) ===============
[22:57:16] ============== ttm_bo_init_reserved_sys_man  ===============
[22:57:16] [PASSED] Buffer object for userspace
[22:57:16] [PASSED] Kernel buffer object
[22:57:16] [PASSED] Shared buffer object
[22:57:16] ========== [PASSED] ttm_bo_init_reserved_sys_man ===========
[22:57:16] ============== ttm_bo_init_reserved_mock_man  ==============
[22:57:16] [PASSED] Buffer object for userspace
[22:57:16] [PASSED] Kernel buffer object
[22:57:16] [PASSED] Shared buffer object
[22:57:16] ========== [PASSED] ttm_bo_init_reserved_mock_man ==========
[22:57:16] [PASSED] ttm_bo_init_reserved_resv
[22:57:16] ================== ttm_bo_validate_basic  ==================
[22:57:16] [PASSED] Buffer object for userspace
[22:57:16] [PASSED] Kernel buffer object
[22:57:16] [PASSED] Shared buffer object
[22:57:16] ============== [PASSED] ttm_bo_validate_basic ==============
[22:57:16] [PASSED] ttm_bo_validate_invalid_placement
[22:57:16] ============= ttm_bo_validate_same_placement  ==============
[22:57:16] [PASSED] System manager
[22:57:16] [PASSED] VRAM manager
[22:57:16] ========= [PASSED] ttm_bo_validate_same_placement ==========
[22:57:16] [PASSED] ttm_bo_validate_failed_alloc
[22:57:16] [PASSED] ttm_bo_validate_pinned
[22:57:16] [PASSED] ttm_bo_validate_busy_placement
[22:57:16] ================ ttm_bo_validate_multihop  =================
[22:57:16] [PASSED] Buffer object for userspace
[22:57:16] [PASSED] Kernel buffer object
[22:57:16] [PASSED] Shared buffer object
[22:57:16] ============ [PASSED] ttm_bo_validate_multihop =============
[22:57:16] ========== ttm_bo_validate_no_placement_signaled  ==========
[22:57:16] [PASSED] Buffer object in system domain, no page vector
[22:57:16] [PASSED] Buffer object in system domain with an existing page vector
[22:57:16] ====== [PASSED] ttm_bo_validate_no_placement_signaled ======
[22:57:16] ======== ttm_bo_validate_no_placement_not_signaled  ========
[22:57:16] [PASSED] Buffer object for userspace
[22:57:16] [PASSED] Kernel buffer object
[22:57:16] [PASSED] Shared buffer object
[22:57:16] ==== [PASSED] ttm_bo_validate_no_placement_not_signaled ====
[22:57:16] [PASSED] ttm_bo_validate_move_fence_signaled
[22:57:16] ========= ttm_bo_validate_move_fence_not_signaled  =========
[22:57:16] [PASSED] Waits for GPU
[22:57:16] [PASSED] Tries to lock straight away
[22:57:16] ===== [PASSED] ttm_bo_validate_move_fence_not_signaled =====
[22:57:16] [PASSED] ttm_bo_validate_happy_evict
[22:57:16] [PASSED] ttm_bo_validate_all_pinned_evict
[22:57:16] [PASSED] ttm_bo_validate_allowed_only_evict
[22:57:16] [PASSED] ttm_bo_validate_deleted_evict
[22:57:16] [PASSED] ttm_bo_validate_busy_domain_evict
[22:57:16] [PASSED] ttm_bo_validate_evict_gutting
[22:57:16] [PASSED] ttm_bo_validate_recrusive_evict
stty: 'standard input': Inappropriate ioctl for device
[22:57:16] ================= [PASSED] ttm_bo_validate =================
[22:57:16] ============================================================
[22:57:16] Testing complete. Ran 101 tests: passed: 101
[22:57:16] Elapsed time: 11.408s total, 1.671s configuring, 9.520s building, 0.188s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



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

* Re: [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for rule matching
  2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
@ 2026-01-14 22:57   ` Gustavo Sousa
  2026-02-10 22:03   ` Matt Roper
  1 sibling, 0 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-01-14 22:57 UTC (permalink / raw)
  To: intel-xe

Quoting Gustavo Sousa (2026-01-14 19:49:51-03:00)
>The kunit test cases for the RTP framework are currently separated into
>those that validate xe_rtp_process_to_sr() and those that validate
>xe_rtp_process().  In both of them, we also have mixed stuff to validate
>rule matching functionality, which should rather be done in a separate
>test case group.
>
>Let's create such a group, specific for validating rule matching, and
>also add an initial set of cases.  In an upcoming change, we will do a
>cleanup of the other groups by migrating those cases intended for rule
>matching to this new group.
>
>Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>---
> drivers/gpu/drm/xe/tests/xe_rtp.c      |  38 +++++++++
> drivers/gpu/drm/xe/tests/xe_rtp_test.c | 141 +++++++++++++++++++++++++++++++++
> drivers/gpu/drm/xe/tests/xe_rtp_test.h |  24 ++++++
> drivers/gpu/drm/xe/xe_rtp.c            |  55 +++++++++----
> 4 files changed, 242 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/tests/xe_rtp.c b/drivers/gpu/drm/xe/tests/xe_rtp.c
>new file mode 100644
>index 000000000000..b3a8b75936d1
>--- /dev/null
>+++ b/drivers/gpu/drm/xe/tests/xe_rtp.c
>@@ -0,0 +1,38 @@
>+// SPDX-License-Identifier: GPL-2.0 AND MIT
>+/*
>+ * Copyright © 2026 Intel Corporation
>+ */
>+
>+#include "tests/xe_rtp_test.h"
>+
>+#include <kunit/visibility.h>
>+
>+/**
>+ * xe_rtp_rule_matches - Check if a set of RTP rule set match against the
>+ *                         device/GT/hwe
>+ * @xe: The xe device
>+ * @gt: The GT struct (may be NULL)
>+ * @hwe: The hw_engine  (may be NULL)
>+ * @rules: The array of rules to match against
>+ * @n_rules: Number of items in @rules
>+ * @err: Pointer (may be NULL) to set error number.
>+ *
>+ * This parses the set of rules and check if they match against the passed
>+ * parameters.
>+ *
>+ * If passed, @err is updated with a non-zero negative error number or zero if
>+ * no errors were found during the parsing/evaluation of rules.
>+ *
>+ * Returns true if there is a match and false if there is no match or if an
>+ * error was found.
>+ */
>+bool xe_rtp_rule_matches(const struct xe_device *xe,
>+                         struct xe_gt *gt,
>+                         struct xe_hw_engine *hwe,
>+                         const struct xe_rtp_rule *rules,
>+                         unsigned int n_rules,
>+                         int *err)
>+{
>+        return rule_matches_with_err(xe, gt, hwe, rules, n_rules, err);
>+}
>+EXPORT_SYMBOL_IF_KUNIT(xe_rtp_rule_matches);
>diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>index d2255a59e58f..c3fea547da32 100644
>--- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>@@ -19,6 +19,7 @@
> #include "xe_pci_test.h"
> #include "xe_reg_sr.h"
> #include "xe_rtp.h"
>+#include "xe_rtp_test.h"
> 
> #define REGULAR_REG1        XE_REG(1)
> #define REGULAR_REG2        XE_REG(2)
>@@ -31,6 +32,14 @@
> #undef XE_REG_MCR
> #define XE_REG_MCR(...)     XE_REG(__VA_ARGS__, .mcr = 1)
> 
>+struct rtp_rules_test_case {
>+        const char *name;
>+        bool expected_match;
>+        int expected_err;
>+        const struct xe_rtp_rule *rules;
>+        u8 n_rules;
>+};
>+
> struct rtp_to_sr_test_case {
>         const char *name;
>         struct xe_reg expected_reg;
>@@ -60,6 +69,130 @@ static bool match_no(const struct xe_device *xe, const struct xe_gt *gt,
>         return false;
> }
> 
>+static const struct rtp_rules_test_case rtp_rules_cases[] = {
>+        /*
>+         * Single rules.
>+         *
>+         * TODO: Include other types of rules as well: GRAPHICS_VERSION(),
>+         * MEDIA_VERSION(), etc.
>+         */
>+        {
>+                .name = "no",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_no)),
>+        },
>+        {
>+                .name = "yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes)),
>+        },
>+
>+        /* Conjunctions with 2 operands. */
>+        {
>+                .name = "no-and-no",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_no), FUNC(match_no)),
>+        },
>+        {
>+                .name = "no-and-yes",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_no), FUNC(match_yes)),
>+        },
>+        {
>+                .name = "yes-and-no",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_yes), FUNC(match_no)),
>+        },
>+        {
>+                .name = "yes-and-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes)),
>+        },
>+
>+        /* Disjunctions with 2 operands. */
>+        {
>+                .name = "no-or-no",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_no)),
>+        },
>+        {
>+                .name = "no-or-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_yes)),
>+        },
>+        {
>+                .name = "yes-or-no",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_no)),
>+        },
>+        {
>+                .name = "yes-or-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_yes)),
>+        },
>+
>+        /* Conjunction and disjunctions. */
>+        {
>+                .name = "no-yes-or-no-yes",
>+                .expected_match = false,
>+                XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
>+                             FUNC(match_yes), FUNC(match_no)),
>+        },
>+        {
>+                .name = "no-yes-or-yes-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
>+                             FUNC(match_yes), FUNC(match_yes)),
>+        },
>+        {
>+                .name = "yes-yes-or-no-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
>+                             FUNC(match_no), FUNC(match_yes)),
>+        },
>+        {
>+                .name = "yes-yes-or-yes-yes",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
>+                             FUNC(match_yes), FUNC(match_yes)),
>+        },
>+        {
>+                .name = "no-no-or-yes-or-no",
>+                .expected_match = true,
>+                XE_RTP_RULES(FUNC(match_no), FUNC(match_no), OR,
>+                             FUNC(match_yes), OR,
>+                             FUNC(match_no)),
>+        },
>+
>+        /* Syntax errors. */
>+        {
>+                .name = "or",
>+                .expected_match = false,
>+                .expected_err = -EINVAL,
>+                XE_RTP_RULES(OR),
>+        },
>+        {
>+                .name = "or-anything",
>+                .expected_match = false,
>+                .expected_err = -EINVAL,
>+                XE_RTP_RULES(OR, FUNC(match_yes)),
>+        },
>+};
>+
>+static void xe_rtp_rules_tests(struct kunit *test)
>+{
>+        const struct rtp_rules_test_case *param = test->param_value;
>+        struct xe_device *xe = test->priv;
>+        struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt;
>+        int err;
>+        bool match;
>+
>+        match = xe_rtp_rule_matches(xe, gt, NULL, param->rules, param->n_rules, &err);
>+
>+        KUNIT_EXPECT_EQ(test, match, param->expected_match);
>+        KUNIT_EXPECT_EQ(test, err, param->expected_err);
>+}
>+
> static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
>         {
>                 .name = "coalesce-same-reg",
>@@ -488,6 +621,13 @@ static void xe_rtp_process_tests(struct kunit *test)
>         KUNIT_EXPECT_EQ(test, active, param->expected_active);
> }
> 
>+static void rtp_rules_desc(const struct rtp_rules_test_case *t, char *desc)
>+{
>+        strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
>+}
>+
>+KUNIT_ARRAY_PARAM(rtp_rules, rtp_rules_cases, rtp_rules_desc);
>+
> static void rtp_to_sr_desc(const struct rtp_to_sr_test_case *t, char *desc)
> {
>         strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
>@@ -533,6 +673,7 @@ static void xe_rtp_test_exit(struct kunit *test)
> }
> 
> static struct kunit_case xe_rtp_tests[] = {
>+        KUNIT_CASE_PARAM(xe_rtp_rules_tests, rtp_rules_gen_params),
>         KUNIT_CASE_PARAM(xe_rtp_process_to_sr_tests, rtp_to_sr_gen_params),
>         KUNIT_CASE_PARAM(xe_rtp_process_tests, rtp_gen_params),
>         {}
>diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.h b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
>new file mode 100644
>index 000000000000..0579c1522424
>--- /dev/null
>+++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
>@@ -0,0 +1,24 @@
>+/* SPDX-License-Identifier: GPL-2.0 AND MIT */
>+/*
>+ * Copyright © 2026 Intel Corporation
>+ */
>+
>+#ifndef _XE_RTP_TEST_H_
>+#define _XE_RTP_TEST_H_
>+
>+#include <linux/types.h>
>+#include <kunit/test.h>

Oops... A leftover that should have been removed.

--
Gustavo Sousa

>+
>+struct xe_device;
>+struct xe_gt;
>+struct xe_hw_engine;
>+struct xe_rtp_rule;
>+
>+bool xe_rtp_rule_matches(const struct xe_device *xe,
>+                         struct xe_gt *gt,
>+                         struct xe_hw_engine *hwe,
>+                         const struct xe_rtp_rule *rules,
>+                         unsigned int n_rules,
>+                         int *err);
>+
>+#endif
>diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
>index ed509b1c8cfc..e955df6c22ca 100644
>--- a/drivers/gpu/drm/xe/xe_rtp.c
>+++ b/drivers/gpu/drm/xe/xe_rtp.c
>@@ -30,16 +30,20 @@ static bool has_samedia(const struct xe_device *xe)
>         return xe->info.media_verx100 >= 1300;
> }
> 
>-static bool rule_matches(const struct xe_device *xe,
>-                         struct xe_gt *gt,
>-                         struct xe_hw_engine *hwe,
>-                         const struct xe_rtp_rule *rules,
>-                         unsigned int n_rules)
>+static bool rule_matches_with_err(const struct xe_device *xe,
>+                                  struct xe_gt *gt,
>+                                  struct xe_hw_engine *hwe,
>+                                  const struct xe_rtp_rule *rules,
>+                                  unsigned int n_rules,
>+                                  int *err)
> {
>         const struct xe_rtp_rule *r;
>         unsigned int i, rcount = 0;
>         bool match;
> 
>+        if (err)
>+                *err = 0;
>+
>         for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
>                 switch (r->match_type) {
>                 case XE_RTP_MATCH_OR:
>@@ -58,14 +62,14 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_GRAPHICS_VERSION:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.graphics_verx100 == r->ver_start &&
>                                 (!has_samedia(xe) || !xe_gt_is_media_type(gt));
>                         break;
>                 case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.graphics_verx100 >= r->ver_start &&
>                                 xe->info.graphics_verx100 <= r->ver_end &&
>@@ -73,13 +77,13 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.graphics_verx100 == r->ver_start;
>                         break;
>                 case XE_RTP_MATCH_GRAPHICS_STEP:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.step.graphics >= r->step_start &&
>                                 xe->info.step.graphics < r->step_end &&
>@@ -87,14 +91,14 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_MEDIA_VERSION:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.media_verx100 == r->ver_start &&
>                                 (!has_samedia(xe) || xe_gt_is_media_type(gt));
>                         break;
>                 case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.media_verx100 >= r->ver_start &&
>                                 xe->info.media_verx100 <= r->ver_end &&
>@@ -102,7 +106,7 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_MEDIA_STEP:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.step.media >= r->step_start &&
>                                 xe->info.step.media < r->step_end &&
>@@ -110,7 +114,7 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
>                         if (drm_WARN_ON(&xe->drm, !gt))
>-                                return false;
>+                                goto error;
> 
>                         match = xe->info.media_verx100 == r->ver_start;
>                         break;
>@@ -122,13 +126,13 @@ static bool rule_matches(const struct xe_device *xe,
>                         break;
>                 case XE_RTP_MATCH_ENGINE_CLASS:
>                         if (drm_WARN_ON(&xe->drm, !hwe))
>-                                return false;
>+                                goto error;
> 
>                         match = hwe->class == r->engine_class;
>                         break;
>                 case XE_RTP_MATCH_NOT_ENGINE_CLASS:
>                         if (drm_WARN_ON(&xe->drm, !hwe))
>-                                return false;
>+                                goto error;
> 
>                         match = hwe->class != r->engine_class;
>                         break;
>@@ -160,9 +164,24 @@ static bool rule_matches(const struct xe_device *xe,
> 
> done:
>         if (drm_WARN_ON(&xe->drm, !rcount))
>-                return false;
>+                goto error;
> 
>         return true;
>+
>+error:
>+        if (err)
>+                *err = -EINVAL;
>+
>+        return false;
>+}
>+
>+static bool rule_matches(const struct xe_device *xe,
>+                         struct xe_gt *gt,
>+                         struct xe_hw_engine *hwe,
>+                         const struct xe_rtp_rule *rules,
>+                         unsigned int n_rules)
>+{
>+        return rule_matches_with_err(xe, gt, hwe, rules, n_rules, NULL);
> }
> 
> static void rtp_add_sr_entry(const struct xe_rtp_action *action,
>@@ -385,3 +404,7 @@ bool xe_rtp_match_has_flat_ccs(const struct xe_device *xe,
> {
>         return xe->info.has_flat_ccs;
> }
>+
>+#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
>+#include "tests/xe_rtp.c"
>+#endif
>
>-- 
>2.52.0
>

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

* ✓ Xe.CI.BAT: success for drm/xe/rtp: Miscellaneous improvements to rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (7 preceding siblings ...)
  2026-01-14 22:57 ` ✓ CI.KUnit: success " Patchwork
@ 2026-01-14 23:30 ` Patchwork
  2026-01-15  4:53 ` ✗ Xe.CI.Full: failure " Patchwork
  9 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2026-01-14 23:30 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

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

== Series Details ==

Series: drm/xe/rtp: Miscellaneous improvements to rule matching
URL   : https://patchwork.freedesktop.org/series/160111/
State : success

== Summary ==

CI Bug Log - changes from xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d_BAT -> xe-pw-160111v1_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (12 -> 12)
------------------------------

  No changes in participating hosts


Changes
-------

  No changes found


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

  * Linux: xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d -> xe-pw-160111v1

  IGT_8701: 8701
  xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d: 733664f1edf3c01cc68e6dd0bbdb135158a98a1d
  xe-pw-160111v1: 160111v1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/index.html

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

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

* ✗ Xe.CI.Full: failure for drm/xe/rtp: Miscellaneous improvements to rule matching
  2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
                   ` (8 preceding siblings ...)
  2026-01-14 23:30 ` ✓ Xe.CI.BAT: " Patchwork
@ 2026-01-15  4:53 ` Patchwork
  9 siblings, 0 replies; 19+ messages in thread
From: Patchwork @ 2026-01-15  4:53 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

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

== Series Details ==

Series: drm/xe/rtp: Miscellaneous improvements to rule matching
URL   : https://patchwork.freedesktop.org/series/160111/
State : failure

== Summary ==

CI Bug Log - changes from xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d_FULL -> xe-pw-160111v1_FULL
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with xe-pw-160111v1_FULL absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in xe-pw-160111v1_FULL, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (2 -> 2)
------------------------------

  No changes in participating hosts

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

  Here are the unknown changes that may have been introduced in xe-pw-160111v1_FULL:

### IGT changes ###

#### Possible regressions ####

  * igt@xe_fault_injection@oa-add-config-fail-xe_oa_alloc_regs:
    - shard-bmg:          [PASS][1] -> [ABORT][2]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-7/igt@xe_fault_injection@oa-add-config-fail-xe_oa_alloc_regs.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-7/igt@xe_fault_injection@oa-add-config-fail-xe_oa_alloc_regs.html

  
#### Warnings ####

  * igt@xe_exec_system_allocator@process-many-mmap-file-mlock-nomemset:
    - shard-lnl:          [DMESG-WARN][3] ([Intel XE#4537]) -> [DMESG-WARN][4]
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-lnl-3/igt@xe_exec_system_allocator@process-many-mmap-file-mlock-nomemset.html
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-4/igt@xe_exec_system_allocator@process-many-mmap-file-mlock-nomemset.html

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

  Here are the changes found in xe-pw-160111v1_FULL that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_3d@basic:
    - shard-lnl:          NOTRUN -> [SKIP][5] ([Intel XE#6011])
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-1/igt@kms_3d@basic.html

  * igt@kms_big_fb@linear-32bpp-rotate-270:
    - shard-bmg:          NOTRUN -> [SKIP][6] ([Intel XE#2327]) +3 other tests skip
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_big_fb@linear-32bpp-rotate-270.html

  * igt@kms_big_fb@linear-64bpp-rotate-90:
    - shard-lnl:          NOTRUN -> [SKIP][7] ([Intel XE#1407])
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-1/igt@kms_big_fb@linear-64bpp-rotate-90.html

  * igt@kms_big_fb@y-tiled-addfb:
    - shard-bmg:          NOTRUN -> [SKIP][8] ([Intel XE#2328])
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_big_fb@y-tiled-addfb.html

  * igt@kms_big_fb@y-tiled-addfb-size-overflow:
    - shard-bmg:          NOTRUN -> [SKIP][9] ([Intel XE#610])
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_big_fb@y-tiled-addfb-size-overflow.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180:
    - shard-bmg:          NOTRUN -> [SKIP][10] ([Intel XE#1124]) +10 other tests skip
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180.html

  * igt@kms_bw@connected-linear-tiling-3-displays-1920x1080p:
    - shard-bmg:          NOTRUN -> [SKIP][11] ([Intel XE#2314] / [Intel XE#2894]) +1 other test skip
   [11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_bw@connected-linear-tiling-3-displays-1920x1080p.html

  * igt@kms_bw@linear-tiling-4-displays-3840x2160p:
    - shard-bmg:          NOTRUN -> [SKIP][12] ([Intel XE#367]) +4 other tests skip
   [12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_bw@linear-tiling-4-displays-3840x2160p.html

  * igt@kms_ccs@bad-rotation-90-4-tiled-dg2-mc-ccs:
    - shard-bmg:          NOTRUN -> [SKIP][13] ([Intel XE#2887]) +10 other tests skip
   [13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_ccs@bad-rotation-90-4-tiled-dg2-mc-ccs.html

  * igt@kms_ccs@crc-primary-suspend-4-tiled-mtl-rc-ccs:
    - shard-bmg:          NOTRUN -> [SKIP][14] ([Intel XE#3432]) +1 other test skip
   [14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_ccs@crc-primary-suspend-4-tiled-mtl-rc-ccs.html

  * igt@kms_ccs@crc-sprite-planes-basic-4-tiled-lnl-ccs@pipe-b-dp-2:
    - shard-bmg:          NOTRUN -> [SKIP][15] ([Intel XE#2652] / [Intel XE#787]) +8 other tests skip
   [15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_ccs@crc-sprite-planes-basic-4-tiled-lnl-ccs@pipe-b-dp-2.html

  * igt@kms_cdclk@plane-scaling:
    - shard-bmg:          NOTRUN -> [SKIP][16] ([Intel XE#2724])
   [16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_cdclk@plane-scaling.html

  * igt@kms_chamelium_hpd@common-hpd-after-suspend:
    - shard-bmg:          NOTRUN -> [SKIP][17] ([Intel XE#2252]) +9 other tests skip
   [17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_chamelium_hpd@common-hpd-after-suspend.html

  * igt@kms_content_protection@atomic:
    - shard-bmg:          NOTRUN -> [FAIL][18] ([Intel XE#1178] / [Intel XE#3304]) +1 other test fail
   [18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_content_protection@atomic.html

  * igt@kms_content_protection@dp-mst-lic-type-0:
    - shard-bmg:          NOTRUN -> [SKIP][19] ([Intel XE#2390] / [Intel XE#6974])
   [19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_content_protection@dp-mst-lic-type-0.html

  * igt@kms_content_protection@dp-mst-type-0-hdcp14:
    - shard-bmg:          NOTRUN -> [SKIP][20] ([Intel XE#6974]) +1 other test skip
   [20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_content_protection@dp-mst-type-0-hdcp14.html

  * igt@kms_content_protection@lic-type-0-hdcp14@pipe-a-dp-2:
    - shard-bmg:          NOTRUN -> [FAIL][21] ([Intel XE#3304]) +3 other tests fail
   [21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_content_protection@lic-type-0-hdcp14@pipe-a-dp-2.html

  * igt@kms_cursor_crc@cursor-offscreen-512x170:
    - shard-bmg:          NOTRUN -> [SKIP][22] ([Intel XE#2321])
   [22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_cursor_crc@cursor-offscreen-512x170.html

  * igt@kms_cursor_crc@cursor-sliding-max-size:
    - shard-bmg:          NOTRUN -> [SKIP][23] ([Intel XE#2320]) +3 other tests skip
   [23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_cursor_crc@cursor-sliding-max-size.html

  * igt@kms_cursor_legacy@flip-vs-cursor-legacy:
    - shard-bmg:          NOTRUN -> [FAIL][24] ([Intel XE#5299])
   [24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_cursor_legacy@flip-vs-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - shard-bmg:          NOTRUN -> [SKIP][25] ([Intel XE#2244])
   [25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_dsc@dsc-basic.html

  * igt@kms_feature_discovery@display-3x:
    - shard-bmg:          NOTRUN -> [SKIP][26] ([Intel XE#2373])
   [26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_feature_discovery@display-3x.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1:
    - shard-lnl:          [PASS][27] -> [FAIL][28] ([Intel XE#301]) +1 other test fail
   [27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-lnl-3/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html
   [28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-4/igt@kms_flip@flip-vs-expired-vblank-interruptible@b-edp1.html

  * igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-upscaling:
    - shard-bmg:          NOTRUN -> [SKIP][29] ([Intel XE#2293] / [Intel XE#2380]) +4 other tests skip
   [29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_flip_scaled_crc@flip-32bpp-yftile-to-32bpp-yftileccs-upscaling.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode:
    - shard-bmg:          NOTRUN -> [SKIP][30] ([Intel XE#2293]) +4 other tests skip
   [30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-valid-mode.html

  * igt@kms_frontbuffer_tracking@drrs-1p-primscrn-cur-indfb-draw-render:
    - shard-lnl:          NOTRUN -> [SKIP][31] ([Intel XE#651])
   [31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-1/igt@kms_frontbuffer_tracking@drrs-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-shrfb-msflip-blt:
    - shard-lnl:          NOTRUN -> [SKIP][32] ([Intel XE#656])
   [32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-1/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-shrfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-draw-blt:
    - shard-bmg:          NOTRUN -> [SKIP][33] ([Intel XE#2311]) +29 other tests skip
   [33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-render:
    - shard-bmg:          NOTRUN -> [SKIP][34] ([Intel XE#4141]) +13 other tests skip
   [34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_frontbuffer_tracking@fbc-2p-scndscrn-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbc-argb161616f-draw-render:
    - shard-bmg:          NOTRUN -> [SKIP][35] ([Intel XE#7061]) +6 other tests skip
   [35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_frontbuffer_tracking@fbc-argb161616f-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-msflip-blt:
    - shard-bmg:          NOTRUN -> [SKIP][36] ([Intel XE#2313]) +28 other tests skip
   [36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_frontbuffer_tracking@fbcpsr-2p-scndscrn-indfb-msflip-blt.html

  * igt@kms_hdr@bpc-switch-dpms@pipe-a-dp-2:
    - shard-bmg:          [PASS][37] -> [ABORT][38] ([Intel XE#6740]) +1 other test abort
   [37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-2/igt@kms_hdr@bpc-switch-dpms@pipe-a-dp-2.html
   [38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-8/igt@kms_hdr@bpc-switch-dpms@pipe-a-dp-2.html

  * igt@kms_hdr@brightness-with-hdr:
    - shard-bmg:          NOTRUN -> [SKIP][39] ([Intel XE#3544])
   [39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_hdr@brightness-with-hdr.html

  * igt@kms_hdr@static-toggle-suspend:
    - shard-bmg:          NOTRUN -> [ABORT][40] ([Intel XE#6740]) +1 other test abort
   [40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_hdr@static-toggle-suspend.html

  * igt@kms_joiner@basic-max-non-joiner:
    - shard-bmg:          NOTRUN -> [SKIP][41] ([Intel XE#4298])
   [41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_joiner@basic-max-non-joiner.html

  * igt@kms_joiner@invalid-modeset-force-ultra-joiner:
    - shard-bmg:          NOTRUN -> [SKIP][42] ([Intel XE#6911])
   [42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_joiner@invalid-modeset-force-ultra-joiner.html

  * igt@kms_multipipe_modeset@basic-max-pipe-crc-check:
    - shard-bmg:          NOTRUN -> [SKIP][43] ([Intel XE#2501])
   [43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_multipipe_modeset@basic-max-pipe-crc-check.html

  * igt@kms_panel_fitting@legacy:
    - shard-bmg:          NOTRUN -> [SKIP][44] ([Intel XE#2486])
   [44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_panel_fitting@legacy.html

  * igt@kms_plane_multiple@tiling-yf:
    - shard-bmg:          NOTRUN -> [SKIP][45] ([Intel XE#5020])
   [45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_plane_multiple@tiling-yf.html

  * igt@kms_pm_dc@dc3co-vpb-simulation:
    - shard-bmg:          NOTRUN -> [SKIP][46] ([Intel XE#2391])
   [46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_pm_dc@dc3co-vpb-simulation.html

  * igt@kms_pm_rpm@dpms-lpsp:
    - shard-bmg:          NOTRUN -> [SKIP][47] ([Intel XE#1439] / [Intel XE#3141] / [Intel XE#836]) +1 other test skip
   [47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_pm_rpm@dpms-lpsp.html

  * igt@kms_pm_rpm@package-g7:
    - shard-bmg:          NOTRUN -> [SKIP][48] ([Intel XE#6814])
   [48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_pm_rpm@package-g7.html

  * igt@kms_psr2_sf@fbc-psr2-overlay-plane-update-sf-dmg-area:
    - shard-bmg:          NOTRUN -> [SKIP][49] ([Intel XE#1406] / [Intel XE#1489]) +6 other tests skip
   [49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_psr2_sf@fbc-psr2-overlay-plane-update-sf-dmg-area.html

  * igt@kms_psr2_su@page_flip-nv12:
    - shard-bmg:          NOTRUN -> [SKIP][50] ([Intel XE#1406] / [Intel XE#2387]) +1 other test skip
   [50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_psr2_su@page_flip-nv12.html

  * igt@kms_psr@psr-basic:
    - shard-bmg:          NOTRUN -> [SKIP][51] ([Intel XE#1406] / [Intel XE#2234] / [Intel XE#2850]) +13 other tests skip
   [51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_psr@psr-basic.html

  * igt@kms_rotation_crc@primary-y-tiled-reflect-x-270:
    - shard-bmg:          NOTRUN -> [SKIP][52] ([Intel XE#3414] / [Intel XE#3904])
   [52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_rotation_crc@primary-y-tiled-reflect-x-270.html

  * igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0:
    - shard-bmg:          NOTRUN -> [SKIP][53] ([Intel XE#2330])
   [53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0.html

  * igt@kms_scaling_modes@scaling-mode-full:
    - shard-bmg:          NOTRUN -> [SKIP][54] ([Intel XE#2413])
   [54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_scaling_modes@scaling-mode-full.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - shard-bmg:          NOTRUN -> [SKIP][55] ([Intel XE#1435])
   [55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@kms_sharpness_filter@invalid-filter-with-scaler:
    - shard-bmg:          NOTRUN -> [SKIP][56] ([Intel XE#6503])
   [56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@kms_sharpness_filter@invalid-filter-with-scaler.html

  * igt@kms_vrr@flip-suspend:
    - shard-bmg:          NOTRUN -> [SKIP][57] ([Intel XE#1499]) +1 other test skip
   [57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@kms_vrr@flip-suspend.html

  * igt@kms_vrr@lobf:
    - shard-bmg:          NOTRUN -> [SKIP][58] ([Intel XE#2168])
   [58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@kms_vrr@lobf.html

  * igt@xe_eudebug@basic-vms:
    - shard-bmg:          NOTRUN -> [SKIP][59] ([Intel XE#4837]) +6 other tests skip
   [59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@xe_eudebug@basic-vms.html

  * igt@xe_eudebug_online@breakpoint-many-sessions-single-tile:
    - shard-bmg:          NOTRUN -> [SKIP][60] ([Intel XE#4837] / [Intel XE#6665]) +6 other tests skip
   [60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@xe_eudebug_online@breakpoint-many-sessions-single-tile.html

  * igt@xe_eudebug_sriov@deny-sriov:
    - shard-bmg:          NOTRUN -> [SKIP][61] ([Intel XE#5793])
   [61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@xe_eudebug_sriov@deny-sriov.html

  * igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue:
    - shard-bmg:          NOTRUN -> [SKIP][62] ([Intel XE#2322]) +8 other tests skip
   [62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@xe_exec_basic@multigpu-many-execqueues-many-vm-bindexecqueue.html

  * igt@xe_exec_multi_queue@two-queues-basic-smem:
    - shard-bmg:          NOTRUN -> [SKIP][63] ([Intel XE#6874]) +29 other tests skip
   [63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@xe_exec_multi_queue@two-queues-basic-smem.html

  * igt@xe_exec_system_allocator@many-64k-mmap-new-huge-nomemset:
    - shard-bmg:          NOTRUN -> [SKIP][64] ([Intel XE#5007])
   [64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@xe_exec_system_allocator@many-64k-mmap-new-huge-nomemset.html

  * igt@xe_exec_system_allocator@threads-shared-vm-many-execqueues-mmap-new-huge:
    - shard-bmg:          NOTRUN -> [SKIP][65] ([Intel XE#4943]) +26 other tests skip
   [65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@xe_exec_system_allocator@threads-shared-vm-many-execqueues-mmap-new-huge.html

  * igt@xe_multigpu_svm@mgpu-concurrent-access-prefetch:
    - shard-bmg:          NOTRUN -> [SKIP][66] ([Intel XE#6964]) +4 other tests skip
   [66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@xe_multigpu_svm@mgpu-concurrent-access-prefetch.html

  * igt@xe_peer2peer@read:
    - shard-bmg:          NOTRUN -> [SKIP][67] ([Intel XE#2427] / [Intel XE#6953])
   [67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@xe_peer2peer@read.html

  * igt@xe_pm@d3cold-i2c:
    - shard-bmg:          NOTRUN -> [SKIP][68] ([Intel XE#5694])
   [68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@xe_pm@d3cold-i2c.html

  * igt@xe_pm@d3cold-multiple-execs:
    - shard-bmg:          NOTRUN -> [SKIP][69] ([Intel XE#2284])
   [69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@xe_pm@d3cold-multiple-execs.html

  * igt@xe_pxp@pxp-stale-bo-bind-post-termination-irq:
    - shard-bmg:          NOTRUN -> [SKIP][70] ([Intel XE#4733]) +2 other tests skip
   [70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-6/igt@xe_pxp@pxp-stale-bo-bind-post-termination-irq.html

  * igt@xe_query@multigpu-query-mem-usage:
    - shard-bmg:          NOTRUN -> [SKIP][71] ([Intel XE#944]) +1 other test skip
   [71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-9/igt@xe_query@multigpu-query-mem-usage.html

  * igt@xe_sriov_flr@flr-vf1-clear:
    - shard-bmg:          NOTRUN -> [FAIL][72] ([Intel XE#5937])
   [72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-2/igt@xe_sriov_flr@flr-vf1-clear.html

  * igt@xe_vm@large-binds-268435456:
    - shard-bmg:          [PASS][73] -> [INCOMPLETE][74] ([Intel XE#2594])
   [73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-10/igt@xe_vm@large-binds-268435456.html
   [74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-8/igt@xe_vm@large-binds-268435456.html

  
#### Possible fixes ####

  * igt@kms_flip@2x-flip-vs-absolute-wf_vblank:
    - shard-bmg:          [ABORT][75] ([Intel XE#5545]) -> [PASS][76] +1 other test pass
   [75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-2/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html
   [76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_flip@2x-flip-vs-absolute-wf_vblank.html

  * igt@kms_vrr@cmrr@pipe-a-edp-1:
    - shard-lnl:          [FAIL][77] ([Intel XE#4459]) -> [PASS][78] +1 other test pass
   [77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-lnl-1/igt@kms_vrr@cmrr@pipe-a-edp-1.html
   [78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-1/igt@kms_vrr@cmrr@pipe-a-edp-1.html

  * igt@xe_compute@loop-duration-2s:
    - shard-bmg:          [FAIL][79] -> [PASS][80]
   [79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-10/igt@xe_compute@loop-duration-2s.html
   [80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-8/igt@xe_compute@loop-duration-2s.html

  * igt@xe_evict@evict-beng-mixed-many-threads-small:
    - shard-bmg:          [INCOMPLETE][81] ([Intel XE#6321]) -> [PASS][82]
   [81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-9/igt@xe_evict@evict-beng-mixed-many-threads-small.html
   [82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-3/igt@xe_evict@evict-beng-mixed-many-threads-small.html

  * igt@xe_exec_reset@gt-reset-stress:
    - shard-lnl:          [DMESG-WARN][83] ([Intel XE#7023]) -> [PASS][84]
   [83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-lnl-4/igt@xe_exec_reset@gt-reset-stress.html
   [84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-lnl-8/igt@xe_exec_reset@gt-reset-stress.html

  
#### Warnings ####

  * igt@kms_hdr@invalid-hdr:
    - shard-bmg:          [ABORT][85] ([Intel XE#6740]) -> [SKIP][86] ([Intel XE#1503])
   [85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d/shard-bmg-1/igt@kms_hdr@invalid-hdr.html
   [86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/shard-bmg-10/igt@kms_hdr@invalid-hdr.html

  
  [Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
  [Intel XE#1178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1178
  [Intel XE#1406]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1406
  [Intel XE#1407]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1407
  [Intel XE#1435]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1435
  [Intel XE#1439]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1439
  [Intel XE#1489]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1489
  [Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
  [Intel XE#1503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1503
  [Intel XE#2168]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2168
  [Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
  [Intel XE#2244]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2244
  [Intel XE#2252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2252
  [Intel XE#2284]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2284
  [Intel XE#2293]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2293
  [Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
  [Intel XE#2313]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2313
  [Intel XE#2314]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2314
  [Intel XE#2320]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2320
  [Intel XE#2321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2321
  [Intel XE#2322]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2322
  [Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
  [Intel XE#2328]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2328
  [Intel XE#2330]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2330
  [Intel XE#2373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2373
  [Intel XE#2380]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2380
  [Intel XE#2387]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2387
  [Intel XE#2390]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2390
  [Intel XE#2391]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2391
  [Intel XE#2413]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2413
  [Intel XE#2427]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2427
  [Intel XE#2486]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2486
  [Intel XE#2501]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2501
  [Intel XE#2594]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2594
  [Intel XE#2652]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2652
  [Intel XE#2724]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2724
  [Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
  [Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
  [Intel XE#2894]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2894
  [Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
  [Intel XE#3141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3141
  [Intel XE#3304]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3304
  [Intel XE#3414]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3414
  [Intel XE#3432]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3432
  [Intel XE#3544]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3544
  [Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
  [Intel XE#3904]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3904
  [Intel XE#4141]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4141
  [Intel XE#4298]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4298
  [Intel XE#4459]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4459
  [Intel XE#4537]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4537
  [Intel XE#4733]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4733
  [Intel XE#4837]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4837
  [Intel XE#4943]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4943
  [Intel XE#5007]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5007
  [Intel XE#5020]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5020
  [Intel XE#5299]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5299
  [Intel XE#5545]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5545
  [Intel XE#5694]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5694
  [Intel XE#5793]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5793
  [Intel XE#5937]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5937
  [Intel XE#6011]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6011
  [Intel XE#610]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/610
  [Intel XE#6321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6321
  [Intel XE#6503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6503
  [Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
  [Intel XE#656]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/656
  [Intel XE#6665]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6665
  [Intel XE#6740]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6740
  [Intel XE#6814]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6814
  [Intel XE#6874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6874
  [Intel XE#6911]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6911
  [Intel XE#6953]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6953
  [Intel XE#6964]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6964
  [Intel XE#6974]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6974
  [Intel XE#7023]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7023
  [Intel XE#7061]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7061
  [Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
  [Intel XE#836]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/836
  [Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944


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

  * Linux: xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d -> xe-pw-160111v1

  IGT_8701: 8701
  xe-4384-733664f1edf3c01cc68e6dd0bbdb135158a98a1d: 733664f1edf3c01cc68e6dd0bbdb135158a98a1d
  xe-pw-160111v1: 160111v1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-160111v1/index.html

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

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

* Re: [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for rule matching
  2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
  2026-01-14 22:57   ` Gustavo Sousa
@ 2026-02-10 22:03   ` Matt Roper
  1 sibling, 0 replies; 19+ messages in thread
From: Matt Roper @ 2026-02-10 22:03 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Jan 14, 2026 at 07:49:51PM -0300, Gustavo Sousa wrote:
> The kunit test cases for the RTP framework are currently separated into
> those that validate xe_rtp_process_to_sr() and those that validate
> xe_rtp_process().  In both of them, we also have mixed stuff to validate
> rule matching functionality, which should rather be done in a separate
> test case group.
> 
> Let's create such a group, specific for validating rule matching, and
> also add an initial set of cases.  In an upcoming change, we will do a
> cleanup of the other groups by migrating those cases intended for rule
> matching to this new group.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/xe/tests/xe_rtp.c      |  38 +++++++++
>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 141 +++++++++++++++++++++++++++++++++
>  drivers/gpu/drm/xe/tests/xe_rtp_test.h |  24 ++++++
>  drivers/gpu/drm/xe/xe_rtp.c            |  55 +++++++++----
>  4 files changed, 242 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp.c b/drivers/gpu/drm/xe/tests/xe_rtp.c
> new file mode 100644
> index 000000000000..b3a8b75936d1
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp.c
> @@ -0,0 +1,38 @@
> +// SPDX-License-Identifier: GPL-2.0 AND MIT
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#include "tests/xe_rtp_test.h"
> +
> +#include <kunit/visibility.h>
> +
> +/**
> + * xe_rtp_rule_matches - Check if a set of RTP rule set match against the
> + *			 device/GT/hwe
> + * @xe: The xe device
> + * @gt: The GT struct (may be NULL)
> + * @hwe: The hw_engine  (may be NULL)
> + * @rules: The array of rules to match against
> + * @n_rules: Number of items in @rules
> + * @err: Pointer (may be NULL) to set error number.
> + *
> + * This parses the set of rules and check if they match against the passed
> + * parameters.
> + *
> + * If passed, @err is updated with a non-zero negative error number or zero if
> + * no errors were found during the parsing/evaluation of rules.
> + *
> + * Returns true if there is a match and false if there is no match or if an
> + * error was found.
> + */
> +bool xe_rtp_rule_matches(const struct xe_device *xe,
> +			 struct xe_gt *gt,
> +			 struct xe_hw_engine *hwe,
> +			 const struct xe_rtp_rule *rules,
> +			 unsigned int n_rules,
> +			 int *err)
> +{
> +	return rule_matches_with_err(xe, gt, hwe, rules, n_rules, err);
> +}
> +EXPORT_SYMBOL_IF_KUNIT(xe_rtp_rule_matches);
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> index d2255a59e58f..c3fea547da32 100644
> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> @@ -19,6 +19,7 @@
>  #include "xe_pci_test.h"
>  #include "xe_reg_sr.h"
>  #include "xe_rtp.h"
> +#include "xe_rtp_test.h"
>  
>  #define REGULAR_REG1	XE_REG(1)
>  #define REGULAR_REG2	XE_REG(2)
> @@ -31,6 +32,14 @@
>  #undef XE_REG_MCR
>  #define XE_REG_MCR(...)     XE_REG(__VA_ARGS__, .mcr = 1)
>  
> +struct rtp_rules_test_case {
> +	const char *name;
> +	bool expected_match;
> +	int expected_err;
> +	const struct xe_rtp_rule *rules;
> +	u8 n_rules;
> +};
> +
>  struct rtp_to_sr_test_case {
>  	const char *name;
>  	struct xe_reg expected_reg;
> @@ -60,6 +69,130 @@ static bool match_no(const struct xe_device *xe, const struct xe_gt *gt,
>  	return false;
>  }
>  
> +static const struct rtp_rules_test_case rtp_rules_cases[] = {
> +	/*
> +	 * Single rules.
> +	 *
> +	 * TODO: Include other types of rules as well: GRAPHICS_VERSION(),
> +	 * MEDIA_VERSION(), etc.
> +	 */
> +	{
> +		.name = "no",
> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_no)),
> +	},
> +	{
> +		.name = "yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes)),
> +	},
> +
> +	/* Conjunctions with 2 operands. */
> +	{
> +		.name = "no-and-no",
> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_no), FUNC(match_no)),
> +	},
> +	{
> +		.name = "no-and-yes",
> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes)),
> +	},
> +	{
> +		.name = "yes-and-no",
> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_yes), FUNC(match_no)),
> +	},
> +	{
> +		.name = "yes-and-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes)),
> +	},
> +
> +	/* Disjunctions with 2 operands. */
> +	{
> +		.name = "no-or-no",
> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_no)),
> +	},
> +	{
> +		.name = "no-or-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_yes)),
> +	},
> +	{
> +		.name = "yes-or-no",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_no)),
> +	},
> +	{
> +		.name = "yes-or-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_yes)),
> +	},
> +
> +	/* Conjunction and disjunctions. */
> +	{
> +		.name = "no-yes-or-no-yes",

The name doesn't quite match the rules on this one.  We should probably
either name this "no-yes-or-yes-no" or swap the final two rules.

Otherwise,

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> +		.expected_match = false,
> +		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
> +			     FUNC(match_yes), FUNC(match_no)),
> +	},
> +	{
> +		.name = "no-yes-or-yes-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_no), FUNC(match_yes), OR,
> +			     FUNC(match_yes), FUNC(match_yes)),
> +	},
> +	{
> +		.name = "yes-yes-or-no-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
> +			     FUNC(match_no), FUNC(match_yes)),
> +	},
> +	{
> +		.name = "yes-yes-or-yes-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_yes), FUNC(match_yes), OR,
> +			     FUNC(match_yes), FUNC(match_yes)),
> +	},
> +	{
> +		.name = "no-no-or-yes-or-no",
> +		.expected_match = true,
> +		XE_RTP_RULES(FUNC(match_no), FUNC(match_no), OR,
> +			     FUNC(match_yes), OR,
> +			     FUNC(match_no)),
> +	},
> +
> +	/* Syntax errors. */
> +	{
> +		.name = "or",
> +		.expected_match = false,
> +		.expected_err = -EINVAL,
> +		XE_RTP_RULES(OR),
> +	},
> +	{
> +		.name = "or-anything",
> +		.expected_match = false,
> +		.expected_err = -EINVAL,
> +		XE_RTP_RULES(OR, FUNC(match_yes)),
> +	},
> +};
> +
> +static void xe_rtp_rules_tests(struct kunit *test)
> +{
> +	const struct rtp_rules_test_case *param = test->param_value;
> +	struct xe_device *xe = test->priv;
> +	struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt;
> +	int err;
> +	bool match;
> +
> +	match = xe_rtp_rule_matches(xe, gt, NULL, param->rules, param->n_rules, &err);
> +
> +	KUNIT_EXPECT_EQ(test, match, param->expected_match);
> +	KUNIT_EXPECT_EQ(test, err, param->expected_err);
> +}
> +
>  static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
>  	{
>  		.name = "coalesce-same-reg",
> @@ -488,6 +621,13 @@ static void xe_rtp_process_tests(struct kunit *test)
>  	KUNIT_EXPECT_EQ(test, active, param->expected_active);
>  }
>  
> +static void rtp_rules_desc(const struct rtp_rules_test_case *t, char *desc)
> +{
> +	strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
> +}
> +
> +KUNIT_ARRAY_PARAM(rtp_rules, rtp_rules_cases, rtp_rules_desc);
> +
>  static void rtp_to_sr_desc(const struct rtp_to_sr_test_case *t, char *desc)
>  {
>  	strscpy(desc, t->name, KUNIT_PARAM_DESC_SIZE);
> @@ -533,6 +673,7 @@ static void xe_rtp_test_exit(struct kunit *test)
>  }
>  
>  static struct kunit_case xe_rtp_tests[] = {
> +	KUNIT_CASE_PARAM(xe_rtp_rules_tests, rtp_rules_gen_params),
>  	KUNIT_CASE_PARAM(xe_rtp_process_to_sr_tests, rtp_to_sr_gen_params),
>  	KUNIT_CASE_PARAM(xe_rtp_process_tests, rtp_gen_params),
>  	{}
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.h b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
> new file mode 100644
> index 000000000000..0579c1522424
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.h
> @@ -0,0 +1,24 @@
> +/* SPDX-License-Identifier: GPL-2.0 AND MIT */
> +/*
> + * Copyright © 2026 Intel Corporation
> + */
> +
> +#ifndef _XE_RTP_TEST_H_
> +#define _XE_RTP_TEST_H_
> +
> +#include <linux/types.h>
> +#include <kunit/test.h>
> +
> +struct xe_device;
> +struct xe_gt;
> +struct xe_hw_engine;
> +struct xe_rtp_rule;
> +
> +bool xe_rtp_rule_matches(const struct xe_device *xe,
> +			 struct xe_gt *gt,
> +			 struct xe_hw_engine *hwe,
> +			 const struct xe_rtp_rule *rules,
> +			 unsigned int n_rules,
> +			 int *err);
> +
> +#endif
> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> index ed509b1c8cfc..e955df6c22ca 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.c
> +++ b/drivers/gpu/drm/xe/xe_rtp.c
> @@ -30,16 +30,20 @@ static bool has_samedia(const struct xe_device *xe)
>  	return xe->info.media_verx100 >= 1300;
>  }
>  
> -static bool rule_matches(const struct xe_device *xe,
> -			 struct xe_gt *gt,
> -			 struct xe_hw_engine *hwe,
> -			 const struct xe_rtp_rule *rules,
> -			 unsigned int n_rules)
> +static bool rule_matches_with_err(const struct xe_device *xe,
> +				  struct xe_gt *gt,
> +				  struct xe_hw_engine *hwe,
> +				  const struct xe_rtp_rule *rules,
> +				  unsigned int n_rules,
> +				  int *err)
>  {
>  	const struct xe_rtp_rule *r;
>  	unsigned int i, rcount = 0;
>  	bool match;
>  
> +	if (err)
> +		*err = 0;
> +
>  	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
>  		switch (r->match_type) {
>  		case XE_RTP_MATCH_OR:
> @@ -58,14 +62,14 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.graphics_verx100 == r->ver_start &&
>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.graphics_verx100 >= r->ver_start &&
>  				xe->info.graphics_verx100 <= r->ver_end &&
> @@ -73,13 +77,13 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.graphics_verx100 == r->ver_start;
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_STEP:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.step.graphics >= r->step_start &&
>  				xe->info.step.graphics < r->step_end &&
> @@ -87,14 +91,14 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.media_verx100 == r->ver_start &&
>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.media_verx100 >= r->ver_start &&
>  				xe->info.media_verx100 <= r->ver_end &&
> @@ -102,7 +106,7 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_MEDIA_STEP:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.step.media >= r->step_start &&
>  				xe->info.step.media < r->step_end &&
> @@ -110,7 +114,7 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
>  			if (drm_WARN_ON(&xe->drm, !gt))
> -				return false;
> +				goto error;
>  
>  			match = xe->info.media_verx100 == r->ver_start;
>  			break;
> @@ -122,13 +126,13 @@ static bool rule_matches(const struct xe_device *xe,
>  			break;
>  		case XE_RTP_MATCH_ENGINE_CLASS:
>  			if (drm_WARN_ON(&xe->drm, !hwe))
> -				return false;
> +				goto error;
>  
>  			match = hwe->class == r->engine_class;
>  			break;
>  		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
>  			if (drm_WARN_ON(&xe->drm, !hwe))
> -				return false;
> +				goto error;
>  
>  			match = hwe->class != r->engine_class;
>  			break;
> @@ -160,9 +164,24 @@ static bool rule_matches(const struct xe_device *xe,
>  
>  done:
>  	if (drm_WARN_ON(&xe->drm, !rcount))
> -		return false;
> +		goto error;
>  
>  	return true;
> +
> +error:
> +	if (err)
> +		*err = -EINVAL;
> +
> +	return false;
> +}
> +
> +static bool rule_matches(const struct xe_device *xe,
> +			 struct xe_gt *gt,
> +			 struct xe_hw_engine *hwe,
> +			 const struct xe_rtp_rule *rules,
> +			 unsigned int n_rules)
> +{
> +	return rule_matches_with_err(xe, gt, hwe, rules, n_rules, NULL);
>  }
>  
>  static void rtp_add_sr_entry(const struct xe_rtp_action *action,
> @@ -385,3 +404,7 @@ bool xe_rtp_match_has_flat_ccs(const struct xe_device *xe,
>  {
>  	return xe->info.has_flat_ccs;
>  }
> +
> +#if IS_ENABLED(CONFIG_DRM_XE_KUNIT_TEST)
> +#include "tests/xe_rtp.c"
> +#endif
> 
> -- 
> 2.52.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

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

* Re: [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases
  2026-01-14 22:49 ` [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases Gustavo Sousa
@ 2026-02-10 22:06   ` Matt Roper
  0 siblings, 0 replies; 19+ messages in thread
From: Matt Roper @ 2026-02-10 22:06 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Jan 14, 2026 at 07:49:52PM -0300, Gustavo Sousa wrote:
> The kunit test cases for the RTP framework are currently separated into
> three groups:
> 
> (1) rtp_rules_cases:
>     Those to verify rule matching logic.
> 
> (2) rtp_to_sr_cases:
>     Those to verify generation of save/restore tables from RTP tables.
> 
> (3) rtp_cases
>     Those to verify processing of RTP tables without save/restore action
>     associated, which are used for OOB workarounds.
> 
> Today we have some cases in (2) and (3) that are actually meant to
> verify rule matching logic.  Now that we have (1), let's cleanup (2)
> and (3) so that they become focused on their main objectives.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 122 ++-------------------------------
>  1 file changed, 6 insertions(+), 116 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> index c3fea547da32..b2286dd9d92a 100644
> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> @@ -234,80 +234,6 @@ static const struct rtp_to_sr_test_case rtp_to_sr_cases[] = {
>  			{}
>  		},
>  	},
> -	{
> -		.name = "match-or",
> -		.expected_reg = REGULAR_REG1,
> -		.expected_set_bits = REG_BIT(0) | REG_BIT(1) | REG_BIT(2),
> -		.expected_clr_bits = REG_BIT(0) | REG_BIT(1) | REG_BIT(2),
> -		.expected_active = BIT(0) | BIT(1) | BIT(2),
> -		.expected_count_sr_entries = 1,
> -		.entries = (const struct xe_rtp_entry_sr[]) {
> -			{ XE_RTP_NAME("first"),
> -			  XE_RTP_RULES(FUNC(match_yes), OR, FUNC(match_no)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
> -			},
> -			{ XE_RTP_NAME("middle"),
> -			  XE_RTP_RULES(FUNC(match_no), FUNC(match_no), OR,
> -				       FUNC(match_yes), OR,
> -				       FUNC(match_no)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
> -			},
> -			{ XE_RTP_NAME("last"),
> -			  XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_yes)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(2)))
> -			},
> -			{ XE_RTP_NAME("no-match"),
> -			  XE_RTP_RULES(FUNC(match_no), OR, FUNC(match_no)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(3)))
> -			},
> -			{}
> -		},
> -	},
> -	{
> -		.name = "match-or-xfail",
> -		.expected_reg = REGULAR_REG1,
> -		.expected_count_sr_entries = 0,
> -		.entries = (const struct xe_rtp_entry_sr[]) {
> -			{ XE_RTP_NAME("leading-or"),
> -			  XE_RTP_RULES(OR, FUNC(match_yes)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
> -			},
> -			{ XE_RTP_NAME("trailing-or"),
> -			  /*
> -			   * First condition is match_no, otherwise the failure
> -			   * wouldn't really trigger as RTP stops processing as
> -			   * soon as it has a matching set of rules
> -			   */
> -			  XE_RTP_RULES(FUNC(match_no), OR),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
> -			},
> -			{ XE_RTP_NAME("no-or-or-yes"),
> -			  XE_RTP_RULES(FUNC(match_no), OR, OR, FUNC(match_yes)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(2)))
> -			},
> -			{}
> -		},
> -	},
> -	{
> -		.name = "no-match-no-add-multiple-rules",
> -		.expected_reg = REGULAR_REG1,
> -		.expected_set_bits = REG_BIT(0),
> -		.expected_clr_bits = REG_BIT(0),
> -		.expected_active = BIT(0),
> -		.expected_count_sr_entries = 1,
> -		/* Don't coalesce second entry due to one of the rules */
> -		.entries = (const struct xe_rtp_entry_sr[]) {
> -			{ XE_RTP_NAME("basic-1"),
> -			  XE_RTP_RULES(FUNC(match_yes)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(0)))
> -			},
> -			{ XE_RTP_NAME("basic-2"),
> -			  XE_RTP_RULES(FUNC(match_yes), FUNC(match_no)),
> -			  XE_RTP_ACTIONS(SET(REGULAR_REG1, REG_BIT(1)))
> -			},
> -			{}
> -		},
> -	},
>  	{
>  		.name = "two-regs-two-entries",
>  		.expected_reg = REGULAR_REG1,
> @@ -535,33 +461,15 @@ static const struct rtp_test_case rtp_cases[] = {
>  		},
>  	},
>  	{
> -		.name = "inactive-1st_or_active-inactive",
> +		.name = "inactive-active-inactive",
>  		.expected_active = BIT(1),
>  		.entries = (const struct xe_rtp_entry[]) {
>  			{ XE_RTP_NAME("r1"),
>  			  XE_RTP_RULES(FUNC(match_no)),
>  			},
> -			{ XE_RTP_NAME("r2_or_conditions"),
> -			  XE_RTP_RULES(FUNC(match_yes), OR,
> -				       FUNC(match_no), OR,
> -				       FUNC(match_no)) },
> -			{ XE_RTP_NAME("r3"),
> -			  XE_RTP_RULES(FUNC(match_no)),
> -			},
> -			{}
> -		},
> -	},
> -	{
> -		.name = "inactive-2nd_or_active-inactive",
> -		.expected_active = BIT(1),
> -		.entries = (const struct xe_rtp_entry[]) {
> -			{ XE_RTP_NAME("r1"),
> -			  XE_RTP_RULES(FUNC(match_no)),
> +			{ XE_RTP_NAME("r2"),
> +			  XE_RTP_RULES(FUNC(match_yes)),
>  			},
> -			{ XE_RTP_NAME("r2_or_conditions"),
> -			  XE_RTP_RULES(FUNC(match_no), OR,
> -				       FUNC(match_yes), OR,
> -				       FUNC(match_no)) },
>  			{ XE_RTP_NAME("r3"),
>  			  XE_RTP_RULES(FUNC(match_no)),
>  			},
> @@ -569,33 +477,15 @@ static const struct rtp_test_case rtp_cases[] = {
>  		},
>  	},
>  	{
> -		.name = "inactive-last_or_active-inactive",
> -		.expected_active = BIT(1),
> +		.name = "inactive-inactive-inactive",
> +		.expected_active = 0,
>  		.entries = (const struct xe_rtp_entry[]) {
>  			{ XE_RTP_NAME("r1"),
>  			  XE_RTP_RULES(FUNC(match_no)),
>  			},
> -			{ XE_RTP_NAME("r2_or_conditions"),
> -			  XE_RTP_RULES(FUNC(match_no), OR,
> -				       FUNC(match_no), OR,
> -				       FUNC(match_yes)) },
> -			{ XE_RTP_NAME("r3"),
> -			  XE_RTP_RULES(FUNC(match_no)),
> -			},
> -			{}
> -		},
> -	},
> -	{
> -		.name = "inactive-no_or_active-inactive",
> -		.expected_active = 0,
> -		.entries = (const struct xe_rtp_entry[]) {
> -			{ XE_RTP_NAME("r1"),
> +			{ XE_RTP_NAME("r2"),
>  			  XE_RTP_RULES(FUNC(match_no)),
>  			},
> -			{ XE_RTP_NAME("r2_or_conditions"),
> -			  XE_RTP_RULES(FUNC(match_no), OR,
> -				       FUNC(match_no), OR,
> -				       FUNC(match_no)) },
>  			{ XE_RTP_NAME("r3"),
>  			  XE_RTP_RULES(FUNC(match_no)),
>  			},
> 
> -- 
> 2.52.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

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

* Re: [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context
  2026-01-14 22:49 ` [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context Gustavo Sousa
@ 2026-02-10 22:20   ` Matt Roper
  2026-04-29 19:45     ` Gustavo Sousa
  0 siblings, 1 reply; 19+ messages in thread
From: Matt Roper @ 2026-02-10 22:20 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Jan 14, 2026 at 07:49:53PM -0300, Gustavo Sousa wrote:
> With the current implementation, the RTP framework will cause parsing of
> the rule set to be interrupted if one rule requires a context item (gt
> or hwe) that is missing (i.e. when the value is NULL).
> 
> This is arguably a semantic error instead of a syntactic one, meaning
> that RTP should not interrupt parsing the rules.  With the current
> behavior, we would miss detecting other errors that could appear in the
> remaining rules and could also prevent valid rules joined by "OR" from
> being evaluated.
> 
> Make sure that we do not stop parsing the rule set when detecting
> missing context and let's add rtp_rules_test_cases to reflect that.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 28 ++++++++++++++++
>  drivers/gpu/drm/xe/xe_rtp.c            | 60 ++++++++++++++++++++++------------
>  2 files changed, 68 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> index b2286dd9d92a..19c7142b2fe4 100644
> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> @@ -177,6 +177,34 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
>  		.expected_err = -EINVAL,
>  		XE_RTP_RULES(OR, FUNC(match_yes)),
>  	},
> +
> +	/* No match because hwe is NULL. */
> +	{
> +		.name = "engine-class",

Nitpick:  The names for these tests doesn't really make it clear what's
being tested.  Something like "missing-context-engine-class" might be
better?

I'm wondering if an even more useful test would be one that scans our
actual RTP tables and just looks for anything on gt_was[] or oob_was[]
that has an engine class rule, or anything on device_oob_was[] that has
either an IP version rule or an engine class rule.  If we catch those
mistakes during early kunit testing, then we shouldn't really need to
worry about what the behavior would be if one of them survived to be
parsed on a live device.

Anyway, the rest of the patch looks fine, so aside from improving the
names,

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>


Matt

> +		.expected_match = false,
> +		XE_RTP_RULES(ENGINE_CLASS(RENDER)),
> +	},
> +
> +	/*
> +	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
> +	 * expect a match.
> +	 */
> +	{
> +		.name = "engine-class-or-yes",
> +		.expected_match = true,
> +		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, FUNC(match_yes)),
> +	},
> +
> +	/*
> +	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
> +	 * expect a syntax error.
> +	 */
> +	{
> +		.name = "engine-class-or-or-yes",
> +		.expected_match = false,
> +		.expected_err = -EINVAL,
> +		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, OR, FUNC(match_yes)),
> +	},
>  };
>  
>  static void xe_rtp_rules_tests(struct kunit *test)
> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> index e955df6c22ca..e0bed5ac1369 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.c
> +++ b/drivers/gpu/drm/xe/xe_rtp.c
> @@ -61,60 +61,76 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>  				xe->info.subplatform == r->subplatform;
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.graphics_verx100 == r->ver_start &&
>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.graphics_verx100 >= r->ver_start &&
>  				xe->info.graphics_verx100 <= r->ver_end &&
>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.graphics_verx100 == r->ver_start;
>  			break;
>  		case XE_RTP_MATCH_GRAPHICS_STEP:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.step.graphics >= r->step_start &&
>  				xe->info.step.graphics < r->step_end &&
>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.media_verx100 == r->ver_start &&
>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.media_verx100 >= r->ver_start &&
>  				xe->info.media_verx100 <= r->ver_end &&
>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_MEDIA_STEP:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.step.media >= r->step_start &&
>  				xe->info.step.media < r->step_end &&
>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>  			break;
>  		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
> -			if (drm_WARN_ON(&xe->drm, !gt))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !gt)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = xe->info.media_verx100 == r->ver_start;
>  			break;
> @@ -125,14 +141,18 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>  			match = xe->info.is_dgfx;
>  			break;
>  		case XE_RTP_MATCH_ENGINE_CLASS:
> -			if (drm_WARN_ON(&xe->drm, !hwe))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !hwe)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = hwe->class == r->engine_class;
>  			break;
>  		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
> -			if (drm_WARN_ON(&xe->drm, !hwe))
> -				goto error;
> +			if (drm_WARN_ON(&xe->drm, !hwe)) {
> +				match = false;
> +				break;
> +			}
>  
>  			match = hwe->class != r->engine_class;
>  			break;
> 
> -- 
> 2.52.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

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

* Re: [PATCH 4/6] drm/xe/rtp: Extract rule_match_item()
  2026-01-14 22:49 ` [PATCH 4/6] drm/xe/rtp: Extract rule_match_item() Gustavo Sousa
@ 2026-02-10 22:24   ` Matt Roper
  0 siblings, 0 replies; 19+ messages in thread
From: Matt Roper @ 2026-02-10 22:24 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Jan 14, 2026 at 07:49:54PM -0300, Gustavo Sousa wrote:
> The currently logic in rule_matches() mixes individual rule matching
> with the logic necessary for handling OR operations.  Let's simplify
> rule_matches() to focus on the latter by extracting individual rule
> matching into a separate function called rule_match_item().
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

> ---
>  drivers/gpu/drm/xe/xe_rtp.c | 205 +++++++++++++++++++-------------------------
>  1 file changed, 88 insertions(+), 117 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> index e0bed5ac1369..dabc2e74e2ce 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.c
> +++ b/drivers/gpu/drm/xe/xe_rtp.c
> @@ -30,6 +30,90 @@ static bool has_samedia(const struct xe_device *xe)
>  	return xe->info.media_verx100 >= 1300;
>  }
>  
> +static bool rule_match_item(const struct xe_device *xe,
> +			    struct xe_gt *gt,
> +			    struct xe_hw_engine *hwe,
> +			    const struct xe_rtp_rule *r)
> +{
> +	switch (r->match_type) {
> +	case XE_RTP_MATCH_PLATFORM:
> +		return xe->info.platform == r->platform;
> +	case XE_RTP_MATCH_SUBPLATFORM:
> +		return xe->info.platform == r->platform &&
> +			xe->info.subplatform == r->subplatform;
> +	case XE_RTP_MATCH_GRAPHICS_VERSION:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.graphics_verx100 == r->ver_start &&
> +			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.graphics_verx100 >= r->ver_start &&
> +			xe->info.graphics_verx100 <= r->ver_end &&
> +			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.graphics_verx100 == r->ver_start;
> +	case XE_RTP_MATCH_GRAPHICS_STEP:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.step.graphics >= r->step_start &&
> +			xe->info.step.graphics < r->step_end &&
> +			(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_MEDIA_VERSION:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.media_verx100 == r->ver_start &&
> +			(!has_samedia(xe) || xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.media_verx100 >= r->ver_start &&
> +			xe->info.media_verx100 <= r->ver_end &&
> +			(!has_samedia(xe) || xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_MEDIA_STEP:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.step.media >= r->step_start &&
> +			xe->info.step.media < r->step_end &&
> +			(!has_samedia(xe) || xe_gt_is_media_type(gt));
> +	case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
> +		if (drm_WARN_ON(&xe->drm, !gt))
> +			return false;
> +
> +		return xe->info.media_verx100 == r->ver_start;
> +	case XE_RTP_MATCH_INTEGRATED:
> +		return !xe->info.is_dgfx;
> +	case XE_RTP_MATCH_DISCRETE:
> +		return xe->info.is_dgfx;
> +	case XE_RTP_MATCH_ENGINE_CLASS:
> +		if (drm_WARN_ON(&xe->drm, !hwe))
> +			return false;
> +
> +		return hwe->class == r->engine_class;
> +	case XE_RTP_MATCH_NOT_ENGINE_CLASS:
> +		if (drm_WARN_ON(&xe->drm, !hwe))
> +			return false;
> +
> +		return hwe->class != r->engine_class;
> +	case XE_RTP_MATCH_FUNC:
> +		return r->match_func(xe, gt, hwe);
> +	default:
> +		drm_warn(&xe->drm, "Invalid RTP match %u\n",
> +			 r->match_type);
> +		return false;
> +	}
> +}
> +
>  static bool rule_matches_with_err(const struct xe_device *xe,
>  				  struct xe_gt *gt,
>  				  struct xe_hw_engine *hwe,
> @@ -39,133 +123,22 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>  {
>  	const struct xe_rtp_rule *r;
>  	unsigned int i, rcount = 0;
> -	bool match;
>  
>  	if (err)
>  		*err = 0;
>  
>  	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
> -		switch (r->match_type) {
> -		case XE_RTP_MATCH_OR:
> +		if (r->match_type == XE_RTP_MATCH_OR)
>  			/*
>  			 * This is only reached if a complete set of
>  			 * rules passed or none were evaluated. For both cases,
>  			 * shortcut the other rules and return the proper value.
>  			 */
>  			goto done;
> -		case XE_RTP_MATCH_PLATFORM:
> -			match = xe->info.platform == r->platform;
> -			break;
> -		case XE_RTP_MATCH_SUBPLATFORM:
> -			match = xe->info.platform == r->platform &&
> -				xe->info.subplatform == r->subplatform;
> -			break;
> -		case XE_RTP_MATCH_GRAPHICS_VERSION:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.graphics_verx100 == r->ver_start &&
> -				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.graphics_verx100 >= r->ver_start &&
> -				xe->info.graphics_verx100 <= r->ver_end &&
> -				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.graphics_verx100 == r->ver_start;
> -			break;
> -		case XE_RTP_MATCH_GRAPHICS_STEP:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.step.graphics >= r->step_start &&
> -				xe->info.step.graphics < r->step_end &&
> -				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_MEDIA_VERSION:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.media_verx100 == r->ver_start &&
> -				(!has_samedia(xe) || xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.media_verx100 >= r->ver_start &&
> -				xe->info.media_verx100 <= r->ver_end &&
> -				(!has_samedia(xe) || xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_MEDIA_STEP:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.step.media >= r->step_start &&
> -				xe->info.step.media < r->step_end &&
> -				(!has_samedia(xe) || xe_gt_is_media_type(gt));
> -			break;
> -		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
> -			if (drm_WARN_ON(&xe->drm, !gt)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = xe->info.media_verx100 == r->ver_start;
> -			break;
> -		case XE_RTP_MATCH_INTEGRATED:
> -			match = !xe->info.is_dgfx;
> -			break;
> -		case XE_RTP_MATCH_DISCRETE:
> -			match = xe->info.is_dgfx;
> -			break;
> -		case XE_RTP_MATCH_ENGINE_CLASS:
> -			if (drm_WARN_ON(&xe->drm, !hwe)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = hwe->class == r->engine_class;
> -			break;
> -		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
> -			if (drm_WARN_ON(&xe->drm, !hwe)) {
> -				match = false;
> -				break;
> -			}
> -
> -			match = hwe->class != r->engine_class;
> -			break;
> -		case XE_RTP_MATCH_FUNC:
> -			match = r->match_func(xe, gt, hwe);
> -			break;
> -		default:
> -			drm_warn(&xe->drm, "Invalid RTP match %u\n",
> -				 r->match_type);
> -			match = false;
> -		}
>  
> -		if (!match) {
> +		if (rule_match_item(xe, gt, hwe, r)) {
> +			rcount++;
> +		} else {
>  			/*
>  			 * Advance rules until we find XE_RTP_MATCH_OR to check
>  			 * if there's another set of conditions to check
> @@ -177,8 +150,6 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>  				return false;
>  
>  			rcount = 0;
> -		} else {
> -			rcount++;
>  		}
>  	}
>  
> 
> -- 
> 2.52.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

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

* Re: [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset
  2026-01-14 22:49 ` [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset Gustavo Sousa
@ 2026-02-10 22:34   ` Matt Roper
  2026-04-30 13:33     ` Gustavo Sousa
  0 siblings, 1 reply; 19+ messages in thread
From: Matt Roper @ 2026-02-10 22:34 UTC (permalink / raw)
  To: Gustavo Sousa; +Cc: intel-xe

On Wed, Jan 14, 2026 at 07:49:55PM -0300, Gustavo Sousa wrote:
> The function rule_matches() short-circuits evaluation of the implicit
> conjunctions (each substring of rules not containing OR) and the
> explicit disjunctions (implicit conjunctions joined by OR). In other
> words:
> 
>   - in a conjunction, once a rule evaluate to false, we skip to the next
>     OR (if any) to evaluate the next conjunction;
>   - in a disjunction, once a conjunction evaluates to true, we return
>     true and skip evaluating all the remaining rules.
> 
> While this behavior results in a correct logical value, it has the
> side-effect that rule set does not get fully "parsed", allowing
> incomplete constructs like (rule1, OR) to evaluate to true when rule1 is
> true.  We should treat such constructs as invalid and treat them the
> same way we do for stuff like (OR, rule1).
> 
> As such, update rule_matches() to "parse" the whole rule set, and that
> while keeping the short-circuit aspect of evaluation.

I took "keeping the short-circuit aspect of evaluation" to mean that a
"yes-or" rule would still be treated as a match functionally, but
flagged as an error for kunit checks.  But it seems we're also changing
the behavior to reject the whole record in that case, which seems like
it would just make the mistake worse in non-kunit settings.

I think it would be better to treat "or-yes" and "yes-or" type mistakes
as a match, but flag them as errors in kunit.  I'd expect the most
common case we'd have such a mistake would be if someone is deleting
something that no longer applies (e.g., a pre-production workaround set
of rules) and they just forget to also remove the adjacent OR.  The
remaining parts of the rule should still be valid with that kind of
mistake, so treating the whole rule as not a match seems wrong.


Matt

> 
> Let's also update the kunit test to include instances of those
> incomplete constructs to reflect this change.
> 
> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 12 +++++++
>  drivers/gpu/drm/xe/xe_rtp.c            | 61 +++++++++++++++++++---------------
>  2 files changed, 46 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> index 19c7142b2fe4..f0122553644e 100644
> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
> @@ -177,6 +177,18 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
>  		.expected_err = -EINVAL,
>  		XE_RTP_RULES(OR, FUNC(match_yes)),
>  	},
> +	{
> +		.name = "anything-or",
> +		.expected_match = false,
> +		.expected_err = -EINVAL,
> +		XE_RTP_RULES(FUNC(match_yes), OR),
> +	},
> +	{
> +		.name = "anything-or-or-anything",
> +		.expected_match = false,
> +		.expected_err = -EINVAL,
> +		XE_RTP_RULES(FUNC(match_yes), OR, OR, FUNC(match_yes)),
> +	},
>  
>  	/* No match because hwe is NULL. */
>  	{
> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
> index dabc2e74e2ce..55df9c16a3cc 100644
> --- a/drivers/gpu/drm/xe/xe_rtp.c
> +++ b/drivers/gpu/drm/xe/xe_rtp.c
> @@ -123,47 +123,54 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>  {
>  	const struct xe_rtp_rule *r;
>  	unsigned int i, rcount = 0;
> +	bool parse_only = false;
> +	bool match = false;
>  
>  	if (err)
>  		*err = 0;
>  
>  	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
> -		if (r->match_type == XE_RTP_MATCH_OR)
> -			/*
> -			 * This is only reached if a complete set of
> -			 * rules passed or none were evaluated. For both cases,
> -			 * shortcut the other rules and return the proper value.
> -			 */
> -			goto done;
> +		if (r->match_type == XE_RTP_MATCH_OR) {
> +			if (drm_WARN_ON(&xe->drm, !rcount)) {
> +				parse_only = true;
> +				match = false;
> +				if (err)
> +					*err = -EINVAL;
> +			} else if (match) {
> +				parse_only = true;
> +			}
> +
> +			rcount = 0;
> +
> +			continue;
> +		}
> +
> +		rcount++;
> +
> +		if (parse_only || !rule_match_item(xe, gt, hwe, r)) {
> +			if (!parse_only)
> +				match = false;
>  
> -		if (rule_match_item(xe, gt, hwe, r)) {
> -			rcount++;
> -		} else {
>  			/*
>  			 * Advance rules until we find XE_RTP_MATCH_OR to check
>  			 * if there's another set of conditions to check
>  			 */
> -			while (++i < n_rules && rules[i].match_type != XE_RTP_MATCH_OR)
> -				;
> -
> -			if (i >= n_rules)
> -				return false;
> -
> -			rcount = 0;
> +			while (i + 1 < n_rules && rules[i + 1].match_type != XE_RTP_MATCH_OR) {
> +				i++;
> +				rcount++;
> +			}
> +		} else {
> +			match = true;
>  		}
>  	}
>  
> -done:
> -	if (drm_WARN_ON(&xe->drm, !rcount))
> -		goto error;
> -
> -	return true;
> -
> -error:
> -	if (err)
> -		*err = -EINVAL;
> +	if (drm_WARN_ON(&xe->drm, !rcount)) {
> +		match = false;
> +		if (err)
> +			*err = -EINVAL;
> +	}
>  
> -	return false;
> +	return match;
>  }
>  
>  static bool rule_matches(const struct xe_device *xe,
> 
> -- 
> 2.52.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation

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

* Re: [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context
  2026-02-10 22:20   ` Matt Roper
@ 2026-04-29 19:45     ` Gustavo Sousa
  0 siblings, 0 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-04-29 19:45 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-xe

Matt Roper <matthew.d.roper@intel.com> writes:

> On Wed, Jan 14, 2026 at 07:49:53PM -0300, Gustavo Sousa wrote:
>> With the current implementation, the RTP framework will cause parsing of
>> the rule set to be interrupted if one rule requires a context item (gt
>> or hwe) that is missing (i.e. when the value is NULL).
>> 
>> This is arguably a semantic error instead of a syntactic one, meaning
>> that RTP should not interrupt parsing the rules.  With the current
>> behavior, we would miss detecting other errors that could appear in the
>> remaining rules and could also prevent valid rules joined by "OR" from
>> being evaluated.
>> 
>> Make sure that we do not stop parsing the rule set when detecting
>> missing context and let's add rtp_rules_test_cases to reflect that.
>> 
>> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>> ---
>>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 28 ++++++++++++++++
>>  drivers/gpu/drm/xe/xe_rtp.c            | 60 ++++++++++++++++++++++------------
>>  2 files changed, 68 insertions(+), 20 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> index b2286dd9d92a..19c7142b2fe4 100644
>> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> @@ -177,6 +177,34 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
>>  		.expected_err = -EINVAL,
>>  		XE_RTP_RULES(OR, FUNC(match_yes)),
>>  	},
>> +
>> +	/* No match because hwe is NULL. */
>> +	{
>> +		.name = "engine-class",
>
> Nitpick:  The names for these tests doesn't really make it clear what's
> being tested.  Something like "missing-context-engine-class" might be
> better?
>
> I'm wondering if an even more useful test would be one that scans our
> actual RTP tables and just looks for anything on gt_was[] or oob_was[]
> that has an engine class rule, or anything on device_oob_was[] that has
> either an IP version rule or an engine class rule.  If we catch those
> mistakes during early kunit testing, then we shouldn't really need to
> worry about what the behavior would be if one of them survived to be
> parsed on a live device.

That seems like a good idea.

>
> Anyway, the rest of the patch looks fine, so aside from improving the
> names,
>
> Reviewed-by: Matt Roper <matthew.d.roper@intel.com>

Thanks!

--
Gustavo Sousa

>
>
> Matt
>
>> +		.expected_match = false,
>> +		XE_RTP_RULES(ENGINE_CLASS(RENDER)),
>> +	},
>> +
>> +	/*
>> +	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
>> +	 * expect a match.
>> +	 */
>> +	{
>> +		.name = "engine-class-or-yes",
>> +		.expected_match = true,
>> +		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, FUNC(match_yes)),
>> +	},
>> +
>> +	/*
>> +	 * Missing context (hwe==NULL) does not cause parsing to stop, hence we
>> +	 * expect a syntax error.
>> +	 */
>> +	{
>> +		.name = "engine-class-or-or-yes",
>> +		.expected_match = false,
>> +		.expected_err = -EINVAL,
>> +		XE_RTP_RULES(ENGINE_CLASS(RENDER), OR, OR, FUNC(match_yes)),
>> +	},
>>  };
>>  
>>  static void xe_rtp_rules_tests(struct kunit *test)
>> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
>> index e955df6c22ca..e0bed5ac1369 100644
>> --- a/drivers/gpu/drm/xe/xe_rtp.c
>> +++ b/drivers/gpu/drm/xe/xe_rtp.c
>> @@ -61,60 +61,76 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>>  				xe->info.subplatform == r->subplatform;
>>  			break;
>>  		case XE_RTP_MATCH_GRAPHICS_VERSION:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.graphics_verx100 == r->ver_start &&
>>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_GRAPHICS_VERSION_RANGE:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.graphics_verx100 >= r->ver_start &&
>>  				xe->info.graphics_verx100 <= r->ver_end &&
>>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.graphics_verx100 == r->ver_start;
>>  			break;
>>  		case XE_RTP_MATCH_GRAPHICS_STEP:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.step.graphics >= r->step_start &&
>>  				xe->info.step.graphics < r->step_end &&
>>  				(!has_samedia(xe) || !xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_MEDIA_VERSION:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.media_verx100 == r->ver_start &&
>>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_MEDIA_VERSION_RANGE:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.media_verx100 >= r->ver_start &&
>>  				xe->info.media_verx100 <= r->ver_end &&
>>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_MEDIA_STEP:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.step.media >= r->step_start &&
>>  				xe->info.step.media < r->step_end &&
>>  				(!has_samedia(xe) || xe_gt_is_media_type(gt));
>>  			break;
>>  		case XE_RTP_MATCH_MEDIA_VERSION_ANY_GT:
>> -			if (drm_WARN_ON(&xe->drm, !gt))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !gt)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = xe->info.media_verx100 == r->ver_start;
>>  			break;
>> @@ -125,14 +141,18 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>>  			match = xe->info.is_dgfx;
>>  			break;
>>  		case XE_RTP_MATCH_ENGINE_CLASS:
>> -			if (drm_WARN_ON(&xe->drm, !hwe))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !hwe)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = hwe->class == r->engine_class;
>>  			break;
>>  		case XE_RTP_MATCH_NOT_ENGINE_CLASS:
>> -			if (drm_WARN_ON(&xe->drm, !hwe))
>> -				goto error;
>> +			if (drm_WARN_ON(&xe->drm, !hwe)) {
>> +				match = false;
>> +				break;
>> +			}
>>  
>>  			match = hwe->class != r->engine_class;
>>  			break;
>> 
>> -- 
>> 2.52.0
>> 
>
> -- 
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation

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

* Re: [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset
  2026-02-10 22:34   ` Matt Roper
@ 2026-04-30 13:33     ` Gustavo Sousa
  0 siblings, 0 replies; 19+ messages in thread
From: Gustavo Sousa @ 2026-04-30 13:33 UTC (permalink / raw)
  To: Matt Roper; +Cc: intel-xe

Matt Roper <matthew.d.roper@intel.com> writes:

> On Wed, Jan 14, 2026 at 07:49:55PM -0300, Gustavo Sousa wrote:
>> The function rule_matches() short-circuits evaluation of the implicit
>> conjunctions (each substring of rules not containing OR) and the
>> explicit disjunctions (implicit conjunctions joined by OR). In other
>> words:
>> 
>>   - in a conjunction, once a rule evaluate to false, we skip to the next
>>     OR (if any) to evaluate the next conjunction;
>>   - in a disjunction, once a conjunction evaluates to true, we return
>>     true and skip evaluating all the remaining rules.
>> 
>> While this behavior results in a correct logical value, it has the
>> side-effect that rule set does not get fully "parsed", allowing
>> incomplete constructs like (rule1, OR) to evaluate to true when rule1 is
>> true.  We should treat such constructs as invalid and treat them the
>> same way we do for stuff like (OR, rule1).
>> 
>> As such, update rule_matches() to "parse" the whole rule set, and that
>> while keeping the short-circuit aspect of evaluation.
>
> I took "keeping the short-circuit aspect of evaluation" to mean that a
> "yes-or" rule would still be treated as a match functionally, but
> flagged as an error for kunit checks.  But it seems we're also changing
> the behavior to reject the whole record in that case, which seems like
> it would just make the mistake worse in non-kunit settings.

Right.  Indeed, this patch changes that behavior.

>
> I think it would be better to treat "or-yes" and "yes-or" type mistakes
> as a match, but flag them as errors in kunit.  I'd expect the most

Makes sense.  After reading this, I realized that we have some kind of
inconsistency in the current RTP code: "yes-or" would produce a match,
but "or-yes" would not.

I think we can add a preliminary patch to fix that: treat empty
conjunctions as false, meaning that, in the "or-yes" case, there would
be no short-circuit to false (the current behavior) and evaluation would
continue to catch the "yes" match.

With that in place, this patch would be only about making sure that we
fully parse the reulset without changing the matching behavior. I'll do
that in v2.

--
Gustavo Sousa

> common case we'd have such a mistake would be if someone is deleting
> something that no longer applies (e.g., a pre-production workaround set
> of rules) and they just forget to also remove the adjacent OR.  The
> remaining parts of the rule should still be valid with that kind of
> mistake, so treating the whole rule as not a match seems wrong.
>
>
> Matt
>
>> 
>> Let's also update the kunit test to include instances of those
>> incomplete constructs to reflect this change.
>> 
>> Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>> ---
>>  drivers/gpu/drm/xe/tests/xe_rtp_test.c | 12 +++++++
>>  drivers/gpu/drm/xe/xe_rtp.c            | 61 +++++++++++++++++++---------------
>>  2 files changed, 46 insertions(+), 27 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> index 19c7142b2fe4..f0122553644e 100644
>> --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c
>> @@ -177,6 +177,18 @@ static const struct rtp_rules_test_case rtp_rules_cases[] = {
>>  		.expected_err = -EINVAL,
>>  		XE_RTP_RULES(OR, FUNC(match_yes)),
>>  	},
>> +	{
>> +		.name = "anything-or",
>> +		.expected_match = false,
>> +		.expected_err = -EINVAL,
>> +		XE_RTP_RULES(FUNC(match_yes), OR),
>> +	},
>> +	{
>> +		.name = "anything-or-or-anything",
>> +		.expected_match = false,
>> +		.expected_err = -EINVAL,
>> +		XE_RTP_RULES(FUNC(match_yes), OR, OR, FUNC(match_yes)),
>> +	},
>>  
>>  	/* No match because hwe is NULL. */
>>  	{
>> diff --git a/drivers/gpu/drm/xe/xe_rtp.c b/drivers/gpu/drm/xe/xe_rtp.c
>> index dabc2e74e2ce..55df9c16a3cc 100644
>> --- a/drivers/gpu/drm/xe/xe_rtp.c
>> +++ b/drivers/gpu/drm/xe/xe_rtp.c
>> @@ -123,47 +123,54 @@ static bool rule_matches_with_err(const struct xe_device *xe,
>>  {
>>  	const struct xe_rtp_rule *r;
>>  	unsigned int i, rcount = 0;
>> +	bool parse_only = false;
>> +	bool match = false;
>>  
>>  	if (err)
>>  		*err = 0;
>>  
>>  	for (r = rules, i = 0; i < n_rules; r = &rules[++i]) {
>> -		if (r->match_type == XE_RTP_MATCH_OR)
>> -			/*
>> -			 * This is only reached if a complete set of
>> -			 * rules passed or none were evaluated. For both cases,
>> -			 * shortcut the other rules and return the proper value.
>> -			 */
>> -			goto done;
>> +		if (r->match_type == XE_RTP_MATCH_OR) {
>> +			if (drm_WARN_ON(&xe->drm, !rcount)) {
>> +				parse_only = true;
>> +				match = false;
>> +				if (err)
>> +					*err = -EINVAL;
>> +			} else if (match) {
>> +				parse_only = true;
>> +			}
>> +
>> +			rcount = 0;
>> +
>> +			continue;
>> +		}
>> +
>> +		rcount++;
>> +
>> +		if (parse_only || !rule_match_item(xe, gt, hwe, r)) {
>> +			if (!parse_only)
>> +				match = false;
>>  
>> -		if (rule_match_item(xe, gt, hwe, r)) {
>> -			rcount++;
>> -		} else {
>>  			/*
>>  			 * Advance rules until we find XE_RTP_MATCH_OR to check
>>  			 * if there's another set of conditions to check
>>  			 */
>> -			while (++i < n_rules && rules[i].match_type != XE_RTP_MATCH_OR)
>> -				;
>> -
>> -			if (i >= n_rules)
>> -				return false;
>> -
>> -			rcount = 0;
>> +			while (i + 1 < n_rules && rules[i + 1].match_type != XE_RTP_MATCH_OR) {
>> +				i++;
>> +				rcount++;
>> +			}
>> +		} else {
>> +			match = true;
>>  		}
>>  	}
>>  
>> -done:
>> -	if (drm_WARN_ON(&xe->drm, !rcount))
>> -		goto error;
>> -
>> -	return true;
>> -
>> -error:
>> -	if (err)
>> -		*err = -EINVAL;
>> +	if (drm_WARN_ON(&xe->drm, !rcount)) {
>> +		match = false;
>> +		if (err)
>> +			*err = -EINVAL;
>> +	}
>>  
>> -	return false;
>> +	return match;
>>  }
>>  
>>  static bool rule_matches(const struct xe_device *xe,
>> 
>> -- 
>> 2.52.0
>> 
>
> -- 
> Matt Roper
> Graphics Software Engineer
> Linux GPU Platform Enablement
> Intel Corporation

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

end of thread, other threads:[~2026-04-30 13:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-14 22:49 [PATCH 0/6] drm/xe/rtp: Miscellaneous improvements to rule matching Gustavo Sousa
2026-01-14 22:49 ` [PATCH 1/6] drm/xe/rtp: Write kunit test cases specific for " Gustavo Sousa
2026-01-14 22:57   ` Gustavo Sousa
2026-02-10 22:03   ` Matt Roper
2026-01-14 22:49 ` [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases Gustavo Sousa
2026-02-10 22:06   ` Matt Roper
2026-01-14 22:49 ` [PATCH 3/6] drm/xe/rtp: Do not break parsing when missing context Gustavo Sousa
2026-02-10 22:20   ` Matt Roper
2026-04-29 19:45     ` Gustavo Sousa
2026-01-14 22:49 ` [PATCH 4/6] drm/xe/rtp: Extract rule_match_item() Gustavo Sousa
2026-02-10 22:24   ` Matt Roper
2026-01-14 22:49 ` [PATCH 5/6] drm/xe/rtp: Fully parse the ruleset Gustavo Sousa
2026-02-10 22:34   ` Matt Roper
2026-04-30 13:33     ` Gustavo Sousa
2026-01-14 22:49 ` [PATCH 6/6] drm/xe/rtp: Implement a structured parser for rule matching Gustavo Sousa
2026-01-14 22:56 ` ✗ CI.checkpatch: warning for drm/xe/rtp: Miscellaneous improvements to " Patchwork
2026-01-14 22:57 ` ✓ CI.KUnit: success " Patchwork
2026-01-14 23:30 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-15  4:53 ` ✗ Xe.CI.Full: failure " Patchwork

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