From 384e9aed8c477922c960e2cbd429bd3a15b371de Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 30 Aug 2018 02:18:48 +0300 Subject: mb/lenovo: Support dual graphics for xx20/xx30 ThinkPads Add CMOS option that allows to use both integrated and discrete GPU. Tested on ThinkPad W530. Change-Id: I8842fef0fa1235eb91abf6b7e655ed4d8598adc7 Signed-off-by: Evgeny Zinoviev Reviewed-on: https://review.coreboot.org/28393 Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/mainboard/lenovo/t420s/cmos.layout | 1 + src/mainboard/lenovo/t420s/romstage.c | 3 +++ 2 files changed, 4 insertions(+) (limited to 'src/mainboard/lenovo/t420s') diff --git a/src/mainboard/lenovo/t420s/cmos.layout b/src/mainboard/lenovo/t420s/cmos.layout index f395c0c808..2be55f67c7 100644 --- a/src/mainboard/lenovo/t420s/cmos.layout +++ b/src/mainboard/lenovo/t420s/cmos.layout @@ -129,6 +129,7 @@ enumerations 11 6 224M 12 0 Integrated Only 12 1 Discrete Only +12 2 Dual Graphics 13 0 Disable 13 1 AC and battery 13 2 AC only diff --git a/src/mainboard/lenovo/t420s/romstage.c b/src/mainboard/lenovo/t420s/romstage.c index 55011cf2e2..be8052c3ba 100644 --- a/src/mainboard/lenovo/t420s/romstage.c +++ b/src/mainboard/lenovo/t420s/romstage.c @@ -32,6 +32,9 @@ static void hybrid_graphics_init(void) early_hybrid_graphics(&igd, &peg); + if (peg && igd) + return; + /* Hide disabled devices */ reg32 = pci_read_config32(PCI_DEV(0, 0, 0), DEVEN); reg32 &= ~(DEVEN_PEG10 | DEVEN_IGD); -- cgit v1.2.3