Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Fix vram_usage underflow

vram_usage was subtracting non-vram memory size,
which caused it to become negative.

Signed-off-by: Alysa Liu <Alysa.Liu@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Alysa Liu and committed by
Alex Deucher
bd07b3f0 cdfdec6f

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
··· 1961 1961 */ 1962 1962 if (size) { 1963 1963 if (!is_imported && 1964 - (mem->bo->preferred_domains == AMDGPU_GEM_DOMAIN_VRAM || 1965 - (adev->apu_prefer_gtt && 1966 - mem->bo->preferred_domains == AMDGPU_GEM_DOMAIN_GTT))) 1964 + mem->alloc_flags & KFD_IOC_ALLOC_MEM_FLAGS_VRAM) 1967 1965 *size = bo_size; 1968 1966 else 1969 1967 *size = 0;