[PATCH 4/5] drm/xe/rtp: Add match on any GT

Matt Roper matthew.d.roper at intel.com
Mon Jun 17 19:20:37 UTC 2024


On Mon, Jun 17, 2024 at 11:25:17AM -0700, Lucas De Marchi wrote:
> 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.

Isn't this patch missing the corresponding update to rule_matches() that
defines the logic for these new rules?


Matt

> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
> ---
>  drivers/gpu/drm/xe/xe_rtp.h       | 30 +++++++++++++++++++++++++++++-
>  drivers/gpu/drm/xe/xe_rtp_types.h |  2 ++
>  2 files changed, 31 insertions(+), 1 deletion(-)
> 
> 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__)					\
> @@ -163,6 +177,20 @@ struct xe_reg_sr;
>  	{ .match_type = XE_RTP_MATCH_MEDIA_VERSION_RANGE,			\
>  	  .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
>   *
> diff --git a/drivers/gpu/drm/xe/xe_rtp_types.h b/drivers/gpu/drm/xe/xe_rtp_types.h
> index 10150bc22ccd..1b76b947c706 100644
> --- a/drivers/gpu/drm/xe/xe_rtp_types.h
> +++ b/drivers/gpu/drm/xe/xe_rtp_types.h
> @@ -42,9 +42,11 @@ enum {
>  	XE_RTP_MATCH_SUBPLATFORM,
>  	XE_RTP_MATCH_GRAPHICS_VERSION,
>  	XE_RTP_MATCH_GRAPHICS_VERSION_RANGE,
> +	XE_RTP_MATCH_GRAPHICS_VERSION_ANY_GT,
>  	XE_RTP_MATCH_GRAPHICS_STEP,
>  	XE_RTP_MATCH_MEDIA_VERSION,
>  	XE_RTP_MATCH_MEDIA_VERSION_RANGE,
> +	XE_RTP_MATCH_MEDIA_VERSION_ANY_GT,
>  	XE_RTP_MATCH_MEDIA_STEP,
>  	XE_RTP_MATCH_INTEGRATED,
>  	XE_RTP_MATCH_DISCRETE,
> -- 
> 2.43.0
> 

-- 
Matt Roper
Graphics Software Engineer
Linux GPU Platform Enablement
Intel Corporation


More information about the Intel-xe mailing list