On Mon, Nov 30, 2026 at 19:37 UTC, Lizhi Hou wrote:
We tried to resolve the similar issue on Phoenix recently. The fixes
were merged to drm-misc-next (Not in upstream linux yet).
Could you get the latest drm-misc-next and see if it works?
Hi Lizhi,
Thanks for the pointer to drm-misc-next.
TL;DR: I'm not the original reporter, but I have a Hawk Point (npu1)
laptop and ran the drm-misc-next amdxdna driver on it.
- 3 out of 3 forced TDRs recovered. The command came back as
timed out, the NPU kept working afterwards, and there were no
SMU or resume errors.
- The TDR now cuts off a long command after about 1x
tdr_timeout_ms (2 s). The DKMS 2.25.0 driver allowed about 2x.
That matches the new "no progress" check in aie2_tdr_detect. It
may matter to anyone running long single commands.
- What this does NOT show: my trigger is a busy core, not
Andrei's DMA that never completes. I never reached the dead
state, so the dev_lock unbind deadlock is untested. It is also
one machine with different firmware (npu.sbin 1.5.5.391, not
npu_7.sbin), on an out-of-tree build for 6.17.
Details, steps and limits are below.
Machine:
HP Victus 16, AMD Ryzen 7 8845HS (Hawk Point), NPU 1022:1502 (npu1)
at 0000:06:00.1
Ubuntu 25.10, kernel 6.17.0-6-generic, Secure Boot on
Firmware: amdnpu/1502_00/npu.sbin -> npu.sbin.1.5.5.391
(npu_7.sbin is not installed here, so not the reporter's firmware)
Userspace: XRT 2.25.0
Driver under test:
drivers/accel/amdxdna from drm-misc-next at 664e5c7e766d, built as
an out-of-tree module against 6.17.0-6 headers. To build on 6.17 I
reverted 41b545859 ("Use drm_gpusvm_pages for user mapping
tracking") and added small compat shims (kzalloc_obj family,
dma_fence_init flags, dma_buf map_sgt_unlocked names,
zap_special_vma_range, hmm_range_fault_unlocked_timeout via
hmm_range_fault under mmap_read_lock, amd_pmf_get_npu_data stubbed to
-EOPNOTSUPP). srcversion 76586BF06094D47B25CFE19. As far as I can
tell from the source it includes a8aa0954a2f7, 42d1787a575d,
fac7a5f16230 and 8e2afcd2b579.
Module parameter tdr_timeout_ms left at the default 2000.
Trigger:
Not the reporter's stalled DMA. Mine is one long-running command: the
mlir-aie passthrough_pykernel example with its copy loop repeated
REPEAT times (about 20 us per iteration, so the run time scales with
REPEAT). REPEAT=1000000 runs far past any TDR period.
Steps:
1. modprobe -r amdxdna (distro DKMS 2.25.0), insmod the test module.
2. REPEAT=1 and REPEAT=20000: both pass.
3. REPEAT=1000000: forced TDR.
4. REPEAT=1 and REPEAT=20000 again as a recovery check.
5. Steps 3-4 three times in total.
6. Cutoff: REPEAT=50000, 100000, 150000.
7. rmmod the test module, modprobe the DKMS 2.25.0 module back.
Results:
- Module loaded and probed cleanly:
[drm] Load firmware amdnpu/1502_00/npu.sbin
[drm] Initialized amdxdna_accel_driver 1.0.0 for 0000:06:00.1
on minor 0
- Each of the 3 forced TDRs: the command returns
ERT_CMD_STATE_TIMEOUT and the kernel logs exactly one
amdxdna 0000:06:00.1: [drm] *ERROR* aie2_tdr_detect: TDR timeout
detected
- After each TDR both recovery runs passed. 3 of 3 recovered.
- No "smu cmd ... failed" and no "Resume failed" lines in the boot
log.
- Cutoff: REPEAT=50000 passes, 100000 and 150000 time out. Those
REPEAT values take about 1.3 s, 2.4 s and 3.4 s on this machine
(wall time measured earlier with the DKMS driver). So one command
now gets about 1 x tdr_timeout_ms. For comparison, xdna-driver
DKMS 2.25.0 on the same machine let REPEAT=190000 (about 4.2 s)
pass and timed out at about 4 s, i.e. about 2 x tdr_timeout_ms.
That change matches the new "no progress for tdr_timeout_ms"
check in aie2_tdr_detect; I did not time the cutoff on the new
module more finely than that.
- rmmod of the test module after the runs (device healthy, NPU
recovered) was clean, and the DKMS module loaded and passed again.
Limits:
- One machine, one firmware (1.5.5.391 as npu.sbin), not npu_7.sbin.
- The trigger is a busy core, not a DMA that never completes. On
this machine DKMS 2.25.0 also recovers from this trigger, so this
result alone does not show that the reporter's case is fixed. I
have not written a stalled-DMA reproducer.
- Out-of-tree build on 6.17 with 41b545859 reverted, not a full
drm-misc-next kernel. Behaviour changes in the DRM scheduler,
runtime PM or IOMMU between 6.17 and 7.4 that keep the same
function signatures are not covered.
- I did not reach the dead state, so I did not exercise the
remove-path deadlock on dev_lock; the clean rmmod above was from a
healthy device only.
I can rerun with a different trigger or debug options if that helps.
Thanks to you and Min for turning the fixes around so quickly, and to
Andrei for such a careful report; it made this easy to chase.
Scott Boudreaux