Skip to contentSkip to conversation

drm/amdkfd:Check use_xgmi_p2p before reporting hive_id

PATCH Superseded Divya Shikre 2 participants 2 messages Mar 22, 2022 – Mar 23, 2022

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd:Check use_xgmi_p2p before reporting hive_id

XGMI iolinks will not be created in KFD topology when use_xgmi_p2p module parameter is disabled in a dGPU.
In this case PCIe p2p links will be used instead.

---
 drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -1
index 339e12c94cff..d5536e33b3d8 100644
@@ -536,7 +536,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
 		goto kfd_doorbell_error;
 	}
 
-	kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;
+	if (amdgpu_use_xgmi_p2p)
+		kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;
 
 	kfd->noretry = kfd->adev->gmc.noretry;
 
Signature · 1 line
2.25.1
#1 lore raw

Dear Divya,

Thank you for your patch.

Am 22.03.22 um 20:23 schrieb Divya Shikre:

Please add a space after the colon in the commit message summary.

Quoted 2 lines

XGMI iolinks will not be created in KFD topology when use_xgmi_p2p module parameter is disabled in a dGPU.

1. Is “will not be” the current problem, or the result of your patch? Please start by describing the current problem, how to reproduce it.

2. Please wrap lines after 75 characters, and add a blank line between paragraphs.

The script scripts/checkpatch.pl, you should run on all your patches before submitting them, also warns about the first issue:

WARNING: Possible unwrapped commit description (prefer a maximum 75
chars per line)

Quoted 1 line

In this case PCIe p2p links will be used instead.

Is this a regression, and fixes another commit? If so, please add a Fixes line.

Quoted 10 lines
---
  drivers/gpu/drm/amd/amdkfd/kfd_device.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 -0
index 339e12c94cff..d5536e33b3d8 100644

drivers/gpu/drm/amd/amdkfd/kfd_device.c bool kgd2kfd_device_init(struct kfd_dev *kfd, · line 540

Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +2 -1
@@ -536,7 +536,8 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
  		goto kfd_doorbell_error;
  	}
 
-	kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;
+	if (amdgpu_use_xgmi_p2p)
+		kfd->hive_id = kfd->adev->gmc.xgmi.hive_id;

Is hive_id now unset?

drivers/gpu/drm/amd/amdkfd/kfd_device.c bool kgd2kfd_device_init(struct kfd_dev *kfd, · line 543

Quoted 2 lines
drivers/gpu/drm/amd/amdkfd/kfd_device.c +0 -0
  	kfd->noretry = kfd->adev->gmc.noretry;
 

Kind regards,

Paul