Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e330e2f
security/tpm/tspi: Do TPM Restart if TPM Resume fails
crawfxrd May 31, 2024
a0518d9
soc/common/smbus: Support reading SPD5 hubs for DDR5
jackpot51 Jun 1, 2024
398013a
soc/intel/adl: Fill in SPD data on both channels of DDR5 memory
jackpot51 May 10, 2023
dd08609
soc/intel/mtl: Fill in SPD data on both channels of DDR5 memory
jackpot51 Mar 7, 2024
c0ba116
soc/intel/adl,mtl: Use channel 0 only for memory down in mixed topo
jackpot51 Mar 19, 2024
3753153
soc/intel/meteorlake: increase cbfs and preram cbmem console sizes
jackpot51 Mar 21, 2024
16436ba
soc/intel/mtl: Set HDA subsystem ID during FSP-M
crawfxrd Jun 5, 2024
e61c166
soc/intel/common/block/cse: Prevent HECI commands when flash descript…
jackpot51 Mar 21, 2024
ed7203d
intel/block/pcie/rtd3: Also implement _PR3
jackpot51 Dec 29, 2020
1802342
mb/system76/bonw14: Enable TAS5825M smart amp
crawfxrd Jul 15, 2022
62a48fb
mb/system76/mtl: Add Lemur Pro 13
jackpot51 Aug 28, 2024
1fe9ddf
mb/system76/mtl: darp10: Add TCSS configs
crawfxrd Aug 30, 2024
2bb2318
mb/system76/mtl: Enable EnableTcssCovTypeA configs
crawfxrd Apr 1, 2025
ebb70b6
ec/system76/ec: Add config for 2nd fan without GPU
crawfxrd Apr 1, 2025
fe2f5ae
mb/system76/rpl: Add bonw15-b variant
crawfxrd Jul 18, 2024
795108b
mb/system76/meer9: Add Meerkat 9
jackpot51 Apr 17, 2025
177da46
soc/intel: Add Arrow Lake-H/U IDs
jackpot51 Mar 17, 2025
89d96bf
mb/system76/mtl: Add darp11 variants
jackpot51 Mar 14, 2025
436d1ae
ec/system76: Support lockdown based on EC security state
crawfxrd Nov 20, 2023
d919cb5
mb/system76: Enable EC lockdown on TGL+
crawfxrd Nov 20, 2023
53968e2
drivers/gfx/nvidia: Add driver for NVIDIA GPU
jackpot51 Jun 27, 2023
14eda1b
mb/system76: Enable dGPUs
crawfxrd Apr 1, 2025
d0c6d10
drivers/intel/dtbt: Add discrete Thunderbolt driver
jackpot51 May 31, 2024
9f65a37
mb/system76/rpl: Enable discrete TBT device
crawfxrd May 31, 2024
de4ab88
mb/system76: Enable S0ix for darp8/darp9
crawfxrd Jan 8, 2024
de34980
mb/system76: Add custom CMOS default for darp8,darp9
crawfxrd Jan 10, 2024
b543b48
mb/system76/mtl: darp10: Remove pull on SMLink0
crawfxrd Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/drivers/gfx/nvidia/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
config DRIVERS_GFX_NVIDIA
bool
default n
help
Support for NVIDIA Optimus graphics

config DRIVERS_GFX_NVIDIA_BRIDGE
hex "PCI bridge for the GPU device"
default 0x01
depends on DRIVERS_GFX_NVIDIA

config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
depends on DRIVERS_GFX_NVIDIA
bool
default n
help
Support for NVIDIA Dynamic Boost

config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_TPP
int "Total processor power offset from default TGP in watts"
default 45
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This identifies the available power for the CPU or GPU boost

config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MIN
int "Minimum TGP offset from default TGP in watts"
default 0
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This is used to transfer power from the GPU to the CPU

config DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST_MAX
int "Maximum TGP offset from default TGP in watts"
default 0
depends on DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST
help
This is used to transfer power from the CPU to the GPU
5 changes: 5 additions & 0 deletions src/drivers/gfx/nvidia/Makefile.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only

romstage-$(CONFIG_DRIVERS_GFX_NVIDIA) += romstage.c

ramstage-$(CONFIG_DRIVERS_GFX_NVIDIA) += nvidia.c
96 changes: 96 additions & 0 deletions src/drivers/gfx/nvidia/acpi/coffeelake.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* NVIDIA GC6 on CFL and CML CPU PCIe ports */

// Memory mapped PCI express config space
OperationRegion (PCIC, SystemMemory, CONFIG_ECAM_MMCONF_BASE_ADDRESS + (CONFIG_DRIVERS_GFX_NVIDIA_BRIDGE << 15), 0x1000)

Field (PCIC, ByteAcc, NoLock, Preserve) {
PVID, 16,
PDID, 16,

Offset (0x248),
, 7,
L23E, 1, /* L23_Rdy Entry Request */
L23R, 1, /* L23_Rdy to Detect Transition */

Offset (0xC20),
, 4,
P0AP, 2, /* Additional power savings */

Offset (0xC38),
, 3,
P0RM, 1, /* Robust squelch mechanism */
}

// Enter L23
Method (DL23, 0, Serialized) {
Printf(" GPU PORT DL23 START")

L23E = 1
Sleep (16)
Local0 = 0
While (L23E) {
If ((Local0 > 4)) {
Break
}

Sleep (16)
Local0++
}

P0RM = 1
P0AP = 3

Printf(" GPU PORT DL23 FINISH")
}

// Exit L23
Method (L23D, 0, Serialized) {
Printf(" GPU PORT L23D START")

L23R = 1
Sleep (16)
Local0 = 0
While (L23R) {
If ((Local0 > 4)) {
Break
}

Sleep (16)
Local0++
}

P0RM = 0
P0AP = 0

Printf(" GPU PORT L23D FINISH")
}

// Main power resource
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)

Method (_ON, 0, Serialized) {
Printf("GPU PORT PWRR._ON")

^^DEV0._ON()

_STA = 1
}

Method (_OFF, 0, Serialized) {
Printf("GPU PORT PWRR._OFF")

^^DEV0._OFF()

_STA = 0
}
}

// Power resources for entering D0
Name (_PR0, Package () { PWRR })

// Power resources for entering D3
Name (_PR3, Package () { PWRR })

#include "common/gpu.asl"
30 changes: 30 additions & 0 deletions src/drivers/gfx/nvidia/acpi/common/dsm.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#define NV_ERROR_SUCCESS 0x0
#define NV_ERROR_UNSPECIFIED 0x80000001
#define NV_ERROR_UNSUPPORTED 0x80000002

#include "gps.asl"
#include "nvjt.asl"

Method (_DSM, 4, Serialized) {
Printf("GPU _DSM")
If (Arg0 == ToUUID (JT_DSM_GUID)) {
If (ToInteger(Arg1) >= JT_REVISION_ID_MIN) {
Return (NVJT(Arg2, Arg3))
} Else {
Printf(" Unsupported JT revision: %o", SFST(Arg1))
Return (NV_ERROR_UNSUPPORTED)
}
} ElseIf (Arg0 == ToUUID (GPS_DSM_GUID)) {
If (ToInteger(Arg1) == GPS_REVISION_ID) {
Return (GPS(Arg2, Arg3))
} Else {
Printf(" Unsupported GPS revision: %o", SFST(Arg1))
Return (NV_ERROR_UNSUPPORTED)
}
} Else {
Printf(" Unsupported GUID: %o", IDST(Arg0))
Return (NV_ERROR_UNSPECIFIED)
}
}
66 changes: 66 additions & 0 deletions src/drivers/gfx/nvidia/acpi/common/gps.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/* SPDX-License-Identifier: GPL-2.0-only */

#define GPS_DSM_GUID "A3132D01-8CDA-49BA-A52E-BC9D46DF6B81"
#define GPS_REVISION_ID 0x00000200
#define GPS_FUNC_SUPPORT 0x00000000
#define GPS_FUNC_PSHARESTATUS 0x00000020
#define GPS_FUNC_PSHAREPARAMS 0x0000002A

Method(GPS, 2, Serialized) {
Printf(" GPU GPS")
Switch(ToInteger(Arg0)) {
Case(GPS_FUNC_SUPPORT) {
Printf(" Supported Functions")
Return(ITOB(
(1 << GPS_FUNC_SUPPORT) |
(1 << GPS_FUNC_PSHARESTATUS) |
(1 << GPS_FUNC_PSHAREPARAMS)
))
}
Case(GPS_FUNC_PSHARESTATUS) {
Printf(" Power Share Status")
Return(ITOB(0))
}
Case(GPS_FUNC_PSHAREPARAMS) {
Printf(" Power Share Parameters")

CreateField(Arg1, 0, 4, QTYP) // Query type

Name(GPSP, Buffer(36) { 0x00 })
CreateDWordField(GPSP, 0, RSTS) // Response status
CreateDWordField(GPSP, 4, VERS) // Version

// Set query type of response
RSTS = QTYP
// Set version of response
VERS = 0x00010000

Switch(ToInteger(QTYP)) {
Case(0) {
Printf(" Request Current Information")
// No required information
Return(GPSP)
}
Case(1) {
Printf(" Request Supported Fields")
// Support GPU temperature field
RSTS |= (1 << 8)
Return(GPSP)
}
Case(2) {
Printf(" Request Current Limits")
// No required limits
Return(GPSP)
}
Default {
Printf(" Unknown Query: %o", SFST(QTYP))
Return(NV_ERROR_UNSUPPORTED)
}
}
}
Default {
Printf(" Unsupported function: %o", SFST(Arg0))
Return(NV_ERROR_UNSUPPORTED)
}
}
}
18 changes: 18 additions & 0 deletions src/drivers/gfx/nvidia/acpi/common/gpu.asl
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* SPDX-License-Identifier: GPL-2.0-only */

Device (DEV0) {
Name(_ADR, 0x00000000)

#include "utility.asl"
#include "dsm.asl"
#include "power.asl"
}

#if CONFIG(DRIVERS_GFX_NVIDIA_DYNAMIC_BOOST)
Scope (\_SB) {
Device(NPCF) {
#include "utility.asl"
#include "nvpcf.asl"
}
}
#endif
Loading