drm/amdgpu: Fix VRAM memory accounting
authorMukul Joshi <mukul.joshi@amd.com>
Tue, 23 Apr 2024 18:40:37 +0000 (14:40 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 May 2024 01:22:50 +0000 (21:22 -0400)
commitf06446ef23216090d1ee8ede1a7d7ae430c22dcc
treeba1ae1a43c4325f411a3c10366df77327987eaae
parente67572cd2204894179d89bd7b984072f19313b03
drm/amdgpu: Fix VRAM memory accounting

Subtract the VRAM pinned memory when checking for available memory
in amdgpu_amdkfd_reserve_mem_limit function since that memory is not
available for use.

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c