summaryrefslogtreecommitdiff
path: root/src/soc/intel/alderlake
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2023-11-30 19:09:46 +0530
committerSubrata Banik <subratabanik@google.com>2023-12-04 06:15:56 +0000
commit72d616c22c59c6f979afef7fa613f2d2c0f86731 (patch)
tree864da294cb6a8adc18004382a91186afffafb179 /src/soc/intel/alderlake
parentd982274a4ecc8ed6b42724d03332d06d50393109 (diff)
soc/intel/alderlake: Update LidStatus UPD dynamically
This patch ensures that the LidStatus UPD is passed a dynamic value, rather than always passing 1 (CONFIG_RUN_FSP_GOP enabled) for FSP 2.0 devices. Problem statement: * FSP-S GFX PEIM initializes the on-board display (eDP) even when the LID is physically closed, because LidStatus is always set to 1. * FSP-S skips external display initialization even when the LID is closed. Solution: * FSP-S GFX PEIM module understands the presence of an external display if LidStatus is not set, and tries to probe the other display endpoint. * Statically passing LidStatus as always enabled (aka 1) does not illustrate the exact device scenarios, so this patch updates LidStatus dynamically by reading the EC memory map offset. BUG=b:313886118 TEST=Able to build and boot google/marasov to redirect the display using external HDMI monitor while LID is closed. Change-Id: Idb1d71bd54837630f36d43a45effc53d35f9cb70 Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/79352 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/alderlake')
-rw-r--r--src/soc/intel/alderlake/fsp_params.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/alderlake/fsp_params.c b/src/soc/intel/alderlake/fsp_params.c
index d86d62cc9b..4ceda50fb4 100644
--- a/src/soc/intel/alderlake/fsp_params.c
+++ b/src/soc/intel/alderlake/fsp_params.c
@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <assert.h>
+#include <bootmode.h>
#include <bootsplash.h>
#include <console/console.h>
#include <cpu/intel/microcode.h>
@@ -637,7 +638,7 @@ static void fill_fsps_igd_params(FSP_S_CONFIG *s_cfg,
/* Check if IGD is present and fill Graphics init param accordingly */
s_cfg->PeiGraphicsPeimInit = CONFIG(RUN_FSP_GOP) && is_devfn_enabled(SA_DEVFN_IGD);
- s_cfg->LidStatus = CONFIG(RUN_FSP_GOP);
+ s_cfg->LidStatus = CONFIG(VBOOT_LID_SWITCH) ? get_lid_switch() : CONFIG(RUN_FSP_GOP);
s_cfg->PavpEnable = CONFIG(PAVP);
}