From fe92a893038b135e92ad152b1a6ea9971c3ea156 Mon Sep 17 00:00:00 2001 From: Oak Zeng Date: Fri, 26 Jan 2018 13:56:24 -0500 Subject: [PATCH 3310/4131] drm/amdgpu: Ignore TLB flush before vmid allocate Change-Id: I7309e111ebf46b73e9986187887c13642143b486 Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c index 7bddeb6..6e3043c 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c @@ -1183,7 +1183,13 @@ void kfd_flush_tlb(struct kfd_dev *dev, struct kfd_process *p) return; } - f2g->invalidate_tlbs_vmid(dev->kgd, pdd->qpd.vmid); + /* vmid allocation is delayed to the creation of the first + * queue of the process. For buffers allocated and mapped + * before queue creation, vmid is still no allocated (valued 0). + * Ignore tlb invalidation request for this case. + */ + if (pdd->qpd.vmid) + f2g->invalidate_tlbs_vmid(dev->kgd, pdd->qpd.vmid); } else f2g->invalidate_tlbs(dev->kgd, p->pasid); } -- 2.7.4