AMD General

Hi Alex,

Thanks for the patch. I have provided some comments offline.

I'm overall fine with the change, although would recommend we use 
KFD_GC_VERSION(dev) >= IP_VERSION(12, 1, 0)).

Thanks,
Vladimir

Reviewed-by: Vladimir Indic <[email protected]>
________________________________
From: Kasiviswanathan, Harish <[email protected]>
Sent: Monday, November 16, 2026 10:00 PM
To: Deucher, Alexander <[email protected]>; 
[email protected] <[email protected]>
Cc: Zhu, James <[email protected]>; Indic, Vladimir <[email protected]>; 
Yang, Philip <[email protected]>
Subject: Re: [PATCH v2] drm/amdkfd: move TBA/TMA back to system memory

AMD General

Reviewed-by: Harish Kasiviswanathan <[email protected]>


________________________________
From: Alex Deucher <[email protected]>
Sent: Monday, November 16, 2026 9:47 AM
To: [email protected] <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Zhu, James 
<[email protected]>; Indic, Vladimir <[email protected]>; Kasiviswanathan, 
Harish <[email protected]>; Yang, Philip <[email protected]>
Subject: [PATCH v2] drm/amdkfd: move TBA/TMA back to system memory

For non-MI parts, move TBA/TMA back to system memory.
Results in GPU resets in some apps after suspend.

v2: add additional IP versions

Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/6116
Fixes: fe5966d4fdcb ("drm/amdkfd: move TBA/TMA from system to device memory")
Cc: James Zhu <[email protected]>
Cc: Vladimir Indic <[email protected]>
Cc: Harish Kasiviswanathan <[email protected]>
Cc: Philip Yang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 546721b4d59ac..b1b641ddbcf68 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -1554,7 +1554,12 @@ static int kfd_process_device_init_cwsr_dgpu(struct 
kfd_process_device *pdd)
         if (!dev->kfd->cwsr_enabled || !iosys_map_is_null(&qpd->cwsr_map) || 
!qpd->cwsr_base)
                 return 0;

-       if (KFD_GC_VERSION(dev) >= IP_VERSION(9, 4, 2) && 
!dev->adev->apu_prefer_gtt)
+       if ((KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 2) ||
+            KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 3) ||
+            KFD_GC_VERSION(dev) == IP_VERSION(9, 4, 4) ||
+            KFD_GC_VERSION(dev) == IP_VERSION(9, 5, 0) ||
+            KFD_GC_VERSION(dev) == IP_VERSION(12, 1, 0)) &&
+           !dev->adev->apu_prefer_gtt)
                 flags |= KFD_IOC_ALLOC_MEM_FLAGS_VRAM;
         else
                 flags |= KFD_IOC_ALLOC_MEM_FLAGS_GTT;
--
2.56.0

Reply via email to