Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28380
to look at the new patch set (#7).
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Tested on ThinkPad W530.
Adds ACPI code for dGPU power management.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver (with a workaround, see below)
- bumblebee (from the "develop" branch)
- bbswitch
Known problems:
- `lspci -s 01:00.0 -vv` turns dGPU on if it was off before. Not sure why it
happens (probably it calls _PS0 at some point) or whether it should
happen.
- nouveau driver unloading (`rmmod` or `modprobe -r`) does not work well: it
crashes in nouveau_backlight_exit (invalid pointer). The current hack is
to comment out these lines in drivers/gpu/drm/nouveau/nouveau_backlight.c,
function `nouveau_backlight_exit`:
list_for_each_entry(connector, &drm->bl_connectors, head) {
if (connector->id >= 0)
ida_simple_remove(&bl_ida, connector->id);
}
Need to debug why it happens.
- VGA ROM for Nvidia GPU is not loaded from BIOS (i.e. coreboot). Need
to debug and fix this too. (Or maybe I'm just doing it wrong.) The current
workaround is to load it from a file.
To do this automatically, create a new file in /etc/modprobe.d with this
line:
options nouveau config=NvBios=pci10de-0ffc.rom
where "pci10de-0ffc.rom" is a file in /lib/firmware directory
(the path is relative to /lib/firmware). VGA ROM has to be extracted
from vendor UEFI dump, GUID is 9781FA9D-5A3B-431A-AD59-2748C9A170EC.
Not tested yet:
- nvidia proprietary driver
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
A src/drivers/lenovo/hybrid_graphics/acpi/gpu.asl
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420/dsdt.asl
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t420s/dsdt.asl
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430/dsdt.asl
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t430s/dsdt.asl
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t520/dsdt.asl
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/t530/dsdt.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
16 files changed, 357 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/7
--
To view, visit https://review.coreboot.org/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 7
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28380
to look at the new patch set (#6).
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Tested on ThinkPad W530.
Adds ACPI code for dGPU power management.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver (with a workaround, see below)
- bumblebee (from the "develop" branch)
- bbswitch
Known problems:
- `lspci -s 01:00.0 -vv` turns dGPU on if it was off before. Not sure why it
happens (probably it calls _PS0 at some point) or whether it should
happen.
- nouveau driver unloading (`rmmod` or `modprobe -r`) does not work well: it
crashes in nouveau_backlight_exit (invalid pointer). The current hack is
to comment out these lines in drivers/gpu/drm/nouveau/nouveau_backlight.c,
function `nouveau_backlight_exit`:
list_for_each_entry(connector, &drm->bl_connectors, head) {
if (connector->id >= 0)
ida_simple_remove(&bl_ida, connector->id);
}
Need to debug why it happens.
- VGA ROM for Nvidia GPU is not loaded from BIOS (i.e. coreboot). Need
to debug and fix this too. (Or maybe I'm just doing it wrong.) The current
workaround is to load it from a file.
To do this automatically, create a new file in /etc/modprobe.d with this
line:
options nouveau config=NvBios=pci10de-0ffc.rom
where "pci10de-0ffc.rom" is a file in /lib/firmware directory
(the path is relative to /lib/firmware). VGA ROM has to be extracted
from vendor UEFI dump, GUID is 9781FA9D-5A3B-431A-AD59-2748C9A170EC.
Not tested yet:
- nvidia proprietary driver
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
A src/drivers/lenovo/hybrid_graphics/acpi/gpu.asl
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420/dsdt.asl
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t420s/dsdt.asl
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430/dsdt.asl
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t430s/cmos.default
M src/mainboard/lenovo/t430s/dsdt.asl
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t520/dsdt.asl
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/t530/dsdt.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
17 files changed, 358 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/6
--
To view, visit https://review.coreboot.org/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 6
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28380
to look at the new patch set (#5).
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Tested on ThinkPad W530.
Adds ACPI code for dGPU power management.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver (with a workaround, see below)
- bumblebee (from the "develop" branch)
- bbswitch
Known problems:
- `lspci -s 01:00.0 -vv` turns dGPU on if it was off before. Not sure why it
happens (probably it calls _PS0 at some point) or whether it should
happen.
- nouveau driver unloading (`rmmod` or `modprobe -r`) does not work well: it
crashes in nouveau_backlight_exit (invalid pointer). The current hack is
to comment out these lines in drivers/gpu/drm/nouveau/nouveau_backlight.c,
function `nouveau_backlight_exit`:
list_for_each_entry(connector, &drm->bl_connectors, head) {
if (connector->id >= 0)
ida_simple_remove(&bl_ida, connector->id);
}
Need to debug why it happens.
- VGA ROM for Nvidia GPU is not loaded from BIOS (i.e. coreboot). Need
to debug and fix this too. (Or maybe I'm just doing it wrong.) The current
workaround is to load it from a file.
To do this automatically, create a new file in /etc/modprobe.d with this
line:
options nouveau config=NvBios=pci10de-0ffc.rom
where "pci10de-0ffc.rom" is a file in /lib/firmware directory
(the path is relative to /lib/firmware). VGA ROM has to be extracted
from vendor UEFI dump, GUID is 9781FA9D-5A3B-431A-AD59-2748C9A170EC.
Not tested yet:
- nvidia proprietary driver
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
A src/drivers/lenovo/hybrid_graphics/acpi/gpu.asl
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420/dsdt.asl
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t420s/dsdt.asl
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430/dsdt.asl
M src/mainboard/lenovo/t430s/Makefile.inc
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t430s/cmos.default
M src/mainboard/lenovo/t430s/dsdt.asl
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t520/dsdt.asl
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/t530/dsdt.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
18 files changed, 359 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/5
--
To view, visit https://review.coreboot.org/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 5
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Evgeny Zinoviev has posted comments on this change. ( https://review.coreboot.org/28393 )
Change subject: mb/lenovo: Dual Graphics for xx20/xx30 ThinkPads
......................................................................
Patch Set 1:
Tested on W530. I hope someone can test on T430s, I'm not sure about it.
--
To view, visit https://review.coreboot.org/28393
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8842fef0fa1235eb91abf6b7e655ed4d8598adc7
Gerrit-Change-Number: 28393
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Comment-Date: Thu, 30 Aug 2018 00:03:30 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Evgeny Zinoviev has uploaded a new patch set (#2). ( https://review.coreboot.org/28392 )
Change subject: mb/lenovo: dGPU power handling on T430, T530
......................................................................
mb/lenovo: dGPU power handling on T430, T530
Enable dGPU power handling on Lenovo ThinkPad T430, T530 via PMH7
register 0x50.
Although there's no Thinker-1 chip on these models according to
schematics, dGPU power control via PMH7 works the same as on T420/T520,
so they can be considered Thinker-1-compatible.
It can be tested from linux userpace using util/pmh7tool.
To turn dGPU power off:
pmh7tool -c 0x50 7
pmh7tool -c 0x50 3
To turn it on:
pmh7tool -s 0x50 3
pmh7tool -s 0x50 7
To check whether it is on (bash):
reg=0x$(pmh7tool -r 0x50)
echo "$(( (( reg & 0x08 )) >> 3 ))"
or just `pmh7tool -b 0x50 3` with
https://review.coreboot.org/#/c/coreboot/+/28388/
Tested on ThinkPad W530.
Change-Id: Ieab1a33b3c680c757cc0999660b5cb7e122474cc
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
M src/mainboard/lenovo/t430/devicetree.cb
M src/mainboard/lenovo/t530/variants/t530/devicetree.cb
M src/mainboard/lenovo/t530/variants/w530/devicetree.cb
3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/28392/2
--
To view, visit https://review.coreboot.org/28392
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieab1a33b3c680c757cc0999660b5cb7e122474cc
Gerrit-Change-Number: 28392
Gerrit-PatchSet: 2
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Hello Patrick Rudolph, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28380
to look at the new patch set (#4).
Change subject: [WIP] Nvidia Optimus support for ThinkPads
......................................................................
[WIP] Nvidia Optimus support for ThinkPads
Based on siro's work #23041.
Tested on ThinkPad W530.
Adds ACPI code for dGPU power management.
Depends on:
https://review.coreboot.org/#/c/coreboot/+/28392https://review.coreboot.org/#/c/coreboot/+/28393
What works (tested on 4.16.13-gentoo kernel):
- power management via _PS0 and _DSM + _PS3 ACPI calls
- nouveau driver (with a workaround, see below)
- bumblebee (from the "develop" branch)
- bbswitch
Known problems:
- `lspci -s 01:00.0 -vv` turns dGPU on if it was off before. Not sure why it
happens (probably it calls _PS0 at some point) or whether it should
happen.
- nouveau driver unloading (`rmmod` or `modprobe -r`) does not work well: it
crashes in nouveau_backlight_exit (invalid pointer). The current hack is
to comment out these lines in drivers/gpu/drm/nouveau/nouveau_backlight.c,
function `nouveau_backlight_exit`:
list_for_each_entry(connector, &drm->bl_connectors, head) {
if (connector->id >= 0)
ida_simple_remove(&bl_ida, connector->id);
}
Need to debug why it happens.
- VGA ROM for Nvidia GPU is not loaded from BIOS (i.e. coreboot). Need
to debug and fix this too. (Or maybe I'm just doing it wrong.) The current
workaround is to load it from a file.
To do this automatically, create a new file in /etc/modprobe.d with this
line:
options nouveau config=NvBios=pci10de-0ffc.rom
where "pci10de-0ffc.rom" is a file in /lib/firmware directory
(the path is relative to /lib/firmware). VGA ROM has to be extracted
from vendor UEFI dump, GUID is 9781FA9D-5A3B-431A-AD59-2748C9A170EC.
Not tested yet:
- nvidia proprietary driver
Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
A src/drivers/lenovo/hybrid_graphics/acpi/gpu.asl
A src/drivers/nvidia/optimus/acpi/optimus.asl
A src/ec/lenovo/pmh7/acpi/pmh7.asl
M src/mainboard/lenovo/t420/acpi/ec.asl
M src/mainboard/lenovo/t420/dsdt.asl
M src/mainboard/lenovo/t420s/acpi/ec.asl
M src/mainboard/lenovo/t420s/dsdt.asl
M src/mainboard/lenovo/t430/acpi/ec.asl
M src/mainboard/lenovo/t430/dsdt.asl
M src/mainboard/lenovo/t430s/Kconfig
M src/mainboard/lenovo/t430s/Makefile.inc
M src/mainboard/lenovo/t430s/acpi/ec.asl
M src/mainboard/lenovo/t430s/cmos.default
M src/mainboard/lenovo/t430s/dsdt.asl
M src/mainboard/lenovo/t520/acpi/ec.asl
M src/mainboard/lenovo/t520/dsdt.asl
M src/mainboard/lenovo/t530/acpi/ec.asl
M src/mainboard/lenovo/t530/dsdt.asl
M src/northbridge/intel/sandybridge/acpi/peg.asl
19 files changed, 360 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/28380/4
--
To view, visit https://review.coreboot.org/28380
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I277808d6c1d8bd6e0a267a53f25471597698f8d5
Gerrit-Change-Number: 28380
Gerrit-PatchSet: 4
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/28392
Change subject: mb/lenovo: dGPU power handling on T430(s), T530
......................................................................
mb/lenovo: dGPU power handling on T430(s), T530
Enable dGPU power handling on Lenovo ThinkPad T430, T430s, T530 via
PMH7 register 0x50.
Although there's no Thinker-1 chip on these models according to
schematics, dGPU power control via PMH7 works the same as on T420/T520,
so they can be considered Thinker-1-compatible.
It can be tested from linux userpace using util/pmh7tool.
To turn dGPU power off:
pmh7tool -c 0x50 7
pmh7tool -c 0x50 3
To turn it on:
pmh7tool -s 0x50 3
pmh7tool -s 0x50 7
To check whether it is on (bash):
reg=0x$(pmh7tool -r 0x50)
echo "$(( (( reg & 0x08 )) >> 3 ))"
or just `pmh7tool -b 0x50 3` with
https://review.coreboot.org/#/c/coreboot/+/28388/
Tested on ThinkPad W530.
Change-Id: Ieab1a33b3c680c757cc0999660b5cb7e122474cc
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.com>
---
M src/mainboard/lenovo/t430/devicetree.cb
M src/mainboard/lenovo/t530/variants/t530/devicetree.cb
M src/mainboard/lenovo/t530/variants/w530/devicetree.cb
3 files changed, 3 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/28392/1
diff --git a/src/mainboard/lenovo/t430/devicetree.cb b/src/mainboard/lenovo/t430/devicetree.cb
index d466b36..5eb92bc 100644
--- a/src/mainboard/lenovo/t430/devicetree.cb
+++ b/src/mainboard/lenovo/t430/devicetree.cb
@@ -167,7 +167,7 @@
register "has_backlight_gpio" = "0"
register "has_dgpu_power_gpio" = "0"
- register "has_thinker1" = "0"
+ register "has_thinker1" = "1"
end
chip drivers/pc80/tpm
device pnp 0c31.0 on end
diff --git a/src/mainboard/lenovo/t530/variants/t530/devicetree.cb b/src/mainboard/lenovo/t530/variants/t530/devicetree.cb
index 0da05e0..4dcdc9d 100644
--- a/src/mainboard/lenovo/t530/variants/t530/devicetree.cb
+++ b/src/mainboard/lenovo/t530/variants/t530/devicetree.cb
@@ -157,7 +157,7 @@
register "has_backlight_gpio" = "0"
register "has_dgpu_power_gpio" = "0"
- register "has_thinker1" = "0"
+ register "has_thinker1" = "1"
end
end # LPC bridge
device pci 1f.2 on end # SATA Controller 1
diff --git a/src/mainboard/lenovo/t530/variants/w530/devicetree.cb b/src/mainboard/lenovo/t530/variants/w530/devicetree.cb
index d9d9df5..7a72b26 100644
--- a/src/mainboard/lenovo/t530/variants/w530/devicetree.cb
+++ b/src/mainboard/lenovo/t530/variants/w530/devicetree.cb
@@ -179,7 +179,7 @@
register "has_backlight_gpio" = "0"
register "has_dgpu_power_gpio" = "0"
- register "has_thinker1" = "0"
+ register "has_thinker1" = "1"
end
end
device pci 1f.2 on # SATA Controller 1
--
To view, visit https://review.coreboot.org/28392
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieab1a33b3c680c757cc0999660b5cb7e122474cc
Gerrit-Change-Number: 28392
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Felix Held has posted comments on this change. ( https://review.coreboot.org/28388 )
Change subject: util/pmh7tool: Add option to read specific bit
......................................................................
Patch Set 2: Code-Review+2
--
To view, visit https://review.coreboot.org/28388
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I045383eedbcf438270e9c64329a8d910bb941ab8
Gerrit-Change-Number: 28388
Gerrit-PatchSet: 2
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Wed, 29 Aug 2018 23:55:51 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes