Skip to content

Commit af7828f

Browse files
yifancomalexdeucher
authored andcommitted
drm/amdgpu: set gfx9 onwards APU atomics support to be true
APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is internal path w/ native atomic support. Set have_atomics_support to true. Signed-off-by: Yifan Zhang <[email protected]> Reviewed-by: Lang Yu <[email protected]> Acked-by: Felix Kuehling <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 476ac50 commit af7828f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3757,6 +3757,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,
37573757
adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *)
37583758
adev->virt.fw_reserve.p_pf2vf)->pcie_atomic_ops_support_flags ==
37593759
(PCI_EXP_DEVCAP2_ATOMIC_COMP32 | PCI_EXP_DEVCAP2_ATOMIC_COMP64);
3760+
/* APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is a
3761+
* internal path natively support atomics, set have_atomics_support to true.
3762+
*/
3763+
else if ((adev->flags & AMD_IS_APU) &&
3764+
(adev->ip_versions[GC_HWIP][0] > IP_VERSION(9, 0, 0)))
3765+
adev->have_atomics_support = true;
37603766
else
37613767
adev->have_atomics_support =
37623768
!pci_enable_atomic_ops_to_root(adev->pdev,

0 commit comments

Comments
 (0)