diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1590-drm-amdgpu-Drop-last_vm_update-fence-after-KFD-VM-up.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1590-drm-amdgpu-Drop-last_vm_update-fence-after-KFD-VM-up.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1590-drm-amdgpu-Drop-last_vm_update-fence-after-KFD-VM-up.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1590-drm-amdgpu-Drop-last_vm_update-fence-after-KFD-VM-up.patch new file mode 100644 index 00000000..83d39922 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1590-drm-amdgpu-Drop-last_vm_update-fence-after-KFD-VM-up.patch @@ -0,0 +1,64 @@ +From fe3221262c2a338f21c942c1899437e15838dbf5 Mon Sep 17 00:00:00 2001 +From: Felix Kuehling <Felix.Kuehling@amd.com> +Date: Tue, 14 Feb 2017 19:11:57 -0500 +Subject: [PATCH 1590/4131] drm/amdgpu: Drop last_vm_update fence after KFD VM + updates + +KFD can use one sync object while updating multiple GPUs' page tables +at once during evictions. This violates an assumption that the +sync->last_vm_update fence is always updated with fences from the +same context (using amdgpu_sync_keep_later), resulting in lots of +WARNs in the kernel log. + +KFD doesn't need this fence. It seems to be used only for selecting +VMs for the graphics drivers. So we just drop that fence after KFD +page table updates to avoid context mismatches in later page table +updates using the same sync object. + +Bug: SWDEV-113250 + +Change-Id: Id36664d26bd6e981d8d4776409e5c6ff8fabd769 +Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +index e1bea18..c27abc7 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +@@ -893,6 +893,15 @@ static int unmap_bo_from_gpuvm(struct amdgpu_device *adev, + + amdgpu_sync_fence(adev, sync, bo_va->last_pt_update); + ++ /* Sync objects can't handle multiple GPUs (contexts) updating ++ * sync->last_vm_update. Fortunately we don't need it for ++ * KFD's purposes, so we can just drop that fence. ++ */ ++ if (sync->last_vm_update) { ++ fence_put(sync->last_vm_update); ++ sync->last_vm_update = NULL; ++ } ++ + return 0; + } + +@@ -930,6 +939,15 @@ static int update_gpuvm_pte(struct amdgpu_device *adev, + /* Remove PTs from LRU list (reservation removed PD only) */ + amdgpu_vm_move_pt_bos_in_lru(adev, vm); + ++ /* Sync objects can't handle multiple GPUs (contexts) updating ++ * sync->last_vm_update. Fortunately we don't need it for ++ * KFD's purposes, so we can just drop that fence. ++ */ ++ if (sync->last_vm_update) { ++ fence_put(sync->last_vm_update); ++ sync->last_vm_update = NULL; ++ } ++ + return 0; + } + +-- +2.7.4 + |