[PATCH] drm/amdkfd: fix TLB flush after unmap for GFX9.4.2

Kasiviswanathan, Harish Harish.Kasiviswanathan at amd.com
Thu Mar 21 01:30:27 UTC 2024


[AMD Official Use Only - General]

Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Eric Huang
Sent: Wednesday, March 20, 2024 4:25 PM
To: amd-gfx at lists.freedesktop.org
Cc: Huang, JinHuiEric <JinHuiEric.Huang at amd.com>
Subject: [PATCH] drm/amdkfd: fix TLB flush after unmap for GFX9.4.2

TLB flush after unmap accidentially was removed on
gfx9.4.2. It is to add it back.

Signed-off-by: Eric Huang <jinhuieric.huang at amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index 42d40560cd30..a81ef232fdef 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -1473,7 +1473,7 @@ static inline void kfd_flush_tlb(struct kfd_process_device *pdd,

 static inline bool kfd_flush_tlb_after_unmap(struct kfd_dev *dev)
 {
-       return KFD_GC_VERSION(dev) > IP_VERSION(9, 4, 2) ||
+       return KFD_GC_VERSION(dev) >= IP_VERSION(9, 4, 2) ||
               (KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 1) && dev->sdma_fw_version >= 18) ||
               KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 0);
 }
--
2.34.1



More information about the amd-gfx mailing list