diff options
author | Christian König <christian.koenig@amd.com> | 2017-07-27 17:43:00 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-15 14:45:57 -0400 |
commit | 078af1a3e9d7b47f3e37ea25640023cf2e8b4d51 (patch) | |
tree | d89ebe9b58fa2e8e141ab36b6e6ef8afb781d7f6 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | a4a02777892c16d98bbcc2ea2add47950bfbf9e0 (diff) | |
download | lwn-078af1a3e9d7b47f3e37ea25640023cf2e8b4d51.tar.gz lwn-078af1a3e9d7b47f3e37ea25640023cf2e8b4d51.zip |
drm/amdgpu: use amdgpu_bo_free_kernel more often
Saves us even more loc.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 510188477fe5..ce10ca1cdec3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -345,18 +345,7 @@ static int amdgpu_vram_scratch_init(struct amdgpu_device *adev) static void amdgpu_vram_scratch_fini(struct amdgpu_device *adev) { - int r; - - if (adev->vram_scratch.robj == NULL) { - return; - } - r = amdgpu_bo_reserve(adev->vram_scratch.robj, true); - if (likely(r == 0)) { - amdgpu_bo_kunmap(adev->vram_scratch.robj); - amdgpu_bo_unpin(adev->vram_scratch.robj); - amdgpu_bo_unreserve(adev->vram_scratch.robj); - } - amdgpu_bo_unref(&adev->vram_scratch.robj); + amdgpu_bo_free_kernel(&adev->vram_scratch.robj, NULL, NULL); } /** |