drm/amdkfd: Add VRAM accounting for SVM migration

[ Upstream commit 1e214f7faa ]

Do VRAM accounting when doing migrations to vram to make sure
there is enough available VRAM and migrating to VRAM doesn't evict
other possible non-unified memory BOs. If migrating to VRAM fails,
driver can fall back to using system memory seamlessly.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Mukul Joshi 2024-04-18 15:13:58 -04:00 • committed by Greg Kroah-Hartman
commit bdbb7611dd
2 changed files with 16 additions and 2 deletions