diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1766-drm-amdkfd-Fix-bo_va-structure-reference-since-it-ha.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/1766-drm-amdkfd-Fix-bo_va-structure-reference-since-it-ha.patch | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1766-drm-amdkfd-Fix-bo_va-structure-reference-since-it-ha.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1766-drm-amdkfd-Fix-bo_va-structure-reference-since-it-ha.patch new file mode 100644 index 00000000..454b945b --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1766-drm-amdkfd-Fix-bo_va-structure-reference-since-it-ha.patch @@ -0,0 +1,109 @@ +From 988b9ea93fe5e8554673a8d711b45ced140f5791 Mon Sep 17 00:00:00 2001 +From: "Le.Ma" <Le.Ma@amd.com> +Date: Wed, 23 Aug 2017 15:19:18 +0800 +Subject: [PATCH 1766/4131] drm/amdkfd: Fix bo_va structure reference since it + has been separated. + +Change-Id: I90f6d67b14004f56113fb93659323633ec12f087 +Signed-off-by: Le.Ma <Le.Ma@amd.com> +Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +index 80b5197..b352e8e 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -94,7 +94,7 @@ static bool check_if_add_bo_to_vm(struct amdgpu_vm *avm, + struct kfd_bo_va_list *entry; + + list_for_each_entry(entry, &mem->bo_va_list, bo_list) +- if (entry->bo_va->vm == avm) ++ if (entry->bo_va->base.vm == avm) + return false; + + return true; +@@ -873,7 +873,7 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem, + INIT_LIST_HEAD(&ctx->duplicates); + + list_for_each_entry(entry, &mem->bo_va_list, bo_list) { +- if ((vm && vm != entry->bo_va->vm) || ++ if ((vm && vm != entry->bo_va->base.vm) || + (entry->is_mapped != map_type + && map_type != VA_DO_NOT_CARE)) + continue; +@@ -897,12 +897,12 @@ static int reserve_bo_and_cond_vms(struct kgd_mem *mem, + + i = 0; + list_for_each_entry(entry, &mem->bo_va_list, bo_list) { +- if ((vm && vm != entry->bo_va->vm) || ++ if ((vm && vm != entry->bo_va->base.vm) || + (entry->is_mapped != map_type + && map_type != VA_DO_NOT_CARE)) + continue; + +- amdgpu_vm_get_pd_bo(entry->bo_va->vm, &ctx->list, ++ amdgpu_vm_get_pd_bo(entry->bo_va->base.vm, &ctx->list, + &ctx->vm_pd[i]); + i++; + } +@@ -947,7 +947,7 @@ static int unmap_bo_from_gpuvm(struct amdgpu_device *adev, + struct amdgpu_sync *sync) + { + struct amdgpu_bo_va *bo_va = entry->bo_va; +- struct amdgpu_vm *vm = bo_va->vm; ++ struct amdgpu_vm *vm = bo_va->base.vm; + struct amdkfd_vm *kvm = container_of(vm, struct amdkfd_vm, base); + struct amdgpu_bo *pd = vm->root.bo; + +@@ -990,8 +990,8 @@ static int update_gpuvm_pte(struct amdgpu_device *adev, + struct amdgpu_bo *bo; + + bo_va = entry->bo_va; +- vm = bo_va->vm; +- bo = bo_va->bo; ++ vm = bo_va->base.vm; ++ bo = bo_va->base.bo; + + /* Update the page tables */ + ret = amdgpu_vm_bo_update(adev, bo_va, false); +@@ -1022,7 +1022,7 @@ static int map_bo_to_gpuvm(struct amdgpu_device *adev, + + /* Set virtual address for the allocation */ + ret = amdgpu_vm_bo_map(adev, entry->bo_va, entry->va, 0, +- amdgpu_bo_size(entry->bo_va->bo), entry->pte_flags); ++ amdgpu_bo_size(entry->bo_va->base.bo), entry->pte_flags); + if (ret != 0) { + pr_err("Failed to map VA 0x%llx in vm. ret %d\n", + entry->va, ret); +@@ -1337,7 +1337,7 @@ int amdgpu_amdkfd_gpuvm_map_memory_to_gpu( + } + + list_for_each_entry(entry, &mem->bo_va_list, bo_list) { +- if (entry->bo_va->vm == vm && !entry->is_mapped) { ++ if (entry->bo_va->base.vm == vm && !entry->is_mapped) { + pr_debug("\t map VA 0x%llx - 0x%llx in entry %p\n", + entry->va, entry->va + bo_size, + entry); +@@ -1546,7 +1546,7 @@ static bool is_mem_on_local_device(struct kgd_dev *kgd, + struct kfd_bo_va_list *entry; + + list_for_each_entry(entry, bo_va_list, bo_list) { +- if (entry->kgd_dev == kgd && entry->bo_va->vm == vm) ++ if (entry->kgd_dev == kgd && entry->bo_va->base.vm == vm) + return true; + } + +@@ -1597,7 +1597,7 @@ int amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu( + vm); + + list_for_each_entry(entry, &mem->bo_va_list, bo_list) { +- if (entry->bo_va->vm == vm && entry->is_mapped) { ++ if (entry->bo_va->base.vm == vm && entry->is_mapped) { + pr_debug("\t unmap VA 0x%llx - 0x%llx from entry %p\n", + entry->va, + entry->va + bo_size, +-- +2.7.4 + |