summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_rtp.h
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2024-06-17 22:00:43 -0700
committerMatt Roper <matthew.d.roper@intel.com>2024-06-18 12:03:29 -0700
commitc8c00286f5c4bb3cafa4a6562711dff26fca6c8e (patch)
treecfd3dcf007266761e3e57bf958532649f14bf142 /drivers/gpu/drm/xe/xe_rtp.h
parentdc72c52a42e0255441bed7444ab16f2b6c98b681 (diff)
drm/xe/rtp: Add match on any GT
One surprising factor of GRAPHICS_VERSION()/MEDIA_VERSION() matching for people adding new WAs is that it implicitly checks that the graphics/media IP under check is of that specific type and not that the device contains a media/graphics IP of that version. Add a new *_ANY_GT() variant that can be used in that case. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240618050044.324454-5-lucas.demarchi@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_rtp.h')
-rw-r--r--drivers/gpu/drm/xe/xe_rtp.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_rtp.h b/drivers/gpu/drm/xe/xe_rtp.h
index bd5b5ba0fb31..ad446731192c 100644
--- a/drivers/gpu/drm/xe/xe_rtp.h
+++ b/drivers/gpu/drm/xe/xe_rtp.h
@@ -140,9 +140,23 @@ struct xe_reg_sr;
.ver_start = ver_start__, .ver_end = ver_end__, }
/**
- * XE_RTP_RULE_MEDIA_VERSION - Create rule matching media version
+ * XE_RTP_RULE_GRAPHICS_VERSION_ANY_GT - Create rule matching graphics version on any GT
* @ver__: Graphics IP version to match
*
+ * Like XE_RTP_RULE_GRAPHICS_VERSION, but it matches even if the current GT
+ * being checked is not of the graphics type. It allows to add RTP entries to
+ * another GT when the device contains a Graphics IP with that version.
+ *
+ * Refer to XE_RTP_RULES() for expected usage.
+ */
+#define XE_RTP_RULE_GRAPHICS_VERSION_ANY_GT(ver__) \
+ { .match_type = XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT, \
+ .ver_start = ver__, }
+
+/**
+ * XE_RTP_RULE_MEDIA_VERSION - Create rule matching media version
+ * @ver__: Media IP version to match
+ *
* Refer to XE_RTP_RULES() for expected usage.
*/
#define XE_RTP_RULE_MEDIA_VERSION(ver__) \
@@ -164,6 +178,20 @@ struct xe_reg_sr;
.ver_start = ver_start__, .ver_end = ver_end__, }
/**
+ * XE_RTP_RULE_MEDIA_VERSION_ANY_GT - Create rule matching media version on any GT
+ * @ver__: Media IP version to match
+ *
+ * Like XE_RTP_RULE_MEDIA_VERSION, but it matches even if the current GT being
+ * checked is not of the media type. It allows to add RTP entries to another
+ * GT when the device contains a Media IP with that version.
+ *
+ * Refer to XE_RTP_RULES() for expected usage.
+ */
+#define XE_RTP_RULE_MEDIA_VERSION_ANY_GT(ver__) \
+ { .match_type = XE_RTP_MATCH_MEDIA_VERSION_ANY_GT, \
+ .ver_start = ver__, }
+
+/**
* XE_RTP_RULE_IS_INTEGRATED - Create a rule matching integrated graphics devices
*
* Refer to XE_RTP_RULES() for expected usage.