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

Commit 373308a5 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: double the priority of kernel allocations



Give kernel allocations a higher priority cause it is often
more work to swap them back in.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarRoger.He <Hongbo.He@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e1f055b3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -387,6 +387,8 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev,
		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));

	if (flags & AMDGPU_GEM_CREATE_VRAM_CLEARED &&