mb/system76/{galp5,gaze16}: acpi: Save/Restore NVIDIA SSID
Save NVIDIA device subsystem ID before turning off the GPU, and restore it after turning on the GPU. This prevents to GPU from having the default 10de:0000 SSID on RTD3 _ON. Fixes formatting and device scope. Tested on gaze16-3050 by checking lspci after RTD3 _OFF. $ cat /sys/bus/pci/devices/0000\:01\:00.0/power/runtime_status suspended $ lspci -s 01:00.0 -vnn | grep Subsystem Subsystem: CLEVO/KAPOK Computer GA107M [GeForce RTX 3050 Mobile] [1558:5015] Change-Id: Ic5a91f96a5741abb605906f404b1632eaec73590 Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
committed by
Jeremy Soller
parent
952260ced2
commit
970cc13192
@@ -1,13 +1,14 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
Scope (\_SB.PCI0.RP01) {
|
Scope (\_SB.PCI0.RP05) {
|
||||||
Device (DEV0) {
|
Device (DEV0) {
|
||||||
Name(_ADR, 0x00000000)
|
Name(_ADR, 0x00000000)
|
||||||
|
Name(SSID, 0x00000000)
|
||||||
|
|
||||||
OperationRegion (PCIC, PCI_Config, 0x00, 0x50)
|
OperationRegion (PCIC, PCI_Config, 0x00, 0x50)
|
||||||
Field (PCIC, DwordAcc, NoLock, Preserve) {
|
Field (PCIC, DwordAcc, NoLock, Preserve) {
|
||||||
Offset (0x40),
|
Offset (0x40),
|
||||||
SSID, 32
|
NVID, 32
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (_PR0, Package () { PWRR })
|
Name (_PR0, Package () { PWRR })
|
||||||
@@ -16,12 +17,13 @@ Scope (\_SB.PCI0.RP01) {
|
|||||||
Name (_STA, 1)
|
Name (_STA, 1)
|
||||||
|
|
||||||
Method (_ON) {
|
Method (_ON) {
|
||||||
^^SSID = 0x40181558
|
^^NVID = ^^SSID
|
||||||
Printf("GPU _ON %o", ToHexString(^^SSID))
|
Printf("GPU _ON %o", ToHexString(^^SSID))
|
||||||
_STA = 1
|
_STA = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF) {
|
Method (_OFF) {
|
||||||
|
^^SSID = ^^NVID
|
||||||
Printf("GPU _OFF %o", ToHexString(^^SSID))
|
Printf("GPU _OFF %o", ToHexString(^^SSID))
|
||||||
_STA = 0
|
_STA = 0
|
||||||
}
|
}
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
Scope (\_SB.PCI0.RP01) {
|
Scope (\_SB.PCI0.PEG1) {
|
||||||
Device (DEV0) {
|
Device (DEV0) {
|
||||||
Name(_ADR, 0x00000000)
|
Name(_ADR, 0x00000000)
|
||||||
|
Name(SSID, 0x00000000)
|
||||||
|
|
||||||
OperationRegion (PCIC, PCI_Config, 0x00, 0x50)
|
OperationRegion (PCIC, PCI_Config, 0x00, 0x50)
|
||||||
Field (PCIC, DwordAcc, NoLock, Preserve) {
|
Field (PCIC, DwordAcc, NoLock, Preserve) {
|
||||||
Offset (0x40),
|
Offset (0x40),
|
||||||
SSID, 32
|
NVID, 32
|
||||||
}
|
}
|
||||||
|
|
||||||
Name (_PR0, Package () { PWRR })
|
Name (_PR0, Package () { PWRR })
|
||||||
@@ -16,12 +17,13 @@ Scope (\_SB.PCI0.RP01) {
|
|||||||
Name (_STA, 1)
|
Name (_STA, 1)
|
||||||
|
|
||||||
Method (_ON) {
|
Method (_ON) {
|
||||||
^^SSID = 0x50171558
|
^^NVID = ^^SSID
|
||||||
Printf("GPU _ON %o", ToHexString(^^SSID))
|
Printf("GPU _ON %o", ToHexString(^^SSID))
|
||||||
_STA = 1
|
_STA = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (_OFF) {
|
Method (_OFF) {
|
||||||
|
^^SSID = ^^NVID
|
||||||
Printf("GPU _OFF %o", ToHexString(^^SSID))
|
Printf("GPU _OFF %o", ToHexString(^^SSID))
|
||||||
_STA = 0
|
_STA = 0
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user