feat: [ADL/TGL] support gfx(i915) S3 resume for Linux kernel 5.15.71+ (#1821)

During S3 resume, bootloader must not set VBT pointer.
Otherwise the i915 driver in newer kernel will fail to load GuC.

Test method:
  1. S3 suspend, says 5 seconds: rtcwake -m mem -s 5
  2. check the display and dmesg

Verify: ADLS and TGLU RVP + Linux kernel 5.15.71

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
This commit is contained in:
Vincent Chen 2023-02-02 23:12:55 +08:00 committed by GitHub
parent 657acd2067
commit 401228a7db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -592,7 +592,7 @@ UpdateFspConfig (
DEBUG (((BiosProtected) ? DEBUG_INFO : DEBUG_WARN, "BIOS SPI region will %a protected\n", (BiosProtected) ? "be" : "NOT BE"));
}
if (PcdGetBool (PcdFramebufferInitEnabled)) {
if (PcdGetBool (PcdFramebufferInitEnabled) && (GetBootMode() != BOOT_ON_S3_RESUME)) {
DEBUG ((DEBUG_INFO, "Frame Buffer Enabled\n"));
FspsConfig->GraphicsConfigPtr = (UINT32)GetVbtAddress ();
VbtPtr = (VBIOS_VBT_STRUCTURE*)(UINTN)(FspsConfig->GraphicsConfigPtr);

View File

@ -1411,7 +1411,7 @@ UpdateFspConfig (
DEBUG ((DEBUG_ERROR, "UpdateFspConfig Error: Could not allocate Memory for HdaVerbTable\n"));
}
}
if (PcdGetBool (PcdFramebufferInitEnabled)) {
if (PcdGetBool (PcdFramebufferInitEnabled) && (GetBootMode() != BOOT_ON_S3_RESUME)) {
FspsConfig->GraphicsConfigPtr = (UINT32) GetVbtAddress();
FspsConfig->PeiGraphicsPeimInit = 1;
} else {