xe_rtp_rule_matches(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

xe_rtp_rule_matches β€” bestie, this is the little function that checks whether a whole set of RTP rules matches against the device / GT / hwe πŸ’… like a vibe check but for hardware

(and yes it's a kernel API manual page, we're being fancy today πŸ‘‘)


🌸 SYNOPSIS 🌸

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 );

okay so it's bool in, bool out, and the only way you get a true is if everything lines up ✨ no cap


πŸŽ€ ARGUMENTS πŸŽ€

  • xe β€” the xe device πŸ–₯️ literally the star of the show, main character energy
  • gt β€” the GT struct (may be NULL, so it's giving 'optional bestie' 🫢)
  • hwe β€” the hw_engine (also may be NULL, love that for us πŸ™ˆ)
  • rules β€” the array of rules to match against, this is the whole shopping list πŸ›οΈ
  • n_rules β€” number of items in rules, don't forget to count fr fr πŸ”’
  • err β€” pointer (may be NULL, we do love a flexible icon πŸ’…) that gets set with the error number

πŸ’– DESCRIPTION πŸ’–

so what it does is: it parses the set of rules and checks if they match against the parameters you passed in πŸ”₯ like a matching game but make it kernel

if the call passes, err gets updated with a non-zero negative error number, or zero if no errors were found during the parsing/evaluation of rules πŸ‘€ β€” so like, 0 = we're so back, negative = it's over 😭

⚠️ heads up bestie: it returns true if there is a match, and false if there is no match or if an error was found. yes, "no match" and "something went wrong" both come back as false β€” that's why err is right there, use it!! πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/gpu/drm/xe/tests/xe_rtp.c β€” go read it, iykyk πŸ“–βœ¨

aaaaaaaaand that's the page πŸŽ€ this was brought to you by the Kernel API Manual, living in ./drivers/gpu/drm/xe/tests, dated October 2026 β€” stay slay, stay matched, periodt πŸ’œπŸŒˆβ­

πŸ“¦ where this page comes from