aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch')
-rw-r--r--common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch57
1 files changed, 0 insertions, 57 deletions
diff --git a/common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch b/common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch
deleted file mode 100644
index f7c498de..00000000
--- a/common/recipes-kernel/linux/files/0419-drm-amdgpu-Don-t-move-pinned-BOs.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0c0ee0cd5953041ae70900845bba5e601e5e4031 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
-Date: Mon, 28 Mar 2016 12:53:02 +0900
-Subject: [PATCH 0419/1110] drm/amdgpu: Don't move pinned BOs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The purpose of pinning is to prevent a buffer from moving.
-
-Reviewed-by: Christian König <christian.koenig@amd.com>
-Tested-by: Rex Zhu <Rex.Zhu@amd.com>
-Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
-Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
----
- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++++
- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ++++++
- 2 files changed, 10 insertions(+)
-
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
-index 7700867..95d35c2 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
-@@ -609,6 +609,10 @@ int amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
- if ((offset + size) <= adev->mc.visible_vram_size)
- return 0;
-
-+ /* Can't move a pinned BO to visible VRAM */
-+ if (abo->pin_count > 0)
-+ return -EINVAL;
-+
- /* hurrah the memory is not visible ! */
- amdgpu_ttm_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_VRAM);
- lpfn = adev->mc.visible_vram_size >> PAGE_SHIFT;
-diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-index 6bbd395..fbc3c2b 100644
---- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
-@@ -384,9 +384,15 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo,
- struct ttm_mem_reg *new_mem)
- {
- struct amdgpu_device *adev;
-+ struct amdgpu_bo *abo;
- struct ttm_mem_reg *old_mem = &bo->mem;
- int r;
-
-+ /* Can't move a pinned BO */
-+ abo = container_of(bo, struct amdgpu_bo, tbo);
-+ if (WARN_ON_ONCE(abo->pin_count > 0))
-+ return -EINVAL;
-+
- adev = amdgpu_get_adev(bo->bdev);
- if (old_mem->mem_type == TTM_PL_SYSTEM && bo->ttm == NULL) {
- amdgpu_move_null(bo, new_mem);
---
-2.7.4
-