https://bugs.freedesktop.org/show_bug.cgi?id=100712
--- Comment #7 from Julien Isorce julien.isorce@gmail.com --- I made 2 apitrace using Zach's test mentioned here https://bugs.freedesktop.org/show_bug.cgi?id=100465#c24 . This test is also good to reproduce this ring 0 stalled issue.
1: apitrace ideal for vram size 2048 (ex: HD7770) https://drive.google.com/file/d/0Bzat_iFKrgCWYzBlZFFLQjgyRU0/view?usp=sharin...
2: apitrace ideal for vram size 6144 (ex: W9000) https://drive.google.com/file/d/0Bzat_iFKrgCWczgzM2FzaVFTUXc/view?usp=sharin...
DISPLAY=:0 apitrace replay thrash.trace
Also I have attached the log (dmesg_W9000_with_custom_fence_debug.log) I get with my dev branch here https://github.com/CapOM/linux/commits/amd-staging-4.9_add_debug_fences where I added traces to debug ring N stalled issues. It prints the backtrace from where it waits for the fence and it also prints the backtrace from where it has emited that fence.
Also note that setting R600_DEBUG=nowc avoids this ring N stalled (so the endless fence is signaled).