diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/1501-drm-amdkfd-Avoid-calling-amd_iommu_unbind_pasid-when.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/1501-drm-amdkfd-Avoid-calling-amd_iommu_unbind_pasid-when.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/1501-drm-amdkfd-Avoid-calling-amd_iommu_unbind_pasid-when.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/1501-drm-amdkfd-Avoid-calling-amd_iommu_unbind_pasid-when.patch new file mode 100644 index 00000000..de3fc502 --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/1501-drm-amdkfd-Avoid-calling-amd_iommu_unbind_pasid-when.patch @@ -0,0 +1,53 @@ +From 9e1272d54de6f006b36a3cd4e742d789cb540a71 Mon Sep 17 00:00:00 2001 +From: Yong Zhao <yong.zhao@amd.com> +Date: Wed, 7 Sep 2016 19:26:37 -0400 +Subject: [PATCH 1501/4131] drm/amdkfd: Avoid calling amd_iommu_unbind_pasid() + when suspending + +When kfd suspending on APU, we do not need to call +amd_iommu_unbind_pasid(), because pasid will be unbound automatically +when power goes off. + +On the other hand, calling amd_iommu_unbind_pasid() will trigger +kfd_process_iommu_unbind_callback() if the process is not terminating. +By design, kfd_process_iommu_unbind_callback() should only be called +for process terminating. So we would rather not to call +amd_iommu_unbind_pasid() when suspending. + +Change-Id: I9fb0770509df64bcbf8b48dd869032c6cef4946b +Signed-off-by: Yong Zhao <yong.zhao@amd.com> +--- + drivers/gpu/drm/amd/amdkfd/kfd_process.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +index ca4ed91..cd33ffc 100644 +--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c +@@ -825,21 +825,17 @@ void kfd_unbind_processes_from_device(struct kfd_dev *dev) + { + struct kfd_process_device *pdd; + struct kfd_process *p; +- unsigned int temp, temp_bound, temp_pasid; ++ unsigned int temp; + + int idx = srcu_read_lock(&kfd_processes_srcu); + + hash_for_each_rcu(kfd_processes_table, temp, p, kfd_processes) { + down_write(&p->lock); + pdd = kfd_get_process_device_data(dev, p); +- temp_bound = pdd->bound; +- temp_pasid = p->pasid; ++ + if (pdd->bound == PDD_BOUND) + pdd->bound = PDD_BOUND_SUSPENDED; + up_write(&p->lock); +- +- if (temp_bound == PDD_BOUND) +- amd_iommu_unbind_pasid(dev->pdev, temp_pasid); + } + + srcu_read_unlock(&kfd_processes_srcu, idx); +-- +2.7.4 + |