[Intel-xe] [PATCH v4 01/12] drm/i915: Move MCR_REG define to i915_reg_defs.h

Lucas De Marchi lucas.demarchi at intel.com
Sat Feb 25 00:15:37 UTC 2023


Define MCR_REG() in the same header where i915_mcr_reg_t is defined,
like i915_reg_t and _MMIO(). It's a more natural place for such a
definition so it's not mixed with the registers for the platforms.

Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Reviewed-by: Matt Roper <matthew.d.roper at intel.com>
---
 drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 -
 drivers/gpu/drm/i915/i915_reg_defs.h    | 2 ++
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_gt_regs.h b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
index 3b9e20dd6039..12c5115f7b61 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_regs.h
+++ b/drivers/gpu/drm/i915/gt/intel_gt_regs.h
@@ -10,7 +10,6 @@
 #ifdef I915
 #include "display/intel_display_reg_defs.h"	/* VLV_DISPLAY_BASE */
 #endif
-#define MCR_REG(offset)	((const i915_mcr_reg_t){ .reg = (offset) })
 
 /*
  * The perf control registers are technically multicast registers, but the
diff --git a/drivers/gpu/drm/i915/i915_reg_defs.h b/drivers/gpu/drm/i915/i915_reg_defs.h
index b5e06b6a9478..a6080c983a77 100644
--- a/drivers/gpu/drm/i915/i915_reg_defs.h
+++ b/drivers/gpu/drm/i915/i915_reg_defs.h
@@ -136,6 +136,8 @@ typedef struct {
 	u32 reg;
 } i915_mcr_reg_t;
 
+#define MCR_REG(offset)	((const i915_mcr_reg_t){ .reg = (offset) })
+
 #define INVALID_MMIO_REG _MMIO(0)
 
 /*
-- 
2.39.0



More information about the Intel-xe mailing list