Pārlūkot izejas kodu

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: Christian König <christian.koenig@amd.com>
Reviewed-by: Roger.He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König 8 gadi atpakaļ
vecāks
revīzija
373308a5f5
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2 0
      drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

+ 2 - 0
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

@@ -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 &&