From: "Timur Kristóf" <timur.kristof@gmail.com>
To: "Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com
Subject: Re: [PATCH v3 1/5] drm/amdgpu: Expand kernel-doc in amdgpu_ring
Date: Tue, 21 Oct 2025 11:23:39 +0200 [thread overview]
Message-ID: <44ecb43a-5f6e-440e-9e16-f56ca697eed4@gmail.com> (raw)
In-Reply-To: <20251020194631.102260-2-siqueira@igalia.com>
On 10/20/25 21:38, Rodrigo Siqueira wrote:
> Expand the kernel-doc about amdgpu_ring and add some tiny improvements.
>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Timur Kristóf <timur.kristof@gmail.com>
> Signed-off-by: Rodrigo Siqueira <siqueira@igalia.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 15 ++++++++++++---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++
> 2 files changed, 14 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> index 5ec5c3ff22bb..29de8dbe2917 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
> @@ -75,8 +75,16 @@ unsigned int amdgpu_ring_max_ibs(enum amdgpu_ring_type type)
> * @ring: amdgpu_ring structure holding ring information
> * @ndw: number of dwords to allocate in the ring buffer
> *
> - * Allocate @ndw dwords in the ring buffer (all asics).
> - * Returns 0 on success, error on failure.
> + * Allocate @ndw dwords in the ring buffer (it works in all ASICs). When
> + * inspecting the code, you may encounter places where this function is invoked
> + * like this: amdgpu_ring_alloc(ring, X + Y + Z), where X, Y, and Z are integer
> + * numbers. The idea of using each integer addition instead of the final result
> + * is to explicitly indicate each block of operation that will be inserted into
> + * the ring.
To clarify this further, I recommend using the term "packet" instead of
"block of operation".
> + *
> + * Returns:
> + * 0 on success, otherwise -ENOMEM if it tries to allocate more than the
> + * maximum dword allowed for one submission.
> */
> int amdgpu_ring_alloc(struct amdgpu_ring *ring, unsigned int ndw)
> {
> @@ -122,7 +130,8 @@ static void amdgpu_ring_alloc_reemit(struct amdgpu_ring *ring, unsigned int ndw)
> ring->funcs->begin_use(ring);
> }
>
> -/** amdgpu_ring_insert_nop - insert NOP packets
> +/**
> + * amdgpu_ring_insert_nop - insert NOP packets
> *
> * @ring: amdgpu_ring structure holding ring information
> * @count: the number of NOP packets to insert
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> index 87b962df5460..e83589619a92 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
> @@ -62,6 +62,8 @@ enum amdgpu_ring_priority_level {
> #define AMDGPU_FENCE_FLAG_64BIT (1 << 0)
> #define AMDGPU_FENCE_FLAG_INT (1 << 1)
> #define AMDGPU_FENCE_FLAG_TC_WB_ONLY (1 << 2)
> +
> +/* Ensure the execution in case of preemption or reset */
> #define AMDGPU_FENCE_FLAG_EXEC (1 << 3)
>
> #define to_amdgpu_ring(s) container_of((s), struct amdgpu_ring, sched)
next prev parent reply other threads:[~2025-10-21 9:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 19:38 [PATCH v3 0/5] Expand kernel-doc with more generic details and info about ring buffers Rodrigo Siqueira
2025-10-20 19:38 ` [PATCH v3 1/5] drm/amdgpu: Expand kernel-doc in amdgpu_ring Rodrigo Siqueira
2025-10-20 20:30 ` Alex Deucher
2025-10-21 9:23 ` Timur Kristóf [this message]
2025-10-21 13:11 ` Rodrigo Siqueira
2025-10-28 13:01 ` Christian König
2025-10-20 19:38 ` [PATCH v3 2/5] Documentation/gpu: Add new glossary entries from UMR Rodrigo Siqueira
2025-10-20 20:17 ` Alex Deucher
2025-10-21 5:16 ` Lazar, Lijo
2025-10-21 13:25 ` Rodrigo Siqueira
2025-10-21 14:46 ` Alex Deucher
2025-10-28 13:10 ` Christian König
2025-10-28 14:36 ` Rodrigo Siqueira
2025-10-20 19:38 ` [PATCH v3 3/5] Documentation/gpu: Expand generic block information Rodrigo Siqueira
2025-10-20 20:28 ` Alex Deucher
2025-10-21 9:30 ` Timur Kristóf
2025-10-21 14:55 ` Rodrigo Siqueira
2025-10-21 21:34 ` Alex Deucher
2025-10-21 5:24 ` Lazar, Lijo
2025-10-20 19:38 ` [PATCH v3 4/5] Documentation/gpu: Add more information about GC Rodrigo Siqueira
2025-10-20 20:30 ` Alex Deucher
2025-10-20 19:38 ` [PATCH v3 5/5] Documentation/gpu: Add documentation about ring buffer Rodrigo Siqueira
2025-10-20 20:53 ` Alex Deucher
2025-10-21 12:52 ` [PATCH v3 0/5] Expand kernel-doc with more generic details and info about ring buffers Alex Deucher
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=44ecb43a-5f6e-440e-9e16-f56ca697eed4@gmail.com \
--to=timur.kristof@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=kernel-dev@igalia.com \
--cc=siqueira@igalia.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