Am 14.11.2017 um 10:07 schrieb Monk Liu:
Change-Id: Id641e125f3dafc54223e49ee444ab64249e7e3a1
Signed-off-by: Monk Liu <monk....@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 +++--------
1 file 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 99e812d..cf21b38 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -1640,14 +1640,9 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)
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);
- }
+ if (adev->stolen_vga_memory)
+ amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, NULL);
+
I think you can even drop the "if" here, since amdgpu_bo_free_kernel()
checks that anyway.
Either way just a minor difference, patch is Reviewed-by: Christian
König <christian.koe...@amd.com>.
Regards,
Christian.
amdgpu_ssg_fini(adev);
amdgpu_direct_gma_fini(adev);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx