From: Felix Kuehling <felix.kuehling@amd.com>
To: Gang Ba <gaba@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Change the way to determine framebuffer type
Date: Tue, 3 Nov 2020 10:33:17 -0500 [thread overview]
Message-ID: <405a609e-4d1e-4ad0-5998-c00a0acf138b@amd.com> (raw)
In-Reply-To: <20201008171557.29071-1-gaba@amd.com>
Am 2020-10-08 um 1:15 p.m. schrieb Gang Ba:
> Determine FRAMEBUFFER_PUBLIC/PRIVATE only based host-accessibility,
> not peer-accesssibility
>
> Signed-off-by: Gang Ba <gaba@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 20 +++++++-------------
> 1 file changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> index 5aa7dbaf6e76..f066696338d7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
> @@ -390,23 +390,17 @@ void amdgpu_amdkfd_get_local_mem_info(struct kgd_dev *kgd,
> struct kfd_local_mem_info *mem_info)
> {
> struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
> - uint64_t address_mask = adev->dev->dma_mask ? ~*adev->dev->dma_mask :
> - ~((1ULL << 32) - 1);
> - resource_size_t aper_limit = adev->gmc.aper_base + adev->gmc.aper_size;
>
> memset(mem_info, 0, sizeof(*mem_info));
> - if (!(adev->gmc.aper_base & address_mask || aper_limit & address_mask)) {
> - mem_info->local_mem_size_public = adev->gmc.visible_vram_size;
> - mem_info->local_mem_size_private = adev->gmc.real_vram_size -
> - adev->gmc.visible_vram_size;
> - } else {
> - mem_info->local_mem_size_public = 0;
> - mem_info->local_mem_size_private = adev->gmc.real_vram_size;
> - }
> +
> + mem_info->local_mem_size_public = adev->gmc.visible_vram_size;
> + mem_info->local_mem_size_private = adev->gmc.real_vram_size -
> + adev->gmc.visible_vram_size;
> +
> mem_info->vram_width = adev->gmc.vram_width;
>
> - pr_debug("Address base: %pap limit %pap public 0x%llx private 0x%llx\n",
> - &adev->gmc.aper_base, &aper_limit,
> + pr_debug("Address base: %pap public 0x%llx private 0x%llx\n",
> + &adev->gmc.aper_base,
> mem_info->local_mem_size_public,
> mem_info->local_mem_size_private);
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2020-11-03 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 17:15 [PATCH] drm/amdgpu: Change the way to determine framebuffer type Gang Ba
2020-11-03 15:33 ` Felix Kuehling [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=405a609e-4d1e-4ad0-5998-c00a0acf138b@amd.com \
--to=felix.kuehling@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=gaba@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