Skip to contentSkip to conversation

drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

PATCH In review Mario Limonciello 2 participants 4 messages Jul 7, 2022

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

PATCH 1/1 drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

By having dependencies on PCI_P2PDMA and DMABUF_MOVE_NOTIFY the option HSA_AMD_P2P is not discoverable. The kernel menu configuration hides it if the dependencies aren't satisfied, making it harder to find.

Instead select these options when enabling HSA_AMD_P2P. This way distributions and users can just enable HSA_AMD_P2P.

---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/Kconfig +3 -1
index 93bd4eda0d94..b153c26903ee 100644
@@ -28,7 +28,9 @@ config HSA_AMD_SVM
 
 config HSA_AMD_P2P
 	bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
-	depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+	depends on HSA_AMD
+	select PCI_P2PDMA
+	select DMABUF_MOVE_NOTIFY
 	help
 	  Enable peer-to-peer (P2P) communication between AMD GPUs over
 	  the PCIe bus. This can improve performance of multi-GPU compute
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - General]

Using "depends" prevents shallow binding. Applying "select" can cause trouble.

Regards,
Ramesh

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Mario Limonciello
Sent: Thursday, July 7, 2022 3:12 PM
To: [email protected]; Kuehling, Felix <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

[CAUTION: External Email]

By having dependencies on PCI_P2PDMA and DMABUF_MOVE_NOTIFY the option HSA_AMD_P2P is not discoverable. The kernel menu configuration hides it if the dependencies aren't satisfied, making it harder to find.

Instead select these options when enabling HSA_AMD_P2P. This way distributions and users can just enable HSA_AMD_P2P.

---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/Kconfig +3 -1
index 93bd4eda0d94..b153c26903ee 100644
@@ -28,7 +28,9 @@ config HSA_AMD_SVM
 
 config HSA_AMD_P2P
        bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
-       depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+       depends on HSA_AMD
+       select PCI_P2PDMA
+       select DMABUF_MOVE_NOTIFY
        help
          Enable peer-to-peer (P2P) communication between AMD GPUs over
          the PCIe bus. This can improve performance of multi-GPU compute

--
2.34.1

#2 lore raw

[Public]

Quoted 9 lines

-----Original Message-----
From: Errabolu, Ramesh <[email protected]>
Sent: Thursday, July 7, 2022 15:30
To: Limonciello, Mario <[email protected]>; amd- [email protected]; Kuehling, Felix <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: RE: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

Quoted 3 lines

[AMD Official Use Only - General]

Using "depends" prevents shallow binding. Applying "select" can cause trouble.

Can you give some more information? What kind of trouble can be caused?

Quoted 45 lines

Regards,
Ramesh

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Mario Limonciello
Sent: Thursday, July 7, 2022 3:12 PM
To: [email protected]; Kuehling, Felix <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

[CAUTION: External Email]

By having dependencies on PCI_P2PDMA and DMABUF_MOVE_NOTIFY the option HSA_AMD_P2P is not discoverable. The kernel menu configuration hides it if the dependencies aren't satisfied, making it harder to find.

Instead select these options when enabling HSA_AMD_P2P. This way distributions and users can just enable HSA_AMD_P2P.

---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/Kconfig +3 -2
index 93bd4eda0d94..b153c26903ee 100644
@@ -28,7 +28,9 @@ config HSA_AMD_SVM
 
 config HSA_AMD_P2P
        bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
-       depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+       depends on HSA_AMD
+       select PCI_P2PDMA
+       select DMABUF_MOVE_NOTIFY
        help
          Enable peer-to-peer (P2P) communication between AMD GPUs over
          the PCIe bus. This can improve performance of multi-GPU compute
--

2.34.1

#3 lore raw

[Public]

Follow the dependency chain of either CONFIG_DMABUF_MOVE_NOTIFY or CONFIG_PCI_P2PDMA.

What happens if you enable CONFIG_DMABUF_MOVE_NOTIFY but its dependency CONFIG_DMA_SHARED_BUFFER is not enabled.

Therefore using "selects" is not the right way to go about it.

Regards,
Ramesh

-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Thursday, July 7, 2022 3:34 PM
To: Errabolu, Ramesh <[email protected]>; [email protected]; Kuehling, Felix <[email protected]>
Subject: RE: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

[Public]

Quoted 9 lines

-----Original Message-----
From: Errabolu, Ramesh <[email protected]>
Sent: Thursday, July 7, 2022 15:30
To: Limonciello, Mario <[email protected]>; amd- [email protected]; Kuehling, Felix <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: RE: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

Quoted 3 lines

[AMD Official Use Only - General]

Using "depends" prevents shallow binding. Applying "select" can cause trouble.

Can you give some more information? What kind of trouble can be caused?

Quoted 47 lines

Regards,
Ramesh

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Mario Limonciello
Sent: Thursday, July 7, 2022 3:12 PM
To: [email protected]; Kuehling, Felix <[email protected]>
Cc: Limonciello, Mario <[email protected]>
Subject: [PATCH] drm/amdkfd: Select PCI_P2PDMA and DMABUF_MOVE_NOTIFY instead of depending

[CAUTION: External Email]

By having dependencies on PCI_P2PDMA and DMABUF_MOVE_NOTIFY the option HSA_AMD_P2P is not discoverable. The kernel menu configuration hides it if the dependencies aren't satisfied, making it harder to find.

Instead select these options when enabling HSA_AMD_P2P. This way distributions and users can just enable HSA_AMD_P2P.

---
 drivers/gpu/drm/amd/amdkfd/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/Kconfig +3 -1
index 93bd4eda0d94..b153c26903ee 100644
@@ -28,7 +28,9 @@ config HSA_AMD_SVM
 
 config HSA_AMD_P2P
        bool "HSA kernel driver support for peer-to-peer for AMD GPU devices"
-       depends on HSA_AMD && PCI_P2PDMA && DMABUF_MOVE_NOTIFY
+       depends on HSA_AMD
+       select PCI_P2PDMA
+       select DMABUF_MOVE_NOTIFY
        help
          Enable peer-to-peer (P2P) communication between AMD GPUs over
          the PCIe bus. This can improve performance of multi-GPU 

compute
--
2.34.1