XE_RTP_RULES(9)
π XE_RTP_RULES β bestie, this is the macro that stacks your rules β¨
okay so real quick: this page is XE_RTP_RULES(9) from the Kernel API Manual, and it's literally the helper that sets multiple rules onto a struct xe_rtp_entry_sr entry. group-chat summary: it's the "and alsoβ¦" macro. periodt.
β¨ NAME β¨
XE_RTP_RULES β the helper that sets multiple rules onto a struct xe_rtp_entry_sr entry π
πΈ SYNOPSIS πΈ
XE_RTP_RULES (... );
π¦ ARGUMENTS π¦
...β the Rules. that's it, that's the whole argument list. it's variadic and it's eating good π
π₯ DESCRIPTION π₯
so when an RTP table is being processed, the rules of each entry get evaluated to check if they match the target entity β and which entity that is depends on the specific RTP table, bestie: it's platform, gt or hwe. iykyk.
The sequence of arguments you hand to this macro must follow this eBNF grammar (no cap, this is the actual grammar, keep it exact):
rules = disjunction;
disjunction = conjunction, { "OR", conjunction };
conjunction = single_rule, { single_rule };
(* the AND operator is implicit *)
single_rule = ? GRAPHICS_VERSION(...), MEDIA_VERSION(...),
FUNC(...), etc ?
so yeah β OR is the only operator you actually type, and the AND is justβ¦ vibes. implicit vibes. it's giving "the comma is the AND" π«Ά
π EXAMPLES π
const struct xe_rtp_entry_sr wa_entries[] = {
...
{ XE_RTP_NAME("entry-a"),
// Match DG2-G10 with graphics steppings A0 up-to B0
// (exclusive).
XE_RTP_RULES(SUBPLATFORM(DG2, G10), GRAPHICS_STEP(A0, B0)),
...
},
{ XE_RTP_NAME("entry-b"),
// Match graphics version 20 (all steppings) or graphics
// version 30 steppings A0 up-to B0 (exclusive).
XE_RTP_RULES(GRAPHICS_VERSION(2000), OR,
GRAPHICS_VERSION(3000), GRAPHICS_STEP(A0, B0))
...
},
...
};
like look at entry-b β that OR is doing main character work, and everything else is quietly ANDed together. iconic. π₯
π SEE ALSO π
Kernel file ./drivers/gpu/drm/xe/xe_rtp.h, plus the whole squad:
XE_RTP_RULE_PLATFORM(9)XE_RTP_RULE_SUBPLATFORM(9)XE_RTP_RULE_PLATFORM_STEP(9)XE_RTP_RULE_GRAPHICS_STEP(9)XE_RTP_RULE_MEDIA_STEP(9)XE_RTP_RULE_ENGINE_CLASS(9)XE_RTP_RULE_FUNC(9)XE_RTP_RULE_GRAPHICS_VERSION(9)XE_RTP_RULE_GRAPHICS_VERSION_RANGE(9)XE_RTP_RULE_GRAPHICS_VERSION_ANY_GT(9)XE_RTP_RULE_MEDIA_VERSION(9)XE_RTP_RULE_MEDIA_VERSION_RANGE(9)XE_RTP_RULE_MEDIA_VERSION_ANY_GT(9)XE_RTP_RULE_IS_INTEGRATED(9)XE_RTP_RULE_IS_DISCRETE(9)XE_RTP_RULE_OR(9)XE_RTP_ACTION_WR(9)XE_RTP_ACTION_SET(9)XE_RTP_ACTION_CLR(9)XE_RTP_ACTION_FIELD_SET(9)XE_RTP_ACTION_FIELD_SET_FUNC(9)XE_RTP_ACTION_WHITELIST(9)XE_RTP_NAME(9)XE_RTP_ENTRY_FLAG(9)XE_RTP_ACTION_FLAG(9)XE_RTP_ACTIONS(9)xe_rtp_match_always(9)xe_rtp_match_even_instance(9)xe_rtp_match_has_flat_ccs(9)xe_rtp_match_has_msix(9)
π that's the whole page bestie, go forth and stack your rules π
shoutout to ./drivers/gpu/drm/xe for shipping this, and happy October 2026 to everyone who celebrates πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms