diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-07-25 18:18:57 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-08-10 16:06:19 +0000 |
commit | 24680d0902f70d3b63f8d7b11f47ffac73697d94 (patch) | |
tree | 09005f9b40dbc99d25f89fe3ab61e858d02421e2 /src/mainboard/lenovo/t400/romstage.c | |
parent | d7dcc44eb97dcf99093e64b887b9dc2296a31d21 (diff) | |
download | coreboot-24680d0902f70d3b63f8d7b11f47ffac73697d94.tar.xz |
mb/lenovo/t400: Switch to new hybrid graphics driver
Use new hybrid graphics driver to get device state.
Move remaining code to romstage.c.
Tested on Lenovo T500:
* Linux 4.11.4 on Fedora 25
* Integrated (using NGI)
* Discrete (using VGA OpROM)
* Switchable (using NGI and VGA OpROM), tested with DRI_PRIME
No regressions found.
Change-Id: Iad2eccaab19c71f11308853ba9326d8186e67c93
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20793
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/mainboard/lenovo/t400/romstage.c')
-rw-r--r-- | src/mainboard/lenovo/t400/romstage.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/mainboard/lenovo/t400/romstage.c b/src/mainboard/lenovo/t400/romstage.c index 2d35650b0a..f5d5dd1597 100644 --- a/src/mainboard/lenovo/t400/romstage.c +++ b/src/mainboard/lenovo/t400/romstage.c @@ -31,6 +31,7 @@ #include <console/console.h> #include <southbridge/intel/i82801ix/i82801ix.h> #include <northbridge/intel/gm45/gm45.h> +#include <drivers/lenovo/hybrid_graphics/hybrid_graphics.h> #include <timestamp.h> #include "dock.h" #include "gpio.h" @@ -38,7 +39,15 @@ #define LPC_DEV PCI_DEV(0, 0x1f, 0) #define MCH_DEV PCI_DEV(0, 0, 0) -void hybrid_graphics_init(sysinfo_t *sysinfo); +static void hybrid_graphics_init(sysinfo_t *sysinfo) +{ + bool peg, igd; + + early_hybrid_graphics(&igd, &peg); + + sysinfo->enable_igd = igd; + sysinfo->enable_peg = peg; +} static void early_lpc_setup(void) { |