* i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence @ 2011-08-12 6:16 Justin P. Mattock 2011-08-12 14:14 ` Keith Packard 0 siblings, 1 reply; 7+ messages in thread From: Justin P. Mattock @ 2011-08-12 6:16 UTC (permalink / raw) To: linux-kernel@vger.kernel.org, airlied Im getting a freeze with the current Mainline using an inspiron 1200. I have posted images of no_console_suspend=1 http://www.flickr.com/photos/44066293@N08/6034687244/ http://www.flickr.com/photos/44066293@N08/6034131811/ Note: these are images of suspending the machine on two occasions (removing the battery gave me more message on the screen). I can try for a bisect, but might not be able to do so due to time constraints and things. (if there is any patches to try and test let me know!) Justin P. Mattock ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 6:16 i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence Justin P. Mattock @ 2011-08-12 14:14 ` Keith Packard 2011-08-12 15:57 ` Justin P. Mattock 0 siblings, 1 reply; 7+ messages in thread From: Keith Packard @ 2011-08-12 14:14 UTC (permalink / raw) To: Justin P. Mattock, linux-kernel@vger.kernel.org, airlied [-- Attachment #1: Type: text/plain, Size: 398 bytes --] On Thu, 11 Aug 2011 23:16:23 -0700, "Justin P. Mattock" <justinmattock@gmail.com> wrote: > I can try for a bisect, but might not be able to do so due to time > constraints and things. > (if there is any patches to try and test let me know!) Can you provide the output of 'lspci -n -v', and can you tell us which version of the kernel this corresponds to? -- keith.packard@intel.com [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 14:14 ` Keith Packard @ 2011-08-12 15:57 ` Justin P. Mattock 2011-08-12 17:11 ` Keith Packard 0 siblings, 1 reply; 7+ messages in thread From: Justin P. Mattock @ 2011-08-12 15:57 UTC (permalink / raw) To: Keith Packard; +Cc: linux-kernel@vger.kernel.org, airlied On 08/12/2011 07:14 AM, Keith Packard wrote: > On Thu, 11 Aug 2011 23:16:23 -0700, "Justin P. Mattock"<justinmattock@gmail.com> wrote: > >> I can try for a bisect, but might not be able to do so due to time >> constraints and things. >> (if there is any patches to try and test let me know!) > > Can you provide the output of 'lspci -n -v', and can you tell us which > version of the kernel this corresponds to? > yeah appologize for not posting any info on the machine(bit tired). Anyways here is part of lspci(I can fpast the whole thing if need be), and dmesg of the machine running the latest Mainline. http://fpaste.org/aSQP/ one thing I am seeing is: [ 96.384971] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.408364] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.425860] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.443365] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.474238] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.491728] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 [ 96.521229] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 in of which I have not seen in the past. as for good kernel 2.6.39-rc5 survives suspend. Justin P. Mattock ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 15:57 ` Justin P. Mattock @ 2011-08-12 17:11 ` Keith Packard 2011-08-12 17:37 ` Justin P. Mattock 0 siblings, 1 reply; 7+ messages in thread From: Keith Packard @ 2011-08-12 17:11 UTC (permalink / raw) To: Justin P. Mattock; +Cc: linux-kernel@vger.kernel.org, airlied [-- Attachment #1: Type: text/plain, Size: 1797 bytes --] On Fri, 12 Aug 2011 08:57:41 -0700, "Justin P. Mattock" <justinmattock@gmail.com> wrote: > [ 96.384971] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 You're not using KMS are you... UMS mode disables a ton of features in the driver; you've hit a couple that weren't getting skipped in all cases. Here's some patches that make sure two of the disabled features are correctly bypassed. If these work for you, I'll create a couple of patches, one per bug. Afterwards, you should really consider switching to KMS... (meanwhile, thanks for finding bugs in ancient code!) diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 02f96fd..9cbb0cd 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -2058,8 +2058,10 @@ void intel_irq_init(struct drm_device *dev) dev->driver->get_vblank_counter = gm45_get_vblank_counter; } - - dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; + if (drm_core_check_feature(dev, DRIVER_MODESET)) + dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; + else + dev->driver->get_vblank_timestamp = NULL; dev->driver->get_scanout_position = i915_get_crtc_scanoutpos; if (IS_IVYBRIDGE(dev)) { diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 87677d6..f107423 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -871,7 +871,8 @@ int i915_restore_state(struct drm_device *dev) } mutex_unlock(&dev->struct_mutex); - intel_init_clock_gating(dev); + if (drm_core_check_feature(dev, DRIVER_MODESET)) + intel_init_clock_gating(dev); if (IS_IRONLAKE_M(dev)) { ironlake_enable_drps(dev); -- keith.packard@intel.com [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 17:11 ` Keith Packard @ 2011-08-12 17:37 ` Justin P. Mattock 2011-08-12 17:43 ` Keith Packard 0 siblings, 1 reply; 7+ messages in thread From: Justin P. Mattock @ 2011-08-12 17:37 UTC (permalink / raw) To: Keith Packard; +Cc: linux-kernel@vger.kernel.org, airlied on 08/12/2011 10:11 AM, Keith Packard wrote: > On Fri, 12 Aug 2011 08:57:41 -0700, "Justin P. Mattock"<justinmattock@gmail.com> wrote: > >> [ 96.384971] [drm:i915_get_vblank_timestamp] *ERROR* Invalid crtc 0 > > You're not using KMS are you... > > UMS mode disables a ton of features in the driver; you've hit a couple > that weren't getting skipped in all cases. > > Here's some patches that make sure two of the disabled features are > correctly bypassed. If these work for you, I'll create a couple of > patches, one per bug. Afterwards, you should really consider switching > to KMS... > > (meanwhile, thanks for finding bugs in ancient code!) > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c > index 02f96fd..9cbb0cd 100644 > --- a/drivers/gpu/drm/i915/i915_irq.c > +++ b/drivers/gpu/drm/i915/i915_irq.c > @@ -2058,8 +2058,10 @@ void intel_irq_init(struct drm_device *dev) > dev->driver->get_vblank_counter = gm45_get_vblank_counter; > } > > - > - dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; > + if (drm_core_check_feature(dev, DRIVER_MODESET)) > + dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp; > + else > + dev->driver->get_vblank_timestamp = NULL; > dev->driver->get_scanout_position = i915_get_crtc_scanoutpos; > > if (IS_IVYBRIDGE(dev)) { > diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c > index 87677d6..f107423 100644 > --- a/drivers/gpu/drm/i915/i915_suspend.c > +++ b/drivers/gpu/drm/i915/i915_suspend.c > @@ -871,7 +871,8 @@ int i915_restore_state(struct drm_device *dev) > } > mutex_unlock(&dev->struct_mutex); > > - intel_init_clock_gating(dev); > + if (drm_core_check_feature(dev, DRIVER_MODESET)) > + intel_init_clock_gating(dev); > > if (IS_IRONLAKE_M(dev)) { > ironlake_enable_drps(dev); > > I have: Enable modesetting on intel by default (DRM_I915_KMS) not set in my .config. I will enable that and see if this fixes this issue, if not then I will test those patches out. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 17:37 ` Justin P. Mattock @ 2011-08-12 17:43 ` Keith Packard 2011-08-12 23:52 ` Justin P. Mattock 0 siblings, 1 reply; 7+ messages in thread From: Keith Packard @ 2011-08-12 17:43 UTC (permalink / raw) To: Justin P. Mattock; +Cc: linux-kernel@vger.kernel.org, airlied [-- Attachment #1: Type: text/plain, Size: 459 bytes --] On Fri, 12 Aug 2011 10:37:20 -0700, "Justin P. Mattock" <justinmattock@gmail.com> wrote: > I have: Enable modesetting on intel by default (DRM_I915_KMS) not set > in my .config. I will enable that and see if this fixes this issue, if > not then I will test those patches out. Could you test the patches without switching to KMS first? Otherwise, the underlying bugs aren't going to get fixed for anyone else... -- keith.packard@intel.com [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence 2011-08-12 17:43 ` Keith Packard @ 2011-08-12 23:52 ` Justin P. Mattock 0 siblings, 0 replies; 7+ messages in thread From: Justin P. Mattock @ 2011-08-12 23:52 UTC (permalink / raw) To: Keith Packard; +Cc: linux-kernel@vger.kernel.org, airlied On 08/12/2011 10:43 AM, Keith Packard wrote: > On Fri, 12 Aug 2011 10:37:20 -0700, "Justin P. Mattock"<justinmattock@gmail.com> wrote: > >> I have: Enable modesetting on intel by default (DRM_I915_KMS) not set >> in my .config. I will enable that and see if this fixes this issue, if >> not then I will test those patches out. > > Could you test the patches without switching to KMS first? Otherwise, > the underlying bugs aren't going to get fixed for anyone else... > Thanks a who lot for that.. machine wakes up perfectly with that patch.. dmesg of a patch applied with a good wakeup: http://fpaste.org/7GA7/ only really thing now I am seeing is: [drm:i915_report_and_clear_eir] *ERROR* EIR stuck: 0x00000010, masking [ 146.362007] render error detected, EIR: 0x00000010 [ 146.362007] page table error but might just be cosmetic. Justin P. Mattock ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-12 23:52 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-12 6:16 i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence Justin P. Mattock 2011-08-12 14:14 ` Keith Packard 2011-08-12 15:57 ` Justin P. Mattock 2011-08-12 17:11 ` Keith Packard 2011-08-12 17:37 ` Justin P. Mattock 2011-08-12 17:43 ` Keith Packard 2011-08-12 23:52 ` Justin P. Mattock
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox