summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGustavo Sousa <gustavo.sousa@intel.com>2026-05-22 05:45:22 -0300
committerGustavo Sousa <gustavo.sousa@intel.com>2026-05-22 10:52:29 -0300
commitdf07911cb72dabebec3dd18d94c33f9ced74c3d6 (patch)
tree49660be7580d5bf9b4529ad0765fb07afa7b85cd /include
parent0da9ab6c4e12e66dbd2e8f54481662225a79b7f5 (diff)
drm/xe/rtp: Implement a structured parser for rule matching
The current unwritten grammar for RTP rules is as follows: rules = disjunction; disjunction = conjunction, { "OR", conjunction }; conjunction = single_rule, { single_rule }; (* the AND operator is implicit *) single_rule = ? GRAPHICS_VERSION(...), MEDIA_VERSION(...), FUNC(...), etc ? While rule_matches() currently works for the grammar above, it doesn't easily resemble it. Let's replace it with an implementation that is structured in a way to resemble the grammar. Such a new implementation, although a bit more verbose, is arguably easier to reason about and to adapt to any extension we do to the grammer in the future. Also take this opportunity to update the kernel-doc for XE_RTP_RULES() to include the grammar, so that it is not unwritten anymore. v2: - Include the grammar in the code documentation. (Matt) Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Violet Monti <violet.monti@intel.com> Link: https://patch.msgid.link/20260522-rtp-rule-parser-v3-7-0c51039899f4@intel.com Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions