mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
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]
This commit is contained in:
parent
3457388fcd
commit
8cb49012ac
|
|
@ -100,9 +100,6 @@ xe-y += xe_bb.o \
|
|||
xe_wa.o \
|
||||
xe_wopcm.o
|
||||
|
||||
# XXX: Needed for i915 register definitions. Will be removed after xe-regs.
|
||||
subdir-ccflags-y += -I$(srctree)/drivers/gpu/drm/i915/
|
||||
|
||||
obj-$(CONFIG_DRM_XE) += xe.o
|
||||
obj-$(CONFIG_DRM_XE_KUNIT_TEST) += tests/
|
||||
\
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#include <asm/page.h>
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
#define RING_TAIL(base) _MMIO((base) + 0x30)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef _XE_GT_REGS_H_
|
||||
#define _XE_GT_REGS_H_
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
/* RPM unit config (Gen8+) */
|
||||
#define RPM_CONFIG0 _MMIO(0xd00)
|
||||
|
|
@ -108,6 +108,12 @@
|
|||
#define GEN11_GT_VEBOX_DISABLE_SHIFT 16
|
||||
#define GEN11_GT_VEBOX_DISABLE_MASK (0x0f << GEN11_GT_VEBOX_DISABLE_SHIFT)
|
||||
|
||||
#define XELP_EU_ENABLE _MMIO(0x9134) /* "_DISABLE" on Xe_LP */
|
||||
#define XELP_EU_MASK REG_GENMASK(7, 0)
|
||||
#define XELP_GT_GEOMETRY_DSS_ENABLE _MMIO(0x913c)
|
||||
#define XEHP_GT_COMPUTE_DSS_ENABLE _MMIO(0x9144)
|
||||
#define XEHPC_GT_COMPUTE_DSS_ENABLE_EXT _MMIO(0x9148)
|
||||
|
||||
#define GEN6_GDRST _MMIO(0x941c)
|
||||
#define GEN11_GRDOM_GUC REG_BIT(3)
|
||||
#define GEN6_GRDOM_FULL (1 << 0)
|
||||
|
|
|
|||
11
drivers/gpu/drm/xe/regs/xe_reg_defs.h
Normal file
11
drivers/gpu/drm/xe/regs/xe_reg_defs.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright © 2023 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef _XE_REG_DEFS_H_
|
||||
#define _XE_REG_DEFS_H_
|
||||
|
||||
#include "../../i915/i915_reg_defs.h"
|
||||
|
||||
#endif
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
#ifndef _XE_REGS_H_
|
||||
#define _XE_REGS_H_
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
#define GU_CNTL _MMIO(0x101010)
|
||||
#define LMEM_INIT REG_BIT(7)
|
||||
|
|
@ -70,6 +70,8 @@
|
|||
#define PIPE_DSI0_OFFSET 0x7b000
|
||||
#define PIPE_DSI1_OFFSET 0x7b800
|
||||
|
||||
#define SOFTWARE_FLAGS_SPR33 _MMIO(0x4f084)
|
||||
|
||||
#define GEN8_PCU_ISR _MMIO(0x444e0)
|
||||
#define GEN8_PCU_IMR _MMIO(0x444e4)
|
||||
#define GEN8_PCU_IIR _MMIO(0x444e8)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include <drm/drm_managed.h>
|
||||
#include <drm/xe_drm.h>
|
||||
|
||||
#include "regs/xe_regs.h"
|
||||
#include "xe_bo.h"
|
||||
#include "xe_debugfs.h"
|
||||
#include "xe_dma_buf.h"
|
||||
|
|
@ -335,8 +336,6 @@ static void device_kill_persitent_engines(struct xe_device *xe,
|
|||
mutex_unlock(&xe->persitent_engines.lock);
|
||||
}
|
||||
|
||||
#define SOFTWARE_FLAGS_SPR33 _MMIO(0x4F084)
|
||||
|
||||
void xe_device_wmb(struct xe_device *xe)
|
||||
{
|
||||
struct xe_gt *gt = xe_device_get_gt(xe, 0);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#ifndef _XE_GT_MCR_H_
|
||||
#define _XE_GT_MCR_H_
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
struct drm_printer;
|
||||
struct xe_gt;
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "xe_gt_pagefault.h"
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/circ_buf.h>
|
||||
|
||||
#include <drm/drm_managed.h>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -22,14 +22,6 @@
|
|||
#include "xe_uc_fw.h"
|
||||
#include "xe_wopcm.h"
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
|
||||
/* TODO: move to common file */
|
||||
#define GUC_PVC_MOCS_INDEX_MASK REG_GENMASK(25, 24)
|
||||
#define PVC_MOCS_UC_INDEX 1
|
||||
#define PVC_GUC_MOCS_INDEX(index) REG_FIELD_PREP(GUC_PVC_MOCS_INDEX_MASK,\
|
||||
index)
|
||||
|
||||
static struct xe_gt *
|
||||
guc_to_gt(struct xe_guc *guc)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
/* Definitions of GuC H/W registers, bits, etc */
|
||||
|
||||
|
|
@ -93,6 +93,10 @@
|
|||
#define GUC_ENABLE_READ_CACHE_FOR_WOPCM_DATA (1<<10)
|
||||
#define GUC_ENABLE_MIA_CLOCK_GATING (1<<15)
|
||||
#define GUC_GEN10_SHIM_WC_ENABLE (1<<21)
|
||||
#define PVC_GUC_MOCS_INDEX_MASK REG_GENMASK(25, 24)
|
||||
#define PVC_MOCS_UC_INDEX 1
|
||||
#define PVC_GUC_MOCS_INDEX(index) REG_FIELD_PREP(PVC_GUC_MOCS_INDEX_MASK,\
|
||||
index)
|
||||
|
||||
#define GUC_SEND_INTERRUPT _MMIO(0xc4c8)
|
||||
#define GUC_SEND_TRIGGER (1<<0)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "xe_migrate.h"
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
#include <linux/sizes.h>
|
||||
|
||||
#include <drm/drm_managed.h>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
/* Internal to xe_pcode */
|
||||
|
||||
#include "regs/xe_reg_defs.h"
|
||||
|
||||
#define PCODE_MAILBOX _MMIO(0x138124)
|
||||
#define PCODE_READY REG_BIT(31)
|
||||
#define PCODE_MB_PARAM2 REG_GENMASK(23, 16)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@
|
|||
#include <linux/types.h>
|
||||
#include <linux/xarray.h>
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
|
||||
struct xe_reg_sr_entry {
|
||||
u32 clr_bits;
|
||||
u32 set_bits;
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
#include "xe_rtp_types.h"
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
|
||||
/*
|
||||
* Register table poke infrastructure
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "i915_reg_defs.h"
|
||||
|
||||
struct xe_hw_engine;
|
||||
struct xe_gt;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "xe_step.h"
|
||||
|
||||
#include <linux/bitfield.h>
|
||||
|
||||
#include "xe_device.h"
|
||||
#include "xe_platform_types.h"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user