From: "Justin P. Mattock" <justinmattock@gmail.com>
To: Keith Packard <keithp@keithp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
airlied@linux.ie
Subject: Re: i915 suspend crash: BUG: unable to handle kernel NULL pointer deferrence
Date: Fri, 12 Aug 2011 10:37:20 -0700 [thread overview]
Message-ID: <4E4564D0.70104@gmail.com> (raw)
In-Reply-To: <yunliuysgf6.fsf@aiko.keithp.com>
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.
next prev parent reply other threads:[~2011-08-12 17:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-08-12 17:43 ` Keith Packard
2011-08-12 23:52 ` Justin P. Mattock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E4564D0.70104@gmail.com \
--to=justinmattock@gmail.com \
--cc=airlied@linux.ie \
--cc=keithp@keithp.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox