drm/xe: Define XE_REG_OPTION_VF
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 14 Mar 2024 17:31:26 +0000 (18:31 +0100)
committerMichał Winiarski <michal.winiarski@intel.com>
Fri, 15 Mar 2024 21:20:14 +0000 (22:20 +0100)
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.

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240314173130.1177-3-michal.wajdeczko@intel.com
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
drivers/gpu/drm/xe/regs/xe_reg_defs.h

index 114b07db962f168f95043e89e695c0394ef355aa..c89ef2b79a3f9f920e0ee8b7f702359a9786edb6 100644 (file)
@@ -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