[PATCH 2/6] drm/xe: Define XE_REG_OPTION_VF

Matt Roper matthew.d.roper at intel.com
Wed Jan 17 23:23:14 UTC 2024


On Tue, Jan 16, 2024 at 03:56:13PM +0100, Michal Wajdeczko wrote:
> We will tag registers that SR-IOV Virtual Functions can access.
> This will help us catch any invalid usage and/or provide custom
> replacement if available.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko at intel.com>

Reviewed-by: Matt Roper <matthew.d.roper at intel.com>

> ---
>  drivers/gpu/drm/xe/regs/xe_reg_defs.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/gpu/drm/xe/regs/xe_reg_defs.h b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
> index 114b07db962f..c89ef2b79a3f 100644
> --- a/drivers/gpu/drm/xe/regs/xe_reg_defs.h
> +++ b/drivers/gpu/drm/xe/regs/xe_reg_defs.h
> @@ -37,6 +37,10 @@ struct xe_reg {
>  			 * value can inspect it.
>  			 */
>  			u32 mcr:1;
> +			/**
> +			 * @vf: register is accessible from the Virtual Function.
> +			 */
> +			u32 vf:1;
>  			/**
>  			 * @ext: access MMIO extension space for current register.
>  			 */
> @@ -78,6 +82,13 @@ struct xe_reg_mcr {
>   */
>  #define XE_REG_OPTION_MASKED		.masked = 1
>  
> +/**
> + * XE_REG_OPTION_VF - Register is "VF" accessible.
> + *
> + * To be used with XE_REG() and XE_REG_INITIALIZER().
> + */
> +#define XE_REG_OPTION_VF		.vf = 1
> +
>  /**
>   * XE_REG_INITIALIZER - Initializer for xe_reg_t.
>   * @r_: Register offset
> -- 
> 2.25.1
> 

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


More information about the Intel-xe mailing list