OSDN Git Service

drm/amdgpu: allocate the bo_list array after the list
authorChristian König <christian.koenig@amd.com>
Mon, 30 Jul 2018 14:16:01 +0000 (16:16 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 31 Jul 2018 21:58:19 +0000 (16:58 -0500)
commit920990cb080a44203bf6c8eb706e79ad23241ad3
treec561ae3c784ad5930fd2db05389b2516b89693e4
parent39f7f69a6054bb9777b47b6afdb5ce2fae30dbee
drm/amdgpu: allocate the bo_list array after the list

This avoids multiple allocations for the head and the array.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.h