Bug 60021 - kernel panic when loading i915 module
Summary: kernel panic when loading i915 module
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Video(DRI - Intel) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Daniel Vetter
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-21 08:25 UTC by Dustin King
Modified: 2013-08-09 08:39 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.9
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
netconsole log of kernel panic (11.39 KB, text/plain)
2013-06-21 08:25 UTC, Dustin King
Details
output of lspci -s 00:02.0 -vv (1.01 KB, text/plain)
2013-06-21 08:26 UTC, Dustin King
Details
Read the hardware state for the transcoder (2.83 KB, patch)
2013-06-21 14:39 UTC, Chris Wilson
Details | Diff
modified version of the patch to patch cleanly against 3.9.6 (1.52 KB, patch)
2013-06-21 23:49 UTC, Dustin King
Details | Diff
new patch which punts the pipe->cpu transcoder decoding to userspace (6.43 KB, patch)
2013-08-08 12:36 UTC, Daniel Vetter
Details | Diff
don't deref the pipe->cpu_transcoder mapping in the hangcheck code (7.22 KB, patch)
2013-08-08 13:12 UTC, Daniel Vetter
Details | Diff
modified version of new patch for 3.10.5 (4.41 KB, patch)
2013-08-08 22:23 UTC, Dustin King
Details | Diff

Description Dustin King 2013-06-21 08:25:56 UTC
Created attachment 105601 [details]
netconsole log of kernel panic

I get a kernel panic most but not all of the time that the i915 module gets loaded. When it does load successfully, the system behaves normally. I'm using Arch Linux on an older MacBook (2,1) and have had the problem with all the 3.9 kernels I've tried thus far (3.9.3, 3.9.5, and 3.9.6). The problem does not occur with any of the 3.8 kernels I've used (3.8.4, 3.8.6, 3.8.8, 3.8.11) or any earlier kernel versions.

Setting nomodeset on the kernel command line avoids the kernel panic. I tried modifying a number of the other i915 module parameters without any sort of consistent success.

I've attached a netconsole log of one of the kernel panics.
Comment 1 Dustin King 2013-06-21 08:26:39 UTC
Created attachment 105611 [details]
output of lspci -s 00:02.0 -vv
Comment 2 Chris Wilson 2013-06-21 14:39:53 UTC
Created attachment 105661 [details]
Read the hardware state for the transcoder
Comment 3 Dustin King 2013-06-21 23:46:40 UTC
Thanks. That patch seems to resolve the problem. Is it likely to make it into the mainline kernel soon?
Comment 4 Dustin King 2013-06-21 23:49:08 UTC
Created attachment 105691 [details]
modified version of the patch to patch cleanly against 3.9.6

Not sure if this is helpful, but figured I'd upload it in case it is.
Comment 5 Jani Nikula 2013-08-08 10:06:35 UTC
Chris, the patch seems to have stalled at [1], will you pick it up?

[1] http://mid.gmane.org/20130625124357.GS5823@phenom.ffwll.local
Comment 6 Chris Wilson 2013-08-08 10:12:45 UTC
Daniel wants to completely rewrite the tested patch, so...
Comment 7 Daniel Vetter 2013-08-08 12:36:27 UTC
Created attachment 107156 [details]
new patch which punts the pipe->cpu transcoder decoding to userspace
Comment 8 Daniel Vetter 2013-08-08 12:38:03 UTC
commit e8129b9113a71083a3eea13ae63b4bb848c47895
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jun 25 08:15:22 2013 +0100

    drm/i915: Dump all transcoder registers on error

Fix pushed to drm-intel-next-queued, please reopen if it doesn't work.
Comment 9 Daniel Vetter 2013-08-08 13:09:24 UTC
Patch needs more work, also it needs to go into -fixes with cc: stable.
Comment 10 Daniel Vetter 2013-08-08 13:12:41 UTC
Created attachment 107157 [details]
don't deref the pipe->cpu_transcoder mapping in the hangcheck code

Completely new patch, please test.
Comment 11 Dustin King 2013-08-08 22:21:57 UTC
The new patch seems to work as well. I had to modify it slightly to patch cleanly against the 3.10.5 kernel sources (the current kernel for Arch Linux, the distribution I'm running). I'll upload the modified patch in case it's helpful.
Comment 12 Dustin King 2013-08-08 22:23:25 UTC
Created attachment 107161 [details]
modified version of new patch for 3.10.5
Comment 13 Daniel Vetter 2013-08-09 08:39:18 UTC
Fix merged with cc: stable, thanks for testing:

commit 3d51af04567800a87a04785d375f1258977ef6d7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Aug 8 15:12:06 2013 +0200

    drm/i915: Don't deref pipe->cpu_transcoder in the hangcheck code

Note You need to log in before you can comment on or make changes to this bug.