Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753919Ab0ADWyN (ORCPT ); Mon, 4 Jan 2010 17:54:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753750Ab0ADWyL (ORCPT ); Mon, 4 Jan 2010 17:54:11 -0500 Received: from outbound-mail-07.bluehost.com ([69.89.17.207]:52655 "HELO outbound-mail-07.bluehost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753674Ab0ADWyK convert rfc822-to-8bit (ORCPT ); Mon, 4 Jan 2010 17:54:10 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=virtuousgeek.org; h=Received:Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding:X-Identified-User; b=ppkjY928SZeycXEJstxgClZcm7rQnLX0DixI+VXOT8OoLjt1wuQAPPSJttir1NyKWerpETuyO/pRYqaqz7VibwCP3AXxG1x4F1cbASRenmihd2THoZc5XN59jNJlLhRd; Date: Mon, 4 Jan 2010 14:54:04 -0800 From: Jesse Barnes To: Andrew Lutomirski Cc: Zdenek Kabelac , Linux Kernel Mailing List , airlied@redhat.com, ajax@redhat.com Subject: Re: i915 drm fails to resume with modeset = 0 Message-ID: <20100104145404.23f34b2a@jbarnes-piketon> In-Reply-To: References: <20100104090221.6f6fc0a6@jbarnes-piketon> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Identified-User: {10642:box514.bluehost.com:virtuous:virtuousgeek.org} {sentby:smtp auth 75.111.28.251 authed with jbarnes@virtuousgeek.org} Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4715 Lines: 111 It's in Eric's tree, I just missed it when I posted this as my 'git pull' was still in progress. Jesse On Mon, 4 Jan 2010 17:17:57 -0500 Andrew Lutomirski wrote: > Did my fix get lost? There's a duplicate save/restore of RC6, too. > > --Andy > > On Mon, Jan 4, 2010 at 12:02 PM, Jesse Barnes > wrote: > > On Mon, 4 Jan 2010 17:27:21 +0100 > > Zdenek Kabelac wrote: > > > >> 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:[]  [] > >> 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: > >>  [] ? drm_gem_object_free+0x0/0x60 [drm] > >>  [] kref_put+0x37/0x70 > >>  [] drm_gem_object_unreference+0x1a/0x20 [i915] > >>  [] intel_init_clock_gating+0x32f/0x350 [i915] > >>  [] i915_restore_state+0x202/0x350 [i915] > >>  [] i915_resume+0x77/0x100 [i915] > >>  [] ? drm_class_resume+0x0/0x50 [drm] > >>  [] drm_class_resume+0x4b/0x50 [drm] > >>  [] legacy_resume+0x34/0x80 > >>  [] dpm_resume_end+0x409/0x430 > >>  [] suspend_devices_and_enter+0x124/0x1a0 > >>  [] enter_state+0xda/0xf0 > >>  [] state_store+0x99/0x100 > >>  [] kobj_attr_store+0x17/0x20 > >>  [] sysfs_write_file+0xe6/0x170 > >>  [] vfs_write+0xb8/0x1a0 > >>  [] sys_write+0x51/0x90 > >>  [] 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  [] drm_gem_object_free+0x5a/0x60 [drm] > >>  RSP > >> ---[ 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: > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c > > b/drivers/gpu/drm/i915/intel_d index 279dc96..3f46f81 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -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; > > > > > -- Jesse Barnes, Intel Open Source Technology Center -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/