i915 drm fails to resume with modeset = 0
Subsystems (2)
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
[drm:intel_init_clock_gating] *ERROR* failed to pin power context: -16
------------[ cut here ]------------ kernel BUG at drivers/gpu/drm/drm_gem.c:438!
invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/power/state
CPU 0
Pid: 2621, comm: pm-suspend Not tainted 2.6.33-rc2-00270-gc31ac8b #49 6464CTO/6464CTO
RIP: 0010:[<ffffffffa031482a>] [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm] RSP: 0000:ffff880139cddca8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff880139f5f000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffa03147d0 RDI: ffff880137e1a780 RBP: ffff880139cddcb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880137e1a780 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88013a13c870 FS: 00007fdcfaf78700(0000) GS:ffff88002be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007fd607b1b440 CR3: 0000000139e6b000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process pm-suspend (pid: 2621, threadinfo ffff880139cdc000, task ffff88013bd64640) Stack: ffff880137e1a780 ffffffffa03147d0 ffff880139cddcd8 ffffffff81245a07 <0> ffff880137e1a780 ffff88013976c000 ffff880139cddce8 ffffffffa03779ea <0> ffff880139cddd08 ffffffffa0379bdf ffff88013976c000 ffff880139f5f000 Call Trace: [<ffffffffa03147d0>] ? drm_gem_object_free+0x0/0x60 [drm] [<ffffffff81245a07>] kref_put+0x37/0x70 [<ffffffffa03779ea>] drm_gem_object_unreference+0x1a/0x20 [i915] [<ffffffffa0379bdf>] intel_init_clock_gating+0x32f/0x350 [i915] [<ffffffffa03675b2>] i915_restore_state+0x202/0x350 [i915] [<ffffffffa035c097>] i915_resume+0x77/0x100 [i915] [<ffffffffa031b410>] ? drm_class_resume+0x0/0x50 [drm] [<ffffffffa031b45b>] drm_class_resume+0x4b/0x50 [drm] [<ffffffff812fd094>] legacy_resume+0x34/0x80 [<ffffffff812fda19>] dpm_resume_end+0x409/0x430 [<ffffffff81092ae4>] suspend_devices_and_enter+0x124/0x1a0 [<ffffffff81092c3a>] enter_state+0xda/0xf0 [<ffffffff810922f9>] state_store+0x99/0x100 [<ffffffff81244237>] kobj_attr_store+0x17/0x20 [<ffffffff81185fb6>] sysfs_write_file+0xe6/0x170 [<ffffffff811222d8>] vfs_write+0xb8/0x1a0 [<ffffffff81122d31>] sys_write+0x51/0x90 [<ffffffff8100309b>] system_call_fastpath+0x16/0x1b Code: d0 49 8b 7c 24 10 e8 16 f6 e0 e0 f0 ff 8b e0 0a 00 00 41 8b 44
24 60 f0 29 83 e4 0a 00 00 4c 89 e7 e8 cb 57 e0 e0 5b 41 5c c9 c3 <0f> 0b eb fe 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 RIP [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm]
RSP <ffff880139cddca8>
---[ end trace e7a3fdc0abc1c39d ]---
Hardware is T61, 4GB, GMA950, 64bit kernel
I think the problem is visible on kernels 2.6.32, 33-rcX
Zdenek
Quoted 56 lines · On Mon, 4 Jan 2010 17:27:21 +0100 Zdenek Kabelac <[email protected]>…
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
[drm:intel_init_clock_gating] *ERROR* failed to pin power context: -16
------------[ cut here ]------------ kernel BUG at drivers/gpu/drm/drm_gem.c:438!invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file:/sys/power/state
CPU 0
Pid: 2621, comm: pm-suspend Not tainted 2.6.33-rc2-00270-gc31ac8b #49 6464CTO/6464CTORIP: 0010:[<ffffffffa031482a>] [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm] RSP: 0000:ffff880139cddca8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff880139f5f000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffa03147d0 RDI: ffff880137e1a780 RBP: ffff880139cddcb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880137e1a780 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88013a13c870 FS: 00007fdcfaf78700(0000) GS:ffff88002be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007fd607b1b440 CR3: 0000000139e6b000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process pm-suspend (pid: 2621, threadinfo ffff880139cdc000, task ffff88013bd64640) Stack: ffff880137e1a780 ffffffffa03147d0 ffff880139cddcd8 ffffffff81245a07<0>
ffff880137e1a780ffff88013976c000ffff880139cddce8ffffffffa03779ea<0>ffff880139cddd08ffffffffa0379bdfffff88013976c000ffff880139f5f000Call Trace:
[<ffffffffa03147d0>] ?drm_gem_object_free+0x0/0x60[drm][<ffffffff81245a07>] kref_put+0x37/0x70 [<ffffffffa03779ea>] drm_gem_object_unreference+0x1a/0x20 [i915] [<ffffffffa0379bdf>] intel_init_clock_gating+0x32f/0x350 [i915] [<ffffffffa03675b2>] i915_restore_state+0x202/0x350 [i915] [<ffffffffa035c097>] i915_resume+0x77/0x100 [i915] [<ffffffffa031b410>] ? drm_class_resume+0x0/0x50 [drm] [<ffffffffa031b45b>] drm_class_resume+0x4b/0x50 [drm] [<ffffffff812fd094>] legacy_resume+0x34/0x80 [<ffffffff812fda19>] dpm_resume_end+0x409/0x430 [<ffffffff81092ae4>] suspend_devices_and_enter+0x124/0x1a0 [<ffffffff81092c3a>] enter_state+0xda/0xf0 [<ffffffff810922f9>] state_store+0x99/0x100 [<ffffffff81244237>] kobj_attr_store+0x17/0x20 [<ffffffff81185fb6>] sysfs_write_file+0xe6/0x170 [<ffffffff811222d8>] vfs_write+0xb8/0x1a0 [<ffffffff81122d31>] sys_write+0x51/0x90 [<ffffffff8100309b>] system_call_fastpath+0x16/0x1b Code: d0 49 8b 7c 24 10 e8 16 f6 e0 e0 f0 ff 8b e0 0a 00 00 41 8b 4424 60 f0 29 83 e4 0a 00 00 4c 89 e7 e8 cb 57 e0 e0 5b 41 5c c9 c3 <0f> 0b eb fe 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 RIP [<
ffffffffa031482a>]drm_gem_object_free+0x5a/0x60[drm]
RSP <ffff880139cddca8>
Quoted 8 lines
---[ end trace e7a3fdc0abc1c39d ]---Hardware is T61, 4GB, GMA950, 64bit kernel
I think the problem is visible on kernels 2.6.32, 33-rcX
Zdenek
Something like this might work:
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -4579,7 +4579,7 @@ void intel_init_clock_gating(struct drm_device *dev)* GPU can automatically power down the render unit if given a page * to save state. */ -if (I915_HAS_RC6 (dev)) { +if (I915_HAS_RC6 (dev) &&drm_core_check_feature (dev,DRIVER_MODESET )) {struct drm_gem_object *pwrctx;struct drm_i915_gem_object *obj_priv;int ret;
Did my fix get lost? There's a duplicate save/restore of RC6, too.
--Andy
Quoted 85 lines · Jesse Barnes
Quoted 56 lines · On Mon, 4 Jan 2010 17:27:21 +0100 Zdenek Kabelac <[email protected]>…
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
[drm:intel_init_clock_gating] *ERROR* failed to pin power context: -16
------------[ cut here ]------------ kernel BUG at drivers/gpu/drm/drm_gem.c:438!invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file:/sys/power/state
CPU 0
Pid: 2621, comm: pm-suspend Not tainted 2.6.33-rc2-00270-gc31ac8b #49 6464CTO/6464CTORIP: 0010:[<ffffffffa031482a>] [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm]RSP: 0000:ffff880139cddca8 EFLAGS: 00010246
RAX: 0000000000000001 RBX:ffff880139f5f000RCX: 0000000000000000
RDX: 0000000000000001 RSI:ffffffffa03147d0RDI:ffff880137e1a780
RBP:ffff880139cddcb8R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12:ffff880137e1a780
R13: 0000000000000000 R14: 0000000000000000 R15:ffff88013a13c870
FS: 00007fdcfaf78700(0000) GS:ffff88002be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0:000000008005003bCR2:00007fd607b1b440CR3:0000000139e6b000CR4:00000000000006f0DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000 DR3: 0000000000000000 DR6:00000000ffff0ff0DR7:
0000000000000400 Process pm-suspend (pid: 2621, threadinfoffff880139cdc000, taskffff88013bd64640)Stack:ffff880137e1a780
ffffffffa03147d0ffff880139cddcd8ffffffff81245a07<0>ffff880137e1a780ffff88013976c000ffff880139cddce8ffffffffa03779ea<0>ffff880139cddd08ffffffffa0379bdfffff88013976c000ffff880139f5f000Call Trace:
[<ffffffffa03147d0>] ?drm_gem_object_free+0x0/0x60[drm][<ffffffff81245a07>] kref_put+0x37/0x70 [<ffffffffa03779ea>] drm_gem_object_unreference+0x1a/0x20 [i915] [<ffffffffa0379bdf>] intel_init_clock_gating+0x32f/0x350 [i915] [<ffffffffa03675b2>] i915_restore_state+0x202/0x350 [i915] [<ffffffffa035c097>] i915_resume+0x77/0x100 [i915] [<ffffffffa031b410>] ? drm_class_resume+0x0/0x50 [drm] [<ffffffffa031b45b>] drm_class_resume+0x4b/0x50 [drm] [<ffffffff812fd094>] legacy_resume+0x34/0x80 [<ffffffff812fda19>] dpm_resume_end+0x409/0x430 [<ffffffff81092ae4>] suspend_devices_and_enter+0x124/0x1a0 [<ffffffff81092c3a>] enter_state+0xda/0xf0 [<ffffffff810922f9>] state_store+0x99/0x100 [<ffffffff81244237>] kobj_attr_store+0x17/0x20 [<ffffffff81185fb6>] sysfs_write_file+0xe6/0x170 [<ffffffff811222d8>] vfs_write+0xb8/0x1a0 [<ffffffff81122d31>] sys_write+0x51/0x90 [<ffffffff8100309b>] system_call_fastpath+0x16/0x1b Code: d0 49 8b 7c 24 10 e8 16 f6 e0 e0 f0 ff 8b e0 0a 00 00 41 8b 4424 60 f0 29 83 e4 0a 00 00 4c 89 e7 e8 cb 57 e0 e0 5b 41 5c c9 c3 <0f> 0b eb fe 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 RIP [<ffffffffa031482a>]
drm_gem_object_free+0x5a/0x60[drm] RSP <ffff880139cddca8>Quoted 8 lines
---[ end trace e7a3fdc0abc1c39d ]---Hardware is T61, 4GB, GMA950, 64bit kernel
I think the problem is visible on kernels 2.6.32, 33-rcX
Zdenek
Something like this might work:
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -4579,7 +4579,7 @@ void intel_init_clock_gating(struct drm_device *dev)* GPU can automatically power down the render unit if given a page * to save state. */ - if (I915_HAS_RC6(dev)) { + if (I915_HAS_RC6(dev) && drm_core_check_feature(dev, DRIVER_MODESET)) { struct drm_gem_object *pwrctx; struct drm_i915_gem_object *obj_priv; int ret;
It's in Eric's tree, I just missed it when I posted this as my 'git pull' was still in progress.
Jesse
Quoted 94 lines · On Mon, 4 Jan 2010 17:17:57 -0500 Andrew Lutomirski <[email protected]> wrote:
Did my fix get lost? There's a duplicate save/restore of RC6, too.
--Andy
Quoted 87 lines · Jesse Barnes
Quoted 56 lines · On Mon, 4 Jan 2010 17:27:21 +0100 Zdenek Kabelac <[email protected]>…
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
[drm:intel_init_clock_gating] *ERROR* failed to pin power context:
-16 ------------[ cut here ]------------
kernel BUG atdrivers/gpu/drm/drm_gem.c:438!
invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file:/sys/power/state
CPU 0
Pid: 2621, comm: pm-suspend Not tainted 2.6.33-rc2-00270-gc31ac8b #49 6464CTO/6464CTORIP: 0010:[<ffffffffa031482a>] [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm]RSP: 0000:ffff880139cddca8 EFLAGS: 00010246
RAX: 0000000000000001 RBX:ffff880139f5f000RCX: 0000000000000000
RDX: 0000000000000001 RSI:ffffffffa03147d0RDI:ffff880137e1a780
RBP:ffff880139cddcb8R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12:ffff880137e1a780
R13: 0000000000000000 R14: 0000000000000000 R15:ffff88013a13c870
FS: 00007fdcfaf78700(0000) GS:ffff88002be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0:000000008005003bCR2:00007fd607b1b440CR3:0000000139e6b000CR4:00000000000006f0DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000 DR3: 0000000000000000 DR6:00000000ffff0ff0DR7:
0000000000000400 Process pm-suspend (pid: 2621, threadinfoffff880139cdc000, taskffff88013bd64640)Stack:ffff880137e1a780
ffffffffa03147d0ffff880139cddcd8ffffffff81245a07<0>ffff880137e1a780ffff88013976c000ffff880139cddce8ffffffffa03779ea<0>ffff880139cddd08ffffffffa0379bdfffff88013976c000ffff880139f5f000Call Trace:
[<ffffffffa03147d0>] ?drm_gem_object_free+0x0/0x60[drm][<ffffffff81245a07>] kref_put+0x37/0x70 [<ffffffffa03779ea>] drm_gem_object_unreference+0x1a/0x20 [i915] [<ffffffffa0379bdf>] intel_init_clock_gating+0x32f/0x350 [i915] [<ffffffffa03675b2>] i915_restore_state+0x202/0x350 [i915] [<ffffffffa035c097>] i915_resume+0x77/0x100 [i915] [<ffffffffa031b410>] ? drm_class_resume+0x0/0x50 [drm] [<ffffffffa031b45b>] drm_class_resume+0x4b/0x50 [drm] [<ffffffff812fd094>] legacy_resume+0x34/0x80 [<ffffffff812fda19>] dpm_resume_end+0x409/0x430 [<ffffffff81092ae4>] suspend_devices_and_enter+0x124/0x1a0 [<ffffffff81092c3a>] enter_state+0xda/0xf0 [<ffffffff810922f9>] state_store+0x99/0x100 [<ffffffff81244237>] kobj_attr_store+0x17/0x20 [<ffffffff81185fb6>] sysfs_write_file+0xe6/0x170 [<ffffffff811222d8>] vfs_write+0xb8/0x1a0 [<ffffffff81122d31>] sys_write+0x51/0x90 [<ffffffff8100309b>] system_call_fastpath+0x16/0x1b Code: d0 49 8b 7c 24 10 e8 16 f6 e0 e0 f0 ff 8b e0 0a 00 00 41 8b44 24 60 f0 29 83 e4 0a 00 00 4c 89 e7 e8 cb 57 e0 e0 5b 41 5c c9 c3 <0f> 0b eb fe 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 RIP [<ffffffffa031482a>]
drm_gem_object_free+0x5a/0x60[drm] RSP <ffff880139cddca8>Quoted 8 lines
---[ end trace e7a3fdc0abc1c39d ]---Hardware is T61, 4GB, GMA950, 64bit kernel
I think the problem is visible on kernels 2.6.32, 33-rcX
Zdenek
Something like this might work:
(quoted diff) +0
-0b/drivers/gpu/drm/i915/intel_d index 279dc96..3f46f81 100644
drivers/gpu/drm/i915/intel_display.c +0
-0@@ -4579,7 +4579,7 @@ void intel_init_clock_gating(struct drm_device *dev) * GPU can automatically power down the render unit if givena page
* to save state.
*/
- if (I915_HAS_RC6(dev)) {
+ if (I915_HAS_RC6(dev)&&drm_core_check_feature(dev, DRIVER_MODESET)) { structdrm_gem_object*pwrctx; structdrm_i915_gem_object*obj_priv; int ret;
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 56 lines · On Mon, 4 Jan 2010 17:27:21 +0100 Zdenek Kabelac <[email protected]>…
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
[drm:intel_init_clock_gating] *ERROR* failed to pin power context: -16
------------[ cut here ]------------ kernel BUG at drivers/gpu/drm/drm_gem.c:438!invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file:/sys/power/state
CPU 0
Pid: 2621, comm: pm-suspend Not tainted 2.6.33-rc2-00270-gc31ac8b #49 6464CTO/6464CTORIP: 0010:[<ffffffffa031482a>] [<ffffffffa031482a>] drm_gem_object_free+0x5a/0x60 [drm] RSP: 0000:ffff880139cddca8 EFLAGS: 00010246 RAX: 0000000000000001 RBX: ffff880139f5f000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffffa03147d0 RDI: ffff880137e1a780 RBP: ffff880139cddcb8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880137e1a780 R13: 0000000000000000 R14: 0000000000000000 R15: ffff88013a13c870 FS: 00007fdcfaf78700(0000) GS:ffff88002be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: 00007fd607b1b440 CR3: 0000000139e6b000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process pm-suspend (pid: 2621, threadinfo ffff880139cdc000, task ffff88013bd64640) Stack: ffff880137e1a780 ffffffffa03147d0 ffff880139cddcd8 ffffffff81245a07<0>
ffff880137e1a780ffff88013976c000ffff880139cddce8ffffffffa03779ea<0>ffff880139cddd08ffffffffa0379bdfffff88013976c000ffff880139f5f000Call Trace:
[<ffffffffa03147d0>] ?drm_gem_object_free+0x0/0x60[drm][<ffffffff81245a07>] kref_put+0x37/0x70 [<ffffffffa03779ea>] drm_gem_object_unreference+0x1a/0x20 [i915] [<ffffffffa0379bdf>] intel_init_clock_gating+0x32f/0x350 [i915] [<ffffffffa03675b2>] i915_restore_state+0x202/0x350 [i915] [<ffffffffa035c097>] i915_resume+0x77/0x100 [i915] [<ffffffffa031b410>] ? drm_class_resume+0x0/0x50 [drm] [<ffffffffa031b45b>] drm_class_resume+0x4b/0x50 [drm] [<ffffffff812fd094>] legacy_resume+0x34/0x80 [<ffffffff812fda19>] dpm_resume_end+0x409/0x430 [<ffffffff81092ae4>] suspend_devices_and_enter+0x124/0x1a0 [<ffffffff81092c3a>] enter_state+0xda/0xf0 [<ffffffff810922f9>] state_store+0x99/0x100 [<ffffffff81244237>] kobj_attr_store+0x17/0x20 [<ffffffff81185fb6>] sysfs_write_file+0xe6/0x170 [<ffffffff811222d8>] vfs_write+0xb8/0x1a0 [<ffffffff81122d31>] sys_write+0x51/0x90 [<ffffffff8100309b>] system_call_fastpath+0x16/0x1b Code: d0 49 8b 7c 24 10 e8 16 f6 e0 e0 f0 ff 8b e0 0a 00 00 41 8b 4424 60 f0 29 83 e4 0a 00 00 4c 89 e7 e8 cb 57 e0 e0 5b 41 5c c9 c3 <0f> 0b eb fe 66 90 55 48 89 e5 48 83 ec 10 48 89 1c 24 4c 89 64 RIP [<
ffffffffa031482a>]drm_gem_object_free+0x5a/0x60[drm]
RSP <ffff880139cddca8>
Quoted 6 lines
---[ end trace e7a3fdc0abc1c39d ]---Hardware is T61, 4GB, GMA950, 64bit kernel
I think the problem is visible on kernels 2.6.32, 33-rcX
Oh nevermind, looks like the fix I just sent has already been applied to Eric's drm-intel tree. Should be upstream soon (if it's not there already).
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
Quoted 3 lines · Zdenek Kabelac
Hi
Resume seems to fail when i915 modeset is 0. Machine produces following oops:
This looks like http://bugzilla.kernel.org/show_bug.cgi?id=15026
Rafael