Commit 226bfec8 authored by Lucas De Marchi's avatar Lucas De Marchi Committed by Rodrigo Vivi

drm/xe: Remove dependency on intel_gt_regs.h

Create regs/xe_gt_regs.h file with all the registers and bit
definitions used by the xe driver. Eventually the registers may be
defined in a different way and since xe doesn't supported below gen12,
the number of registers touched is much smaller, so create a new header.

The definitions themselves are direct copy from the
gt/intel_gt_regs.h file, just sorting the registers by address.
Cleaning those up and adhering to a common coding style is left for
later.

v2: Make the change to MCR_REG location in a separate patch to go
    through the i915 branch  (Matt Roper / Rodrigo)
Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent b79e8fd9
This diff is collapsed.
......@@ -8,6 +8,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_engine.h"
......@@ -21,7 +22,6 @@
#include "xe_sched_job.h"
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gt_regs.h"
#include "gt/intel_lrc_reg.h"
#include "i915_reg.h"
......
......@@ -7,11 +7,10 @@
#include <drm/drm_util.h>
#include "regs/xe_gt_regs.h"
#include "xe_gt.h"
#include "xe_mmio.h"
#include "gt/intel_gt_regs.h"
#define XE_FORCE_WAKE_ACK_TIMEOUT_MS 50
static struct xe_gt *
......
......@@ -10,6 +10,7 @@
#include <drm/drm_managed.h>
#include <drm/i915_drm.h>
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_gt.h"
......@@ -18,7 +19,6 @@
#include "xe_mmio.h"
#include "xe_wopcm.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
/* FIXME: Common file, preferably auto-gen */
......
......@@ -9,6 +9,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_gt_regs.h"
#include "xe_bb.h"
#include "xe_bo.h"
#include "xe_device.h"
......@@ -41,8 +42,6 @@
#include "xe_wa.h"
#include "xe_wopcm.h"
#include "gt/intel_gt_regs.h"
struct xe_gt *xe_find_full_gt(struct xe_gt *gt)
{
struct xe_gt *search;
......
......@@ -5,12 +5,12 @@
#include "xe_gt_clock.h"
#include "regs/xe_gt_regs.h"
#include "xe_device.h"
#include "xe_gt.h"
#include "xe_macros.h"
#include "xe_mmio.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
static u32 read_reference_ts_freq(struct xe_gt *gt)
......
......@@ -5,13 +5,12 @@
#include "xe_gt_mcr.h"
#include "regs/xe_gt_regs.h"
#include "xe_gt.h"
#include "xe_gt_topology.h"
#include "xe_gt_types.h"
#include "xe_mmio.h"
#include "gt/intel_gt_regs.h"
/**
* DOC: GT Multicast/Replicated (MCR) Register Support
*
......
......@@ -5,6 +5,7 @@
#include "xe_guc.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_force_wake.h"
......@@ -21,7 +22,6 @@
#include "xe_uc_fw.h"
#include "xe_wopcm.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg_defs.h"
/* TODO: move to common file */
......
......@@ -8,6 +8,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_gt.h"
#include "xe_guc.h"
......@@ -18,9 +19,6 @@
#include "xe_mmio.h"
#include "xe_platform_types.h"
#include "gt/intel_gt_regs.h"
/* Slack of a few additional entries per engine */
#define ADS_REGSET_EXTRA_MAX 8
......
......@@ -9,6 +9,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_gt.h"
......@@ -31,7 +32,6 @@
#define GEN10_FREQ_INFO_REC _MMIO(MCHBAR_MIRROR_BASE_SNB + 0x5ef0)
#define RPE_MASK REG_GENMASK(15, 8)
#include "gt/intel_gt_regs.h"
/* For GEN6_RPNSWREQ.reg to be merged when the definition moves to Xe */
#define REQ_RATIO_MASK REG_GENMASK(31, 23)
......
......@@ -8,6 +8,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_execlist.h"
......@@ -22,7 +23,6 @@
#include "xe_sched_job.h"
#include "xe_wa.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
#define MAX_MMIO_BASES 3
......
......@@ -9,6 +9,7 @@
#include <drm/drm_managed.h>
#include "regs/xe_gt_regs.h"
#include "xe_device.h"
#include "xe_drv.h"
#include "xe_gt.h"
......@@ -16,7 +17,6 @@
#include "xe_hw_engine.h"
#include "xe_mmio.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
static void gen3_assert_iir_is_zero(struct xe_gt *gt, i915_reg_t reg)
......
......@@ -6,6 +6,7 @@
#include "xe_lrc.h"
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_engine_types.h"
......@@ -15,7 +16,6 @@
#include "xe_vm.h"
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gt_regs.h"
#include "gt/intel_lrc_reg.h"
#include "i915_reg.h"
......
......@@ -9,13 +9,13 @@
#include <drm/xe_drm.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_device.h"
#include "xe_gt.h"
#include "xe_gt_mcr.h"
#include "xe_macros.h"
#include "xe_module.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
#define XEHP_MTCFG_ADDR _MMIO(0x101800)
......
......@@ -5,6 +5,7 @@
#include "xe_mocs.h"
#include "regs/xe_gt_regs.h"
#include "xe_bo.h"
#include "xe_device.h"
#include "xe_engine.h"
......@@ -13,8 +14,6 @@
#include "xe_platform_types.h"
#include "xe_step_types.h"
#include "gt/intel_gt_regs.h"
#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
#define mocs_dbg drm_dbg
#else
......
......@@ -13,6 +13,7 @@
#include <drm/drm_print.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_device_types.h"
#include "xe_force_wake.h"
#include "xe_gt.h"
......@@ -21,8 +22,6 @@
#include "xe_mmio.h"
#include "xe_rtp_types.h"
#include "gt/intel_gt_regs.h"
#define XE_REG_SR_GROW_STEP_DEFAULT 16
static void reg_sr_fini(struct drm_device *drm, void *arg)
......
......@@ -6,12 +6,11 @@
#include "xe_reg_whitelist.h"
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_gt_types.h"
#include "xe_platform_types.h"
#include "xe_rtp.h"
#include "gt/intel_gt_regs.h"
#undef _MMIO
#undef MCR_REG
#define _MMIO(x) _XE_RTP_REG(x)
......
......@@ -5,6 +5,7 @@
#include "xe_ring_ops.h"
#include "regs/xe_gt_regs.h"
#include "xe_engine_types.h"
#include "xe_gt.h"
#include "xe_lrc.h"
......@@ -13,7 +14,6 @@
#include "xe_vm_types.h"
#include "gt/intel_gpu_commands.h"
#include "gt/intel_gt_regs.h"
#include "gt/intel_lrc_reg.h"
#include "i915_reg.h"
......
......@@ -5,12 +5,11 @@
#include "xe_tuning.h"
#include "regs/xe_gt_regs.h"
#include "xe_gt_types.h"
#include "xe_platform_types.h"
#include "xe_rtp.h"
#include "gt/intel_gt_regs.h"
#undef _MMIO
#undef MCR_REG
#define _MMIO(x) _XE_RTP_REG(x)
......
......@@ -8,6 +8,7 @@
#include <linux/compiler_types.h>
#include "regs/xe_engine_regs.h"
#include "regs/xe_gt_regs.h"
#include "xe_device_types.h"
#include "xe_force_wake.h"
#include "xe_gt.h"
......@@ -17,7 +18,6 @@
#include "xe_rtp.h"
#include "xe_step.h"
#include "gt/intel_gt_regs.h"
#include "i915_reg.h"
/**
......
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