aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch
new file mode 100644
index 00000000..39a6144b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1192-drm-amdgpu-Modify-free_memory_of_gpu-interface.patch
@@ -0,0 +1,90 @@
+From 75d041ba035eb74b4ca7f65e90d7ebedb0d475eb Mon Sep 17 00:00:00 2001
+From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
+Date: Thu, 25 Aug 2016 17:59:18 -0400
+Subject: [PATCH 1192/4131] drm/amdgpu: Modify free_memory_of_gpu interface
+
+Change-Id: Iff6b4876e293110ac3e573217f357b90662645f1
+Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
+---
+ drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 12 ++++++++----
+ drivers/gpu/drm/amd/amdkfd/kfd_process.c | 6 +++---
+ 2 files changed, 11 insertions(+), 7 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+index d42b415..134b1de 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+@@ -1189,7 +1189,8 @@ static int kfd_ioctl_alloc_memory_of_gpu(struct file *filep,
+ up_write(&p->lock);
+ if (idr_handle < 0) {
+ dev->kfd2kgd->free_memory_of_gpu(dev->kgd,
+- (struct kgd_mem *) mem);
++ (struct kgd_mem *) mem,
++ pdd->vm);
+ return -EFAULT;
+ }
+
+@@ -1326,7 +1327,8 @@ static int kfd_ioctl_alloc_memory_of_gpu_new(struct file *filep,
+ up_write(&p->lock);
+ if (idr_handle < 0) {
+ dev->kfd2kgd->free_memory_of_gpu(dev->kgd,
+- (struct kgd_mem *) mem);
++ (struct kgd_mem *) mem,
++ pdd->vm);
+ return -EFAULT;
+ }
+
+@@ -1376,7 +1378,8 @@ static int kfd_ioctl_free_memory_of_gpu(struct file *filep,
+
+ up_write(&p->lock);
+
+- ret = dev->kfd2kgd->free_memory_of_gpu(dev->kgd, buf_obj->mem);
++ ret = dev->kfd2kgd->free_memory_of_gpu(dev->kgd, buf_obj->mem,
++ pdd->vm);
+
+ /* If freeing the buffer failed, leave the handle in place for
+ * clean-up during process tear-down. */
+@@ -1817,7 +1820,8 @@ static int kfd_ioctl_import_dmabuf(struct file *filep,
+ up_write(&p->lock);
+ if (idr_handle < 0) {
+ dev->kfd2kgd->free_memory_of_gpu(dev->kgd,
+- (struct kgd_mem *)mem);
++ (struct kgd_mem *)mem,
++ pdd->vm);
+ return -EFAULT;
+ }
+
+diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+index 87dd412..19e3af9 100644
+--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+@@ -80,7 +80,7 @@ static void kfd_process_free_gpuvm(struct kfd_dev *kdev, struct kgd_mem *mem,
+ void *vm)
+ {
+ kdev->kfd2kgd->unmap_memory_to_gpu(kdev->kgd, mem, vm);
+- kdev->kfd2kgd->free_memory_of_gpu(kdev->kgd, mem);
++ kdev->kfd2kgd->free_memory_of_gpu(kdev->kgd, mem, vm);
+ }
+
+ /* kfd_process_alloc_gpuvm - Allocate GPU VM for the KFD process
+@@ -132,7 +132,7 @@ static int kfd_process_alloc_gpuvm(struct kfd_process *p,
+ return err;
+
+ err_map_mem:
+- kdev->kfd2kgd->free_memory_of_gpu(kdev->kgd, mem);
++ kdev->kfd2kgd->free_memory_of_gpu(kdev->kgd, mem, pdd->vm);
+ err_alloc_mem:
+ *kptr = NULL;
+ return err;
+@@ -416,7 +416,7 @@ static void kfd_process_free_outstanding_kfd_bos(struct kfd_process *p)
+
+ run_rdma_free_callback(buf_obj);
+ pdd->dev->kfd2kgd->free_memory_of_gpu(
+- pdd->dev->kgd, buf_obj->mem);
++ pdd->dev->kgd, buf_obj->mem, pdd->vm);
+ kfd_process_device_remove_obj_handle(pdd, id);
+ }
+ }
+--
+2.7.4
+