aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch
new file mode 100644
index 00000000..08452613
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2204-drm-amdgpu-cleanup-stolen-vga-memory-finish.patch
@@ -0,0 +1,42 @@
+From 518f9465a86d7e86c040dfa829fb8dc7698bedd0 Mon Sep 17 00:00:00 2001
+From: Monk Liu <Monk.Liu@amd.com>
+Date: Mon, 13 Nov 2017 20:41:56 +0800
+Subject: [PATCH 2204/4131] drm/amdgpu:cleanup stolen vga memory finish
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: Id641e125f3dafc54223e49ee444ab64249e7e3a1
+Signed-off-by: Monk Liu <Monk.Liu@amd.com>
+Reviewed-by: Christian König <christian.koenig@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 fffdd02..dc1bad5 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+@@ -1638,16 +1638,11 @@ 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);
++
+ amdgpu_ssg_fini(adev);
+ amdgpu_direct_gma_fini(adev);
+
+--
+2.7.4
+