aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch
new file mode 100644
index 00000000..17fadb6d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1573-drm-amdgpu-Don-t-clear-BO-during-memory-allocation.patch
@@ -0,0 +1,56 @@
+From 6e9673f82a9e4556ff3b0e93da0ed4594a63c4ed Mon Sep 17 00:00:00 2001
+From: Kent Russell <kent.russell@amd.com>
+Date: Wed, 2 Nov 2016 16:09:59 -0400
+Subject: [PATCH 1573/4131] drm/amdgpu: Don't clear BO during memory allocation
+
+Using an offset doesn't work as larger memory allocations are split into
+smaller chunks. For now, don't clear the BO. Use the fill_buffer
+function in a future patch to address the issue properly
+
+Change-Id: I80f6070097998d47db08b4719a78f289bbc44edd
+Signed-off-by: Kent Russell <kent.russell@amd.com>
+
+ Conflicts:
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+index 27205a0..1899eba 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+@@ -643,22 +643,6 @@ static int __alloc_memory_of_gpu(struct kgd_dev *kgd, uint64_t va,
+ if (userptr)
+ bo->flags |= AMDGPU_AMDKFD_USERPTR_BO;
+
+- if (domain == AMDGPU_GEM_DOMAIN_VRAM) {
+- ret = amdgpu_bo_reserve(bo, true);
+- if (ret) {
+- pr_err("Failed to reserve bo. ret %d\n",
+- ret);
+- goto err_bo_clear;
+- }
+- ret = amdgpu_amdkfd_gpuvm_clear_bo(adev, vm, bo);
+- amdgpu_bo_unreserve(bo);
+- if (ret) {
+- pr_err("Failed to clear VRAM BO object. ret %d\n",
+- ret);
+- goto err_bo_clear;
+- }
+- }
+-
+ if (userptr) {
+ ret = amdgpu_ttm_tt_set_userptr(bo->tbo.ttm, user_addr, 0);
+ if (ret) {
+@@ -717,7 +701,6 @@ static int __alloc_memory_of_gpu(struct kgd_dev *kgd, uint64_t va,
+ if (userptr)
+ amdgpu_mn_unregister(bo);
+ allocate_mem_set_userptr_failed:
+-err_bo_clear:
+ amdgpu_bo_unref(&bo);
+ err_bo_create:
+ kfree(*mem);
+--
+2.7.4
+