summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_mmio.c
diff options
context:
space:
mode:
authorOak Zeng <oak.zeng@intel.com>2023-07-12 00:46:09 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 19:40:19 +0300
commit0887a2e7ab620510093d55f4587c407362363b6d (patch)
tree0fb8135a614d6bdce1244bf94442880de1edba94 /drivers/gpu/drm/xe/xe_mmio.c
parenta20c75dba192af6ba63d618514a064268dbbe7db (diff)
downloadlinux-0887a2e7ab620510093d55f4587c407362363b6d.tar.xz
drm/xe: Make xe_mem_region struct
Make a xe_mem_region structure which will be used in the coming patches. The new structure is used in both xe device level (xe->mem.vram) and xe_tile level (tile->vram). Make the definition of xe_mem_region.dpa_base to be the DPA base of this memory region and change codes according to this new definition. v1: - rename xe_mem_region.base to dpa_base per conversation with Mike Ruhl Signed-off-by: Oak Zeng <oak.zeng@intel.com> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_mmio.c')
-rw-r--r--drivers/gpu/drm/xe/xe_mmio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index aa9c573b1243..41ee89247ddb 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -173,7 +173,8 @@ static int xe_determine_lmem_bar_size(struct xe_device *xe)
if (!xe->mem.vram.io_size)
return -EIO;
- xe->mem.vram.base = 0; /* DPA offset */
+ /* XXX: Need to change when xe link code is ready */
+ xe->mem.vram.dpa_base = 0;
/* set up a map to the total memory area. */
xe->mem.vram.mapping = ioremap_wc(xe->mem.vram.io_start, xe->mem.vram.io_size);
@@ -281,7 +282,7 @@ int xe_mmio_probe_vram(struct xe_device *xe)
return -ENODEV;
}
- tile->mem.vram.base = tile_offset;
+ tile->mem.vram.dpa_base = xe->mem.vram.dpa_base + tile_offset;
tile->mem.vram.usable_size = vram_size;
tile->mem.vram.mapping = xe->mem.vram.mapping + tile_offset;
@@ -304,10 +305,10 @@ int xe_mmio_probe_vram(struct xe_device *xe)
io_size -= min_t(u64, tile_size, io_size);
}
- xe->mem.vram.size = total_size;
+ xe->mem.vram.actual_physical_size = total_size;
drm_info(&xe->drm, "Total VRAM: %pa, %pa\n", &xe->mem.vram.io_start,
- &xe->mem.vram.size);
+ &xe->mem.vram.actual_physical_size);
drm_info(&xe->drm, "Available VRAM: %pa, %pa\n", &xe->mem.vram.io_start,
&available_size);