diff options
author | Subrata Banik <subratabanik@google.com> | 2023-09-05 18:51:23 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-09-07 13:37:41 +0000 |
commit | 2527e3f7edfa5fa5b25b6b3ddcf1b700af4d5fc8 (patch) | |
tree | f8a1c1e95dba452dbea6affde8836b61b9ae0fb1 /src | |
parent | d3a89cdb749aad5bc378552eee3167003219b62d (diff) |
soc/intel/meteorlake: 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:299137940
TEST=Able to build and boot google/rex to redirect the display
using external HDMI monitor while LID is closed.
Change-Id: I7d7b678227a6c8e32114de069af8455b8c1aa058
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77685
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/intel/meteorlake/fsp_params.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c index 7a7a2e60c2..17d7ad0fc1 100644 --- a/src/soc/intel/meteorlake/fsp_params.c +++ b/src/soc/intel/meteorlake/fsp_params.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include <assert.h> +#include <bootmode.h> #include <bootsplash.h> #include <cbfs.h> #include <console/console.h> @@ -411,7 +412,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(PCI_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); } |