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);
}
#include <drm/drm_buddy.h>
#include <drm/ttm/ttm_device.h>
-struct xe_tile;
+struct xe_mem_region;
/**
* struct xe_ttm_vram_mgr - XE TTM VRAM manager
* Manages placement of TTM resource in VRAM.
*/
struct xe_ttm_vram_mgr {
- /** @tile: Tile which the VRAM belongs to */
- struct xe_tile *tile;
/** @manager: Base TTM resource manager */
struct ttm_resource_manager manager;
/** @mm: DRM buddy allocator which manages the VRAM */
struct drm_buddy mm;
+ /** @vram: ptr to details of associated VRAM region */
+ struct xe_mem_region *vram;
/** @visible_size: Proped size of the CPU visible portion */
u64 visible_size;
/** @visible_avail: CPU visible portion still unallocated */