aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1276-drm-amdkfd-Fix-CMA-bug.patch
blob: 5318d242c1a9bb85918bf945799b0ae312778642 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 4a69b4809187bc1edada84d8182b83b772d9e3cb Mon Sep 17 00:00:00 2001
From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Date: Wed, 3 May 2017 15:58:50 -0400
Subject: [PATCH 1276/4131] drm/amdkfd: Fix CMA bug

If source buffer is copied to multiple destination buffers, the source
offset is not changed. This resulted in same (top) part of the source
buffer repeatedly copied into different destination buffers. Fix it.

Change-Id: Ib1344a3571ae8b1b49e1cd3c11b8525b78454109
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index f394f05..c763103 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -2096,6 +2096,7 @@ static int kfd_ioctl_cross_memory_copy(struct file *filep,
 			space_left -= copied;
 			dst_va_addr += copied;
 			dst_offset += copied;
+			src_offset += copied;
 			if (dst_va_addr > dst_bo->it.last + 1) {
 				pr_err("Cross mem copy failed. Memory overflow\n");
 				err = -EFAULT;
-- 
2.7.4