All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdkfd: fix incorrect condition check for pci atomics gpu flags
@ 2021-04-30 20:51 Jonathan Kim
  2021-04-30 22:32 ` Felix Kuehling
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Kim @ 2021-04-30 20:51 UTC (permalink / raw)
  To: amd-gfx; +Cc: Felix.Kuehling, Jonathan Kim, Oak.Zeng

As pci_atomics_device_to_root check is a host to device support check,
the device xgmi hive setup status is irrelevant to setting the NO_ATOMICS
gpu flags so move it under the correct host-device check condition.

Signed-off-by: Jonathan Kim <jonathan.kim@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 30430aefcfc7..c84db6441c4e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1206,23 +1206,21 @@ static void kfd_fill_iolink_non_crat_info(struct kfd_topology_device *dev)
 
 	adev = (struct amdgpu_device *)(dev->gpu->kgd);
 	if (!adev->gmc.xgmi.connected_to_cpu) {
 		pcie_capability_read_dword(dev->gpu->pdev,
 				PCI_EXP_DEVCAP2, &cap);
 
 		if (!(cap & (PCI_EXP_DEVCAP2_ATOMIC_COMP32 |
 			     PCI_EXP_DEVCAP2_ATOMIC_COMP64)))
 			cpu_flag |= CRAT_IOLINK_FLAGS_NO_ATOMICS_32_BIT |
 				CRAT_IOLINK_FLAGS_NO_ATOMICS_64_BIT;
-	}
 
-	if (!adev->gmc.xgmi.num_physical_nodes) {
 		if (!dev->gpu->pci_atomic_requested ||
 				dev->gpu->device_info->asic_family ==
 							CHIP_HAWAII)
 			flag |= CRAT_IOLINK_FLAGS_NO_ATOMICS_32_BIT |
 				CRAT_IOLINK_FLAGS_NO_ATOMICS_64_BIT;
 	}
 
 	/* GPU only creates direct links so apply flags setting to all */
 	list_for_each_entry(link, &dev->io_link_props, list) {
 		link->flags = flag;
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-30 22:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 20:51 [PATCH] drm/amdkfd: fix incorrect condition check for pci atomics gpu flags Jonathan Kim
2021-04-30 22:32 ` Felix Kuehling

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.