Bug 30132

Summary: BUG_ON just after resume from s2ram
Product: Drivers Reporter: Dmitry Nezhevenko (dion)
Component: Video(DRI - Intel)Assignee: drivers_video-dri-intel (drivers_video-dri-intel)
Status: RESOLVED CODE_FIX    
Severity: normal CC: akpm, chris, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.37.1 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 7216    
Attachments: dmesg from clean boot

Description Dmitry Nezhevenko 2011-03-01 04:56:32 UTC
s2ram sometimes looks very unreliable on my laptop. Usually it suspends without any issues but sometimes it just freezes after/while resuming.

It crashes in various of places related to Intel GPU, but usually with blank display and without any stacktraces in logs:

--- grep ---
Feb 23 11:48:25 laptop kernel: [22138.764489] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:4190!
Feb 24 20:18:21 laptop kernel: [70267.532366] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:4238!
Feb 25 10:16:05 laptop kernel: [23325.739378] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:4238!
--- grep ---

Today I've hit something like this once more but I was able to shutdown machine using SysRQ keys. And here is a trace:

[116757.202070] ------------[ cut here ]------------
[116757.202073] kernel BUG at drivers/gpu/drm/i915/intel_ringbuffer.c:343!
[116757.202076] invalid opcode: 0000 [#1] PREEMPT SMP 
[116757.202079] last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/graphics/fb0/state
[116757.202081] Modules linked in: msr cpufreq_stats nls_iso8859_1 nls_cp437 vfat fat keucr(C) tun ppp_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc rfcomm bnep l2cap crc16 sco btusb bluetooth xt_recent ipt_LOG ipt_REJECT xt_tcpudp xt_state iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables acpi_cpufreq mperf fuse coretemp loop joydev arc4 ecb snd_hda_codec_hdmi snd_hda_codec_realtek iwlagn snd_hda_intel iwlcore snd_hda_codec snd_hwdep snd_pcm uvcvideo snd_seq mac80211 snd_timer snd_seq_device asus_laptop tpm_tis psmouse videodev snd ac soundcore v4l1_compat cfg80211 tpm sparse_keymap snd_page_alloc pcspkr serio_raw tpm_bios processor battery rfkill evdev sha256_generic aes_i586 aes_generic cbc dm_crypt dm_mod btrfs zlib_deflate crc32c libcrc32c reiserfs lzo ext3 jbd mbcache i915 drm_kms_helper drm i2c_algo_bit i2c_core sg sr_mod sd_mod crc_t10dif cdrom usb_storage uas ahci libahci libata scsi_mod thermal video ehci_hcd usbcor
e thermal_sys output button r8169 mii nls_base [last unloaded: uhci_hcd]
[116757.202150] 
[116757.202153] Pid: 2635, comm: Xorg Tainted: G         C  2.6.37.1+ #5 ASUSTeK Computer Inc.         F6A                 /F6A
[116757.202158] EIP: 0060:[<f87dd9a2>] EFLAGS: 00210046 CPU: 1
[116757.202187] EIP is at render_ring_put_user_irq+0x37/0x80 [i915]
[116757.202190] EAX: 00000000 EBX: f4ca4000 ECX: f4ca4080 EDX: f4ca4018
[116757.202193] ESI: f6fe3400 EDI: f4ca429c EBP: f6d05e2c ESP: f6d05e18
[116757.202195]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[116757.202198] Process Xorg (pid: 2635, ti=f6d04000 task=f6be8000 task.ti=f6d04000)
[116757.202200] Stack:
[116757.202201]  f4ca4018 00200296 f4ca4018 f4ca4080 00000001 f6d05e54 f87c3996 f4ca4000
[116757.202207]  00000001 f4ca4080 f6fe3400 00000001 f40fc780 00000000 f6d05e94 f6d05e70
[116757.202213]  f87c67b4 f6d66380 f6fe3400 f6d66380 00000008 00000057 f6d05f24 f8711687
[116757.202219] Call Trace:
[116757.202247]  [<f87c3996>] ? i915_gem_retire_requests_ring+0x159/0x16e [i915]
[116757.202273]  [<f87c67b4>] ? i915_gem_busy_ioctl+0x98/0xbd [i915]
[116757.202299]  [<f8711687>] ? drm_ioctl+0x278/0x345 [drm]
[116757.202321]  [<f87c671c>] ? i915_gem_busy_ioctl+0x0/0xbd [i915]
[116757.202337]  [<c109aa2f>] ? __pagevec_free+0x63/0x70
[116757.202342]  [<c109d222>] ? release_pages+0x11d/0x125
[116757.202346]  [<c10abf1e>] ? free_pgd_range+0xe5/0x150
[116757.202352]  [<c102adaf>] ? get_parent_ip+0xb/0x31
[116757.202370]  [<f871140f>] ? drm_ioctl+0x0/0x345 [drm]
[116757.202374]  [<c10ce2a7>] ? do_vfs_ioctl+0x44d/0x492
[116757.202379]  [<c10bec57>] ? __slab_free+0x56/0xbc
[116757.202383]  [<c10bf1b1>] ? kmem_cache_free+0x67/0xaf
[116757.202386]  [<c10aebb4>] ? remove_vma+0x41/0x47
[116757.202389]  [<c10af8ba>] ? do_munmap+0x217/0x231
[116757.202392]  [<c10ce32d>] ? sys_ioctl+0x41/0x61
[116757.202397]  [<c10031df>] ? sysenter_do_call+0x12/0x28
[116757.202402]  [<c12a0000>] ? perf_cpu_notify+0xfd/0x128 
[116757.202404] Code: 98 1c 02 00 00 89 55 ec 8d bb 9c 02 00 00 89 f8 e8 ac 4a ac c8 8b 55 ec 83 be 30 01 00 00 00 89 45 f0 74 3f 8b 42 40 85 c0 7f 04 <0f> 0b eb fe 48 85 c0 89 42 40 75 2c 8b 86 1c 02 00 00 8b 40 04
[116757.202427] EIP: [<f87dd9a2>] render_ring_put_user_irq+0x37/0x80 [i915] SS:ESP 0068:f6d05e18
[116757.202457] ---[ end trace 3de69b1451c44e14 ]---

And another one just after this (maybe caused by previous one):

[116757.202457] ---[ end trace 3de69b1451c44e14 ]---
Mar  1 06:26:43 laptop kernel: [116757.202460] note: Xorg[2635] exited with preempt_count 1
Mar  1 06:26:43 laptop kernel: [116757.204057] BUG: scheduling while atomic: Xorg/2635/0x10000002
Mar  1 06:26:43 laptop kernel: [116757.204058] Modules linked in: msr cpufreq_stats nls_iso8859_1 nls_cp437 vfat fat keucr(C) tun ppp_deflate bsd_comp ppp_async crc_ccitt ppp_generic slhc rfcomm bnep l2cap crc16 sco btusb bluetooth xt_recent ipt_LOG ipt_REJECT xt_tcpudp xt_state iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables acpi_cpufreq mperf fuse coretemp loop joydev arc4 ecb snd_hda_codec_hdmi snd_hda_codec_realtek iwlagn snd_hda_intel iwlcore snd_hda_codec snd_hwdep snd_pcm uvcvideo snd_seq mac80211 snd_timer snd_seq_device asus_laptop tpm_tis psmouse videodev snd ac soundcore v4l1_compat cfg80211 tpm sparse_keymap snd_page_alloc pcspkr serio_raw tpm_bios processor battery rfkill evdev sha256_generic aes_i586 aes_generic cbc dm_crypt dm_mod btrfs zlib_deflate crc32c libcrc32c reiserfs lzo ext3 jbd mbcache i915 drm_kms_helper drm i2c_algo_bit i2c_core sg sr_mod sd_mod crc_t10dif cdrom usb_storage uas ahci libahci libata scsi_mod thermal video ehci_hcd usbcor
Mar  1 06:26:43 laptop kernel: e thermal_sys output button r8169 mii nls_base [last unloaded: uhci_hcd]
Mar  1 06:26:43 laptop kernel: [116757.204130] Pid: 2635, comm: Xorg Tainted: G      D  C  2.6.37.1+ #5
Mar  1 06:26:43 laptop kernel: [116757.204132] Call Trace:
Mar  1 06:26:43 laptop kernel: [116757.204136]  [<c102c362>] __schedule_bug+0x4c/0x51
Mar  1 06:26:43 laptop kernel: [116757.204140]  [<c12a0a82>] schedule+0xa9/0x6c3
Mar  1 06:26:43 laptop kernel: [116757.204145]  [<c109d570>] ? lru_add_drain+0x74/0x8c
Mar  1 06:26:43 laptop kernel: [116757.204149]  [<c10b5a1d>] ? free_pages_and_swap_cache+0x43/0x50
Mar  1 06:26:43 laptop kernel: [116757.204152]  [<c102db17>] __cond_resched+0x12/0x1e
Mar  1 06:26:43 laptop kernel: [116757.204155]  [<c12a1191>] _cond_resched+0x1e/0x29
Mar  1 06:26:43 laptop kernel: [116757.204159]  [<c10aad2a>] unmap_vmas+0x5aa/0x608
Mar  1 06:26:43 laptop kernel: [116757.204164]  [<c1150cd5>] ? vsnprintf+0x81/0x24c
Mar  1 06:26:43 laptop kernel: [116757.204168]  [<c10aec34>] exit_mmap+0x7a/0xc0
Mar  1 06:26:43 laptop kernel: [116757.204171]  [<c1031966>] mmput+0x37/0xab
Mar  1 06:26:43 laptop kernel: [116757.204175]  [<c1034ffa>] exit_mm+0xfc/0x104
Mar  1 06:26:43 laptop kernel: [116757.204178]  [<c10368bc>] do_exit+0x1ec/0x63d
Mar  1 06:26:43 laptop kernel: [116757.204181]  [<c10343b7>] ? kmsg_dump+0xee/0x103
Mar  1 06:26:43 laptop kernel: [116757.204185]  [<c12a3aaa>] oops_end+0x98/0xa0
Mar  1 06:26:43 laptop kernel: [116757.204189]  [<c1005689>] die+0x53/0x59
Mar  1 06:26:43 laptop kernel: [116757.204192]  [<c12a33d3>] do_trap+0x89/0xa2
Mar  1 06:26:43 laptop kernel: [116757.204195]  [<c1003a58>] ? do_invalid_op+0x0/0x80
Mar  1 06:26:43 laptop kernel: [116757.204198]  [<c1003ace>] do_invalid_op+0x76/0x80
Mar  1 06:26:43 laptop kernel: [116757.204224]  [<f87dd9a2>] ? render_ring_put_user_irq+0x37/0x80 [i915]
Mar  1 06:26:43 laptop kernel: [116757.204228]  [<c12a529f>] ? sub_preempt_count+0x7c/0x89
Mar  1 06:26:43 laptop kernel: [116757.204232]  [<c10beb15>] ? T.1006+0x11/0x26
Mar  1 06:26:43 laptop kernel: [116757.204235]  [<c10bec57>] ? __slab_free+0x56/0xbc
Mar  1 06:26:43 laptop kernel: [116757.204238]  [<c10bf1b1>] ? kmem_cache_free+0x67/0xaf
Mar  1 06:26:43 laptop kernel: [116757.204241]  [<c10d02f8>] ? __d_free+0x39/0x3c
Mar  1 06:26:43 laptop kernel: [116757.204245]  [<c102adaf>] ? get_parent_ip+0xb/0x31
Mar  1 06:26:43 laptop kernel: [116757.204249]  [<c12a529f>] ? sub_preempt_count+0x7c/0x89
Mar  1 06:26:43 laptop kernel: [116757.204252]  [<c12a318b>] error_code+0x67/0x6c
Mar  1 06:26:43 laptop kernel: [116757.204255]  [<c12a007b>] ? start_cpu_timer+0x44/0x50
Mar  1 06:26:43 laptop kernel: [116757.204281]  [<f87dd9a2>] ? render_ring_put_user_irq+0x37/0x80 [i915]
Mar  1 06:26:43 laptop kernel: [116757.204304]  [<f87c3996>] i915_gem_retire_requests_ring+0x159/0x16e [i915]
Mar  1 06:26:43 laptop kernel: [116757.204326]  [<f87c67b4>] i915_gem_busy_ioctl+0x98/0xbd [i915]
Mar  1 06:26:43 laptop kernel: [116757.204347]  [<f8711687>] drm_ioctl+0x278/0x345 [drm]
Mar  1 06:26:43 laptop kernel: [116757.204368]  [<f87c671c>] ? i915_gem_busy_ioctl+0x0/0xbd [i915]
Mar  1 06:26:43 laptop kernel: [116757.204378]  [<c109aa2f>] ? __pagevec_free+0x63/0x70
Mar  1 06:26:43 laptop kernel: [116757.204382]  [<c109d222>] ? release_pages+0x11d/0x125
Mar  1 06:26:43 laptop kernel: [116757.204385]  [<c10abf1e>] ? free_pgd_range+0xe5/0x150
Mar  1 06:26:43 laptop kernel: [116757.204389]  [<c102adaf>] ? get_parent_ip+0xb/0x31
Mar  1 06:26:43 laptop kernel: [116757.204405]  [<f871140f>] ? drm_ioctl+0x0/0x345 [drm]
Mar  1 06:26:43 laptop kernel: [116757.204409]  [<c10ce2a7>] do_vfs_ioctl+0x44d/0x492
Mar  1 06:26:43 laptop kernel: [116757.204412]  [<c10bec57>] ? __slab_free+0x56/0xbc
Mar  1 06:26:43 laptop kernel: [116757.204415]  [<c10bf1b1>] ? kmem_cache_free+0x67/0xaf
Mar  1 06:26:43 laptop kernel: [116757.204419]  [<c10aebb4>] ? remove_vma+0x41/0x47
Mar  1 06:26:43 laptop kernel: [116757.204421]  [<c10af8ba>] ? do_munmap+0x217/0x231
Mar  1 06:26:43 laptop kernel: [116757.204425]  [<c10ce32d>] sys_ioctl+0x41/0x61
Mar  1 06:26:43 laptop kernel: [116757.204428]  [<c10031df>] sysenter_do_call+0x12/0x28
Mar  1 06:26:43 laptop kernel: [116757.204432]  [<c12a0000>] ? perf_cpu_notify+0xfd/0x128

-- lspci:

00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:1a.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
00:1a.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
00:1a.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
00:1a.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
00:1f.2 SATA controller: Intel Corporation ICH9M/M-E SATA AHCI Controller (rev 03)
02:00.0 Network controller: Intel Corporation WiFi Link 5100
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
Comment 1 Andrew Morton 2011-03-01 05:36:31 UTC
Is this a regression?  Was any earlier kernel version OK?  If so, which version?

Thanks.
Comment 2 Dmitry Nezhevenko 2011-03-01 06:00:42 UTC
I'm not sure.. Actually .36 also has this issue. Probably it's not a regression.
Comment 3 Dmitry Nezhevenko 2011-03-01 06:01:47 UTC
Created attachment 49712 [details]
dmesg from clean boot
Comment 4 Dmitry Nezhevenko 2011-03-01 20:23:10 UTC
I was able to get stacktrace for crash on suspend (not resume):

[41504.484027] kernel BUG at drivers/gpu/drm/i915/i915_gem.c:4238!
[41504.484029] invalid opcode: 0000 [#1] PREEMPT SMP 
[41504.484032] last sysfs file: /sys/devices/virtual/sound/timer/uevent
[41504.484035] Modules linked in: tun xt_recent ipt_LOG ipt_REJECT xt_tcpudp xt_state iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables acpi_cpufreq mperf fuse coretemp loop snd_hda_codec_hdmi arc4 snd_hda_codec_realtek ecb snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq snd_timer iwlagn snd_seq_device iwlcore mac80211 snd soundcore uvcvideo videodev snd_page_alloc tpm_tis tpm v4l1_compat cfg80211 psmouse joydev asus_laptop tpm_bios serio_raw pcspkr battery ac processor sparse_keymap evdev rfkill hid_microsoft usbhid hid sha256_generic aes_i586 aes_generic cbc dm_crypt dm_mod btrfs zlib_deflate crc32c libcrc32c reiserfs lzo ext3 jbd mbcache i915 drm_kms_helper drm i2c_algo_bit i2c_core sg sr_mod sd_mod crc_t10dif cdrom usb_storage uas ahci libahci libata uhci_hcd r8169 thermal scsi_mod mii video thermal_sys output ehci_hcd usbcore button nls_base [last unloaded: scsi_wait_scan]
[41504.484091] 
[41504.484094] Pid: 4519, comm: Xorg Not tainted 2.6.37.1+ #5 ASUSTeK Computer Inc.         F6A                 /F6A       
[41504.484099] EIP: 0060:[<f87b6e9d>] EFLAGS: 00213246 CPU: 1
[41504.484119] EIP is at i915_gem_object_unpin+0x30/0x7d [i915]
[41504.484122] EAX: f4fc2900 EBX: 0003c000 ECX: 0003c07c EDX: f4ca4000
[41504.484124] ESI: f684bc14 EDI: f684beb0 EBP: f6c45b28 ESP: f6c45b20
[41504.484127]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[41504.484130] Process Xorg (pid: 4519, ti=f6c44000 task=f6a88000 task.ti=f6c44000)
[41504.484132] Stack:
[41504.484133]  f6881000 f684bc14 f6c45b38 f87bef9b f6881000 f87e3f5c f6c45b50 f8746e8f
[41504.484139]  f684be98 f686d1e4 00000000 f684bd40 f6c45bc0 f8748154 c1025665 f6cb4b40
[41504.484145]  00000004 f6cb4b40 f684beb0 f684bea4 f684beb0 f87e3f5c f684be98 ec6e1000
[41504.484150] Call Trace:
[41504.484173]  [<f87bef9b>] ? intel_crtc_disable+0x31/0x3c [i915]
[41504.484186]  [<f8746e8f>] ? drm_helper_disable_unused_functions+0xeb/0x129 [drm_kms_helper]
[41504.484193]  [<f8748154>] ? drm_crtc_helper_set_config+0x5d8/0x72c [drm_kms_helper]
[41504.484199]  [<c1025665>] ? check_preempt_curr+0x39/0x6b
[41504.484205]  [<c1030d00>] ? try_to_wake_up+0x12a/0x224
[41504.484212]  [<f8746535>] ? drm_fb_helper_set_par+0x5c/0x97 [drm_kms_helper]
[41504.484218]  [<c116f8d5>] ? fb_set_var+0x208/0x2ff
[41504.484223]  [<c102fe57>] ? load_balance+0x9a/0x5d1
[41504.484228]  [<c10a3ba2>] ? shmem_truncate_range+0x24/0x606
[41504.484232]  [<c1008855>] ? __switch_to_xtra+0x129/0x148
[41504.484237]  [<c102adaf>] ? get_parent_ip+0xb/0x31
[41504.484241]  [<c12a529f>] ? sub_preempt_count+0x7c/0x89
[41504.484245]  [<c11777b9>] ? fbcon_blank+0x7e/0x27b
[41504.484251]  [<c11bbc46>] ? do_unblank_screen+0xcc/0x12f
[41504.484256]  [<c11b4a43>] ? vt_ioctl+0x49e/0x1643
[41504.484261]  [<c12a25e5>] ? _raw_spin_unlock+0x1b/0x26
[41504.484264]  [<c1096365>] ? find_get_page+0x66/0x6f
[41504.484268]  [<c102adaf>] ? get_parent_ip+0xb/0x31
[41504.484271]  [<c102adaf>] ? get_parent_ip+0xb/0x31
[41504.484274]  [<c12a529f>] ? sub_preempt_count+0x7c/0x89
[41504.484278]  [<c11b45a5>] ? vt_ioctl+0x0/0x1643
[41504.484283]  [<c11acb59>] ? tty_ioctl+0x7d0/0x832
[41504.484287]  [<c10acd46>] ? handle_mm_fault+0x3a4/0x875
[41504.484291]  [<c11ac389>] ? tty_ioctl+0x0/0x832
[41504.484295]  [<c10ce2a7>] ? do_vfs_ioctl+0x44d/0x492
[41504.484299]  [<c12a51f5>] ? do_page_fault+0x2ec/0x31a
[41504.484303]  [<c10c4372>] ? fput+0x151/0x159
[41504.484306]  [<c10ce32d>] ? sys_ioctl+0x41/0x61
[41504.484309]  [<c10c188f>] ? sys_close+0x6c/0xa0
[41504.484314]  [<c10031df>] ? sysenter_do_call+0x12/0x28
[41504.484316] Code: 8b 48 78 8b 50 08 89 cb 81 e1 ff 3f fc ff c1 eb 0e 8b 92 1c 02 00 00 83 c3 0f 83 e3 0f c1 e3 0e 09 d9 83 78 54 00 89 48 78 75 04 <0f> 0b eb fe 81 e1 00 c0 03 00 75 3d f6 40 78 01 75 28 8b 70 60 
[41504.484341] EIP: [<f87b6e9d>] i915_gem_object_unpin+0x30/0x7d [i915] SS:ESP 0068:f6c45b20
[41504.485029] ---[ end trace 39adb58f3e75513b ]---
Comment 5 Rafael J. Wysocki 2011-03-01 20:36:51 UTC
Do you use the s2ram binary?  If you do, have you tried to disable it (eg.
by making in non-executable)?
Comment 6 Dmitry Nezhevenko 2011-03-01 21:37:11 UTC
I use pm-utils to suspend/resume. I'm not sure how it works internally. Maybe it calls s2ram.

However I've just tried to suspend without any userspace stuff using "echo mem > /sys/power/state". I've tested it two times and both of them were lucky.

So probably this laptop do not require any userspace hacks/quirks. 

I can't say that this "fixes" issues because it is not always reproduceable. So I can continue to use /sys/power/state directly for some time and then post here results.

Anything else I can try?
Comment 7 Chris Wilson 2011-03-01 22:04:27 UTC
These are two different bugs both fixed.

Oops on resume:

commit 01a03331e5fe91861937f8b8e72c259f5e9eae67
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jan 4 22:22:56 2011 +0000

    drm/i915/ringbuffer: Simplify the ring irq refcounting
    
    ... and move it under the spinlock to gain the appropriate memory
    barriers.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32752
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Oops on suspend:

commit 9334ef755f060e251f3f395caeda1a58b6834ea3
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Jan 28 11:53:03 2011 +0000

    drm: Don't switch fb when disabling an output
    
    In drm_crtc_helper_set_config, we call drm_crtc_helper_set_mode which
    may return early and do no operation if the crtc is to be disabled. In
    this case we merrily swap to the new fb, discarding the old_fb believing
    that it has been cleaned up. However, due to the early return, the
    old_fb was not presented to the backend for correct reaping, and nor was
    the new one - which is about to be reaped via the
    drm_helper_disable_unused_functions(), leading to incorrect refcounting
    of the pinned objects.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27722
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29230
    Tested-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>