2012-08-01 15:35:51

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Tue, 2012-07-31 at 10:18 -0500, Seth Forshee wrote:
>
> All of this is working to the extent that I can boot with the Radeon
> card active, switch over to the Intel card, and get the EDID for the
> internal panel and an external monitor (although oddly on an HDMI
> connector, no on the DP like I expected). Both screens are remaining
> blank though. However I'm also getting blank screens if I mux over to
> the Intel GPU from grub before loading the kernel, which used to work
> for the LVDS panel at least.

Hm, when I was changing over to the external screen before boot, I could
get the LVDS working but *not* an external VGA or DVI monitor (via the
standard Apple adaptors). Should I expect that to work if I change the
mux 'properly' at runtime?

--
dwmw2


Attachments:
smime.p7s (6.03 kB)

2012-08-01 15:59:27

by Seth Forshee

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, Aug 01, 2012 at 04:35:44PM +0100, David Woodhouse wrote:
> On Tue, 2012-07-31 at 10:18 -0500, Seth Forshee wrote:
> >
> > All of this is working to the extent that I can boot with the Radeon
> > card active, switch over to the Intel card, and get the EDID for the
> > internal panel and an external monitor (although oddly on an HDMI
> > connector, no on the DP like I expected). Both screens are remaining
> > blank though. However I'm also getting blank screens if I mux over to
> > the Intel GPU from grub before loading the kernel, which used to work
> > for the LVDS panel at least.
>
> Hm, when I was changing over to the external screen before boot, I could
> get the LVDS working but *not* an external VGA or DVI monitor (via the
> standard Apple adaptors). Should I expect that to work if I change the
> mux 'properly' at runtime?

I don't think the mini-DP port works at all with the integrated
graphics, at least not on a Macbook Pro 8,2. I played around with it
yesterday under OS X. When using the DGPU with an external monitor it
works fine, but any attempts to switch to the IGPU were rejected by the
drivers. If I forced it to the IGPU prior to connecting the external
monitor the screen just remained blank when I plugged it in, until I
switched back to the DGPU. It's odd though that the DDC can be switched
over to the IGPU.

Iirc you've got the 8,3, and I'd expect it to be identical to the 8,2 in
this respect. Also, the only reason my LVDS didn't work was because I
wasn't telling i915 to disable SSC. I've got a patch to add a quirk for
this that I'll send soon, since there still doesn't seem to be any way
to get the vbios for the Intel graphics.

Seth

2012-08-01 16:06:21

by Andreas Heider

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

Am 01.08.12 17:59, schrieb Seth Forshee:
> On Wed, Aug 01, 2012 at 04:35:44PM +0100, David Woodhouse wrote:
>> On Tue, 2012-07-31 at 10:18 -0500, Seth Forshee wrote:
>>>
>>> All of this is working to the extent that I can boot with the Radeon
>>> card active, switch over to the Intel card, and get the EDID for the
>>> internal panel and an external monitor (although oddly on an HDMI
>>> connector, no on the DP like I expected). Both screens are remaining
>>> blank though. However I'm also getting blank screens if I mux over to
>>> the Intel GPU from grub before loading the kernel, which used to work
>>> for the LVDS panel at least.
>>
>> Hm, when I was changing over to the external screen before boot, I could
>> get the LVDS working but *not* an external VGA or DVI monitor (via the
>> standard Apple adaptors). Should I expect that to work if I change the
>> mux 'properly' at runtime?
>
> I don't think the mini-DP port works at all with the integrated
> graphics, at least not on a Macbook Pro 8,2. I played around with it
> yesterday under OS X. When using the DGPU with an external monitor it
> works fine, but any attempts to switch to the IGPU were rejected by the
> drivers. If I forced it to the IGPU prior to connecting the external
> monitor the screen just remained blank when I plugged it in, until I
> switched back to the DGPU. It's odd though that the DDC can be switched
> over to the IGPU.

The situation is a bit different on the Macbook Pro 6,2. OS X also
automatically switches to the DGPU when an external monitor is
connected, but unlike the 8,2, the IGPU works fine under Linux with
external monitors if port 0x740 is set accordingly. I'm pretty sure that
this is also the case with for the older macbooks without dynamic switching.

> Iirc you've got the 8,3, and I'd expect it to be identical to the 8,2 in
> this respect. Also, the only reason my LVDS didn't work was because I
> wasn't telling i915 to disable SSC. I've got a patch to add a quirk for
> this that I'll send soon, since there still doesn't seem to be any way
> to get the vbios for the Intel graphics.
>
> Seth
>

2012-08-01 19:41:55

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
> I don't think the mini-DP port works at all with the integrated
> graphics, at least not on a Macbook Pro 8,2. I played around with it
> yesterday under OS X. When using the DGPU with an external monitor it
> works fine, but any attempts to switch to the IGPU were rejected by the
> drivers. If I forced it to the IGPU prior to connecting the external
> monitor the screen just remained blank when I plugged it in, until I
> switched back to the DGPU. It's odd though that the DDC can be switched
> over to the IGPU.

I get a blank screen when I use the VGA adapter, and with the dual-link
DVI adapter I get a barely responsive machine continually printing
[ 1076.439623] [drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting
as described at https://bugzilla.redhat.com/show_bug.cgi?id=843779#c8
And a blank screen.

I thought someone had said they'd got it working with a native DP
monitor, rather than the converters.

> Iirc you've got the 8,3, and I'd expect it to be identical to the 8,2 in
> this respect. Also, the only reason my LVDS didn't work was because I
> wasn't telling i915 to disable SSC. I've got a patch to add a quirk for
> this that I'll send soon, since there still doesn't seem to be any way
> to get the vbios for the Intel graphics.

I think your patch won't cover the 8,3.

00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
Subsystem: Apple Computer Inc. Device [106b:00de]

--
dwmw2


Attachments:
smime.p7s (6.03 kB)

2012-08-01 19:44:09

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
> since there still doesn't seem to be any way
> to get the vbios for the Intel graphics.

Hm, wait. With Matthew's patches to get the Radeon BIOS from EFI, there
*is* also a ROM image for the Intel device. Have we tried that?

--
dwmw2


Attachments:
smime.p7s (6.03 kB)

2012-08-01 19:52:14

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, Aug 01, 2012 at 08:43:58PM +0100, David Woodhouse wrote:
> On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
> > since there still doesn't seem to be any way
> > to get the vbios for the Intel graphics.
>
> Hm, wait. With Matthew's patches to get the Radeon BIOS from EFI, there
> *is* also a ROM image for the Intel device. Have we tried that?

There is? Unexpected! The driver ought to be picking that up
automatically...

--
Matthew Garrett | [email protected]

2012-08-01 19:52:39

by Seth Forshee

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, Aug 01, 2012 at 08:41:42PM +0100, David Woodhouse wrote:
> On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
> > I don't think the mini-DP port works at all with the integrated
> > graphics, at least not on a Macbook Pro 8,2. I played around with it
> > yesterday under OS X. When using the DGPU with an external monitor it
> > works fine, but any attempts to switch to the IGPU were rejected by the
> > drivers. If I forced it to the IGPU prior to connecting the external
> > monitor the screen just remained blank when I plugged it in, until I
> > switched back to the DGPU. It's odd though that the DDC can be switched
> > over to the IGPU.
>
> I get a blank screen when I use the VGA adapter, and with the dual-link
> DVI adapter I get a barely responsive machine continually printing
> [ 1076.439623] [drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting
> as described at https://bugzilla.redhat.com/show_bug.cgi?id=843779#c8
> And a blank screen.
>
> I thought someone had said they'd got it working with a native DP
> monitor, rather than the converters.

Maybe, I don't have a native DP monitor.

> > Iirc you've got the 8,3, and I'd expect it to be identical to the 8,2 in
> > this respect. Also, the only reason my LVDS didn't work was because I
> > wasn't telling i915 to disable SSC. I've got a patch to add a quirk for
> > this that I'll send soon, since there still doesn't seem to be any way
> > to get the vbios for the Intel graphics.
>
> I think your patch won't cover the 8,3.
>
> 00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
> Subsystem: Apple Computer Inc. Device [106b:00de]

Nope, the subsystem device id is different. But I can throw yours into
the patch.

Although Matthew did indicate earlier that he might have some ideas
about how to get the VBT, in which case the quirking wouldn't be
necessary.

2012-08-01 19:56:23

by Seth Forshee

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

On Wed, Aug 01, 2012 at 08:43:58PM +0100, David Woodhouse wrote:
> On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
> > since there still doesn't seem to be any way
> > to get the vbios for the Intel graphics.
>
> Hm, wait. With Matthew's patches to get the Radeon BIOS from EFI, there
> *is* also a ROM image for the Intel device. Have we tried that?

You get a ROM image? Because I'm still not getting one, and the opregion
VBT is invalid as well. I wonder if it's a difference in the machines or
in how you're booting it.

I've got the EFI stub enabled in my build, and I'm booting the kernel
directly from refit (no bootloader). I'm not doing any gmux writes to
switch to the IGPU when I boot. Are you doing something different?

2012-08-01 19:56:49

by Andreas Heider

[permalink] [raw]
Subject: Re: [PATCH] apple-gmux: Restore switch registers on suspend/resume

Am 01.08.12 21:43, schrieb David Woodhouse:
> On Wed, 2012-08-01 at 10:59 -0500, Seth Forshee wrote:
>> since there still doesn't seem to be any way
>> to get the vbios for the Intel graphics.
>
> Hm, wait. With Matthew's patches to get the Radeon BIOS from EFI, there
> *is* also a ROM image for the Intel device. Have we tried that?
>

If I understand your old dmesg
(http://david.woodhou.se/dmesg-boot-to-DIS) correctly there is one, but
it doesn't contain anything useful.

Also there isn't one on my MBP 6,2, see
http://andreas.meetr.de/efi/log/dh111.txt