Skip to contentSkip to conversation

drm/amdgpu: enable PCIE atomics ops support

PATCH New Xiao, Jack 1 participant 1 message May 23, 2019

Subsystems (2)
lore
Share & tools
lore

Xiao, Jack

author
#0 lore raw

PATCH 1/1 drm/amdgpu: enable PCIE atomics ops support

GPU atomics operation depends on PCIE atomics support. Always enable PCIE atomics ops support in case that it hasn't been enabled.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7 -0
index bdd1fe73..a2c6064 100644
@@ -2562,6 +2562,13 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	if (adev->rio_mem == NULL)
 		DRM_INFO("PCI I/O BAR is not found.\n");
 
+	/* enable PCIE atomic ops */
+	r = pci_enable_atomic_ops_to_root(adev->pdev,
+				PCI_EXP_DEVCAP2_ATOMIC_COMP32 |
+				PCI_EXP_DEVCAP2_ATOMIC_COMP64);
+	if (r)
+		DRM_INFO("PCIE atomic ops is not supported\n");
+
 	amdgpu_device_get_pcie_info(adev);
 
 	/* early init functions */
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx