From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Chunming Zhou <zhoucm1-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2)
Date: Thu, 11 Jan 2018 10:57:58 +0800 [thread overview]
Message-ID: <5A56D2B6.9040105@amd.com> (raw)
In-Reply-To: <5585fbaf-d71f-3892-18e7-b6a2ea0a4e1b-5C7GfCeVMHo@public.gmane.org>
On 01/11/2018 10:50 AM, Chunming Zhou wrote:
> Could I how to verify this is valid fix?
For now, check if there is no vm fault or any other side effect when loading
amdgpu with ngg=1.
Later development will be implemented with OGL team together.
Jerry
>
> Regards,
>
> David Zhou
>
>
> On 2018年01月11日 10:30, Junwei Zhang wrote:
>> v2: fix register access
>>
>> Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9 +++++----
>> 1 file changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> index ae976e3..6db3645 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
>> @@ -1068,8 +1068,8 @@ static int gfx_v9_0_ngg_init(struct amdgpu_device *adev)
>> adev->gfx.ngg.gds_reserve_size = ALIGN(5 * 4, 0x40);
>> adev->gds.mem.total_size -= adev->gfx.ngg.gds_reserve_size;
>> adev->gds.mem.gfx_partition_size -= adev->gfx.ngg.gds_reserve_size;
>> - adev->gfx.ngg.gds_reserve_addr = SOC15_REG_OFFSET(GC, 0, mmGDS_VMID0_BASE);
>> - adev->gfx.ngg.gds_reserve_addr += adev->gds.mem.gfx_partition_size;
>> + adev->gfx.ngg.gds_reserve_addr = RREG32_SOC15(GC, 0, mmGDS_VMID0_BASE);
>> + adev->gfx.ngg.gds_reserve_addr += RREG32_SOC15(GC, 0, mmGDS_VMID0_SIZE);
>> /* Primitive Buffer */
>> r = gfx_v9_0_ngg_create_buf(adev, &adev->gfx.ngg.buf[NGG_PRIM],
>> @@ -1181,13 +1181,14 @@ static int gfx_v9_0_ngg_en(struct amdgpu_device *adev)
>> amdgpu_ring_write(ring, PACKET3(PACKET3_DMA_DATA, 5));
>> amdgpu_ring_write(ring, (PACKET3_DMA_DATA_CP_SYNC |
>> + PACKET3_DMA_DATA_DST_SEL(1) |
>> PACKET3_DMA_DATA_SRC_SEL(2)));
>> amdgpu_ring_write(ring, 0);
>> amdgpu_ring_write(ring, 0);
>> amdgpu_ring_write(ring, adev->gfx.ngg.gds_reserve_addr);
>> amdgpu_ring_write(ring, 0);
>> - amdgpu_ring_write(ring, adev->gfx.ngg.gds_reserve_size);
>> -
>> + amdgpu_ring_write(ring, PACKET3_DMA_DATA_CMD_RAW_WAIT |
>> + adev->gfx.ngg.gds_reserve_size);
>> gfx_v9_0_write_data_to_reg(ring, 0, false,
>> SOC15_REG_OFFSET(GC, 0, mmGDS_VMID0_SIZE), 0);
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-01-11 2:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 2:30 [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2) Junwei Zhang
[not found] ` <1515637852-2238-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-01-11 2:50 ` Chunming Zhou
[not found] ` <5585fbaf-d71f-3892-18e7-b6a2ea0a4e1b-5C7GfCeVMHo@public.gmane.org>
2018-01-11 2:57 ` Zhang, Jerry (Junwei) [this message]
[not found] ` <5A56D2B6.9040105-5C7GfCeVMHo@public.gmane.org>
2018-01-11 9:23 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2018-01-11 1:44 Junwei Zhang
[not found] ` <1515635053-623-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-01-11 2:30 ` Zhang, Jerry (Junwei)
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=5A56D2B6.9040105@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=zhoucm1-5C7GfCeVMHo@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.