Skip to contentSkip to conversation

New: Radeon KMS on Macs with EFI boot

Bug 26891 [email protected] 1 participant 67 messages Mar 4, 2010 – Apr 12, 2013

lore
Share & tools
lore
#0 lore raw

http://bugs.freedesktop.org/show_bug.cgi?id=26891

Summary: Radeon KMS on Macs with EFI boot
Product: DRI
Version: XOrg CVS
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: DRM/Radeon
AssignedTo: [email protected]
ReportedBy: [email protected]

Created an attachment (id=33766)
--> (http://bugs.freedesktop.org/attachment.cgi?id=33766)
Bios from firmware loading hack

Apple's iMacs and MacBooks don't have a video bios loaded when booting the Linux Kernel via an EFI bootloader rather than using Apple's bootcamp PC bios compatibility layer. This prevents the ATI Radeon kernel modesetting from working.

Grub2 has a functionality to load a video bios image from a file stored on the efi boot partition. This makes the user mode setting in the X11 driver happy, but the kernel driver doesn't find the bios(invalid PCI Rom signature). Hacking the driver to try the load-from-vram method doesn't work either.

I have created a hacky new bios loading method that loads a bios image via the kernel firmware loader from radeon/vbios.bin. I created this file from a bootcamp boot in the way documented in the Grub 2 wiki(http://grub.enbug.org/TestingOnMacbook). This way radeon KMS works, but like loading a bios image via the bootloader this is not a particularily pretty solution.

I am using a native EFI bootloader instead of bootcamp because bootcamp is not capable of booting from a USB disk.

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#1 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

http://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #1 from Stefan Dösinger <[email protected]> 2010-03-04 12:50:11 PST --- Oh, I forgot: The Intel DRM driver works just fine with KMS without a bios image(tested with a GMA 965 aka X3100). On the Nvidia side I have to use the EFI framebuffer, then start X with the proprietary driver, which obviously breaks my EFI framebuffer. I'm looking forward to noveau...

Signature · 14 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#2 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #2 from [email protected] 2011-05-12 05:06:39 PDT --- Hi,
since I'm triple booting my MBP for some time now (using mostly grub2@efi) I integrated your patch im my local git tree and can confirm it works as intended.

Without using radeon-ucode binaries I'm able to run X in full resolution without any trouble (no direct rendering however).
I was even able to compile the radeon kms driver directly into the kernel by including the vbios / ucode binaries as blobs or placing them in my intramfs.

However when trying to enable direct rendering (by loading radion-ucodes) I get some serious display flicker and sometimes a wrong display placement. Looks like some timings are horribly wrong..

I really love to be able to boot my kernel in pure EFI mode without fakebios etc.
If I can be of any help to improve the situation let me know. I'm not unexperienced in kernel/driver coding and I'm a happy guinea pig ;)

-- my hardware specs --
MacBookPro8,2 (early 2011)
- Intel Core I7 (2,2Ghz, quad)
- ATI Radeon HD 6750m (the 1Gb model)
------------------------

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#3 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #3 from Jérémy Lal <[email protected]> 2011-05-16 13:27:40 PDT --- I'm booting an imac12,2 in UEFI mode (need a "Run EFI in physical mode" patch before doing so),
here's how :
1) boot from latest ubuntu live CD (hold alt, or c, at boot)
2) dump the bios
dd if=/dev/mem of=vbios.bin bs=65536 skip=12 count=1
3) move it to your partition's /lib/firmware/radeon/vbios.bin
4) use your patch, but move the radeon_read_bios_from_firmware call before all other calls to get the bios (force using vbios.bin)

That's it and thank you :)

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #4 from Ortwin Glück <[email protected]> 2011-05-17 02:50:40 PDT --- What is the real reason that the driver doesn't see the video BIOS? Is it looking at the wrong address? Is some MMU wrongly setup? I mean the video BIOS is obviously there, if you can extract it with dd. I would rather see the real bug fixed than have a workaround.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #5 from [email protected] 2011-05-17 03:31:16 PDT --- (In reply to comment #4)
I assume you're not familiar with mac or didn't read the while bug history. Mac are booted using the EFI runtime one of the successors to BIOS.

Quoted 3 lines

What is the real reason that the driver doesn't see the video BIOS? Is it looking at the wrong address? Is some MMU wrongly setup? I mean the video BIOS is obviously there,

You're wrong here. The bios is there if you boot in 'legacy mode'. Legacy mode means your EFI machine will load and run a (slow) BIOS emulation.

Quoted 1 line

if you can extract it with dd.

This exact step happens in legacy mode.
If you boot in native EFI you don't have any BIOS at all.

Quoted 2 lines

I would rather see the real
bug fixed than have a workaround.

As nice as it sounds 'fixing' would imply writing a separate KMS driver which would work entirely without the need to access the BIOS.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #6 from Ortwin Glück <[email protected]> 2011-05-17 04:14:24 PDT --- Sorry for being slightly off-topic. I was implicitly referring to bug 27314, where I observe the same problem "radeon 0000:01:00.0: Invalid ROM contents" when booting in legacy mode (where we obviously do have a vbios).

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #7 from [email protected] 2011-05-19 03:30:41 PDT --- (In reply to comment #3)

Quoted 10 lines

I'm booting an imac12,2 in UEFI mode (need a "Run EFI in physical mode" patch before doing so),
here's how :
1) boot from latest ubuntu live CD (hold alt, or c, at boot)
2) dump the bios
dd if=/dev/mem of=vbios.bin bs=65536 skip=12 count=1
3) move it to your partition's /lib/firmware/radeon/vbios.bin
4) use your patch, but move the radeon_read_bios_from_firmware call before all other calls to get the bios (force using vbios.bin)

Thats exactly what I did on my MBP however the screen flicker remains..

I'm pretty sure the BIOS is valid (dmesg identifies it as ATOM BIOS: Apple) and strings revealed data like "Whistler Pro" which IIRC is the type code used by
the Radeon HD 6xxx series.

Since Jérémy has a working setup with GPU acceleration I can only suspect a problem in the microcode. iMac12,2 has a Radeon HD 6970M which utilizes the CAYMAN microcode while my Radeon HD6750M is using TURKS.

So I'm stuck with working but non-accelerated radeondrmfb.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#8 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #8 from Jérémy Lal <[email protected]> 2011-05-19 05:34:40 PDT --- (In reply to comment #7)

Quoted 3 lines

Since Jérémy has a working setup with GPU acceleration I can only suspect a problem in the microcode. iMac12,2 has a Radeon HD 6970M which utilizes the CAYMAN microcode while my Radeon HD6750M is using TURKS.

Mine is [1002:6740] :

[    9.285052] [drm] Loading TURKS Microcode

which kernel version are you using ?

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #9 from [email protected] 2011-05-19 06:22:52 PDT --- (In reply to comment #8)

Quoted 4 lines

Mine is [1002:6740] :

[    9.285052] [drm] Loading TURKS Microcode

which kernel version are you using ?

2.6.39-rc7-00215-g194a526
git head with local patches applied (phys-efi, radeon-firmware hack) I'm running Gentoo linux amd64.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#10 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #10 from Jérémy Lal <[email protected]> 2012-01-15 04:09:51 PST --- linux 3.2-rc7 is working without any patch, just radeon kms, on iMac12,2 EFI boot. (grub-efi-amd64)

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#11 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #11 from Stefan Dösinger <[email protected]> 2012-02-05 00:38:27 UTC --- Still doesn't work for me, Linux 3.2.1, iMac5,1. Loading the module writes this in dmesg:

[drm] radeon defaulting to kernel modesetting.
[drm] radeon kernel modesetting enabled.
checking generic (c0010000 510000) vs hw (c0000000 8000000)
fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver
Console: switching to colour dummy device 80x25
radeon 0000:01:00.0: can't find IRQ for PCI INT A; please try using pci=biosirq radeon 0000:01:00.0: setting latency timer to 64
[drm] initializing kernel modesetting (RV530 0x1002:0x71C5 0x106B:0x0080). [drm] register mmio base: 0xC8400000
[drm] register mmio size: 65536
radeon 0000:01:00.0: Invalid ROM contents
radeon 0000:01:00.0: Invalid ROM contents
[drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
radeon 0000:01:00.0: Fatal error during GPU init
[drm] radeon: finishing device.
[TTM] Memory type 2 has not been initialized.
[drm] radeon: cp finalized
vga_switcheroo: disabled
radeon: probe of 0000:01:00.0 failed with error -22

From this point on the efi framebuffer is dead(not surprising). It is shown the last screen content from before the radeon driver was loaded.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#12 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #12 from Stefan Dösinger <[email protected]> 2012-02-05 02:25:05 PST --- It looks like there are more things odd in the iMac5,1 firmware:

*) A lot of PCI devices don't work when booted via efi, most importantly the USB hosts. The kernel complains about broken interrupts. This can be worked around with the grub2 fakebios or loadbios commands.

*) Even with my vbios.bin hack direct rendering doesn't work. Glxgears shows a black window and the screen freezes. The mouse pointer is still moving. I can kill the X server with SIGKILL, but then the display turns off and I have to reboot to recover. There are no obvious messages in the X server output, glxgears output(via ssh) or dmesg.

The second problem can be worked around by putting the system to sleep after loading radeon.ko and before running a 3D app. S3 sleep works fine, and after the wakeup the GPU seems to work correctly.

However, sleep mode doesn't magically fix the missing rom image. I'll attach a lspci -vvv output from before and after the standby and the dmesg output, maybe someone spots a difference in the GPU state.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #13 from Stefan Dösinger <[email protected]> 2012-02-05 02:27:18 PST --- Created attachment 56618
--> https://bugs.freedesktop.org/attachment.cgi?id=56618
lspci output before standby

The radeon.ko module was loaded at this time with the firmware hack.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #14 from Stefan Dösinger <[email protected]> 2012-02-05 02:27:54 PST --- Created attachment 56619
--> https://bugs.freedesktop.org/attachment.cgi?id=56619
lspci output after standby

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#15 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #15 from Stefan Dösinger <[email protected]> 2012-02-05 02:28:21 PST --- Created attachment 56620
--> https://bugs.freedesktop.org/attachment.cgi?id=56620
dmesg output

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#16 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #16 from James Tyrrell <[email protected]> 2012-03-29 03:03:58 PDT --- This works for my MacBook Pro 8,3. It allows me to use my thunderbolt monitor whilst booting via EFI, something that is not possible when using the Intel IGD.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#17 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #17 from Chi-Thanh Christopher Nguyen <[email protected]> 2012-03-31 09:39:33 PDT --- Nouveau allows to load vbios from image file now.
http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=c9b07e9e85e5b7fe38c9f009967e8bed51d3760b

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#18 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #18 from James Tyrrell <[email protected]> 2012-04-09 20:15:22 PDT --- What would it take to get this patch into mainline? Like I said before I have a MacBook Pro 8,3 and the patch works for me, allowing me to boot via EFI and use the Radeon graphics card to power my Apple Thunderbolt Display. This is something that was only possible when booting via BIOS.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#19 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #19 from Alex Deucher <[email protected]> 2012-04-10 06:14:26 PDT --- IIRC, Matthew Garret had a patch to fetch the vbios from EFI during early boot. Also, there is a way to fetch the vbios on legacy free EFI systems via ACPI, however, I don't know if apple uses it or not.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#20 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #20 from Austin Lund <[email protected]> 2012-04-10 18:45:03 PDT --- (In reply to comment #19)

Quoted 1 line

IIRC, Matthew Garret had a patch to fetch the vbios from EFI during early boot.

Is this online anywhere? Do you have a link?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#21 lore raw

[Bug 26891] Radeon KMS on Macs with EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #21 from headwall <[email protected]> 2012-05-01 10:24:20 PDT --- I'm on a Mac Pro 1,1 with the original ATI X1900XT card, and had similar problems booting via EFI. After the modesetting was initialized the screen went blank, but the computer completed booting.

Therefore, I applied the patch, which made the kernel boot absolutely fine. When I want to start X however, the picture gets distorted. No errors or warnings are shown in the Xorg log file. Starting X with BIOS boot works absolutely fine with the same install.

One thing I've no noticed is that the kernel doesn't reserve the memory space for the video ROM (0x000c0000-0x000cffff) in EFI boot as it does in BIOS mode. I've tried to write a DSDT patch for this to reserve the area, without success.

I suspect that the ATI drivers (xf86-video-ati) tries to read the video ROM both from the kernel, that was placed there through the patch, and from the memory range, which is not there in EFI boot.

I run a Gentoo install with Grub2 boot, 3.3 vanilla kernel, Xorg-server 1.12 and xf86-video-ati compiled from GIT.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#22 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

David L. <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |equinox-freedesktopbugs@dia
                   |                            |c24.net
            Summary|Radeon KMS on Macs with EFI |Radeon KMS fails with
                   |boot                        |inaccessible AtomBIOS on
                   |                            |systems with (U)EFI boot

--- Comment #22 from David L. <[email protected]> 2012-08-03 16:12:27 UTC --- Exact same issue appears on an HP EliteBook 8470p if you select "native UEFI" as boot method in setup. Legacy and hybrid boot options work fine.

Changing bug title since this is not a Mac-specific issue, although it is more severe on Macs without the legacy/hybrid options easily accessible.

It seems that the driver either cannot rely on the AtomBIOS being accessible, or we need to add code to enable the mapping with some PCI hacks?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#23 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #23 from Alex Deucher <[email protected]> 2012-08-03 16:33:04 UTC --- On UEFI systems the vbios should be accessible via the ACPI VFCT. See the bottom of atombios.h for struct definitions. Macs do their own thing so I don't know if this will work on them or not.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#24 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #24 from David L. <[email protected]> 2012-08-03 17:12:52 UTC --- (In reply to comment #23)

Quoted 3 lines

On UEFI systems the vbios should be accessible via the ACPI VFCT. See the bottom of atombios.h for struct definitions. Macs do their own thing so I don't know if this will work on them or not.

Should this already work on 3.4.7 and should I file a separate report about ACPI VFCT being broken or is that future tense/upcoming?

Also, in hybrid boot mode at least, acpidump gives me no hits for VFCT (just tried acpidump | grep VFCT, that should show something shouldn't it?) Will try under native UEFI in a minute...

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#25 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #25 from Alex Deucher <[email protected]> 2012-08-03 17:26:03 UTC --- (In reply to comment #24)

Quoted 2 lines

Should this already work on 3.4.7 and should I file a separate report about ACPI VFCT being broken or is that future tense/upcoming?

Support for fetching the vbios from VFCT still needs to be implemented.

Quoted 4 lines

Also, in hybrid boot mode at least, acpidump gives me no hits for VFCT (just tried acpidump | grep VFCT, that should show something shouldn't it?) Will try under native UEFI in a minute...

I'm not too familiar with ACPI and UEFI unfortunately. It's part of the GOP stuff for UEFI.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#26 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #26 from David L. <[email protected]> 2012-08-03 18:49:14 UTC --- Created attachment 65100
--> https://bugs.freedesktop.org/attachment.cgi?id=65100
hacked-up radeon VFCT BIOS access patch

So the good news is that a VFCT ACPI table does indeed show up when I boot under UEFI native mode on the HP EliteBook.

I hacked up some code to get the BIOS from there and it successfully brought up the card and drove my DisplayPort screen. (hack patch attached)

The bad news is that the LVDS panel first went backlight-off, on starting X started displaying flickering pixelgarbage and at some later point the entire box locked up.

I'll go diff the BIOS images against each other, maybe the BIOS from VFCT is corrupted...

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#27 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #27 from Alex Deucher <[email protected]> 2012-08-03 19:23:34 UTC --- (In reply to comment #26)

Quoted 9 lines

Created attachment 65100 [details] [review]
hacked-up radeon VFCT BIOS access patch

So the good news is that a VFCT ACPI table does indeed show up when I boot under UEFI native mode on the HP EliteBook.

I hacked up some code to get the BIOS from there and it successfully brought up the card and drove my DisplayPort screen. (hack patch attached)

Excellent.

Quoted 3 lines

The bad news is that the LVDS panel first went backlight-off, on starting X started displaying flickering pixelgarbage and at some later point the entire box locked up.

You probably need this patch:
http://lists.freedesktop.org/archives/dri-devel/2012-July/025567.html

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#28 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #28 from David L. <[email protected]> 2012-08-03 21:17:10 UTC --- (In reply to comment #27)

Quoted 6 lines
Quoted 3 lines

The bad news is that the LVDS panel first went backlight-off, on starting X started displaying flickering pixelgarbage and at some later point the entire box locked up.

You probably need this patch:
http://lists.freedesktop.org/archives/dri-devel/2012-July/025567.html

After both patches, that indeed fixes things as soon as X is started, but the console is still broken. After loading the module, the panel just switches off, though the console is still usable. Plugging my DisplayPort screen in also reenables the LVDS panel, although the image is wrapped around by around 100 pixels. (Left part of my prompt is on the right of the screen.) Wraparound might be related to the different resolution for the ext display; the external screen only shows the nonwrapping part of the image (and is therefore missing the first characters of the prompt). Either way that's a separate bug...

Apart from the above, I now have working graphics (including 3D) on an UEFI native booted HP EliteBook. I'll clean up my hack VFCT patch and send it to dri-devel.

P.S.: The laptop also needs your backlight control patch, thanks a zillion for that - you wouldn't believe how nuts that was driving me.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#29 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #29 from Jerome Glisse <[email protected]> 2012-08-03 22:05:53 UTC --- Is the lvds console display shifted if you don't connect any external monitor ?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#30 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #30 from David L. <[email protected]> 2012-08-03 22:54:12 UTC --- (In reply to comment #29)

Quoted 1 line

Is the lvds console display shifted if you don't connect any external monitor ?

So far I only got the LVDS to display anything by connecting the DP monitor, so I don't really know. I didn't try much there... I'll try some other magic incantations/plug sequences tomorrow, maybe there's a sequence to get LVDS-only with it actually showing something.

Starting X while the LVDS is off works fine, reenabling it.

Also, the "LVDS off" state after loading the module has the backlight off too, maybe it's a bug in the brightness control and there is content but I just don't see it...

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#31 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #31 from David L. <[email protected]> 2012-08-03 23:21:21 UTC --- (In reply to comment #30)

Quoted 9 lines

(In reply to comment #29)

Quoted 1 line

Is the lvds console display shifted if you don't connect any external monitor ?

So far I only got the LVDS to display anything by connecting the DP monitor, so I don't really know. I didn't try much there... I'll try some other magic incantations/plug sequences tomorrow, maybe there's a sequence to get LVDS-only with it actually showing something.

Starting X while the LVDS is off works fine, reenabling it.

Correction: I just had a hard freeze after an hour or so of X use.

Since I need to get some things done, I've booted in hybrid UEFI mode now with only the brightness patch applied. The LVDS-blank-after-insmod issue is gone, so it's not the backlight control I guess.

Also, interestingly, the power consumption of the laptop was considerably lower under UEFI native mode (24W) vs. UEFI hybrid mode (29W). Could be either the CRTC programming patch or something completely unrelated.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#32 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #32 from Alex Deucher <[email protected]> 2012-08-09 21:10:43 UTC --- Created attachment 65357
--> https://bugs.freedesktop.org/attachment.cgi?id=65357
VFCT patch

Hi David, I took the liberty of cleaning up your UEFI VFCT patch. I'd like to get it into the next drm fixes pull in the next day or so. If you are ok with it or would like anything changed, please let me know.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#33 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

headwall <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #33 from headwall <[email protected]> 2012-08-12 17:52:10 UTC --- I tried the VFCT patch on a Mac Pro 1,1, and it gives me a kernel panic. I can't really give any details on it because the screen output is garbled. The previous patch with adding the video ROM to the kernel works, but without X support.

Should the VFCT table show up in /sys/firmware/acpi/tables? If so, the Mac doesn't support this method. Does anyone know what Darwin/OSX does to get the ROM?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#34 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #34 from Anonymous Helper <[email protected]> 2012-08-30 01:48:07 UTC --- Created attachment 66308
--> https://bugs.freedesktop.org/attachment.cgi?id=66308
DSDT table from Macbook Pro 8,2 (EFI boot)

Alex,
Please see the DSDT table from a Macbook Pro booted in EFI mode. Maybe it will give you some ideas for extracting the VBIOS.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#35 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #35 from Alex Deucher <[email protected]> 2012-08-30 14:25:55 UTC --- (In reply to comment #34)

Quoted 3 lines

Alex,
Please see the DSDT table from a Macbook Pro booted in EFI mode. Maybe it will give you some ideas for extracting the VBIOS.

Sorry, I'm not really much of an ACPI or Mac expert. I don't see anything relevant. IIRC, the vbios on macs is only available in boot services so it's likely gone by the time the OS is loaded. You'd probably need the boot loader to grab it and store a copy somewhere so the OS can access it when it loads. I'm not sure how Apple does it. Someone more familiar with Macs may have some ideas.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#36 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #36 from Stefan Dösinger <[email protected]> 2012-08-30 17:39:59 UTC --- My guess would be that they simply store it in the driver, i.e. similarly to what my hack does. Considering that they have hardware and software under full control I don't see why they want a video bios that's separate from the driver.

Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#37 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

Florian Mickler <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #37 from Florian Mickler <[email protected]> 2012-09-05 20:39:27 UTC --- A patch referencing this bug report has been merged in Linux v3.6-rc3:

commit 268ba0a99f89a84dc5eb312470896113d0709c74

Author: David Lamparter <[email protected]>
Date:   Thu Aug 16 15:45:20 2012 -0400

drm/radeon: implement ACPI VFCT vbios fetch (v3)

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#38 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #38 from Moritz Schlarb <[email protected]> 2012-09-16 21:43:50 UTC --- Created attachment 67258
--> https://bugs.freedesktop.org/attachment.cgi?id=67258
dmesg output from failing loading of radeon driver in 3.6.0_rc3

I tried with kernel 3.6.0_rc3 (using the Gentoo Linux ebuild sys-kernel/git-sources-3.6_rc3) but that doesn't change anything... Maybe someone can use the attached dmesg log for some useful information. (This is without using any changes to GRUB, but when I load vbios.bin and int10.bin the behaviour doesn't change)

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#39 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

Chí-Thanh Christopher Nguyễn <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #67258|application/octet-stream    |text/plain
          mime type|                            |
Signature · 7 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#40 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #39 from Austin Lund <[email protected]> 2012-09-16 22:19:23 UTC --- (In reply to comment #38)

Quoted 10 lines

Created attachment 67258 [details]
dmesg output from failing loading of radeon driver in 3.6.0_rc3

I tried with kernel 3.6.0_rc3 (using the Gentoo Linux ebuild sys-kernel/git-sources-3.6_rc3) but that doesn't change anything... Maybe someone can use the attached dmesg log for some useful information. (This is without using any changes to GRUB, but when I load vbios.bin and int10.bin the behaviour doesn't change)

From what I've been told, you need to boot using the EFI stub method and not a

boot-loader. Also, you may need to pass some kernel options (eg initrd) so the easiest way to do this is from within an EFI shell.

How are you booting the kernel?

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#41 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

Moritz Schlarb <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #40 from Moritz Schlarb <[email protected]> 2012-09-17 06:23:27 UTC --- (In reply to comment #39)

Quoted 3 lines

From what I've been told, you need to boot using the EFI stub method and not a boot-loader. Also, you may need to pass some kernel options (eg initrd) so the easiest way to do this is from within an EFI shell.

Do you have any more details on that? I'd like to try it!

Quoted 1 line

How are you booting the kernel?

linux /boot/vmlinuz root=/dev/sda3
I have never needed an initrd, all required modules are built in...

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#42 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #41 from Austin Lund <[email protected]> 2012-09-18 05:55:27 UTC --- (In reply to comment #40)

Quoted 5 lines

(In reply to comment #39)

Quoted 3 lines

From what I've been told, you need to boot using the EFI stub method and not a boot-loader. Also, you may need to pass some kernel options (eg initrd) so the easiest way to do this is from within an EFI shell.

Do you have any more details on that? I'd like to try it!

Make sure you have CONFIG_EFI and CONFIG_EFI_STUB set for your kernel.

Put the kernel image in a filesystem that can be read by the EFI firmware or has a driver for it.

Boot into the EFI shell. I do this via rEFIt.

cd to the location of the kernel then execute it by typing it's name. Kernel parameters can be listed after the kernel name.

Quoted 3 lines
Quoted 1 line

How are you booting the kernel?

linux /boot/vmlinuz root=/dev/sda3
I have never needed an initrd, all required modules are built in...

OK. So you haven't actually said, but you must be booting via Grub either in EFI mode or BIOS compatiability mode. Neither of those will work in extracting the AtomBIOS from the configurations. It needs to be done before calling ExitBootServices() in EFI mode and Grub isn't set up to do anything this tricky. Hence you have to use the inbuilt kernel loader in the EFI stub code.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#43 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #42 from Steve Smith <[email protected]> 2012-09-18 07:02:43 UTC --- Created attachment 67314
--> https://bugs.freedesktop.org/attachment.cgi?id=67314
EFI stub boot, 3.6-rc6

This doesn't work for me either, using EFI stub booting direct from Refind. dmesg attached. Some additional details:

* MacBook Pro 8,3
* Arch Linux
* Kernel 3.6rc6
* Kernel command-line: vmlinuz-linux-mainline-3.x.efi root=/dev/disk/by-label/Root ro add_efi_memmap radeon.modeset=1 i915.modeset=1 i915.lvds_channel_mode=2 initrd=\EFI\arch\initramfs-linux-mainline-3.x.img

Relevent log lines:

[    5.146024] vga_switcheroo: enabled
[    5.146064] radeon 0000:01:00.0: Invalid ROM contents
[    5.146127] radeon 0000:01:00.0: Invalid ROM contents
[    5.146156] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
[    5.146190] radeon 0000:01:00.0: Fatal error during GPU init
[    5.146221] [drm] radeon: finishing device.
[    5.146222] [TTM] Memory type 2 has not been initialized
[    5.147271] vga_switcheroo: disabled
[    5.147416] radeon: probe of 0000:01:00.0 failed with error -22
Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#44 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #43 from Austin Lund <[email protected]> --- Seems to be my bad. I've got some extra patches that aren't in 3.6 to make this EFI stub booting thing work (not that the actual graphics switching works for me at the moment). They can be downloaded here:

http://people.canonical.com/~sforshee/apple-gmux-patches/

However, I've been just rebasing them in my git tree for a while so I don't know if they cleanly apply.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#45 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #44 from [email protected] ---
(In reply to comment #43)

Quoted 8 lines

Seems to be my bad. I've got some extra patches that aren't in 3.6 to make this EFI stub booting thing work (not that the actual graphics switching works for me at the moment). They can be downloaded here:

http://people.canonical.com/~sforshee/apple-gmux-patches/

However, I've been just rebasing them in my git tree for a while so I don't know if they cleanly apply.

Hi,

My Hardware : macbook pro 8.2
OS: Ubuntu 12.04

I've tested on linux 3.6.2 with patchs 0002 to 0008 only, the others one are already included in 3.6.2

Linux EFI stub boot with the following options :

[    0.000000] Kernel Command line: vmlinuz-3.6.2.efi root=UUID=xxxxxxxx ro

add_efi_memmap i915.lvds_channel_mode=2 i915.modeset=1 radeon.modeset=1 elevator=noop vt.handoff=7 initrd=EFI\gmux\initrd.img-3.6.2

Good news, the radeon card is recognised with an EFI stub boot only !

But the screens stay black !! (lcd panel and hdmi) ..., X is started because I heard lightdm ubuntu sound, but all are black, no X and no console frame buffer.

grep drm /var/log/dmesg.0

[    2.657608] [drm] Initialized drm 1.1.0 20060810
[    2.714673] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    2.714678] [drm] Driver supports precise vblank timestamp query.
[    2.716738] [drm:intel_panel_setup_backlight] *ERROR* Failed to get maximum
backlight value
[    2.759521] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
[    2.850547] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit
banging on pin 2
[    2.875632] fbcon: inteldrmfb (fb0) is primary device
[    3.038809] fb0: inteldrmfb frame buffer device
[    3.038829] drm: registered panic notifier
[    3.187709] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor
0
[    5.529949] [drm] radeon kernel modesetting enabled.
[    5.530228] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x106B:0x00E2).
[    5.530299] [drm] register mmio base: 0xB0800000
[    5.530301] [drm] register mmio size: 131072
[    5.530343] [drm] GPU not posted. posting now...
[    5.545249] [drm] Detected VRAM RAM=1024M, BAR=256M
[    5.545252] [drm] RAM width 128bits DDR
[    5.545356] [drm] radeon: 1024M of VRAM memory ready
[    5.545358] [drm] radeon: 512M of GTT memory ready.
[    5.545378] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    5.545380] [drm] Driver supports precise vblank timestamp query.
[    5.545512] [drm] radeon: irq initialized.
[    5.545516] [drm] GART: num cpu pages 131072, num gpu pages 131072
[    5.545871] [drm] probing gen 2 caps for device 8086:101 = 2/0
[    5.545874] [drm] enabling PCIE gen 2 link speeds, disable with
radeon.pcie_gen2=0
[    5.545959] [drm] Loading TURKS Microcode
[    5.765427] [drm] PCIE GART of 512M enabled (table at 0x0000000000040000).
[    5.787353] [drm] ring test on 0 succeeded in 2 usecs
[    5.787761] [drm] ib test on ring 0 succeeded in 0 usecs
[    5.790458] [drm] Radeon Display Connectors
[    5.790462] [drm] Connector 0:
[    5.790464] [drm]   LVDS-2
[    5.790467] [drm]   DDC: 0x6470 0x6470 0x6474 0x6474 0x6478 0x6478 0x647c
0x647c
[    5.790469] [drm]   Encoders:
[    5.790471] [drm]     LCD1: INTERNAL_UNIPHY
[    5.790473] [drm] Connector 1:
[    5.790475] [drm]   DP-2
[    5.790476] [drm]   HPD1
[    5.790479] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c
0x643c
[    5.790481] [drm]   Encoders:
[    5.790482] [drm]     DFP1: INTERNAL_UNIPHY1
[    5.790484] [drm] Connector 2:
[    5.790486] [drm]   DP-3
[    5.790487] [drm]   HPD2
[    5.790490] [drm]   DDC: 0x6440 0x6440 0x6444 0x6444 0x6448 0x6448 0x644c
0x644c
[    5.790491] [drm]   Encoders:
[    5.790493] [drm]     DFP2: INTERNAL_UNIPHY1
[    5.790495] [drm] Connector 3:
[    5.790497] [drm]   DP-4
[    5.790498] [drm]   HPD3
[    5.790501] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c
0x645c
[    5.790503] [drm]   Encoders:
[    5.790505] [drm]     DFP3: INTERNAL_UNIPHY2
[    5.790649] [drm] Special thermal controller config
[    5.793123] [drm] radeon: power management initialized
[    6.213991] [drm] fb mappable at 0x90142000
[    6.213993] [drm] vram apper at 0x90000000
[    6.213994] [drm] size 8294400
[    6.213996] [drm] fb depth is 24
[    6.213997] [drm]    pitch is 7680
[    6.214080] fb1: radeondrmfb frame buffer device
[    6.214085] [drm] Initialized radeon 2.24.0 20080528 for 0000:01:00.0 on

minor 1

grep vga_switcheroo /var/log/dmesg.0

[    4.279348] vga_switcheroo: enabled
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#46 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #45 from Alex Deucher <[email protected]> --- (In reply to comment #44)

Quoted 6 lines

Good news, the radeon card is recognised with an EFI stub boot only !

But the screens stay black !! (lcd panel and hdmi) ..., X is started because I heard lightdm ubuntu sound, but all are black, no X and no console frame buffer.

It looks like you have a hybrid system with both an integrated GPU and a discrete GPU. You'll need to switch the mux to switch between the two GPUs (the integrated is probably selected by default). Apple has their own proprietary mux and I'm not sure how well it's supported in Linux.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#47 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #46 from Anonymous Helper <[email protected]> --- Radeon now works for me on a MBP 8,2 booted from efistub in Linux 3.8.x. Can anyone else confirm this? You just need to make sure you add the PCI IDs to the xorg for both cards. Should Xorg detect them automatically? Is this another bug?

Thank you!

Now we just need the IGP to show something onscreen when switching to it and it will be perfect...

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#48 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #47 from Bruno <[email protected]> ---

Quoted 4 lines

Radeon now works for me on a MBP 8,2 booted from efistub in Linux 3.8.x. Can anyone else confirm this? You just need to make sure you add the PCI IDs to the xorg for both cards. Should Xorg detect them automatically? Is this another bug?

For nouveau on a MBA also booted via EFI stub I was told that "detection of display by Xorg" happened through some magic bit set by first going through efifb prior to native driver.

Without going through efifb Xorg didn't want to choose the available nVidia GPU. (though linux console happily used the GPU).

Possibly the same applies to radeon.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#49 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #48 from Alex Deucher <[email protected]> --- (In reply to comment #46)

Quoted 4 lines

Radeon now works for me on a MBP 8,2 booted from efistub in Linux 3.8.x. Can anyone else confirm this? You just need to make sure you add the PCI IDs to the xorg for both cards. Should Xorg detect them automatically? Is this another bug?

What do you mean by "make sure you add the PCI IDs to the xorg for both cards"?
The driver should autodetect the cards fine. However for systems with
multiple VGA cards, you may have to manually specify which ones you want to start X on.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#50 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #49 from Anonymous Helper <[email protected]> --- (In reply to comment #48)

Quoted 4 lines

What do you mean by "make sure you add the PCI IDs to the xorg for both cards"? The driver should autodetect the cards fine. However for systems with multiple VGA cards, you may have to manually specify which ones you want to start X on.

Currently my xorg.conf.d directory contains the following config:

$ cat /etc/X11/xorg.conf.d/*
Section "Device"
    Identifier "Radeon Graphics"
    BusID "PCI:1:0:0"
EndSection
Section "Device"
    Identifier "Intel Graphics"
    BusID "PCI:0:2:0"
    Driver "intel"
    Option "AccelMethod" "sna"
    #Option "AccelMethod" "uxa"
    #Option "AccelMethod" "xaa"
EndSection

Is the BusID line in the intel device section not needed? What is needed for X to automatically detect multiple GPUs properly and show some video output from the correct card?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#51 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #50 from Alex Deucher <[email protected]> --- (In reply to comment #49)

Quoted 4 lines

Is the BusID line in the intel device section not needed? What is needed for X to automatically detect multiple GPUs properly and show some video output from the correct card?

You'll need to use vga-switcheroo to select the card you want to use. Then you should be able to start X without any config and it will start on the one selected by vga-switcheroo. Having two device sections as your config does will force X to try and start on both devices.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#52 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #51 from Anonymous Helper <[email protected]> --- (In reply to comment #50)

Quoted 4 lines

You'll need to use vga-switcheroo to select the card you want to use. Then you should be able to start X without any config and it will start on the one selected by vga-switcheroo. Having two device sections as your config does will force X to try and start on both devices.

I tried without the BusID but all I got was a black screen. For some reason when I switch to the intel GPU I get a black screen also, though it did work when I booted from grub-efi earlier with the well documented outb commands to disable AMD (no BIOS from EFI w/o efistub). Not sure if it's an issue with vga-switcheroo, intel driver or something else.

I don't know if it's a problem, but both cards are powered on at boot. I can switch back and forth between the GPUs (though it's tricky doing so blind when on intel graphics).

Any other suggestions? Thanks.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#53 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #52 from Alex Deucher <[email protected]> --- (In reply to comment #51)

Quoted 1 line

Any other suggestions? Thanks.

You might ask on the dri-devel mailing list. This is getting off topic for this bug.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#54 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #53 from Benjamin Lee <[email protected]> ---
I can also confirm that Radeon KMS works on my MacBookPro8,2 with kernel version 3.8-rc6 and EFI stub boot. I also needed to add a device section to my xorg.conf.

I don't see any video BIOS in /dev/mem so I guess it is loading from ACPI instead. Out of curiosity, I tried to load fglrx and it failed to find a valid VBIOS so fglrx must not have the ACPI loading method.

blee@supra ~ $ sudo dd if=/dev/mem of=/dev/stdout bs=65536 skip=12 count=1 2>/dev/null | hexdump
0000000 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000

[    2.589927] [drm] Initialized drm 1.1.0 20060810
[    2.589966] [drm] radeon defaulting to kernel modesetting.
[    2.589969] [drm] radeon kernel modesetting enabled.
[    2.590189] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x106B
:0x00E2).
[    2.590226] [drm] register mmio base: 0xB0800000
[    2.590229] [drm] register mmio size: 131072
[    2.590253] ATOM BIOS: Apple
[    2.590264] [drm] GPU not posted. posting now...
[    2.599466] radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 -
0x000000003
FFFFFFF (1024M used)
[    2.599472] radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 -
0x000000005FF
FFFFF
[    2.604787] [drm] Detected VRAM RAM=1024M, BAR=256M
[    2.604793] [drm] RAM width 128bits DDR
[    2.604843] [TTM] Zone  kernel: Available graphics memory: 4042710 kiB
[    2.604846] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[    2.604849] [TTM] Initializing pool allocator
[    2.604858] [TTM] Initializing DMA pool allocator
[    2.604893] [drm] radeon: 1024M of VRAM memory ready
[    2.604896] [drm] radeon: 512M of GTT memory ready.
[    2.604917] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    2.604920] [drm] Driver supports precise vblank timestamp query.
[    2.604982] radeon 0000:01:00.0: irq 45 for MSI/MSI-X
[    2.604993] radeon 0000:01:00.0: radeon: using MSI.
[    2.605028] [drm] radeon: irq initialized.
[    2.605033] [drm] GART: num cpu pages 131072, num gpu pages 131072
[    2.605463] [drm] probing gen 2 caps for device 8086:101 = 2/0
[    2.605470] [drm] PCIE gen 2 link speeds already enabled
[    2.605534] [drm] Loading TURKS Microcode
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#55 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #54 from Austin Lund <[email protected]> ---
This does seem to be fixed in 3.8 series kernels. I just tested 3.8-rc6 and booted fine into radeondrmfb. I could get the vgaswitcheroo to move between the integrated and discrete, but I couldn't get the intel console to work (will have to check my config).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#56 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #55 from Benjamin Lee <[email protected]> ---
This has regressed some time after 3.9-rc2. I haven't tried 3.9-rc3 but it is definitely not working anymore in 3.9-rc4:

[    2.603538] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x106B:0x00E2).
[    2.603568] [drm] register mmio base: 0xB0800000
[    2.603570] [drm] register mmio size: 131072
[    2.603605] radeon 0000:01:00.0: Invalid ROM contents
[    2.603641] radeon 0000:01:00.0: Invalid ROM contents
[    2.603646] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
[    2.603649] radeon 0000:01:00.0: Fatal error during GPU init
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#57 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #56 from Ludovic Watteaux <[email protected]> --- Same here Linux 3.9.0-rc4

[    5.800732] [drm] Initialized drm 1.1.0 20060810
[    5.835989] [drm] radeon kernel modesetting enabled.
[    5.839889] [drm] initializing kernel modesetting (TURKS 0x1002:0x6741
0x106B:0x00E2).
[    5.840512] [drm] register mmio base: 0xB0800000
[    5.840520] [drm] register mmio size: 131072
[    5.840667] [drm:radeon_get_bios] *ERROR* Unable to locate a BIOS ROM
[    5.840687] [drm] radeon: finishing device.
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#58 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #57 from Austin Lund <[email protected]> ---
I can confirm on my machine (macbookpro8,2) that v3.9-rc4 doesn't work and v3.9-rc3 does work.

Looking at the changes in drivers/gpu/drm/radeon between these two versions doesn't reveal anything that stands out as the culprit. Does anyone want to bisect?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#59 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #58 from Austin Lund <[email protected]> --- This still doesn't work for 3.9-rc5.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#60 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #59 from Alex Deucher <[email protected]> --- Possibly fixed by this patch set:
https://patchwork.kernel.org/patch/2344041/

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#61 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #60 from Austin Lund <[email protected]> --- It does look like commit 547b52463 did introduce the problem (tho I didn't finish bisecting).

The patch set does fix the issue for me.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#62 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #61 from Ludovic Watteaux <[email protected]> --- Work again on Linux 3.9.0-rc6 without patch.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#63 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

Alex Deucher <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #62 from Alex Deucher <[email protected]> ---
At this point these are all core kernel changes being discussed and have nothing to do with the radeon driver. Closing.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#64 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #63 from Luca Barbato <[email protected]> ---
I tested today and the problem is still present. Which is your .config and how are you loading the kernel?

I'm trying to load it using grub2.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#65 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #64 from Luca Barbato <[email protected]> ---
The system is a macbookpro 8.2 and it fails to find the bios as reported before. Probably the problem is in the grub configuration or in the kernel, anybody with a working system could point me to and example configuration?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#66 lore raw

[Bug 26891] Radeon KMS fails with inaccessible AtomBIOS on systems with (U)EFI boot

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=26891

--- Comment #65 from Austin Lund <[email protected]> --- Works for me in 3.9-rc6.

As stated above, you cannot use grub to load the firmware as the information is only accessible before you exit the boot services in EFI. The kernel must be booted using EFI stub booting (that's where the code for getting the bios image is). I use rEFInd as this now automaigcally passes the initramfs location to the kernel.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel