RE: [PATCH 1/2] drm/amdgpu: add a new helper to free a BO in kernel allocations

2016-09-07 Thread Zhang, Jerry
Hi Christian, > > + if (likely(amdgpu_bo_reserve(*bo, false) == 0)) { > > + amdgpu_bo_kunmap(*bo); > > We only kmap it in amdgpu_bo_create_kernel() when there was a CPU address > given. > > I think we should mirror that here or otherwise might run into problems > calling > kunmap()

Re: [PATCH 1/2] drm/amdgpu: add a new helper to free a BO in kernel allocations

2016-09-07 Thread Christian König
Am 07.09.2016 um 16:43 schrieb Junwei Zhang: Free the BO allocated by amdgpu_bo_create_kernel() Change-Id: I1c7248cfb00bcc51fb86d89760522ca36095cdd2 Signed-off-by: Junwei Zhang Really nice cleanup, but one comment below. --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[PATCH 1/2] drm/amdgpu: add a new helper to free a BO in kernel allocations

2016-09-07 Thread Junwei Zhang
Free the BO allocated by amdgpu_bo_create_kernel() Change-Id: I1c7248cfb00bcc51fb86d89760522ca36095cdd2 Signed-off-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 26 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2 ++ 2 files