aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch
new file mode 100644
index 00000000..2f5a7f0b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2057-drm-amdgpu-minor-cleanup-for-amdgpu_ttm_bind.patch
@@ -0,0 +1,34 @@
+From 8bd2034ca36ca94fc569109752897d48cabe175f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com>
+Date: Mon, 16 Oct 2017 13:47:15 +0200
+Subject: [PATCH 2057/4131] drm/amdgpu: minor cleanup for amdgpu_ttm_bind
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Filter the placement mask before using it. In theory it could be that we
+have other flags set here as well.
+
+Signed-off-by: Christian König <christian.koenig@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+index 6ef40bb..7ba3279 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+@@ -976,7 +976,8 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem)
+ placement.busy_placement = &placements;
+ placements.fpfn = 0;
+ placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT;
+- placements.flags = bo->mem.placement | TTM_PL_FLAG_TT;
++ placements.flags = (bo->mem.placement & ~TTM_PL_MASK_MEM) |
++ TTM_PL_FLAG_TT;
+
+ r = ttm_bo_mem_space(bo, &placement, &tmp, true, false);
+ if (unlikely(r))
+--
+2.7.4
+