[PATCH] drm/amdgpu: enable PCIE atomics ops support

Christian König ckoenig.leichtzumerken at gmail.com
Tue May 28 07:25:25 UTC 2019


Am 27.05.19 um 20:23 schrieb Kuehling, Felix:
> On 2019-05-27 7:51 a.m., Christian König wrote:
>> That idea sounds sane to me as well.
>>
>> By the way, do we somewhere signal to userspace if atomics are
>> supported or not?
> Yes. KFD topology (a flag in the iolink) provides that information to
> user mode.

Yeah, but we are enabling this for the render node as well.

Question is now if we have that in the info IOCTL or not? I strongly 
suspect that's not present there.

Regards,
Christian.

>
> Regards,
>     Felix
>
>
>> I mean would be nice to keep the state inside adev if this fails for
>> some reason.
>>
>> Christian.
>>
>> Am 27.05.19 um 13:16 schrieb Zhang, Hawking:
>>> How about put pci_enable_atomic_ops_to_root ahead of
>>> amdgpu_device_ip_early_init, while move pci_atomic_requested from kfd
>>> device to kgd device ? In such way, we can avoid duplicate atomic
>>> request from both amdgpu and amdkfd.
>>>
>>> Regards,
>>> Hawking
>>> -----Original Message-----
>>> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
>>> Xiao, Jack
>>> Sent: 2019年5月27日 18:19
>>> To: amd-gfx at lists.freedesktop.org
>>> Cc: Xiao, Jack <Jack.Xiao at amd.com>
>>> Subject: [PATCH] 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.
>>>
>>> Signed-off-by: Jack Xiao <Jack.Xiao at amd.com>
>>> ---
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 +++++++
>>>    1 file changed, 7 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> index bdd1fe73..a2c6064 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
>>> @@ -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 */
>>> -- 
>>> 1.9.1
>>>
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>>> _______________________________________________
>>> amd-gfx mailing list
>>> amd-gfx at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list