From: Alex Deucher <alexander.deucher@amd.com>
To: <amd-gfx@lists.freedesktop.org>, <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 02/31] drm/amdgpu/gfx7: drop reset_kgq
Date: Wed, 4 Jun 2025 21:45:32 -0400 [thread overview]
Message-ID: <20250605014602.5915-3-alexander.deucher@amd.com> (raw)
In-Reply-To: <20250605014602.5915-1-alexander.deucher@amd.com>
It doesn't work reliably and we have soft recover and
full adapter reset so drop this.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 71 ---------------------------
1 file changed, 71 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
index da0534ff1271a..2aa323dab34e3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
@@ -4884,76 +4884,6 @@ static void gfx_v7_0_emit_mem_sync_compute(struct amdgpu_ring *ring)
amdgpu_ring_write(ring, 0x0000000A); /* poll interval */
}
-static void gfx_v7_0_wait_reg_mem(struct amdgpu_ring *ring, int eng_sel,
- int mem_space, int opt, uint32_t addr0,
- uint32_t addr1, uint32_t ref, uint32_t mask,
- uint32_t inv)
-{
- amdgpu_ring_write(ring, PACKET3(PACKET3_WAIT_REG_MEM, 5));
- amdgpu_ring_write(ring,
- /* memory (1) or register (0) */
- (WAIT_REG_MEM_MEM_SPACE(mem_space) |
- WAIT_REG_MEM_OPERATION(opt) | /* wait */
- WAIT_REG_MEM_FUNCTION(3) | /* equal */
- WAIT_REG_MEM_ENGINE(eng_sel)));
-
- if (mem_space)
- BUG_ON(addr0 & 0x3); /* Dword align */
- amdgpu_ring_write(ring, addr0);
- amdgpu_ring_write(ring, addr1);
- amdgpu_ring_write(ring, ref);
- amdgpu_ring_write(ring, mask);
- amdgpu_ring_write(ring, inv); /* poll interval */
-}
-
-static void gfx_v7_0_ring_emit_reg_wait(struct amdgpu_ring *ring, uint32_t reg,
- uint32_t val, uint32_t mask)
-{
- gfx_v7_0_wait_reg_mem(ring, 0, 0, 0, reg, 0, val, mask, 0x20);
-}
-
-static int gfx_v7_0_reset_kgq(struct amdgpu_ring *ring, unsigned int vmid)
-{
- struct amdgpu_device *adev = ring->adev;
- struct amdgpu_kiq *kiq = &adev->gfx.kiq[0];
- struct amdgpu_ring *kiq_ring = &kiq->ring;
- unsigned long flags;
- u32 tmp;
- int r;
-
- if (amdgpu_sriov_vf(adev))
- return -EINVAL;
-
- if (!kiq->pmf || !kiq->pmf->kiq_unmap_queues)
- return -EINVAL;
-
- spin_lock_irqsave(&kiq->ring_lock, flags);
-
- if (amdgpu_ring_alloc(kiq_ring, 5)) {
- spin_unlock_irqrestore(&kiq->ring_lock, flags);
- return -ENOMEM;
- }
-
- tmp = REG_SET_FIELD(0, CP_VMID_RESET, RESET_REQUEST, 1 << vmid);
- gfx_v7_0_ring_emit_wreg(kiq_ring, mmCP_VMID_RESET, tmp);
- amdgpu_ring_commit(kiq_ring);
-
- spin_unlock_irqrestore(&kiq->ring_lock, flags);
-
- r = amdgpu_ring_test_ring(kiq_ring);
- if (r)
- return r;
-
- if (amdgpu_ring_alloc(ring, 7 + 12 + 5))
- return -ENOMEM;
- gfx_v7_0_ring_emit_fence_gfx(ring, ring->fence_drv.gpu_addr,
- ring->fence_drv.sync_seq, AMDGPU_FENCE_FLAG_EXEC);
- gfx_v7_0_ring_emit_reg_wait(ring, mmCP_VMID_RESET, 0, 0xffff);
- gfx_v7_0_ring_emit_wreg(ring, mmCP_VMID_RESET, 0);
-
- return amdgpu_ring_test_ring(ring);
-}
-
static const struct amd_ip_funcs gfx_v7_0_ip_funcs = {
.name = "gfx_v7_0",
.early_init = gfx_v7_0_early_init,
@@ -5003,7 +4933,6 @@ static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_gfx = {
.emit_wreg = gfx_v7_0_ring_emit_wreg,
.soft_recovery = gfx_v7_0_ring_soft_recovery,
.emit_mem_sync = gfx_v7_0_emit_mem_sync,
- .reset = gfx_v7_0_reset_kgq,
};
static const struct amdgpu_ring_funcs gfx_v7_0_ring_funcs_compute = {
--
2.49.0
next prev parent reply other threads:[~2025-06-05 1:46 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 1:45 [PATCH V6 00/31] Reset improvements for GC10+ Alex Deucher
2025-06-05 1:45 ` [PATCH 01/31] drm/amdgpu: enable legacy enforce isolation by default Alex Deucher
2025-06-05 1:45 ` Alex Deucher [this message]
2025-06-05 1:45 ` [PATCH 03/31] drm/amdgpu/gfx8: drop reset_kgq Alex Deucher
2025-06-05 1:45 ` [PATCH 04/31] drm/amdgpu/gfx9: " Alex Deucher
2025-06-05 1:45 ` [PATCH 05/31] drm/amdgpu: switch job hw_fence to amdgpu_fence Alex Deucher
2025-06-05 1:45 ` [PATCH 06/31] drm/amdgpu: rework queue reset scheduler interaction Alex Deucher
2025-06-05 1:45 ` [PATCH 07/31] drm/amdgpu: move force completion into ring resets Alex Deucher
2025-06-05 1:45 ` [PATCH 08/31] drm/amdgpu: track ring state associated with a job Alex Deucher
2025-06-05 12:11 ` Christian König
2025-06-05 13:21 ` Alex Deucher
2025-06-05 13:50 ` Christian König
2025-06-05 1:45 ` [PATCH 09/31] drm/amdgpu: optimize amdgpu_ring_reemit_unprocessed_jobs() Alex Deucher
2025-06-05 1:45 ` [PATCH 10/31] drm/amdgpu/gfx10: re-emit unprocessed state on ring reset Alex Deucher
2025-06-05 1:45 ` [PATCH 11/31] drm/amdgpu/gfx11: " Alex Deucher
2025-06-05 1:45 ` [PATCH 12/31] drm/amdgpu/gfx12: " Alex Deucher
2025-06-05 1:45 ` [PATCH 13/31] drm/amdgpu/gfx9: re-emit unprocessed state on kcq reset Alex Deucher
2025-06-05 1:45 ` [PATCH 14/31] drm/amdgpu/gfx9.4.3: " Alex Deucher
2025-06-05 1:45 ` [PATCH 15/31] drm/amdgpu/sdma4.4.2: re-emit unprocessed state on ring reset Alex Deucher
2025-06-05 1:45 ` [PATCH 16/31] drm/amdgpu/sdma5: " Alex Deucher
2025-06-05 1:45 ` [PATCH 17/31] drm/amdgpu/sdma5.2: " Alex Deucher
2025-06-05 1:45 ` [PATCH 18/31] drm/amdgpu/sdma6: " Alex Deucher
2025-06-05 1:45 ` [PATCH 19/31] drm/amdgpu/sdma7: " Alex Deucher
2025-06-05 1:45 ` [PATCH 20/31] drm/amdgpu/jpeg2: " Alex Deucher
2025-06-05 1:45 ` [PATCH 21/31] drm/amdgpu/jpeg2.5: " Alex Deucher
2025-06-05 1:45 ` [PATCH 22/31] drm/amdgpu/jpeg3: " Alex Deucher
2025-06-05 1:45 ` [PATCH 23/31] drm/amdgpu/jpeg4: " Alex Deucher
2025-06-05 1:45 ` [PATCH 24/31] drm/amdgpu/jpeg4.0.3: " Alex Deucher
2025-06-05 1:45 ` [PATCH 25/31] drm/amdgpu/jpeg5.0.0: add queue reset Alex Deucher
2025-06-05 1:45 ` [PATCH 26/31] drm/amdgpu/jpeg5: re-emit unprocessed state on ring reset Alex Deucher
2025-06-05 1:45 ` [PATCH 27/31] drm/amdgpu/jpeg5.0.1: " Alex Deucher
2025-06-05 1:45 ` [PATCH 28/31] drm/amdgpu/vcn4: " Alex Deucher
2025-06-05 1:45 ` [PATCH 29/31] drm/amdgpu/vcn4.0.3: " Alex Deucher
2025-06-05 1:46 ` [PATCH 30/31] drm/amdgpu/vcn4.0.5: " Alex Deucher
2025-06-05 1:46 ` [PATCH 31/31] drm/amdgpu/vcn5: " 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=20250605014602.5915-3-alexander.deucher@amd.com \
--to=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.