From 86221c63aefeec10571a4698e74737af80c0539f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kope=C4=87?= Date: Mon, 2 May 2022 10:24:41 +0200 Subject: [PATCH] intelblocks/pep: Handle TBT displays on s0ix transition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Notify IOM to enable or disable TBT displays on S0ix exit and entry respectively. Change-Id: I9f49d8e30fe8e8b335128e53d71ef902328f031a Signed-off-by: Michał Kopeć Reviewed-on: https://review.coreboot.org/c/coreboot/+/63980 Tested-by: build bot (Jenkins) Reviewed-by: Krystian Hebel Reviewed-by: Angel Pons --- src/soc/intel/common/block/acpi/pep.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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)