drm/amdgpu: restructure amdgpu_vram_mgr_new
authorChristian König <christian.koenig@amd.com>
Mon, 26 Apr 2021 08:06:13 +0000 (10:06 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 Apr 2021 03:36:05 +0000 (23:36 -0400)
commitdd03daec0ff170c0622c9545137e8ad9846b967d
treede45e4820a9cf39b222194ba1cc77ce4fdabbbc4
parentc0f76fc8ad5f3511bdee37efc130555b39d3f711
drm/amdgpu: restructure amdgpu_vram_mgr_new

Merge the two loops, loosen the restriction for big allocations.
This reduces the CPU overhead in the good case, but increases
it a bit under memory pressure.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-and-Tested-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c