diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2191-drm-amdkfd-Fix-a-bug-causing-CP-hang-at-process-exit.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2191-drm-amdkfd-Fix-a-bug-causing-CP-hang-at-process-exit.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2191-drm-amdkfd-Fix-a-bug-causing-CP-hang-at-process-exit.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2191-drm-amdkfd-Fix-a-bug-causing-CP-hang-at-process-exit.patch new file mode 100644 index 00000000..bfba2628 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2191-drm-amdkfd-Fix-a-bug-causing-CP-hang-at-process-exit.patch @@ -0,0 +1,46 @@ +From a4b63c5f5346a759b209b4030caeff0b24192de2 Mon Sep 17 00:00:00 2001 +From: Yong Zhao <yong.zhao@amd.com> +Date: Thu, 9 Nov 2017 16:18:04 -0500 +Subject: [PATCH 2191/4131] drm/amdkfd: Fix a bug causing CP hang at process + exit + +When HWS is used, flushing tlb at process exit is not needed. + +Change-Id: I7b0d51d585bbf75734af94de4cbebb279cc408fe +Signed-off-by: Yong Zhao <yong.zhao@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_process.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +index 9ccd65c..f737e17 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +@@ -40,6 +40,7 @@ + struct mm_struct; + + #include "kfd_priv.h" ++#include "kfd_device_queue_manager.h" + #include "kfd_dbgmgr.h" + + /* +@@ -358,7 +359,15 @@ static void kfd_process_destroy_pdds(struct kfd_process *p) + + list_for_each_entry_safe(pdd, temp, &p->per_device_data, + per_device_list) { +- kfd_flush_tlb(pdd->dev, p->pasid); ++ /* In case of HWS, by now pasid:vmid mapping has been invalid, ++ * so flushing tlb using PACKET3_INVALID_TLBS packet will cause ++ * CP hang. Moreover, flushing tlb is not needed here as it has ++ * been done by HWS when pasid:vmid is dissociated. ++ * In summary, flushing tlb is only needed for non-HWS case. ++ */ ++ if (pdd->dev->dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS) ++ kfd_flush_tlb(pdd->dev, p->pasid); ++ + /* Destroy the GPUVM VM context */ + if (pdd->vm) + pdd->dev->kfd2kgd->destroy_process_vm( +-- +2.7.4 + |