summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_gt_topology.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2023-02-25 12:10:39 -0800
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-19 18:29:23 -0500
commit8cb49012ac171698b1253dea45e56c284e997d38 (patch)
tree490bb5be1accff65c22afbe8dc311a7be5e4a955 /drivers/gpu/drm/xe/xe_gt_topology.c
parent3457388fcd145d64e6852ca60084e822bec81e9f (diff)
drm/xe: Do not spread i915_reg_defs.h include
Reduce the use of i915_reg_defs.h so it can be encapsulated in a single place. 1) If it was being included by mistake, remove 2) If it was included for FIELD_GET()/FIELD_PREP()/GENMASK() and the like, just include <linux/bitfield.h> 3) If it was included to be able to define additional registers, move the registers to the relavant headers (regs/xe_regs.h or regs/xe_gt_regs.h) v2: - Squash commit fixing i915_reg_defs.h include and with the one introducing regs/xe_reg_defs.h - Remove more cases of i915_reg_defs.h being used when all it was needed was linux/bitfield.h (Matt Roper) - Move some registers to the corresponding regs/*.h file (Matt Roper) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> [Rodrigo squashed here the removal of the i915 include]
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gt_topology.c')
-rw-r--r--drivers/gpu/drm/xe/xe_gt_topology.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_topology.c b/drivers/gpu/drm/xe/xe_gt_topology.c
index c76aaea1887c..2123f84be336 100644
--- a/drivers/gpu/drm/xe/xe_gt_topology.c
+++ b/drivers/gpu/drm/xe/xe_gt_topology.c
@@ -7,18 +7,13 @@
#include <linux/bitmap.h>
+#include "regs/xe_gt_regs.h"
#include "xe_gt.h"
#include "xe_mmio.h"
#define XE_MAX_DSS_FUSE_BITS (32 * XE_MAX_DSS_FUSE_REGS)
#define XE_MAX_EU_FUSE_BITS (32 * XE_MAX_EU_FUSE_REGS)
-#define XELP_EU_ENABLE 0x9134 /* "_DISABLE" on Xe_LP */
-#define XELP_EU_MASK REG_GENMASK(7, 0)
-#define XELP_GT_GEOMETRY_DSS_ENABLE 0x913c
-#define XEHP_GT_COMPUTE_DSS_ENABLE 0x9144
-#define XEHPC_GT_COMPUTE_DSS_ENABLE_EXT 0x9148
-
static void
load_dss_mask(struct xe_gt *gt, xe_dss_mask_t mask, int numregs, ...)
{
@@ -41,7 +36,7 @@ static void
load_eu_mask(struct xe_gt *gt, xe_eu_mask_t mask)
{
struct xe_device *xe = gt_to_xe(gt);
- u32 reg = xe_mmio_read32(gt, XELP_EU_ENABLE);
+ u32 reg = xe_mmio_read32(gt, XELP_EU_ENABLE.reg);
u32 val = 0;
int i;
@@ -86,10 +81,10 @@ xe_gt_topology_init(struct xe_gt *gt)
}
load_dss_mask(gt, gt->fuse_topo.g_dss_mask, num_geometry_regs,
- XELP_GT_GEOMETRY_DSS_ENABLE);
+ XELP_GT_GEOMETRY_DSS_ENABLE.reg);
load_dss_mask(gt, gt->fuse_topo.c_dss_mask, num_compute_regs,
- XEHP_GT_COMPUTE_DSS_ENABLE,
- XEHPC_GT_COMPUTE_DSS_ENABLE_EXT);
+ XEHP_GT_COMPUTE_DSS_ENABLE.reg,
+ XEHPC_GT_COMPUTE_DSS_ENABLE_EXT.reg);
load_eu_mask(gt, gt->fuse_topo.eu_mask_per_dss);
xe_gt_topology_dump(gt, &p);