summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorMichał Kopeć <michal.kopec@3mdeb.com>2022-05-02 10:24:41 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-05-03 19:33:13 +0000
commit86221c63aefeec10571a4698e74737af80c0539f (patch)
treefc0218b5462784b006425728d3fbe0b7db61466e /src/soc
parent2b87b506bcae63b383b7ff75dc5c3e3cc856e8da (diff)
intelblocks/pep: Handle TBT displays on s0ix transition
Notify IOM to enable or disable TBT displays on S0ix exit and entry respectively. Change-Id: I9f49d8e30fe8e8b335128e53d71ef902328f031a Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/63980 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/common/block/acpi/pep.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c
index 139943865f..8028b8147c 100644
--- a/src/soc/intel/common/block/acpi/pep.c
+++ b/src/soc/intel/common/block/acpi/pep.c
@@ -17,6 +17,8 @@
#define MAINBOARD_DISPLAY_HOOK "\\_SB.MDSX"
#define ENABLE_PM_BITS_HOOK "\\_SB.PCI0.EGPM"
#define RESTORE_PM_BITS_HOOK "\\_SB.PCI0.RGPM"
+#define THUNDERBOLT_DEVICE "\\_SB.PCI0.TXHC"
+#define THUNDERBOLT_IOM_DPOF "\\_SB.PCI0.DPOF"
#define LPI_STATES_ALL 0xff
#define MIN_DEVICE_STATE ACPI_DEVICE_SLEEP_D0
#define PEPD_SCOPE "\\_SB.PCI0"
@@ -129,6 +131,11 @@ static void lpi_s0ix_entry(void *unused)
acpigen_write_if_cond_ref_of(ENABLE_PM_BITS_HOOK);
acpigen_emit_namestring(ENABLE_PM_BITS_HOOK);
acpigen_write_if_end();
+
+ /* Handle Thunderbolt displays */
+ acpigen_write_if_cond_ref_of(THUNDERBOLT_DEVICE);
+ acpigen_write_store_int_to_namestr(1, THUNDERBOLT_IOM_DPOF);
+ acpigen_write_if_end();
}
static void lpi_s0ix_exit(void *unused)
@@ -149,6 +156,11 @@ static void lpi_s0ix_exit(void *unused)
acpigen_write_if_cond_ref_of(RESTORE_PM_BITS_HOOK);
acpigen_emit_namestring(RESTORE_PM_BITS_HOOK);
acpigen_write_if_end();
+
+ /* Handle Thunderbolt displays */
+ acpigen_write_if_cond_ref_of(THUNDERBOLT_DEVICE);
+ acpigen_write_store_int_to_namestr(0, THUNDERBOLT_IOM_DPOF);
+ acpigen_write_if_end();
}
static void lpi_display_on(void *unused)