From: Roger.He Date: Mon, 27 Mar 2017 11:38:11 +0000 (+0800) Subject: drm/amd/amdgpu: fix performance drop when VRAM pressure X-Git-Tag: Ubuntu-5.10.0-12.13~10409^2~23^2~14 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c309cd03b4e63785974481d65ffaf13ffcd75afb;p=mirror_ubuntu-hirsute-kernel.git 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 Reviewed-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 9b2e1f18acfa..5aac350b007f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -405,10 +405,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, if (unlikely(r != 0)) return r; - bo->tbo.priority = ilog2(bo->tbo.num_pages); if (kernel) - bo->tbo.priority *= 2; - bo->tbo.priority = min(bo->tbo.priority, (unsigned)(TTM_MAX_BO_PRIORITY - 1)); + bo->tbo.priority = 1; if (flags & AMDGPU_GEM_CREATE_VRAM_CLEARED && bo->tbo.mem.placement & TTM_PL_FLAG_VRAM) {