Attention is currently required from: Angel Pons, Evgeny Zinoviev, Martin L Roth, Nicholas Chin, Nico Huber, Patrick Rudolph.

Felix Singer uploaded patch set #31 to the change originally created by Evgeny Zinoviev.

View Change

The following approvals got outdated and were removed: Verified+1 by build bot (Jenkins)

drivers/apple: Add hybrid graphics driver

A hybrid graphics driver for Apple MacBook Pro.

The driver logic is based on lenovo/hybrid_graphics. It is split
into romstage and ramstage parts.

The mainboard code calls the driver from romstage to get the GPU
state. The driver reads the state from the `hybrid_graphics_mode`
nvram option, switches dGPU power on or off according to the state
and returns the state to the mainboard code. The mainboard code then
has to hide the disabled PCI device.

The ramstage part handles the graphics muxes. The muxes code is based
on the apple-gmux linux driver, originally written by:

* Canonical Ltd. <seth.forshee@canonical.com>
* Andreas Heider, 2010-2012 <andreas@meetr.de>
* Lukas Wunner, 2015 <lukas@wunner.de>

Tested on MacBook Pro Retina 15 Mid 2012 (MacBook Pro 10,1).

Change-Id: I22b66622cd2da0e9951ee726d650d204fbb8a5bc
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
---
A src/drivers/apple/hybrid_graphics/Kconfig
A src/drivers/apple/hybrid_graphics/Makefile.mk
A src/drivers/apple/hybrid_graphics/acpi/gmux.asl
A src/drivers/apple/hybrid_graphics/chip.h
A src/drivers/apple/hybrid_graphics/gmux.c
A src/drivers/apple/hybrid_graphics/gmux.h
A src/drivers/apple/hybrid_graphics/hybrid_graphics.c
A src/drivers/apple/hybrid_graphics/hybrid_graphics.h
A src/drivers/apple/hybrid_graphics/romstage.c
9 files changed, 356 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32719/31

To view, visit change 32719. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I22b66622cd2da0e9951ee726d650d204fbb8a5bc
Gerrit-Change-Number: 32719
Gerrit-PatchSet: 31
Gerrit-Owner: Evgeny Zinoviev <me@ch1p.io>
Gerrit-Reviewer: Evgeny Zinoviev <me@ch1p.io>
Gerrit-Reviewer: Martin L Roth <gaumless@gmail.com>
Gerrit-Reviewer: Patrick Rudolph <rudolphpatrick05@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus@gmail.com>
Gerrit-CC: Nicholas Chin <nic.c3.14@gmail.com>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Martin L Roth <gaumless@gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Evgeny Zinoviev <me@ch1p.io>
Gerrit-Attention: Nicholas Chin <nic.c3.14@gmail.com>
Gerrit-Attention: Patrick Rudolph <rudolphpatrick05@gmail.com>