summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_rtp.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-05-26 19:43:46 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-20 02:34:02 +0300
commited73d03c0803bdb70d7e56c7d8a2518fb9376047 (patch)
tree98478771e36e68841e8388dfe2e9adbd4c877620 /drivers/gpu/drm/xe/xe_rtp.h
parent00a5912c020df0bd4b752db714cb7256a83c0701 (diff)
downloadlinux-ed73d03c0803bdb70d7e56c7d8a2518fb9376047.tar.xz
drm/xe/rtp: Add check for media stepping
Start differentiating the media and graphics stepping as it will be important for MTL. Note that RTP is still not prepared to handle the different types of GT, i.e. checking for graphics version/range/stepping on a media gt or vice versa still matches regardless of the gt being passed as parameter. Changing it to accommodate MTL is left for a future patch. Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Link: https://lore.kernel.org/r/20230526164358.86393-10-lucas.demarchi@intel.com Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_rtp.h')
-rw-r--r--drivers/gpu/drm/xe/xe_rtp.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index 7ba9d2ecab92..d55701d2f39b 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -39,6 +39,10 @@ struct xe_reg_sr;
{ .match_type = XE_RTP_MATCH_GRAPHICS_STEP, \
.step_start = start__, .step_end = end__ }
+#define _XE_RTP_RULE_MEDIA_STEP(start__, end__) \
+ { .match_type = XE_RTP_MATCH_MEDIA_STEP, \
+ .step_start = start__, .step_end = end__ }
+
#define _XE_RTP_RULE_ENGINE_CLASS(cls__) \
{ .match_type = XE_RTP_MATCH_ENGINE_CLASS, \
.engine_class = (cls__) }
@@ -76,6 +80,19 @@ struct xe_reg_sr;
_XE_RTP_RULE_GRAPHICS_STEP(STEP_##start_, STEP_##end_)
/**
+ * XE_RTP_RULE_MEDIA_STEP - Create rule matching media stepping
+ * @start_: First stepping matching the rule
+ * @end_: First stepping that does not match the rule
+ *
+ * Note that the range matching this rule is [ @start_, @end_ ), i.e. inclusive
+ * on the left, exclusive on the right.
+ *
+ * Refer to XE_RTP_RULES() for expected usage.
+ */
+#define XE_RTP_RULE_MEDIA_STEP(start_, end_) \
+ _XE_RTP_RULE_MEDIA_STEP(STEP_##start_, STEP_##end_)
+
+/**
* XE_RTP_RULE_ENGINE_CLASS - Create rule matching an engine class
* @cls_: Engine class to match
*