From: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org>
To: Emily Deng <Emily.Deng-5C7GfCeVMHo@public.gmane.org>,
Christian Koenig <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
Tom StDenis <Tom.StDenis-5C7GfCeVMHo@public.gmane.org>
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback
Date: Tue, 3 Apr 2018 18:55:06 +0800 [thread overview]
Message-ID: <20180403105506.GA3563@hr-amur2> (raw)
In-Reply-To: <1522746482-31353-9-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
On Tue, Apr 03, 2018 at 05:08:02PM +0800, Emily Deng wrote:
> This adds support for writing and reading back in a single
> oneshot packet. This is needed to send a tlb invalidation
> and wait for ack in a single operation.
>
> Signed-off-by: Emily Deng <Emily.Deng@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 9d39fd5..e699b9e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -4137,6 +4137,18 @@ static void gfx_v9_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
> gfx_v9_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
> }
>
> +static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
> + uint32_t reg0, uint32_t reg1,
> + uint32_t ref, uint32_t mask)
> +{
> + if (amdgpu_sriov_vf(ring->adev) && (ring->adev->asic_type == CHIP_VEGA10)) {
> + int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
> + gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
> + } else {
> + amdgpu_ring_emit_reg_write_reg_wait_helper(ring, reg0, reg1, ref, mask);
> + }
> +}
+ Christian, Tom, I think this is the root cause for regression of raven.
Alex, we need write "1" to set eng_sel field on gfx ring with below patch
that based on you previous patch set. I just verified it, the gfx ring
stall is gone.
Thanks,
Ray
8<-----
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index ccacc7d22..2fbb6e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -4134,7 +4134,9 @@ static void gfx_v9_0_ring_emit_reg_write_reg_wait(struct amdgpu_ring *ring,
uint32_t reg0, uint32_t reg1,
uint32_t ref, uint32_t mask)
{
- gfx_v9_0_wait_reg_mem(ring, 0, 0, 1, reg0, reg1, ref, mask, 0x20);
+ int usepfp = (ring->funcs->type == AMDGPU_RING_TYPE_GFX);
+
+ gfx_v9_0_wait_reg_mem(ring, usepfp, 0, 1, reg0, reg1, ref, mask, 0x20);
}
static void gfx_v9_0_set_gfx_eop_interrupt_state(struct amdgpu_device *adev,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-04-03 10:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 9:07 [PATCH 0/8] The vega10 sriov still need those patches Emily Deng
[not found] ` <1522746482-31353-1-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 9:07 ` [PATCH 1/8] Revert "Revert "drm/amdgpu: add emit_reg_write_reg_wait ring callback"" Emily Deng
2018-04-03 9:07 ` [PATCH 2/8] Revert "Revert "drm/amdgpu/sdma4: " Emily Deng
2018-04-03 9:07 ` [PATCH 3/8] Revert "Revert "drm/amdgpu/uvd7: " Emily Deng
2018-04-03 9:07 ` [PATCH 4/8] Revert "Revert "drm/amdgpu/vce4: " Emily Deng
2018-04-03 9:07 ` [PATCH 5/8] Revert "Revert "drm/amdgpu/vcn1: " Emily Deng
2018-04-03 9:08 ` [PATCH 6/8] Revert "Revert "drm/amdgpu/gmc9: use amdgpu_ring_emit_reg_write_reg_wait in gpu tlb flush"" Emily Deng
2018-04-03 9:08 ` [PATCH 7/8] Revert "Revert "drm/amdgpu/sdma4:fix sdma engine hang"" Emily Deng
2018-04-03 9:08 ` [PATCH 8/8] drm/amdgpu/gfx9: add emit_reg_write_reg_wait ring callback Emily Deng
[not found] ` <1522746482-31353-9-git-send-email-Emily.Deng-5C7GfCeVMHo@public.gmane.org>
2018-04-03 10:55 ` Huang Rui [this message]
2018-04-03 10:56 ` Christian König
2018-04-03 13:06 ` [PATCH 0/8] The vega10 sriov still need those patches Michel Dänzer
[not found] ` <8abf4f42-54be-4b1c-6208-80ab8c40fe0a-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-03 15:07 ` Alex Deucher
[not found] ` <CADnq5_OLEhT1qA6iDHx6NpKfkCAnAgL=GA0LZ-=NhXt1idO0Mg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-04-04 2:03 ` Deng, Emily
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=20180403105506.GA3563@hr-amur2 \
--to=ray.huang-5c7gfcevmho@public.gmane.org \
--cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
--cc=Emily.Deng-5C7GfCeVMHo@public.gmane.org \
--cc=Tom.StDenis-5C7GfCeVMHo@public.gmane.org \
--cc=alexander.deucher-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.