am: raise when using more sdma engines (#15569)

This commit is contained in:
nimlgen
2026-04-01 21:33:42 +03:00
committed by GitHub
parent da12c2ea16
commit 93a85c7348
+2
View File
@@ -524,6 +524,8 @@ class AM_SDMA(AM_IP):
self.adev.regGRBM_SOFT_RESET.write(0x0)
def setup_ring(self, ring_addr:int, ring_size:int, rptr_addr:int, wptr_addr:int, idx:int) -> int:
if self.adev.ip_ver[am.SDMA0_HWIP] >= (5,0,0) and idx > 0: raise RuntimeError(f"am {self.adev.devfmt}: sdma queue {idx} is not available")
pipe, queue = idx // 4, idx % 4
reg, inst = ("regSDMA_GFX", pipe+queue*4) if self.adev.ip_ver[am.SDMA0_HWIP][:2] == (4,4) else (f"regSDMA{pipe}_QUEUE{queue}", 0)
doorbell = am.AMDGPU_NAVI10_DOORBELL_sDMA_ENGINE0 + (pipe+queue*4) * 0xA