All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: 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:30:16 +0800	[thread overview]
Message-ID: <5A56CC38.8010205@amd.com> (raw)
In-Reply-To: <1515635053-623-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>

Please ignore this one, a minor update is coming.
Sorry for annoyance.

Jerry

On 01/11/2018 09:44 AM, 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 | 10 ++++++----
>   1 file changed, 6 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..c73a476 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,15 @@ 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(0) |
>   				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_DAS |
> +				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

  parent reply	other threads:[~2018-01-11  2:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-11  1:44 [PATCH v2] drm/amdgpu/gfx9: fix ngg enablement to clear gds reserved memory (v2) Junwei Zhang
     [not found] ` <1515635053-623-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
2018-01-11  2:30   ` Zhang, Jerry (Junwei) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-01-11  2:30 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)
     [not found]         ` <5A56D2B6.9040105-5C7GfCeVMHo@public.gmane.org>
2018-01-11  9:23           ` Christian König

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=5A56CC38.8010205@amd.com \
    --to=jerry.zhang-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.