summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
diff options
context:
space:
mode:
authorBrian Welty <brian.welty@intel.com>2023-09-25 14:02:32 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:43:32 -0500
commit4e002016a1e5b5d0b29191a82d4f561f175f3d33 (patch)
tree20f30e07271dcd1eff3649ceb9e61279afebf8cb /drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
parent4446fcf220ceab4f6d0cc4ae3b1338a0ceeeb72e (diff)
drm/xe: Replace xe_ttm_vram_mgr.tile with xe_mem_region
Replace the xe_ttm_vram_mgr.tile pointer with a xe_mem_region pointer instead. The former is currently unused. TTM VRAM regions are exposing device vram and is better to store a pointer directly to the xe_mem_region instead of the tile. This allows to cleanup unnecessary usage of xe_tile from xe_bo.c in later patch. Signed-off-by: Brian Welty <brian.welty@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_ttm_vram_mgr.c')
-rw-r--r--drivers/gpu/drm/xe/xe_ttm_vram_mgr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
index 285791eb4a79..953e5dc0fd80 100644
--- a/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
+++ b/drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
@@ -358,12 +358,11 @@ int __xe_ttm_vram_mgr_init(struct xe_device *xe, struct xe_ttm_vram_mgr *mgr,
int xe_ttm_vram_mgr_init(struct xe_tile *tile, struct xe_ttm_vram_mgr *mgr)
{
struct xe_device *xe = tile_to_xe(tile);
+ struct xe_mem_region *vram = &tile->mem.vram;
- mgr->tile = tile;
-
+ mgr->vram = vram;
return __xe_ttm_vram_mgr_init(xe, mgr, XE_PL_VRAM0 + tile->id,
- tile->mem.vram.usable_size,
- tile->mem.vram.io_size,
+ vram->usable_size, vram->io_size,
PAGE_SIZE);
}