From: Matt Roper <matthew.d.roper@intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 2/6] drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_cases
Date: Tue, 10 Feb 2026 14:06:33 -0800 [thread overview]
Message-ID: <20260210220633.GF4694@mdroper-desk1.amr.corp.intel.com> (raw)
In-Reply-To: <20260114-rtp-rule-parser-v1-2-fa9029586bff@intel.com>
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
next prev parent reply other threads:[~2026-02-10 22:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260210220633.GF4694@mdroper-desk1.amr.corp.intel.com \
--to=matthew.d.roper@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).