From: Pixel Ding <Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Monk.Liu-5C7GfCeVMHo@public.gmane.org,
Christian.Koenig-5C7GfCeVMHo@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 2/3] drm/amdgpu: report more amdgpu_fence_info v2
Date: Tue, 17 Oct 2017 14:37:46 +0800 [thread overview]
Message-ID: <1508222267-18627-3-git-send-email-Pixel.Ding@amd.com> (raw)
In-Reply-To: <1508222267-18627-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
From: pding <Pixel.Ding@amd.com>
Only for GFX ring. This can help checking MCBP feature.
v2: report more fence offs.
The fence at the end of the frame will indicate the completion status.
If the frame completed normally, the fence is written to the address
given in the EVENT_WRITE_EOP packet. If preemption occurred in the
previous IB the address is adjusted by 2 DWs. If work submitted in the
frame was reset before completion, the fence address is adjusted by
four DWs. In the case that preemption occurred, and before preemption
completed a reset was initiated, the address will be adjusted with six
DWs
Signed-off-by: pding <Pixel.Ding@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 09d5a5c..688740e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -645,6 +645,19 @@ static int amdgpu_debugfs_fence_info(struct seq_file *m, void *data)
atomic_read(&ring->fence_drv.last_seq));
seq_printf(m, "Last emitted 0x%08x\n",
ring->fence_drv.sync_seq);
+
+ if (ring->funcs->type != AMDGPU_RING_TYPE_GFX)
+ continue;
+
+ /* set in CP_VMID_PREEMPT and preemption occurred */
+ seq_printf(m, "Last preempted 0x%08x\n",
+ le32_to_cpu(*(ring->fence_drv.cpu_addr + 2)));
+ /* set in CP_VMID_RESET and reset occurred */
+ seq_printf(m, "Last reset 0x%08x\n",
+ le32_to_cpu(*(ring->fence_drv.cpu_addr + 4)));
+ /* Both preemption and reset occurred */
+ seq_printf(m, "Last both 0x%08x\n",
+ le32_to_cpu(*(ring->fence_drv.cpu_addr + 6)));
}
return 0;
}
--
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:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-17 6:37 Make staging driver stable for SRIOV VF (1 v2) Pixel Ding
[not found] ` <1508222267-18627-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 6:37 ` [PATCH 1/3] drm/amdgpu: always consider virualised device for checking post Pixel Ding
[not found] ` <1508222267-18627-2-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:48 ` Liu, Monk
[not found] ` <BLUPR12MB04492724C9C66EF3ABA7C295844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 7:53 ` Ding, Pixel
[not found] ` <77D84CB4-2676-4DBC-AB49-431923E87EAC-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:00 ` Liu, Monk
[not found] ` <BLUPR12MB0449C0C378B70A73A44579CC844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 8:06 ` Ding, Pixel
[not found] ` <BA0191B9-16C3-43D8-9816-BF77301CE5D5-5C7GfCeVMHo@public.gmane.org>
2017-10-18 2:13 ` Liu, Monk
2017-10-18 2:25 ` Ding, Pixel
[not found] ` <9035FC71-9AB1-406C-9A0B-8B050E51C7F4-5C7GfCeVMHo@public.gmane.org>
2017-10-18 7:19 ` Ding, Pixel
[not found] ` <83AE16CE-43F8-44E7-AEF6-6FA581134C7A-5C7GfCeVMHo@public.gmane.org>
2017-10-18 7:23 ` Christian König
[not found] ` <b3d8df4b-38f9-2bc2-3340-782069591058-5C7GfCeVMHo@public.gmane.org>
2017-10-18 9:13 ` Liu, Monk
2017-10-18 9:20 ` Ding, Pixel
2017-10-18 14:08 ` Deucher, Alexander
[not found] ` <BN6PR12MB16521D66D545EE9CF038725AF74D0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-19 3:23 ` Ding, Pixel
[not found] ` <5D15F8FE-DDA7-4AC9-AB1B-2B69ED5C410F-5C7GfCeVMHo@public.gmane.org>
2017-10-19 3:32 ` Deucher, Alexander
2017-10-17 6:37 ` Pixel Ding [this message]
[not found] ` <1508222267-18627-3-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:03 ` [PATCH 2/3] drm/amdgpu: report more amdgpu_fence_info v2 Christian König
2017-10-17 7:49 ` Liu, Monk
[not found] ` <BLUPR12MB0449B223F1C69AE2587EE9F5844C0-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-17 7:55 ` Ding, Pixel
[not found] ` <AE86FEF5-92C5-4F1B-B302-5A9289C42CD8-5C7GfCeVMHo@public.gmane.org>
2017-10-17 7:59 ` Liu, Monk
2017-10-17 6:37 ` [PATCH 3/3] drm/amdgpu: busywait KIQ register accessing v2 Pixel Ding
[not found] ` <1508222267-18627-4-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:20 ` Christian König
[not found] ` <7f22595c-ae6d-f859-3ba6-42fe30a24707-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:38 ` Ding, Pixel
[not found] ` <E8EDC6D0-8756-4E09-8C0F-187CE061A470-5C7GfCeVMHo@public.gmane.org>
2017-10-17 8:59 ` Christian König
[not found] ` <b6506918-3acf-6480-2f90-6b4bbc09eada-5C7GfCeVMHo@public.gmane.org>
2017-10-17 9:27 ` Ding, Pixel
-- strict thread matches above, loose matches on Subject: below --
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 ` [PATCH 2/3] drm/amdgpu: report more amdgpu_fence_info 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=1508222267-18627-3-git-send-email-Pixel.Ding@amd.com \
--to=pixel.ding-5c7gfcevmho@public.gmane.org \
--cc=Bingley.Li-5C7GfCeVMHo@public.gmane.org \
--cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
--cc=Gary.Sun-5C7GfCeVMHo@public.gmane.org \
--cc=Monk.Liu-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