Commit 6b7ece97 authored by Matt Roper's avatar Matt Roper Committed by Rodrigo Vivi

drm/xe/irq: Drop unnecessary GEN11_ and GEN12_ register prefixes

Any interrupt registers that were introduced by platforms i915
considered to be "gen11" or "gen12" are present on all platforms that
the Xe driver supports; drop the unnecessary prefixes.

While working in the area, also convert a few open-coded bit
manipulations over to REG_BIT and REG_FIELD_GET notation.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230401002106.588656-5-matthew.d.roper@intel.comSigned-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
[Rodrigo: removed display. That was later squashed to the xe Display patch]
parent ca14d553
...@@ -348,34 +348,34 @@ ...@@ -348,34 +348,34 @@
#define GFX_FLSH_CNTL_GEN6 _MMIO(0x101008) #define GFX_FLSH_CNTL_GEN6 _MMIO(0x101008)
#define GFX_FLSH_CNTL_EN (1 << 0) #define GFX_FLSH_CNTL_EN (1 << 0)
#define GEN11_GT_INTR_DW(x) _MMIO(0x190018 + ((x) * 4)) #define GT_INTR_DW(x) _MMIO(0x190018 + ((x) * 4))
#define GEN11_GUC_SG_INTR_ENABLE _MMIO(0x190038) #define GUC_SG_INTR_ENABLE _MMIO(0x190038)
#define ENGINE1_MASK REG_GENMASK(31, 16) #define ENGINE1_MASK REG_GENMASK(31, 16)
#define ENGINE0_MASK REG_GENMASK(15, 0) #define ENGINE0_MASK REG_GENMASK(15, 0)
#define GEN11_GPM_WGBOXPERF_INTR_ENABLE _MMIO(0x19003c) #define GPM_WGBOXPERF_INTR_ENABLE _MMIO(0x19003c)
#define GEN11_INTR_IDENTITY_REG(x) _MMIO(0x190060 + ((x) * 4)) #define INTR_IDENTITY_REG(x) _MMIO(0x190060 + ((x) * 4))
#define GEN11_INTR_DATA_VALID (1 << 31) #define INTR_DATA_VALID REG_BIT(31)
#define GEN11_INTR_ENGINE_INSTANCE(x) (((x) & GENMASK(25, 20)) >> 20) #define INTR_ENGINE_INSTANCE(x) REG_FIELD_GET(GENMASK(25, 20), x)
#define GEN11_INTR_ENGINE_CLASS(x) (((x) & GENMASK(18, 16)) >> 16) #define INTR_ENGINE_CLASS(x) REG_FIELD_GET(GENMASK(18, 16), x)
#define GEN11_INTR_ENGINE_INTR(x) ((x) & 0xffff) #define INTR_ENGINE_INTR(x) REG_FIELD_GET(GENMASK(15, 0), x)
#define OTHER_GUC_INSTANCE 0 #define OTHER_GUC_INSTANCE 0
#define GEN11_RENDER_COPY_INTR_ENABLE _MMIO(0x190030) #define RENDER_COPY_INTR_ENABLE _MMIO(0x190030)
#define GEN11_VCS_VECS_INTR_ENABLE _MMIO(0x190034) #define VCS_VECS_INTR_ENABLE _MMIO(0x190034)
#define GEN12_CCS_RSVD_INTR_ENABLE _MMIO(0x190048) #define CCS_RSVD_INTR_ENABLE _MMIO(0x190048)
#define GEN11_IIR_REG_SELECTOR(x) _MMIO(0x190070 + ((x) * 4)) #define IIR_REG_SELECTOR(x) _MMIO(0x190070 + ((x) * 4))
#define GEN11_RCS0_RSVD_INTR_MASK _MMIO(0x190090) #define RCS0_RSVD_INTR_MASK _MMIO(0x190090)
#define GEN11_BCS_RSVD_INTR_MASK _MMIO(0x1900a0) #define BCS_RSVD_INTR_MASK _MMIO(0x1900a0)
#define GEN11_VCS0_VCS1_INTR_MASK _MMIO(0x1900a8) #define VCS0_VCS1_INTR_MASK _MMIO(0x1900a8)
#define GEN11_VCS2_VCS3_INTR_MASK _MMIO(0x1900ac) #define VCS2_VCS3_INTR_MASK _MMIO(0x1900ac)
#define GEN11_VECS0_VECS1_INTR_MASK _MMIO(0x1900d0) #define VECS0_VECS1_INTR_MASK _MMIO(0x1900d0)
#define GEN11_GUC_SG_INTR_MASK _MMIO(0x1900e8) #define GUC_SG_INTR_MASK _MMIO(0x1900e8)
#define GEN11_GPM_WGBOXPERF_INTR_MASK _MMIO(0x1900ec) #define GPM_WGBOXPERF_INTR_MASK _MMIO(0x1900ec)
#define GEN12_CCS0_CCS1_INTR_MASK _MMIO(0x190100) #define CCS0_CCS1_INTR_MASK _MMIO(0x190100)
#define GEN12_CCS2_CCS3_INTR_MASK _MMIO(0x190104) #define CCS2_CCS3_INTR_MASK _MMIO(0x190104)
#define XEHPC_BCS1_BCS2_INTR_MASK _MMIO(0x190110) #define XEHPC_BCS1_BCS2_INTR_MASK _MMIO(0x190110)
#define XEHPC_BCS3_BCS4_INTR_MASK _MMIO(0x190114) #define XEHPC_BCS3_BCS4_INTR_MASK _MMIO(0x190114)
#define XEHPC_BCS5_BCS6_INTR_MASK _MMIO(0x190118) #define XEHPC_BCS5_BCS6_INTR_MASK _MMIO(0x190118)
......
...@@ -74,13 +74,13 @@ ...@@ -74,13 +74,13 @@
#define PCU_IRQ_OFFSET 0x444e0 #define PCU_IRQ_OFFSET 0x444e0
#define GU_MISC_IRQ_OFFSET 0x444f0 #define GU_MISC_IRQ_OFFSET 0x444f0
#define GEN11_GU_MISC_GSE (1 << 27) #define GU_MISC_GSE REG_BIT(27)
#define GEN11_GFX_MSTR_IRQ _MMIO(0x190010) #define GFX_MSTR_IRQ _MMIO(0x190010)
#define GEN11_MASTER_IRQ (1 << 31) #define MASTER_IRQ REG_BIT(31)
#define GEN11_GU_MISC_IRQ (1 << 29) #define GU_MISC_IRQ REG_BIT(29)
#define GEN11_DISPLAY_IRQ (1 << 16) #define DISPLAY_IRQ REG_BIT(16)
#define GEN11_GT_DW_IRQ(x) (1 << (x)) #define GT_DW_IRQ(x) REG_BIT(x)
#define DG1_MSTR_TILE_INTR _MMIO(0x190008) #define DG1_MSTR_TILE_INTR _MMIO(0x190008)
#define DG1_MSTR_IRQ REG_BIT(31) #define DG1_MSTR_IRQ REG_BIT(31)
......
...@@ -561,12 +561,12 @@ static void guc_enable_irq(struct xe_guc *guc) ...@@ -561,12 +561,12 @@ static void guc_enable_irq(struct xe_guc *guc)
REG_FIELD_PREP(ENGINE0_MASK, GUC_INTR_GUC2HOST) : REG_FIELD_PREP(ENGINE0_MASK, GUC_INTR_GUC2HOST) :
REG_FIELD_PREP(ENGINE1_MASK, GUC_INTR_GUC2HOST); REG_FIELD_PREP(ENGINE1_MASK, GUC_INTR_GUC2HOST);
xe_mmio_write32(gt, GEN11_GUC_SG_INTR_ENABLE.reg, xe_mmio_write32(gt, GUC_SG_INTR_ENABLE.reg,
REG_FIELD_PREP(ENGINE1_MASK, GUC_INTR_GUC2HOST)); REG_FIELD_PREP(ENGINE1_MASK, GUC_INTR_GUC2HOST));
if (xe_gt_is_media_type(gt)) if (xe_gt_is_media_type(gt))
xe_mmio_rmw32(gt, GEN11_GUC_SG_INTR_MASK.reg, events, 0); xe_mmio_rmw32(gt, GUC_SG_INTR_MASK.reg, events, 0);
else else
xe_mmio_write32(gt, GEN11_GUC_SG_INTR_MASK.reg, ~events); xe_mmio_write32(gt, GUC_SG_INTR_MASK.reg, ~events);
} }
int xe_guc_enable_communication(struct xe_guc *guc) int xe_guc_enable_communication(struct xe_guc *guc)
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment