From: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Gary.Sun-5C7GfCeVMHo@public.gmane.org,
pding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>,
Bingley.Li-5C7GfCeVMHo@public.gmane.org
Subject: [PATCH 1/3] drm/amdgpu: workaround for VM fault caused by SDMA set_wptr
Date: Tue, 17 Oct 2017 14:25:08 +0800 [thread overview]
Message-ID: <1508221510-7159-2-git-send-email-Pixel.Ding@amd.com> (raw)
In-Reply-To: <1508221510-7159-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
From: pding <Pixel.Ding@amd.com>
The polling memory was standalone in VRAM before, so the HDP flush
introduced latency that hides a VM fault issue. Now polling memory
leverages the WB in system memory and HDP flush is not required, the
VM fault at same page happens.
Add delay back to workaround until the root cause is found.
Tests: VP1 or launch 40 instances of glxinfo at the same time.
Signed-off-by: pding <Pixel.Ding@amd.com>
---
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index b1de44f..5c4bbe1 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -381,6 +381,9 @@ static void sdma_v3_0_ring_set_wptr(struct amdgpu_ring *ring)
if (ring->use_doorbell) {
/* XXX check if swapping is necessary on BE */
adev->wb.wb[ring->wptr_offs] = lower_32_bits(ring->wptr) << 2;
+ /* workaround: VM fault always happen at page 2046 */
+ if (amdgpu_sriov_vf(adev))
+ udelay(500);
WDOORBELL32(ring->doorbell_index, lower_32_bits(ring->wptr) << 2);
} else {
int me = (ring == &ring->adev->sdma.instance[0].ring) ? 0 : 1;
--
2.9.5
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-10-17 6:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 6:25 Make staging driver stable for SRIOV VF (1 v2) Pixel Ding
[not found] ` <1508221510-7159-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 6:25 ` Pixel Ding [this message]
2017-10-17 6:25 ` [PATCH 2/3] drm/amdgpu: report more amdgpu_fence_info v2 Pixel Ding
2017-10-17 6:25 ` [PATCH 3/3] drm/amdgpu: busywait KIQ register accessing v2 Pixel Ding
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=1508221510-7159-2-git-send-email-Pixel.Ding@amd.com \
--to=pixel.ding-5c7gfcevmho@public.gmane.org \
--cc=Bingley.Li-5C7GfCeVMHo@public.gmane.org \
--cc=Gary.Sun-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox