aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch99
1 files changed, 99 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch
new file mode 100644
index 00000000..9829bedf
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1622-Hybrid-kfd-adaption-replace-vm-page_directory-with-r.patch
@@ -0,0 +1,99 @@
+From 5b3adecd45017567cc2f3d045f8502f98d4ada85 Mon Sep 17 00:00:00 2001
+From: Yong Zhao <Yong.Zhao@amd.com>
+Date: Fri, 7 Apr 2017 17:04:14 -0400
+Subject: [PATCH 1622/4131] Hybrid-kfd-adaption: replace vm page_directory with
+ root.bo
+
+In amd-kfd-staging branch, the corresponding change is embedded in the
+merged commit, which has two parents. Since we are doing cherry-picks
+rather than merges, the manual adaption is needed here.
+
+Change-Id: I55ff89812aa5cc61e6d2237568ef677882b5f6f9
+Signed-off-by: Yong Zhao <Yong.Zhao@amd.com>
+---
+ drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+index 7f431e4..5853b59 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+@@ -455,7 +455,7 @@ static int amdgpu_amdkfd_bo_invalidate(struct amdgpu_bo *bo)
+
+ static int validate_pt_pd_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm)
+ {
+- struct amdgpu_bo *pd = vm->page_directory;
++ struct amdgpu_bo *pd = vm->root.bo;
+ struct amdgpu_vm_parser param;
+ int ret;
+
+@@ -893,7 +893,7 @@ static int unmap_bo_from_gpuvm(struct amdgpu_device *adev,
+ struct amdgpu_bo_va *bo_va = entry->bo_va;
+ struct amdgpu_vm *vm = bo_va->vm;
+ struct amdkfd_vm *kvm = container_of(vm, struct amdkfd_vm, base);
+- struct amdgpu_bo *pd = vm->page_directory;
++ struct amdgpu_bo *pd = vm->root.bo;
+
+ /* Remove eviction fence from PD (and thereby from PTs too as they
+ * share the resv. object. Otherwise during PT update job (see
+@@ -938,13 +938,13 @@ static int update_gpuvm_pte(struct amdgpu_device *adev,
+ bo = bo_va->bo;
+
+ /* Update the page directory */
+- ret = amdgpu_vm_update_page_directory(adev, vm);
++ ret = amdgpu_vm_update_directories(adev, vm);
+ if (ret != 0) {
+ pr_err("amdgpu_vm_update_page_directory failed\n");
+ return ret;
+ }
+
+- amdgpu_sync_fence(adev, sync, vm->page_directory_fence);
++ amdgpu_sync_fence(adev, sync, vm->last_dir_update);
+
+ /* Update the page tables */
+ ret = amdgpu_vm_bo_update(adev, bo_va, false);
+@@ -978,7 +978,7 @@ static int map_bo_to_gpuvm(struct amdgpu_device *adev,
+ struct amdgpu_bo *bo = entry->bo_va->bo;
+ struct amdkfd_vm *kvm = container_of(entry->bo_va->vm,
+ struct amdkfd_vm, base);
+- struct amdgpu_bo *pd = entry->bo_va->vm->page_directory;
++ struct amdgpu_bo *pd = entry->bo_va->vm->root.bo;
+
+ /* Remove eviction fence from PD (and thereby from PTs too as they
+ * share the resv. object. This is necessary because new PTs are
+@@ -1351,11 +1351,11 @@ static u64 get_vm_pd_gpu_offset(void *vm)
+
+ BUG_ON(avm == NULL);
+
+- amdgpu_bo_reserve(avm->page_directory, false);
++ amdgpu_bo_reserve(avm->root.bo, false);
+
+- offset = amdgpu_bo_gpu_offset(avm->page_directory);
++ offset = amdgpu_bo_gpu_offset(avm->root.bo);
+
+- amdgpu_bo_unreserve(avm->page_directory);
++ amdgpu_bo_unreserve(avm->root.bo);
+
+ return offset;
+ }
+@@ -1444,7 +1444,7 @@ void amdgpu_amdkfd_gpuvm_destroy_process_vm(struct kgd_dev *kgd, void *vm)
+
+ pr_debug("Destroying process vm %p\n", vm);
+ /* Release eviction fence from PD */
+- pd = avm->page_directory;
++ pd = avm->root.bo;
+ amdgpu_bo_reserve(pd, false);
+ amdgpu_bo_fence(pd, NULL, false);
+ amdgpu_bo_unreserve(pd);
+@@ -2206,7 +2206,7 @@ int amdgpu_amdkfd_gpuvm_restore_process_bos(void *info)
+ /* Validate PTs*/
+ list_for_each_entry(peer_vm, &process_info->vm_list_head,
+ vm_list_node) {
+- adev = amdgpu_ttm_adev(peer_vm->base.page_directory->tbo.bdev);
++ adev = amdgpu_ttm_adev(peer_vm->base.root.bo->tbo.bdev);
+ ret = amdgpu_vm_validate_pt_bos(adev, &peer_vm->base,
+ amdgpu_amdkfd_validate, &param);
+ if (ret) {
+--
+2.7.4
+