drm/xe: Implement stolen memory.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 12 Jan 2023 22:25:17 +0000 (17:25 -0500)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Tue, 12 Dec 2023 19:06:00 +0000 (14:06 -0500)
commitd8b52a02cb40fe355374e8b0b89763fefc697b53
treee25066ce3f491d2ead799509af8799a65d8f4267
parent765b65e5bde79a9e8332c58f54a98e20fdb25fc7
drm/xe: Implement stolen memory.

This adds support for stolen memory, with the same allocator as
vram_mgr. This allows us to skip a whole lot of copy-paste,
by re-using parts of xe_ttm_vram_mgr.

The stolen memory may be bound using VM_BIND, so it performs like any
other memory region.

We should be able to map a stolen BO directly using the physical memory
location instead of through GGTT even on old platforms, but I don't know
what the effects are on coherency.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
14 files changed:
drivers/gpu/drm/xe/Makefile
drivers/gpu/drm/xe/xe_bo.c
drivers/gpu/drm/xe/xe_bo.h
drivers/gpu/drm/xe/xe_debugfs.c
drivers/gpu/drm/xe/xe_device.c
drivers/gpu/drm/xe/xe_mmio.c
drivers/gpu/drm/xe/xe_mmio.h
drivers/gpu/drm/xe/xe_pt.c
drivers/gpu/drm/xe/xe_res_cursor.h
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.c [new file with mode: 0644]
drivers/gpu/drm/xe/xe_ttm_stolen_mgr.h [new file with mode: 0644]
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c
drivers/gpu/drm/xe/xe_ttm_vram_mgr.h
drivers/gpu/drm/xe/xe_ttm_vram_mgr_types.h