Skip to content

drm/xe/rtp: Miscellaneous improvements to rule matching

Gustavo Sousa intel-xe 3 versions – Applied

Status from this message: Pushed to drm-xe-next. Thanks Matt and Violet for the reviews!

Get series with b4
b4 am [email protected] change-id 20260114-rtp-rule-parser-ac01472acdeb

Versions newest first

  1. v3 Latest7 patches 1 replyApplied
  2. v27 patches 8 repliesSuperseded
  3. v16 patches 8 repliesSuperseded

Changes in v3 from the cover letter

- Added eBNF grammar for the rules to the kernel-doc.
- Fully reviewed now. Sent for fresh CI results.
- Link to v2: https://patch.msgid.link/[email protected]

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/7drm/xe/rtp: Write kunit test cases specific for rule matchingdrivers/gpu/drm/xe/tests/xe_rtp.c drivers/gpu/drm/xe/tests/xe_rtp_test.c drivers/gpu/drm/xe/tests/xe_rtp_test.h +1 more+242 -170 replies
2/7drm/xe/rtp: Drop rule matching cases from rtp_to_sr_cases and rtp_casesdrivers/gpu/drm/xe/tests/xe_rtp_test.c+6 -1160 replies
3/7drm/xe/rtp: Don't short-circuit to false in or-yes casedrivers/gpu/drm/xe/tests/xe_rtp_test.c drivers/gpu/drm/xe/xe_rtp.c+50 -70 replies
4/7drm/xe/rtp: Do not break parsing when missing contextdrivers/gpu/drm/xe/tests/xe_rtp_test.c drivers/gpu/drm/xe/xe_rtp.c+72 -220 replies
5/7drm/xe/rtp: Extract rule_match_item()drivers/gpu/drm/xe/xe_rtp.c+94 -1250 replies
6/7drm/xe/rtp: Fully parse the rulesetdrivers/gpu/drm/xe/tests/xe_rtp_test.c drivers/gpu/drm/xe/xe_rtp.c+15 -170 replies
7/7drm/xe/rtp: Implement a structured parser for rule matchingdrivers/gpu/drm/xe/xe_rtp.c drivers/gpu/drm/xe/xe_rtp.h+113 -540 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchMatt RoperViolet Monti
1/7R-b
2/7R-b
3/7R-b R-b
4/7R-b
5/7R-b
6/7R-b R-b
7/7R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/7] drm/xe/rtp: Miscellaneous improvements to rule matching

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.

---
Changes in v3:
- Added eBNF grammar for the rules to the kernel-doc.
- Fully reviewed now. Sent for fresh CI results.
- Link to v2: https://patch.msgid.link/[email protected]

Changes in v2:
- Incorporated review feedback. See individual patches for the
changelog.
- Incorporated the addition of the match type XE_RTP_MATCH_PLATFORM_STEP after rebasing on latest drm-tip, which is reflected in some of the patches.
- Link to v1: https://patch.msgid.link/[email protected]

---
Gustavo Sousa (7):
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: Don't short-circuit to false in or-yes case 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 | 327 +++++++++++++++++++++------------
 drivers/gpu/drm/xe/tests/xe_rtp_test.h |  23 +++
 drivers/gpu/drm/xe/xe_rtp.c            | 321 +++++++++++++++++++-------------
 drivers/gpu/drm/xe/xe_rtp.h            |  29 ++-
 5 files changed, 486 insertions(+), 252 deletions(-)

---
base-commit: 7e25390024f8a4a9fdd6ec50f000ee25c006c02f
change-id: 20260114-rtp-rule-parser-ac01472acdeb

Best regards,

Signature · 1 line
Gustavo Sousa <[email protected]>