Bug 106030

Summary: [CI] igt@kms_flip@2x-*-flip-* - dmesg-fail - Failed assertion: do_page_flip(o, o->fb_ids[1], 1) == 0 (with flip_done timed out in dmesg)
Product: DRI Reporter: Martin Peres <martin.peres>
Component: DRM/IntelAssignee: Intel GFX Bugs mailing list <intel-gfx-bugs>
Status: CLOSED FIXED QA Contact: Intel GFX Bugs mailing list <intel-gfx-bugs>
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: XOrg git   
Hardware: Other   
OS: All   
Whiteboard: ReadyForDev
i915 platform: GM45, I965GM i915 features: display/Other

Description Martin Peres 2018-04-13 11:52:46 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_8/fi-ctg-p8600/igt@kms_flip@2x-single-buffer-flip-vs-dpms-off-vs-modeset.html

(kms_flip:1411) CRITICAL: Test assertion failure function run_test_on_crtc_set, file ../tests/kms_flip.c:1307:
(kms_flip:1411) CRITICAL: Failed assertion: do_page_flip(o, o->fb_ids[1], 1) == 0
(kms_flip:1411) CRITICAL: Last errno: 16, Device or resource busy
(kms_flip:1411) CRITICAL: error: -16 != 0
Subtest 2x-plain-flip-interruptible failed.

[ 313.312293] [drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:51:pipe B] flip_done timed out
[ 324.064270] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:51:pipe B] flip_done timed out
[ 334.304257] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:59:VGA-1] flip_done timed out
[ 344.544253] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:40:primary B] flip_done timed out
Comment 1 Martin Peres 2018-04-24 14:05:31 UTC
Also seen on ELK: https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_26/fi-elk-e7500/igt@kms_flip@dpms-off-confusion-interruptible.html

(kms_flip:1863) CRITICAL: Test assertion failure function run_test_on_crtc_set, file ../tests/kms_flip.c:1307:
(kms_flip:1863) CRITICAL: Failed assertion: do_page_flip(o, o->fb_ids[1], 1) == 0
(kms_flip:1863) CRITICAL: Last errno: 16, Device or resource busy
(kms_flip:1863) CRITICAL: error: -16 != 0
Subtest dpms-off-confusion-interruptible failed.


[  415.200062] [drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:51:pipe B] flip_done timed out
[  425.440130] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:51:pipe B] flip_done timed out
[  435.680130] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:52:VGA-1] flip_done timed out
[  445.920132] [drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:51:pipe B] flip_done timed out
[  456.672133] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:51:pipe B] flip_done timed out
[  466.912135] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:52:VGA-1] flip_done timed out
[  477.152134] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:40:primary B] flip_done timed out
[  477.256121] ------------[ cut here ]------------
[  477.256125] vblank wait timed out on crtc 1
[  477.256152] WARNING: CPU: 1 PID: 1863 at drivers/gpu/drm/drm_vblank.c:1084 drm_wait_one_vblank+0x175/0x180
[  477.256155] Modules linked in: vgem i915 coretemp snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core lpc_ich snd_pcm e1000e mei_me prime_numbers mei
[  477.256207] CPU: 1 PID: 1863 Comm: kms_flip Tainted: G     U  W         4.17.0-rc1-g75c098251437-drmtip_26+ #1
[  477.256210] Hardware name: Hewlett-Packard HP Compaq 8000 Elite CMT PC/3647h, BIOS 786G7 v01.02 10/22/2009
[  477.256215] RIP: 0010:drm_wait_one_vblank+0x175/0x180
[  477.256219] RSP: 0018:ffffa86c40043a00 EFLAGS: 00010286
[  477.256225] RAX: 0000000000000000 RBX: ffff888889e40000 RCX: 0000000000000001
[  477.256229] RDX: 0000000080000001 RSI: ffffffff8a0f9d09 RDI: 00000000ffffffff
[  477.256232] RBP: 0000000000000001 R08: 000000005b06a589 R09: 0000000000000000
[  477.256236] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  477.256239] R13: 0000000000000ea6 R14: ffff8888590da758 R15: ffff888858921bf8
[  477.256244] FS:  00007f8cf90e4980(0000) GS:ffff88889bc80000(0000) knlGS:0000000000000000
[  477.256248] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  477.256251] CR2: 00007f230da18068 CR3: 00000001035ec000 CR4: 00000000000406e0
[  477.256255] Call Trace:
[  477.256265]  ? wait_woken+0x90/0x90
[  477.256352]  intel_pre_plane_update+0x17c/0x220 [i915]
[  477.256438]  intel_atomic_commit_tail+0xce/0xd20 [i915]
[  477.256537]  intel_atomic_commit+0x240/0x320 [i915]
[  477.256551]  restore_fbdev_mode_atomic+0x1ad/0x220
[  477.256586]  drm_fb_helper_restore_fbdev_mode_unlocked+0x42/0x90
[  477.256595]  drm_fb_helper_set_par+0x24/0x50
[  477.256671]  intel_fbdev_set_par+0x11/0x60 [i915]
[  477.256680]  fbcon_init+0x4db/0x680
[  477.256699]  visual_init+0xd0/0x130
[  477.256708]  do_bind_con_driver+0x1ef/0x3f0
[  477.256728]  do_unbind_con_driver+0x1a8/0x230
[  477.256750]  store_bind+0xad/0x1a0
[  477.256764]  kernfs_fop_write+0x104/0x190
[  477.256777]  __vfs_write+0x31/0x160
[  477.256788]  ? rcu_read_lock_sched_held+0x6f/0x80
[  477.256793]  ? rcu_sync_lockdep_assert+0x29/0x50
[  477.256799]  ? __sb_start_write+0x152/0x1f0
[  477.256803]  ? __sb_start_write+0x168/0x1f0
[  477.256815]  vfs_write+0xbd/0x1a0
[  477.256826]  ksys_write+0x50/0xc0
[  477.256840]  do_syscall_64+0x55/0x190
[  477.256849]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  477.256853] RIP: 0033:0x7f8cf8121281
[  477.256857] RSP: 002b:00007ffcfc6a7748 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
[  477.256864] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f8cf8121281
[  477.256867] RDX: 0000000000000002 RSI: 00007f8cf8cde774 RDI: 0000000000000005
[  477.256871] RBP: 00007ffcfc6a8790 R08: 00005595b48132b3 R09: 0000000000000006
[  477.256874] R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8cf810a718
[  477.256878] R13: 0000000000000003 R14: 00007f8cf810f628 R15: 00007f8cf810bd80
[  477.256907] Code: 2f ff ff ff e8 0d 70 a7 ff 48 89 e6 4c 89 f7 e8 b2 82 ac ff 45 85 e4 0f 85 0c ff ff ff 89 ee 48 c7 c7 b8 fa 0c 8a e8 0b 6d a7 ff <0f> 0b e9 f7 fe ff ff 0f 1f 40 00 8b b7 f8 00 00 00 48 8b 3f e9 
[  477.257073] irq event stamp: 501548
[  477.257073] hardirqs last  enabled at (501547): [<ffffffff890fc5d7>] vprintk_emit+0x4b7/0x4d0
[  477.257073] hardirqs last disabled at (501548): [<ffffffff89a0111c>] error_entry+0x7c/0x100
[  477.257073] softirqs last  enabled at (501182): [<ffffffff89c0032b>] __do_softirq+0x32b/0x4e1
[  477.257073] softirqs last disabled at (501159): [<ffffffff8908f594>] irq_exit+0xa4/0xb0
[  477.257073] WARNING: CPU: 1 PID: 1863 at drivers/gpu/drm/drm_vblank.c:1084 drm_wait_one_vblank+0x175/0x180
[  477.257073] ---[ end trace b9658dcbdc060fd4 ]---
Comment 2 Martin Peres 2018-05-28 16:53:55 UTC
https://intel-gfx-ci.01.org/tree/drm-tip/drmtip_43/fi-bwr-2160/igt@kms_flip@2x-flip-vs-rmfb-interruptible.html

(kms_flip:1231) CRITICAL: Test assertion failure function run_test_on_crtc_set, file ../tests/kms_flip.c:1307:
(kms_flip:1231) CRITICAL: Failed assertion: do_page_flip(o, o->fb_ids[1], 1) == 0
(kms_flip:1231) CRITICAL: Last errno: 16, Device or resource busy
(kms_flip:1231) CRITICAL: error: -16 != 0
Subtest 2x-flip-vs-rmfb-interruptible failed.

[  125.455167] vblank wait timed out on crtc 1
[  125.455207] WARNING: CPU: 0 PID: 1231 at drivers/gpu/drm/drm_vblank.c:1084 drm_wait_one_vblank+0x172/0x180
[  125.455212] Modules linked in: i915 coretemp snd_hda_codec_analog snd_hda_codec_generic snd_hda_intel snd_hda_codec lpc_ich tg3 snd_hwdep snd_hda_core snd_pcm prime_numbers
[  125.455299] CPU: 0 PID: 1231 Comm: kms_flip Tainted: G     U  W         4.17.0-rc5-geecb2c1e793e-drmtip_43+ #1
[  125.455304] Hardware name: Dell Inc.                 OptiPlex 745                 /0GW726, BIOS 2.3.1  05/21/2007
[  125.455309] RIP: 0010:drm_wait_one_vblank+0x172/0x180
[  125.455314] RSP: 0018:ffffa946c05379d8 EFLAGS: 00010282
[  125.455322] RAX: 0000000000000000 RBX: ffffa12eab170000 RCX: 0000000000000001
[  125.455326] RDX: 0000000080000001 RSI: ffffffffba086656 RDI: 00000000ffffffff
[  125.455330] RBP: 0000000000000001 R08: 00000000d314e502 R09: 0000000000000000
[  125.455333] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  125.455338] R13: 0000000000000c39 R14: ffffa12ea921df48 R15: ffffa12ea92c67e8
[  125.455342] FS:  00007fc77e881980(0000) GS:ffffa12ebf200000(0000) knlGS:0000000000000000
[  125.455347] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  125.455351] CR2: 00007fe7c02845b0 CR3: 000000002d794000 CR4: 00000000000006f0
[  125.455355] Call Trace:
[  125.455365]  ? wait_woken+0xa0/0xa0
[  125.455479]  intel_enable_sdvo+0x6a/0x100 [i915]
[  125.455553]  intel_encoders_enable.isra.66+0x50/0x80 [i915]
[  125.455628]  intel_update_crtc+0x45/0x80 [i915]
[  125.455700]  intel_update_crtcs+0x42/0x60 [i915]
[  125.455770]  intel_atomic_commit_tail+0x1c9/0xcf0 [i915]
[  125.455854]  intel_atomic_commit+0x240/0x320 [i915]
[  125.455865]  drm_atomic_helper_set_config+0x7b/0x90
[  125.455875]  __drm_mode_set_config_internal+0x62/0x120
[  125.455882]  drm_mode_setcrtc+0x42a/0x600
[  125.455916]  ? drm_mode_getcrtc+0x180/0x180
[  125.455923]  drm_ioctl_kernel+0x7c/0xf0
[  125.455934]  drm_ioctl+0x2e6/0x3a0
[  125.455944]  ? drm_mode_getcrtc+0x180/0x180
[  125.455961]  ? lock_acquire+0xa6/0x210
[  125.455973]  do_vfs_ioctl+0xa0/0x6c0
[  125.455990]  ksys_ioctl+0x35/0x60
[  125.456000]  __x64_sys_ioctl+0x11/0x20
[  125.456005]  do_syscall_64+0x55/0x190
[  125.456014]  entry_SYSCALL_64_after_hwframe+0x49/0xbe
[  125.456018] RIP: 0033:0x7fc77d5d45d7
[  125.456022] RSP: 002b:00007ffd4e7a6f38 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  125.456030] RAX: ffffffffffffffda RBX: 00007ffd4e7a6f70 RCX: 00007fc77d5d45d7
[  125.456034] RDX: 00007ffd4e7a6f70 RSI: 00000000c06864a2 RDI: 0000000000000003
[  125.456038] RBP: 00007ffd4e7a6f70 R08: 0000000000000000 R09: 00007ffd4e7a730c
[  125.456043] R10: 00007ffd4e7a71f8 R11: 0000000000000246 R12: 00000000c06864a2
[  125.456046] R13: 0000000000000003 R14: 00007fc77e4806bb R15: 00007fc77e481c14
[  125.456067] Code: 32 ff ff ff e8 00 61 a7 ff 48 89 e6 4c 89 f7 e8 e5 74 ac ff 45 85 e4 0f 85 0f ff ff ff 89 ee 48 c7 c7 90 13 0d ba e8 fe 5d a7 ff <0f> 0b e9 fa fe ff ff 0f 1f 80 00 00 00 00 8b b7 f8 00 00 00 48 
[  125.456287] irq event stamp: 123802
[  125.456294] hardirqs last  enabled at (123801): [<ffffffffb90fc126>] console_unlock+0x426/0x640
[  125.456300] hardirqs last disabled at (123802): [<ffffffffb9a0111c>] error_entry+0x7c/0x100
[  125.456305] softirqs last  enabled at (123762): [<ffffffffb9c0032b>] __do_softirq+0x32b/0x4e1
[  125.456311] softirqs last disabled at (123755): [<ffffffffb908f714>] irq_exit+0xa4/0xb0
[  125.456317] WARNING: CPU: 0 PID: 1231 at drivers/gpu/drm/drm_vblank.c:1084 drm_wait_one_vblank+0x172/0x180
[  125.456321] ---[ end trace c854a3c0d88f65a1 ]---
[  135.647097] [drm:drm_atomic_helper_wait_for_flip_done] *ERROR* [CRTC:41:pipe B] flip_done timed out
[  145.887092] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:41:pipe B] flip_done timed out
[  156.127102] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:45:DVI-D-1] flip_done timed out
[  166.367087] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:35:plane B] flip_done timed out
Comment 3 Martin Peres 2018-06-04 08:33:29 UTC
Also seen on HSW, but without the flip_done timeout error in the logs:

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4271/shard-hsw3/igt@kms_flip@2x-busy-flip-interruptible.html

(kms_flip:1548) CRITICAL: Test assertion failure function run_test_step, file ../tests/kms_flip.c:780:
(kms_flip:1548) CRITICAL: Failed assertion: (do_page_flip(o, new_fb_id, !(o->flags & (1 << 16)))) == 0
(kms_flip:1548) CRITICAL: Last errno: 16, Device or resource busy
Subtest 2x-busy-flip-interruptible failed.
Comment 4 Martin Peres 2018-06-04 08:41:19 UTC
(In reply to Martin Peres from comment #3)
> Also seen on HSW, but without the flip_done timeout error in the logs:
> 
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_4271/shard-hsw3/
> igt@kms_flip@2x-busy-flip-interruptible.html
> 
> (kms_flip:1548) CRITICAL: Test assertion failure function run_test_step,
> file ../tests/kms_flip.c:780:
> (kms_flip:1548) CRITICAL: Failed assertion: (do_page_flip(o, new_fb_id,
> !(o->flags & (1 << 16)))) == 0
> (kms_flip:1548) CRITICAL: Last errno: 16, Device or resource busy
> Subtest 2x-busy-flip-interruptible failed.

Never mind, I created a separate bug for it: https://bugs.freedesktop.org/show_bug.cgi?id=106809
Comment 5 Ville Syrjala 2018-06-14 18:23:54 UTC
commit 132c27c97cb958f637dc05adc35a61b47779bcd8
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Jun 11 23:02:55 2018 +0300

    drm/i915: Fix PIPESTAT irq ack on i965/g4x

Fingers crossed...
Comment 6 Martin Peres 2018-06-19 12:53:47 UTC
(In reply to Ville Syrjala from comment #5)
> commit 132c27c97cb958f637dc05adc35a61b47779bcd8
> Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Date:   Mon Jun 11 23:02:55 2018 +0300
> 
>     drm/i915: Fix PIPESTAT irq ack on i965/g4x
> 
> Fingers crossed...

Seems like it is really helped, thanks!
Comment 7 Jani Saarinen 2018-06-19 14:25:57 UTC
Closing, thanks.

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.