Huge amount of WARNs printed with overlay [Xorg]
With recent 5.5 kernel my dmesg log is being filled with lots of these messages.
According to @ickle there is "missing a flush after the invalidate in the overlay code. (or something along those lines). Trivial first step is to make those a WARN_ONCE so the spam is not so overwhelming."
[22564.986269] ------------[ cut here ]------------
[22564.986275] WARN_ON(!(atomic_read(&old->bits) & frontbuffer_bits))
[22564.986445] WARNING: CPU: 0 PID: 1961 at drivers/gpu/drm/i915/display/intel_frontbuffer.c:305 intel_frontbuffer_track+0x53/0x80 [i915]
[22564.986450] Modules linked in: ccm iwl3945 iwlegacy mac80211 btusb btrtl btbcm btintel bluetooth coretemp kvm_intel ecdh_generic xt_CHECKSUM ecc xt_MASQUERADE kvm xt_conntrack ipt_REJECT nf_reject_ipv4 nd_pmem dax_pmem ip6table_mangle ip6table_nat nd_btt dax_pmem_core iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c snd_hda_codec_analog snd_hda_codec_generic ebtable_filter ebtables ip6table_filter iTCO_wdt ip6_tables iptable_filter iTCO_vendor_support tun bridge stp llc snd_hda_intel cfg80211 snd_intel_dspcfg snd_hda_codec nd_e820 irqbypass libnvdimm joydev snd_hda_core wmi_bmof i2c_i801 snd_hwdep snd_seq e1000e r592 snd_seq_device snd_pcm memstick lpc_ich libarc4 snd_timer thinkpad_acpi ledtrig_audio snd soundcore rfkill acpi_cpufreq binfmt_misc nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables i915 i2c_algo_bit drm_kms_helper sdhci_pci cqhci pcspkr serio_raw sdhci mmc_core ata_generic yenta_socket pata_acpi drm wmi video
[22564.986527] CPU: 0 PID: 1961 Comm: Xorg Tainted: G W 5.5.0-0.rc7.git1.2.fc31.x86_64 #1
[22564.986530] Hardware name: LENOVO 6464CTO/6464CTO, BIOS 7LETC9WW (2.29 ) 03/18/2011
[22564.986606] RIP: 0010:intel_frontbuffer_track+0x53/0x80 [i915]
[22564.986611] Code: 0b 8b 43 04 85 c2 75 2a f0 09 53 04 48 83 c4 08 5b 5d c3 48 c7 c6 a8 87 48 c0 48 c7 c7 33 2b 4a c0 89 54 24 04 e8 9f f3 d0 de <0f> 0b 8b 54 24 04 eb c2 48 c7 c6 18 88 48 c0 48 c7 c7 33 2b 4a c0
[22564.986615] RSP: 0018:ffffba19c093fc88 EFLAGS: 00010282
[22564.986620] RAX: 0000000000000000 RBX: ffff8db89272e900 RCX: 0000000000000000
[22564.986623] RDX: 0000000000000006 RSI: ffffffffa1152476 RDI: 0000000000000246
[22564.986627] RBP: ffff8db89272e9c0 R08: 00001485d1fdc73a R09: 0000000000000036
[22564.986630] R10: ffffffffa1152820 R11: 00000000a115243f R12: ffff8db938e65340
[22564.986633] R13: 0000000000000080 R14: ffff8db89272e900 R15: 0000000000000000
[22564.986638] FS: 00007f5501ae3f00(0000) GS:ffff8db9b7c00000(0000) knlGS:0000000000000000
[22564.986642] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[22564.986645] CR2: 00007f3c6448a010 CR3: 000000012f8b6000 CR4: 00000000000006f0
[22564.986649] Call Trace:
[22564.986729] intel_overlay_flip_prepare+0x7d/0x1a0 [i915]
[22564.986805] intel_overlay_put_image_ioctl+0xa48/0xee0 [i915]
[22564.986805] ? intel_overlay_switch_off+0x140/0x140 [i915]
[22564.986805] drm_ioctl_kernel+0xaa/0xf0 [drm]
[22564.986805] drm_ioctl+0x208/0x390 [drm]
[22564.986805] ? intel_overlay_switch_off+0x140/0x140 [i915]
[22564.986805] ? enqueue_hrtimer+0x36/0x90
[22564.986805] ? hrtimer_start_range_ns+0x19d/0x2d0
[22564.986805] do_vfs_ioctl+0x461/0x6d0
[22564.986805] ksys_ioctl+0x5e/0x90
[22564.986805] __x64_sys_ioctl+0x16/0x20
[22564.986805] do_syscall_64+0x5b/0x1c0
[22564.986805] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[22564.986805] RIP: 0033:0x7f5501f5f31b
[22564.986805] Code: 0f 1e fa 48 8b 05 7d ab 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 4d ab 0c 00 f7 d8 64 89 01 48
[22564.986805] RSP: 002b:00007ffcbcf702d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[22564.986805] RAX: ffffffffffffffda RBX: 00007ffcbcf70370 RCX: 00007f5501f5f31b
[22564.986805] RDX: 00007ffcbcf70370 RSI: 00000000402c6467 RDI: 000000000000000d
[22564.986805] RBP: 00000000402c6467 R08: 60605f5f5f5e5e5e R09: 5e5e5f5f5f5f6060
[22564.986805] R10: 5d5d5d5e5f5f5f5f R11: 0000000000000246 R12: 000055e518ef48d0
[22564.986805] R13: 000000000000000d R14: 00007ffcbcf703a0 R15: 000055e518ef4990
[22564.986805] ---[ end trace 391aabdd95e317cc ]---
[22565.020259] ------------[ cut here ]------------
[22565.020270] WARN_ON(!(atomic_read(&old->bits) & frontbuffer_bits))
[22565.020520] WARNING: CPU: 0 PID: 1961 at drivers/gpu/drm/i915/display/intel_frontbuffer.c:305 intel_frontbuffer_track+0x53/0x80 [i915]
[22565.020522] Modules linked in: ccm iwl3945 iwlegacy mac80211 btusb btrtl btbcm btintel bluetooth coretemp kvm_intel ecdh_generic xt_CHECKSUM ecc xt_MASQUERADE kvm xt_conntrack ipt_REJECT nf_reject_ipv4 nd_pmem dax_pmem ip6table_mangle ip6table_nat nd_btt dax_pmem_core iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c snd_hda_codec_analog snd_hda_codec_generic ebtable_filter ebtables ip6table_filter iTCO_wdt ip6_tables iptable_filter iTCO_vendor_support tun bridge stp llc snd_hda_intel cfg80211 snd_intel_dspcfg snd_hda_codec nd_e820 irqbypass libnvdimm joydev snd_hda_core wmi_bmof i2c_i801 snd_hwdep snd_seq e1000e r592 snd_seq_device snd_pcm memstick lpc_ich libarc4 snd_timer thinkpad_acpi ledtrig_audio snd soundcore rfkill acpi_cpufreq binfmt_misc nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables i915 i2c_algo_bit drm_kms_helper sdhci_pci cqhci pcspkr serio_raw sdhci mmc_core ata_generic yenta_socket pata_acpi drm wmi video
[22565.020522] CPU: 0 PID: 1961 Comm: Xorg Tainted: G W 5.5.0-0.rc7.git1.2.fc31.x86_64 #1
[22565.020522] Hardware name: LENOVO 6464CTO/6464CTO, BIOS 7LETC9WW (2.29 ) 03/18/2011
[22565.020522] RIP: 0010:intel_frontbuffer_track+0x53/0x80 [i915]
[22565.020522] Code: 0b 8b 43 04 85 c2 75 2a f0 09 53 04 48 83 c4 08 5b 5d c3 48 c7 c6 a8 87 48 c0 48 c7 c7 33 2b 4a c0 89 54 24 04 e8 9f f3 d0 de <0f> 0b 8b 54 24 04 eb c2 48 c7 c6 18 88 48 c0 48 c7 c7 33 2b 4a c0
[22565.020522] RSP: 0018:ffffba19c093fc88 EFLAGS: 00010282
[22565.020522] RAX: 0000000000000000 RBX: ffff8db89272e900 RCX: 0000000000000000
[22565.020522] RDX: 0000000000000006 RSI: ffffffffa1152476 RDI: 0000000000000246
[22565.020522] RBP: ffff8db89272e9c0 R08: 00001485d4047e33 R09: 0000000000000036
[22565.020522] R10: ffffffffa1152820 R11: 00000000a115243f R12: ffff8db92d154000
[22565.020522] R13: 0000000000000080 R14: ffff8db89272e900 R15: 0000000000000000
[22565.020522] FS: 00007f5501ae3f00(0000) GS:ffff8db9b7c00000(0000) knlGS:0000000000000000
[22565.020522] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[22565.020522] CR2: 00007f3c6448c000 CR3: 000000012f8b6000 CR4: 00000000000006f0
[22565.020522] Call Trace:
[22565.020791] intel_overlay_flip_prepare+0x7d/0x1a0 [i915]
[22565.020791] intel_overlay_put_image_ioctl+0xa48/0xee0 [i915]
[22565.020791] ? intel_overlay_switch_off+0x140/0x140 [i915]
[22565.020791] drm_ioctl_kernel+0xaa/0xf0 [drm]
[22565.020791] drm_ioctl+0x208/0x390 [drm]
[22565.020791] ? intel_overlay_switch_off+0x140/0x140 [i915]
[22565.020791] ? enqueue_hrtimer+0x36/0x90
[22565.020791] ? hrtimer_start_range_ns+0x19d/0x2d0
[22565.020791] do_vfs_ioctl+0x461/0x6d0
[22565.020791] ksys_ioctl+0x5e/0x90
[22565.020791] __x64_sys_ioctl+0x16/0x20
[22565.020791] do_syscall_64+0x5b/0x1c0
[22565.020791] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[22565.020791] RIP: 0033:0x7f5501f5f31b
[22565.020791] Code: 0f 1e fa 48 8b 05 7d ab 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 4d ab 0c 00 f7 d8 64 89 01 48
[22565.020791] RSP: 002b:00007ffcbcf702d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[22565.020791] RAX: ffffffffffffffda RBX: 00007ffcbcf70370 RCX: 00007f5501f5f31b
[22565.020791] RDX: 00007ffcbcf70370 RSI: 00000000402c6467 RDI: 000000000000000d
[22565.020791] RBP: 00000000402c6467 R08: 5f5f5f5f5e5e5e5f R09: 5e5e5f5f5f5f6060
[22565.020791] R10: 5c5b5c5c5c5d5e5e R11: 0000000000000246 R12: 000055e518ef48d0
[22565.020791] R13: 000000000000000d R14: 00007ffcbcf703a0 R15: 000055e518ef4990
[22565.020791] ---[ end trace 391aabdd95e317cd ]---
Edited by Chris Wilson