For the record, I think we all agree that this kind of panic is not FreeBSD's fault. Linux support for this kind of driver is more stable and advanced, but, even though I use FreeBSD both for production and personal use, its "expected" case is production server.
It's an update of the graphics stack to match modern Linux. Apparently amdgpu leaks memory, but radeonkms might work fine.
There's something inside wait6 and kevent that causes a thread to sleep whilst holding a non-sleepable lock. I hit it more than most I suspect because on my systems a lot of processes are blocked in kqread, whereas with the stock toolset one sees few processes using kevent.
I brought the subject up last year on freebsd-hackers, but nothing came of it.