Commit 903a8c3
fix(star6e): settle between RGN detach and destroy in debug_osd_destroy (#79)
The OSD overlay region is attached to the live VPE channel
(MI_RGN_AttachToChn on vpe_bind). debug_osd_destroy() called
MI_RGN_DetachFromChn immediately followed by MI_RGN_Destroy, freeing the
canvas while a VPE frame already mid-composite was still reading it. The
VPE compositor (MMU client 0x15, IsWrite=0) then read the freed canvas →
MMU read-fault storm → hardware watchdog reset on rapid same-mode respawn
(3-157 faults/respawn, ~33% wedge rate observed on Star6E imx335).
Add a usleep settle (default 50ms ≈ 3 frame intervals @ 60fps,
overridable via VENC_OSD_DESTROY_SETTLE_US) between detach and destroy so
the in-flight composite finishes before the canvas is freed.
Device-validated on 192.168.1.13 (imx335): 14 consecutive same-mode
/api/v1/restart respawns, 0 client-0x15 faults each, 0 wedges, RTP egress
confirmed flowing after the respawn batch.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 5c552df commit 903a8c3
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
19 | 31 | | |
20 | 32 | | |
21 | 33 | | |
| |||
327 | 339 | | |
328 | 340 | | |
329 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
330 | 346 | | |
331 | 347 | | |
332 | 348 | | |
| |||
0 commit comments