From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/amdgpu/gfx10: fix wptr reset in KGQ init
Date: Fri, 30 Jan 2026 10:27:59 +0000 [thread overview]
Message-ID: <f9f1f2cc-861f-47e5-b95a-cf48da430fcc@ursulin.net> (raw)
In-Reply-To: <CADnq5_O-Nq8Y+9enz11gqbFOnJsL9Xmf4F2hxJ3vx4k5OOD1FA@mail.gmail.com>
On 29/01/2026 16:39, Alex Deucher wrote:
> On Thu, Jan 29, 2026 at 11:27 AM Tvrtko Ursulin <tursulin@ursulin.net> wrote:
>>
>>
>> On 29/01/2026 04:34, Alex Deucher wrote:
>>> wptr is a 64 bit value and we need to update the
>>> full value, not just 32 bits. Align with what we
>>> already do for KCQs.
>>>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>>> index e9254ec3b6417..ef7d91a4437ec 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
>>> @@ -6883,7 +6883,7 @@ static int gfx_v10_0_kgq_init_queue(struct amdgpu_ring *ring, bool reset)
>>> memcpy_toio(mqd, adev->gfx.me.mqd_backup[mqd_idx], sizeof(*mqd));
>>> /* reset the ring */
>>> ring->wptr = 0;
>>> - *ring->wptr_cpu_addr = 0;
>>> + atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
>>
>> For my education could I ask if this just about writing the 64-bit value
>> or the atomic part is also important?
>
> Just the 64 bit value in this case.
Thank you, it was a bit confusing for me. Even in the context of what
you explained to Timur that pre-gfx9 wptr is 32-bit, becauase when I
looked into for example the gfx8 code, I saw it doing a mix of 64- and
32-bit writes.
I guess the layout of the write back info block thingy is fully
software/driver defined which is why this is not an issue?
Would it be worth getting rid of the atomics to lessen the confusion and
attempt to somehow make this area more self-documenting?
Regards,
Tvrtko
next prev parent reply other threads:[~2026-01-30 10:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 4:34 [PATCH 1/3] drm/amdgpu/gfx10: fix wptr reset in KGQ init Alex Deucher
2026-01-29 4:34 ` [PATCH 2/3] drm/amdgpu/gfx11: " Alex Deucher
2026-01-29 4:34 ` [PATCH 3/3] drm/amdgpu/gfx12: " Alex Deucher
2026-01-29 8:55 ` Zhang, Jesse(Jie)
2026-01-29 9:41 ` [PATCH 1/3] drm/amdgpu/gfx10: " Timur Kristóf
2026-01-29 14:09 ` Alex Deucher
2026-01-29 15:31 ` Tvrtko Ursulin
2026-01-29 16:39 ` Alex Deucher
2026-01-30 10:27 ` Tvrtko Ursulin [this message]
2026-01-30 14:31 ` 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=f9f1f2cc-861f-47e5-b95a-cf48da430fcc@ursulin.net \
--to=tursulin@ursulin.net \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.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