Skip to contentSkip to conversation

drm/amdkfd: set coherent host access capability flag

PATCH New Alex Sierra 1 participant 1 message Jun 15, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: set coherent host access capability flag

This flag determines whether the host possesses coherent access to the memory of the device.

---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_topology.c +3 -0
index 90b86a6ac7bd..296219be350d 100644
@@ -2107,6 +2107,9 @@ int kfd_topology_add_device(struct kfd_node *gpu)
 	if (KFD_IS_SVM_API_SUPPORTED(dev->gpu->adev))
 		dev->node_props.capability |= HSA_CAP_SVMAPI_SUPPORTED;
 
+	if (dev->gpu->adev->gmc.xgmi.connected_to_cpu)
+		dev->node_props.capability |= HSA_CAP_FLAGS_COHERENTHOSTACCESS;
+
 	kfd_debug_print_topology();
 
 	kfd_notify_gpu_change(gpu_id, 1);
Signature · 1 line
2.32.0