Skip to content
/ linux Public

Commit 6c5894d

Browse files
mattropeSasha Levin
authored andcommitted
drm/xe: Create dedicated xe_mmio structure
[ Upstream commit 34953ee ] Pull the 'mmio' substructure from xe_tile out into a dedicated type. Future patches will expand this structure and then eventually move MMIO read/write operations over to using this type. v2: - Fix kerneldoc of 'size' field. The rename/refocusing of this field got moved to the next patch of the series. (Lucas) - Correct commit message; it's the tile, not the device, mmio that's been pulled out to a separate type. (Michal) Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240910234719.3335472-47-matthew.d.roper@intel.com Stable-dep-of: 4a9b4e1 ("drm/xe/mmio: Avoid double-adjust in 64-bit reads") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 4d4e940 commit 6c5894d

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

drivers/gpu/drm/xe/xe_device_types.h

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,22 @@ struct xe_mem_region {
107107
void __iomem *mapping;
108108
};
109109

110+
/**
111+
* struct xe_mmio - register mmio structure
112+
*
113+
* Represents an MMIO region that the CPU may use to access registers. A
114+
* region may share its IO map with other regions (e.g., all GTs within a
115+
* tile share the same map with their parent tile, but represent different
116+
* subregions of the overall IO space).
117+
*/
118+
struct xe_mmio {
119+
/** @regs: Map used to access registers. */
120+
void __iomem *regs;
121+
122+
/** @size: Size of the map. */
123+
size_t size;
124+
};
125+
110126
/**
111127
* struct xe_tile - hardware tile structure
112128
*
@@ -148,13 +164,7 @@ struct xe_tile {
148164
* * 4MB-8MB: reserved
149165
* * 8MB-16MB: global GTT
150166
*/
151-
struct {
152-
/** @mmio.size: size of tile's MMIO space */
153-
size_t size;
154-
155-
/** @mmio.regs: pointer to tile's MMIO space (starting with registers) */
156-
void __iomem *regs;
157-
} mmio;
167+
struct xe_mmio mmio;
158168

159169
/**
160170
* @mmio_ext: MMIO-extension info for a tile.

0 commit comments

Comments
 (0)