Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c309cd03 authored by Roger.He's avatar Roger.He Committed by Alex Deucher
Browse files

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: default avatarRoger.He <Hongbo.He@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e51a3226
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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) {