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

drm/amd/amdgpu: fix performance drop when VRAM pressure

When VRAM pressue and trigger huge evictions there is performance drop,
this patch fix it.

Signed-off-by: Roger.He <Hongbo.He@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Roger.He and committed by
Alex Deucher
c309cd03 e51a3226

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
··· 405 405 if (unlikely(r != 0)) 406 406 return r; 407 407 408 - bo->tbo.priority = ilog2(bo->tbo.num_pages); 409 408 if (kernel) 410 - bo->tbo.priority *= 2; 411 - bo->tbo.priority = min(bo->tbo.priority, (unsigned)(TTM_MAX_BO_PRIORITY - 1)); 409 + bo->tbo.priority = 1; 412 410 413 411 if (flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && 414 412 bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) {