feat: power down dGPUs on hybrid graphics laptops
This commit is contained in:
1 parent
7f12e1a150
commit
24f88ec4c6
23 files changed
+4325
-1130
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include <ACPI/AcpiEvents.hpp>
|
||||
#include <ACPI/EmbeddedController.hpp>
|
||||
#include <ACPI/Battery.hpp>
|
||||
#include <ACPI/AML/AmlParser.hpp>
|
||||
#include <Hal/Apic/ApicInit.hpp>
|
||||
#include <Pci/Pci.hpp>
|
||||
#include <Timekeeping/ApicTimer.hpp>
|
||||
@@ -153,6 +154,12 @@ extern "C" void kmain() {
|
||||
|
||||
Pci::Initialize(g_acpi.GetXSDT());
|
||||
|
||||
// _REG and _INI, once the EC and PCI config space (ECAM, for the
|
||||
// extended registers PCI_Config regions reach) are both available:
|
||||
// firmware settles which OS it is talking to here, and gates device
|
||||
// power control on the answer.
|
||||
Hal::AML::InitializeNamespaceObjects();
|
||||
|
||||
Drivers::ProbeEarly();
|
||||
Drivers::InitializeGraphics();
|
||||
|
||||
@@ -162,6 +169,10 @@ extern "C" void kmain() {
|
||||
Drivers::PS2::Keyboard::Initialize();
|
||||
Drivers::PS2::Mouse::Initialize();
|
||||
|
||||
// Hybrid graphics: switch off a discrete GPU nothing drives before
|
||||
// the normal probe can claim its USB-C/audio functions.
|
||||
Drivers::PowerDownUnusedGpus();
|
||||
|
||||
Drivers::ProbeNormal();
|
||||
Drivers::InitializeNetwork();
|
||||
Drivers::InitializeStorage();
|
||||
|
||||
Reference in new issue
Block a user