[PATCH] drm/amdgpu: save the funcs of gfx software rings
Trigger.Huang at amd.com
Trigger.Huang at amd.com
Thu Aug 1 07:27:23 UTC 2024
From: Trigger Huang <Trigger.Huang at amd.com>
Currently the funcs variable of a gfx software ring is not set. So
if it is visited somewhere, it will lead to error logic being
executed. For example, if we want to call some callbacks in funcs of
a gfx software ring, like per ring reset, it will be failed due to
funcs is NULL.
Signed-off-by: Trigger Huang <Trigger.Huang at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
index d234b7ccfaaf..4dad03a07492 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
@@ -202,6 +202,7 @@ int amdgpu_ring_mux_add_sw_ring(struct amdgpu_ring_mux *mux, struct amdgpu_ring
e = &mux->ring_entry[mux->num_ring_entries];
ring->entry_index = mux->num_ring_entries;
+ ring->funcs = mux->real_ring->funcs;
e->ring = ring;
INIT_LIST_HEAD(&e->list);
--
2.34.1
More information about the amd-gfx
mailing list