diff options
| author | Monk Liu <[email protected]> | 2017-11-13 12:41:56 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-12-06 17:47:49 +0000 |
| commit | 11c6b82afb4cd696e10ab1cfaad3bbfb8dd4f16f (patch) | |
| tree | 8e67e737bb3628e20a1c54834f319fafc549a715 /drivers/gpu/drm/amd/amdgpu | |
| parent | amdgpu: Don't use DRM_ERROR when failing to allocate a BO (diff) | |
| download | kernel-11c6b82afb4cd696e10ab1cfaad3bbfb8dd4f16f.tar.gz kernel-11c6b82afb4cd696e10ab1cfaad3bbfb8dd4f16f.zip | |
drm/amdgpu:cleanup stolen vga memory finish
Signed-off-by: Monk Liu <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index b12a46fadb16..f34adb0cd1ea 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -1401,15 +1401,10 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev) if (!adev->mman.initialized) return; + amdgpu_ttm_debugfs_fini(adev); - if (adev->stolen_vga_memory) { - r = amdgpu_bo_reserve(adev->stolen_vga_memory, true); - if (r == 0) { - amdgpu_bo_unpin(adev->stolen_vga_memory); - amdgpu_bo_unreserve(adev->stolen_vga_memory); - } - amdgpu_bo_unref(&adev->stolen_vga_memory); - } + amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, NULL); + ttm_bo_clean_mm(&adev->mman.bdev, TTM_PL_VRAM); ttm_bo_clean_mm(&adev->mman.bdev, TTM_PL_TT); if (adev->gds.mem.total_size) |
