Bug 33812

Summary: radeon with modeset option causes oops as secondary adapter (vgaswitcheroo)
Product: Drivers Reporter: Johannes Engel (jcnengel)
Component: Video(DRI - non Intel)Assignee: Dave Airlie (airlied)
Status: CLOSED CODE_FIX    
Severity: high CC: airlied, alexdeucher, blazej.bucko, florian, maciej.rutecki, rjw, sfrench
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.38.3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 32012    
Attachments: kernel log
lspci output
attempted fix.

Description Johannes Engel 2011-04-21 23:14:59 UTC
Created attachment 54942 [details]
kernel log

System: Lenovo ThinkPad T500
00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
01:00.0 VGA compatible controller: ATI Technologies Inc Mobility Radeon HD 3650
using vgaswitcheroo

Trying to load radeon (as a module or in kernel) with modeset not explicitly disabled causes a kernel NULL pointer dereference if i915 has initialised the fb console already. 
That behaviour did not occur in 2.6.38, only after upgrading to 2.6.38.3 (haven't had the time to bisect yet).

If I disable switching in the BIOS and move to the radeon card as exclusive adapter, everything works fine. with dual graphics stack
Comment 1 Johannes Engel 2011-04-21 23:15:31 UTC
Created attachment 54952 [details]
lspci output
Comment 2 Rafael J. Wysocki 2011-04-30 22:14:26 UTC
*** Bug 34022 has been marked as a duplicate of this bug. ***
Comment 3 Dave Airlie 2011-05-01 08:07:11 UTC
don't suppose anyone can bisect this? you'd only have to bisect drivers/gpu

I can probably try and reproduce it next week.
Comment 4 Dave Airlie 2011-05-01 10:14:41 UTC
Created attachment 56052 [details]
attempted fix.

please test this.
Comment 5 blazej.bucko 2011-05-01 11:24:51 UTC
It seems to be working fine.
Comment 6 Johannes Engel 2011-05-01 11:47:47 UTC
I confirm that Dave's patch resolves the issue.
Thanks a lot!
Comment 7 Rafael J. Wysocki 2011-05-01 11:57:39 UTC
*** Bug 33422 has been marked as a duplicate of this bug. ***
Comment 8 Rafael J. Wysocki 2011-05-01 12:00:54 UTC
Handled-By : Dave Airlie <airlied@linux.ie>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=56052
Comment 9 Steve French 2011-05-02 02:54:14 UTC
I get this frequently on rc3, but have run more recent builds or with this patch yet.
Comment 10 Johannes Engel 2011-05-03 21:37:08 UTC
Hi Dave,
can we expect this patch in 2.6.38.6?
Comment 11 Rafael J. Wysocki 2011-05-04 16:33:09 UTC
Fixed by http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eaa4f5e1d0b816291a59a47917e569c0384f2b6f

@Johannes: The commit has been annotated as "Cc: stable@kernel.org", so the
answer is yes, you can.