summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_rtp_types.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-01-26 03:40:02 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:28:13 +0300
commit944a5e993a3e8a54ec56feec3253bb6b6f5c90d7 (patch)
tree55e4471b8c87bae4e2c5582853763e43a97da5a2 /drivers/gpu/drm/xe/xe_rtp_types.h
parent3747c88428a199620ca626a196781516c6da12e6 (diff)
downloadlinux-944a5e993a3e8a54ec56feec3253bb6b6f5c90d7.tar.xz
drm/xe/rtp: Split action and entry flags
Entry flags is meant for the whole entry, including the rule evaluation. Action flags are for flags applied to the register or action being taken. Since there's only one action per entry, the distinction was not important and a u8 was spared. However more and more workarounds are needing multiple actions. This prepares for multiple action support. Right now there are these action flags: - XE_RTP_ACTION_FLAG_MASKED_REG: register in the action is a masked register - XE_RTP_ACTION_FLAG_ENGINE_BASE: the engine base should be added to the register in order to form the real address And this entry flag: - XE_RTP_ENTRY_FLAG_FOREACH_ENGINE: the rules should be evaluated for each engine on the gt. It also automatically implies XE_RTP_ACTION_FLAG_ENGINE_BASE. Since there are likely not that many rules, reduce n_rules to u8 so the overall entry size doesn't increase more than needed. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_rtp_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_rtp_types.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
index 9cd722f310cb..f7efb17d00e5 100644
--- a/drivers/gpu/drm/xe/xe_rtp_types.h
+++ b/drivers/gpu/drm/xe/xe_rtp_types.h
@@ -34,9 +34,8 @@ struct xe_rtp_action {
#define XE_RTP_NOCHECK .read_mask = 0
/** @read_mask: mask for bits to consider when reading value back */
u32 read_mask;
-#define XE_RTP_FLAG_FOREACH_ENGINE BIT(0)
-#define XE_RTP_FLAG_MASKED_REG BIT(1)
-#define XE_RTP_FLAG_ENGINE_BASE BIT(2)
+#define XE_RTP_ACTION_FLAG_MASKED_REG BIT(0)
+#define XE_RTP_ACTION_FLAG_ENGINE_BASE BIT(1)
/** @flags: flags to apply on rule evaluation or action */
u8 flags;
/** @reg_type: register type, see ``XE_RTP_REG_*`` */
@@ -98,7 +97,9 @@ struct xe_rtp_entry {
const char *name;
const struct xe_rtp_action action;
const struct xe_rtp_rule *rules;
- unsigned int n_rules;
+ u8 n_rules;
+#define XE_RTP_ENTRY_FLAG_FOREACH_ENGINE BIT(0)
+ u8 flags;
};
#endif