[PATCH] drm/amdgpu: do not call mux_start_ib on high priority rings

jiadong.zhu at amd.com jiadong.zhu at amd.com
Fri Jul 26 00:06:29 UTC 2024


From: Jiadong Zhu <Jiadong.Zhu at amd.com>

The function amdgpu_ring_mux_start_ib shall not be called on
high priority rings even if mcbp is disabled. Otherwise there
maybe leak from the chunks of the ring mux.

Signed-off-by: Jiadong Zhu <Jiadong.Zhu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
index d234b7ccfaaf..94255c18509e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
@@ -395,8 +395,8 @@ void amdgpu_sw_ring_ib_begin(struct amdgpu_ring *ring)
 	struct amdgpu_ring_mux *mux = &adev->gfx.muxer;
 
 	WARN_ON(!ring->is_sw_ring);
-	if (adev->gfx.mcbp && ring->hw_prio > AMDGPU_RING_PRIO_DEFAULT) {
-		if (amdgpu_mcbp_scan(mux) > 0)
+	if (ring->hw_prio > AMDGPU_RING_PRIO_DEFAULT) {
+		if (adev->gfx.mcbp && amdgpu_mcbp_scan(mux) > 0)
 			amdgpu_mcbp_trigger_preempt(mux);
 		return;
 	}
-- 
2.25.1



More information about the amd-gfx mailing list