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>
Fri, 26 Apr 2024 21:22:40 +0000 (17:22 -0400)
commit8e1d1905951dffe4980ed73a330b770281ebac85
treef6060a338888f155fe67ae62f0a1548047c3198d
parentc551316e150bc0e25ec0609fb396cc37fc8e6fc9
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