I've noticed that while playing the NFSIISE port on my desktop PC I get errors such as this one on dmesg: [ 544.874379] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun Previously, my system also hung while playing this same game on this PC, with a different error: [ 3641.648551] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:29:pipe A] flip_done timed out This is the game I'm playing: https://github.com/zaps166/NFSIISE I'm on Arch Linux (x86-64) and kernel 4.11.3-1-ARCH.
Created attachment 131623 [details] dmesg showing flip_done timed out errors
Created attachment 131624 [details] dmesg showing [i915]] *ERROR* CPU pipe A FIFO underrun
Created attachment 131625 [details] lspci
Created attachment 131626 [details] dmesg (more info about the flip_done timed out trace)
I get the error below after running other games too (Limbo, Distance, etc.) [ 9982.362655] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun
Created attachment 131689 [details] dmesg with drm-tip I compiled a kernel from drm-tip and I no longer get this issue: [ 9982.362655] [drm:intel_cpu_fifo_underrun_irq_handler [i915]] *ERROR* CPU pipe A FIFO underrun However, after trying a game and using my system for other things, my system began to stall and graphics would also stop updating, I noticed this in dmesg again: [ 888.582323] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:32:pipe A] flip_done timed out Please see the attachment for the full dmesg with the drm-tip kernel.
This is the drm-tip commit I'm currently testing with: commit d919ad0d077110d2d48a4b7503ddc02c3864667d
I'm glad the FIFO underruns are fixed. g45 had some changes to watermarks that probably fixed that. I'm less certain about pipe A vblank wait timeouts, could you boot with drm.debug=0x3f and reproduce the error? it's a bit spammy though.
(In reply to Maarten Lankhorst from comment #8) > I'm glad the FIFO underruns are fixed. g45 had some changes to watermarks > that probably fixed that. > > I'm less certain about pipe A vblank wait timeouts, could you boot with > drm.debug=0x3f and reproduce the error? it's a bit spammy though. I couldn't reproduce the flip_done timed out error with drm.debug=0x3f, do you have a testsuite I could test with?
Created attachment 131937 [details] pipe A vblank wait timed out with drm-tip The "pipe A vblank wait timed out" hang is still happening with drm-tip, that said, I'm unable to reproduce it when booting the kernel with drm.debug=0x3f.
Created attachment 131938 [details] dmesg with drm.debug=0x3f (drm-tip kernel) OK, I was finally able to reproduce the hang with drm.debug=0x3f. I was able to reproduce the problem by switching between the game and pavucontrol, I'm using i3 as my window manager. Please see the attachment.
[ 2113.973548] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:30:pipe A] flip_done timed out This is still happening with linux 4.12-rc6.
I'm running the games inside a systemd-nspawn container, not sure if this matters at all.
I also get the same problem when running the game on my main system (outside of systemd-nspawn).
Can you test with this? git://github.com/vsyrjala/linux.git gmch_irq_redo
(In reply to Ville Syrjala from comment #15) > Can you test with this? > git://github.com/vsyrjala/linux.git gmch_irq_redo It freezes with this branch too. Jun 22 16:26:42 myhost kernel: [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:32:pipe A] flip_done timed out
Created attachment 132149 [details] dmesg with drm.debug=0x3e (vsyrjala/linux.git gmch_irq_redo)
I tried some older kernels in order to see if this ever worked before, and to see if I could bisect the problem. The kernels I tried: 4.10.17 4.9.33 4.8.17 4.7.10 4.4.73 Those are all broken, which means the bug is also present in those too. 4.8.17 and 4.7.10 I couldn't even get to compile due to this error: kernel/built-in.o: In function `update_wall_time': (.text+0x7afd7): undefined reference to `____ilog2_NaN' make: *** [Makefile:969: vmlinux] Error 1 I'm sure 4.6 and 4.5 would have been the same. 4.4.73 is also broken, which means the game ran and but it hung, I didn't notice any 'flip_done timed out' errors in dmesg, the game window just got frozen/stuck and after I closed the game window (ctrl-c on the process), and restarted the game, the whole system froze and the display turned black. I had to hard reset at this point. So maybe it never worked and there's no way for me to bisect.
Created attachment 132155 [details] [review] [PATCH] drm/i915: Disable MSI for all pre-gen5 Let's try disabling MSI. It suspect it's just broken still on g4x. It is even documented to be broken on 965gm but we still try to use it for some reason.
Created attachment 132208 [details] [review] [PATCH] drm/i915: Drop the IER tricks from pre-gen5 irq handlers We might not need these IER tricks when we're not using MSI, so it would be nice if you can try this in addition to the previous patch.
(In reply to Ville Syrjala from comment #19) > Created attachment 132155 [details] [review] [review] > [PATCH] drm/i915: Disable MSI for all pre-gen5 > > Let's try disabling MSI. It suspect it's just broken still on g4x. It is > even documented to be broken on 965gm but we still try to use it for some > reason. By applying this patch to the gmch_irq_redo branch the problem was solved, thanks.
(In reply to Ville Syrjala from comment #20) > Created attachment 132208 [details] [review] [review] > [PATCH] drm/i915: Drop the IER tricks from pre-gen5 irq handlers > > We might not need these IER tricks when we're not using MSI, so it would be > nice if you can try this in addition to the previous patch. The combination of the gmch_irq_redo branch and your two latest patches also solves the problem.
drm-tip + 0001-drm-i915-Disable-MSI-for-all-pre-gen5.patch is also working perfectly. I've spent another 2 hours playing, I've basically spent all day playing games, and it didn't freeze anymore. Thank you.
commit e38c2da01f76cca82b59ca612529b81df82a7cc7 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Mon Jun 26 23:30:51 2017 +0300 drm/i915: Disable MSI for all pre-gen5
Closing verified
If there Any patches for this bug, they are not in the kernel 4.13.1 from kernel.org. Disabling MSI in the kernel config does not help. Dmesg at boot: [ 19.424100] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:30:pipe A] flip_done timed out [ 19.525043] vblank wait timed out on crtc 0 [ 19.525096] ------------[ cut here ]------------ [ 19.525113] WARNING: CPU: 1 PID: 106 at drivers/gpu/drm/drm_vblank.c:1090 drm_wait_one_vblank+0x187/0x190 [drm] Dmesg when playing OpenArena: [ 477.152249] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] *ERROR* [CRTC:35:pipe B] flip_done timed out [ 477.253242] vblank wait timed out on crtc 1 [ 477.253303] ------------[ cut here ]------------ [ 477.253325] WARNING: CPU: 0 PID: 363 at drivers/gpu/drm/drm_vblank.c:1090 drm_wait_one_vblank+0x187/0x190 [drm] My 10 year old dual core pentium64 intel laptop: [ 0.000000] DMI: FUJITSU SIEMENS ESPRIMO Mobile V5505 /ESPRIMO Mobi le V5505 , BIOS R01-A1D 01/21/2009
(In reply to fin4478 from comment #26) > If there Any patches for this bug, they are not in the kernel 4.13.1 from > kernel.org. Disabling MSI in the kernel config does not help. I don't think this is true, see: commit ce3f7163e4ce8fd583dcb36b6ee6b81fd1b419ae Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Mon Jun 26 23:30:51 2017 +0300 drm/i915: Disable MSI for all pre-gen5 $ git describe --contains ce3f7163e4ce8fd583dcb36b6ee6b81fd1b419ae v4.13-rc1~45^2~2^2~9 The patch is already included in 4.13 and up. > Dmesg at boot: > [ 19.424100] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] > *ERROR* [CRTC:30:pipe A] flip_done timed out > [ 19.525043] vblank wait timed out on crtc 0 > [ 19.525096] ------------[ cut here ]------------ > [ 19.525113] WARNING: CPU: 1 PID: 106 at drivers/gpu/drm/drm_vblank.c:1090 > drm_wait_one_vblank+0x187/0x190 [drm] > > Dmesg when playing OpenArena: > [ 477.152249] [drm:drm_atomic_helper_commit_cleanup_done [drm_kms_helper]] > *ERROR* [CRTC:35:pipe B] flip_done timed out > [ 477.253242] vblank wait timed out on crtc 1 > [ 477.253303] ------------[ cut here ]------------ > [ 477.253325] WARNING: CPU: 0 PID: 363 at drivers/gpu/drm/drm_vblank.c:1090 > drm_wait_one_vblank+0x187/0x190 [drm] > > My 10 year old dual core pentium64 intel laptop: > [ 0.000000] DMI: FUJITSU SIEMENS ESPRIMO Mobile V5505 /ESPRIMO > Mobi > le V5505 , BIOS R01-A1D 01/21/2009 I think it's possible that your "flip_done timed out" is being caused by a different issue, please open a separate bug report.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.