diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1617-drm-amdgpu-Fix-copy_mem_to_mem-resv.-list.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/1617-drm-amdgpu-Fix-copy_mem_to_mem-resv.-list.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1617-drm-amdgpu-Fix-copy_mem_to_mem-resv.-list.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1617-drm-amdgpu-Fix-copy_mem_to_mem-resv.-list.patch new file mode 100644 index 00000000..842bb5e4 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1617-drm-amdgpu-Fix-copy_mem_to_mem-resv.-list.patch @@ -0,0 +1,49 @@ +From 70ea033afebaca6ab3d02aa0d43e40377218902d Mon Sep 17 00:00:00 2001 +From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> +Date: Fri, 10 Mar 2017 16:05:09 -0500 +Subject: [PATCH 1617/4131] drm/amdgpu: Fix copy_mem_to_mem resv. list + +The current use of kgd_mem.validate_list corrupts the kfd_bo_list. Fix +this by creating a local duplicate list + +Change-Id: Ib14d64bbd09a4641c28ed9837b65f9f6c57499f4 +Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +index 5b17443..358bb72 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -2290,7 +2290,7 @@ int amdgpu_amdkfd_copy_mem_to_mem(struct kgd_dev *kgd, struct kgd_mem *src_mem, + struct amdgpu_ring *ring; + struct ww_acquire_ctx ticket; + struct list_head list; +- struct ttm_validate_buffer *entry; ++ struct ttm_validate_buffer resv_list[2]; + uint64_t src_start, dst_start; + uint64_t src_left, dst_left, cur_copy_size, total_copy_size = 0; + struct fence *fence = NULL; +@@ -2313,10 +2313,14 @@ int amdgpu_amdkfd_copy_mem_to_mem(struct kgd_dev *kgd, struct kgd_mem *src_mem, + ring = adev->mman.buffer_funcs_ring; + + INIT_LIST_HEAD(&list); +- entry = &src_mem->validate_list; +- list_add_tail(&entry->head, &list); +- entry = &dst_mem->validate_list; +- list_add_tail(&entry->head, &list); ++ ++ resv_list[0].bo = src_ttm_bo; ++ resv_list[0].shared = true; ++ resv_list[1].bo = dst_ttm_bo; ++ resv_list[1].shared = true; ++ ++ list_add_tail(&resv_list[0].head, &list); ++ list_add_tail(&resv_list[1].head, &list); + + if (!ring->ready) { + pr_err("Trying to move memory with ring turned off.\n"); +-- +2.7.4 + |