From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-kernel] fix #6766: cherry-pick amdgpu crash fix
Date: Fri, 19 Sep 2025 13:48:31 +0200 [thread overview]
Message-ID: <20250919114903.306014-1-f.gruenbichler@proxmox.com> (raw)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
Confirmed to fix the issue by the reporter on BZ
...reset-compute-ring-wptr-on-the-GPU-o.patch | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 patches/kernel/0021-drm-amdgpu-gfx8-reset-compute-ring-wptr-on-the-GPU-o.patch
diff --git a/patches/kernel/0021-drm-amdgpu-gfx8-reset-compute-ring-wptr-on-the-GPU-o.patch b/patches/kernel/0021-drm-amdgpu-gfx8-reset-compute-ring-wptr-on-the-GPU-o.patch
new file mode 100644
index 0000000..179e66e
--- /dev/null
+++ b/patches/kernel/0021-drm-amdgpu-gfx8-reset-compute-ring-wptr-on-the-GPU-o.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Eeli Haapalainen <eeli.haapalainen@protonmail.com>
+Date: Mon, 14 Jul 2025 08:13:09 +0300
+Subject: [PATCH] drm/amdgpu/gfx8: reset compute ring wptr on the GPU on resume
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+commit 83261934015c434fabb980a3e613b01d9976e877 upstream.
+
+Commit 42cdf6f687da ("drm/amdgpu/gfx8: always restore kcq MQDs") made the
+ring pointer always to be reset on resume from suspend. This caused compute
+rings to fail since the reset was done without also resetting it for the
+firmware. Reset wptr on the GPU to avoid a disconnect between the driver
+and firmware wptr.
+
+Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3911
+Fixes: 42cdf6f687da ("drm/amdgpu/gfx8: always restore kcq MQDs")
+Signed-off-by: Eeli Haapalainen <eeli.haapalainen@protonmail.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+(cherry picked from commit 2becafc319db3d96205320f31cc0de4ee5a93747)
+Cc: stable@vger.kernel.org
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+(cherry picked from commit 07ed3ff608bd7840d99bae26598ded0c49f319f4)
+Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
+---
+ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+index 6a025438f9d041abcc3eb6bbc9eb98a79cd57ab9..e0d1b623e75e673f07b9ef7ab7fbf4f2fd0fa33a 100644
+--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+@@ -4666,6 +4666,7 @@ static int gfx_v8_0_kcq_init_queue(struct amdgpu_ring *ring)
+ memcpy(mqd, adev->gfx.mec.mqd_backup[mqd_idx], sizeof(struct vi_mqd_allocation));
+ /* reset ring buffer */
+ ring->wptr = 0;
++ atomic64_set((atomic64_t *)ring->wptr_cpu_addr, 0);
+ amdgpu_ring_clear_ring(ring);
+ }
+ return 0;
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
reply other threads:[~2025-09-19 11:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250919114903.306014-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.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