]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/xe/rtp: Do not break parsing when missing context
authorGustavo Sousa <gustavo.sousa@intel.com>
Fri, 22 May 2026 08:45:19 +0000 (05:45 -0300)
committerGustavo Sousa <gustavo.sousa@intel.com>
Fri, 22 May 2026 13:52:29 +0000 (10:52 -0300)
commit6dc07632134c10dc82abe3ced8316618b1d61c72
tree2a5007feef4fbb50a0c073b7bf3c0937eafbabb9
parentf6d460e33e537b576d74c67bb9b6352511f5bb96
drm/xe/rtp: Do not break parsing when missing context

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.

v2:
  - Add "missing-context" in the test case names to indicate that those
    are about rules that are missing the necessary context. (Matt)
  - Rebase: treat the new match type XE_RTP_MATCH_PLATFORM_STEP in the
    same way when the platform is missing step information.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com> # v1
Link: https://patch.msgid.link/20260522-rtp-rule-parser-v3-4-0c51039899f4@intel.com
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
drivers/gpu/drm/xe/tests/xe_rtp_test.c
drivers/gpu/drm/xe/xe_rtp.c