AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lang Yu <Lang.Yu@amd.com>
To: Yifan Zhang <yifan1.zhang@amd.com>
Cc: Alexander.Deucher@amd.com, Felix.Kuehling@amd.com,
	Christian.Koenig@amd.com, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: set gfx9 onwards APU atomics support to be true
Date: Tue, 2 May 2023 21:50:03 +0800	[thread overview]
Message-ID: <ZFEVC3Q+PSKFJ1e+@lang-desktop> (raw)
In-Reply-To: <20230430020220.1266699-1-yifan1.zhang@amd.com>

On 04/30/ , Yifan Zhang wrote:
> 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 <yifan1.zhang@amd.com>

Reviewed-by: Lang Yu <lang.yu@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index b57e7776055b..750eaffa81ba 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3757,6 +3757,12 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>  		adev->have_atomics_support = ((struct amd_sriov_msg_pf2vf_info *)
>  			adev->virt.fw_reserve.p_pf2vf)->pcie_atomic_ops_support_flags ==
>  			(PCI_EXP_DEVCAP2_ATOMIC_COMP32 | PCI_EXP_DEVCAP2_ATOMIC_COMP64);
> +	/* APUs w/ gfx9 onwards doesn't reply on PCIe atomics, rather it is a
> +	 * internal path natively support atomics, set have_atomics_support to true.
> +	 */
> +	else if ((adev->flags & AMD_IS_APU) &&
> +		(adev->ip_versions[GC_HWIP][0] > IP_VERSION(9, 0, 0)))
> +		adev->have_atomics_support = true;
>  	else
>  		adev->have_atomics_support =
>  			!pci_enable_atomic_ops_to_root(adev->pdev,
> -- 
> 2.37.3
> 

      parent reply	other threads:[~2023-05-02 13:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30  2:02 [PATCH] drm/amdgpu: set gfx9 onwards APU atomics support to be true Yifan Zhang
2023-05-01 15:05 ` Felix Kuehling
2023-05-02 13:50 ` Lang Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFEVC3Q+PSKFJ1e+@lang-desktop \
    --to=lang.yu@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=yifan1.zhang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox