From: Yann Dirson <ydirson@free.fr>
To: amd-gfx list <amd-gfx@lists.freedesktop.org>,
Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Subject: Looking for clarifications around gfx/kcq/kiq
Date: Sun, 5 Dec 2021 21:18:27 +0100 (CET) [thread overview]
Message-ID: <1064509373.27600770.1638735507175.JavaMail.root@zimbra39-e7> (raw)
In-Reply-To: <1473700406.26541073.1638716639650.JavaMail.root@zimbra39-e7>
Hello,
Context: trying to understand what happens with my Renoir passed through
to a Xen domu [0] (starting with the "VCN disabled" because I don't need it
now (so let's postpone the problem with its _fini) and with "PSP disabled"
because the alternative issue seems easier to solve -- so ip_block_mask=0xF7).
I'm slowed down by a number of additional terms:
* KIQ: we have the acronym, but a few more words about it would be great:
it seems to relate to a ring buffer provided by the GFX IP, but this one
does not talk much to me (e.g. it tells me less than the names of the
"gfx" and "compute" ones)
* "me", "mec" = ? In some places at least "me" stands for "micro engine" but
what are those ? A "mec" contains pipes which contain queues. And in
amdgpu_ring the "me" field seems to identify a "mec"
* "mes", rather looks like an IP/block family than the plural of "me".
A specific list of those IPs / hw blocks would be useful (maybe with
a diagram showing how they interact, much as what was started by
Rodrigo for the DC pipeline, but a first components/subcomponents diagram
would probably be helpful)
* RLC ? Looks like a "micro engine" inside the GFX IPs ?
* one starting point for enhancing doc would be to start with amdgpu.h, where
a number of acronyms used in structs are not self-explanatory: IB, SS, CP,
ACP, CAC, HPD, ...
Do we have somewhere a description of what the hardware expects to find in
those queues ?
About amdgpu_gfx_enable_kcq():
- Isn't the `DRM_INFO("kiq ring mec %d pipe %d q %d\n"` line rather meant as
DRM_DEBUG ?
- An error from amdgpu_ring_alloc() is reported as "failed to lock", but looks
like "failed to allocate space on ring" ?
amdgpu_ring_alloc() itself is unconditionally setting count_dw, which looked
suspicious to me -- so I added the check shown below, and it does look like
ring_alloc() gets called again too soon. Am I right in thinking this could be
the cause of amdgpu_ring_test_helper() failing in timeout ?
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -70,6 +70,9 @@ int amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned ndw)
if (WARN_ON_ONCE(ndw > ring->max_dw))
return -ENOMEM;
+ /* check we're not allocating too fast */
+ WARN_ON_ONCE(ring->count_dw);
+
ring->count_dw = ndw;
ring->wptr_old = ring->wptr;
About gfx_v9_0_sw_fini():
- the 2 calls to bo_free are called here without condition, whereas they are
allocated from rlc_init, not directly from sw_init. Is this asymmetry wanted ?
Maybe such info should join the documentation at some point?
[0] https://lists.freedesktop.org/archives/amd-gfx/2021-November/071855.html
next parent reply other threads:[~2021-12-06 10:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1473700406.26541073.1638716639650.JavaMail.root@zimbra39-e7>
2021-12-05 20:18 ` Yann Dirson [this message]
2021-12-06 20:01 ` Looking for clarifications around gfx/kcq/kiq Alex Deucher
2021-12-07 22:07 ` gpu block diagram Yann Dirson
2021-12-09 4:49 ` Alex Deucher
2021-12-10 20:36 ` Looking for clarifications around gfx/kcq/kiq Yann Dirson
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=1064509373.27600770.1638735507175.JavaMail.root@zimbra39-e7 \
--to=ydirson@free.fr \
--cc=amd-gfx@lists.freedesktop.org \
--cc=rodrigo.siqueira@amd.com \
/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;
as well as URLs for NNTP newsgroup(s).