xe_rtp_rule_matches(9)
β¨ 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 energygtβ the GT struct (may beNULL, so it's giving 'optional bestie' π«Ά)hweβ the hw_engine (also may beNULL, love that for us π)rulesβ the array of rules to match against, this is the whole shopping list ποΈn_rulesβ number of items inrules, don't forget to count fr fr π’errβ pointer (may beNULL, 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 returnstrueif there is a match, andfalseif there is no match or if an error was found. yes, "no match" and "something went wrong" both come back asfalseβ that's whyerris 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
- 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