diff options
author | Koby Elbaz <[email protected]> | 2023-10-05 11:06:18 -0400 |
---|---|---|
committer | Rodrigo Vivi <[email protected]> | 2023-12-21 11:42:59 -0500 |
commit | ef29b390c7345f081412454538ab94c395068153 (patch) | |
tree | ac91cecf794b79f4886c8406decf37fee60a7904 | |
parent | 866b2b1764341ada0611f54c6b19285c32d20efa (diff) |
drm/xe: map MMIO BAR according to the num of tiles in device desc
When MMIO BAR is initially mapped, the driver assumes a single tile device.
However, former memory allocations take all tiles into account.
First, a common standard for resource usage is needed here.
Second, with the next (6th) patch in this series, the MMIO BAR remapping
will be done only if a reduced-tile device is attached.
Signed-off-by: Koby Elbaz <[email protected]>
Reviewed-by: Ofir Bitton <[email protected]>
Reviewed-by: Moti Haimovski <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
-rw-r--r-- | drivers/gpu/drm/xe/xe_mmio.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c index 054ad752303f..52e4572e3c4a 100644 --- a/drivers/gpu/drm/xe/xe_mmio.c +++ b/drivers/gpu/drm/xe/xe_mmio.c @@ -383,14 +383,13 @@ int xe_mmio_init(struct xe_device *xe) int err; /* - * Map the first 16MB of th BAR, which includes the registers (0-4MB), - * reserved space (4MB-8MB), and GGTT (8MB-16MB) for a single tile. - * This will get remapped later if we determine that we're running - * on a multi-tile system. + * Map the maximum expected BAR size, which will get remapped later + * if we determine that we're running on a reduced-tile system. + * The first 16MB of the BAR, belong to the root tile, and include: + * registers (0-4MB), reserved space (4MB-8MB) and GGTT (8MB-16MB). */ - xe->mmio.size = SZ_16M; - xe->mmio.regs = pci_iomap(to_pci_dev(xe->drm.dev), mmio_bar, - xe->mmio.size); + xe->mmio.size = (SZ_16M + xe->info.tile_mmio_ext_size) * xe->info.tile_count; + xe->mmio.regs = pci_iomap(to_pci_dev(xe->drm.dev), mmio_bar, xe->mmio.size); if (xe->mmio.regs == NULL) { drm_err(&xe->drm, "failed to map registers\n"); return -EIO; |