1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <device/pci_ops.h>
5 #include <device/pci_def.h>
6 #include <northbridge/intel/sandybridge/raminit_native.h>
7 #include <southbridge/intel/bd82x6x/pch.h>
8 #include <northbridge/intel/sandybridge/sandybridge.h>
9 #include <drivers/lenovo/hybrid_graphics/hybrid_graphics.h>
10 #include <device/device.h>
12 static void hybrid_graphics_init(void)
17 early_hybrid_graphics(&igd
, &peg
);
22 /* Hide disabled devices */
23 reg32
= pci_read_config32(PCI_DEV(0, 0, 0), DEVEN
);
24 reg32
&= ~(DEVEN_PEG10
| DEVEN_IGD
);
32 /* Disable IGD VGA decode, no GTT or GFX stolen */
33 pci_write_config16(PCI_DEV(0, 0, 0), GGC
, 2);
35 pci_write_config32(PCI_DEV(0, 0, 0), DEVEN
, reg32
);
38 void mainboard_early_init(int s3resume
)
40 hybrid_graphics_init();