mirror of https://github.com/acidanthera/audk.git
Set video resolution to highest when PcdVideoHorizontalResolution or PcdVideoVerticalResolution are set to 0x0.
Signed-off-by: li-elvin Reviewed-by: niruiyu, hhtian git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12596 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b9b5e3078d
commit
675253b4a4
|
@ -1225,12 +1225,18 @@ BiosVideoCheckForVbe (
|
||||||
UINT8 *EdidOverrideDataBlock;
|
UINT8 *EdidOverrideDataBlock;
|
||||||
UINTN EdidActiveDataSize;
|
UINTN EdidActiveDataSize;
|
||||||
UINT8 *EdidActiveDataBlock;
|
UINT8 *EdidActiveDataBlock;
|
||||||
|
UINT32 HighestHorizontalResolution;
|
||||||
|
UINT32 HighestVerticalResolution;
|
||||||
|
UINTN HighestResolutionMode;
|
||||||
|
|
||||||
EdidFound = TRUE;
|
EdidFound = TRUE;
|
||||||
EdidOverrideFound = FALSE;
|
EdidOverrideFound = FALSE;
|
||||||
EdidOverrideDataBlock = NULL;
|
EdidOverrideDataBlock = NULL;
|
||||||
EdidActiveDataSize = 0;
|
EdidActiveDataSize = 0;
|
||||||
EdidActiveDataBlock = NULL;
|
EdidActiveDataBlock = NULL;
|
||||||
|
HighestHorizontalResolution = 0;
|
||||||
|
HighestVerticalResolution = 0;
|
||||||
|
HighestResolutionMode = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Allocate buffer under 1MB for VBE data structures
|
// Allocate buffer under 1MB for VBE data structures
|
||||||
|
@ -1526,6 +1532,16 @@ BiosVideoCheckForVbe (
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Record the highest resolution mode to set later
|
||||||
|
//
|
||||||
|
if ((BiosVideoPrivate->VbeModeInformationBlock->XResolution >= HighestHorizontalResolution) &&
|
||||||
|
(BiosVideoPrivate->VbeModeInformationBlock->YResolution >= HighestVerticalResolution)) {
|
||||||
|
HighestHorizontalResolution = BiosVideoPrivate->VbeModeInformationBlock->XResolution;
|
||||||
|
HighestVerticalResolution = BiosVideoPrivate->VbeModeInformationBlock->YResolution;
|
||||||
|
HighestResolutionMode = ModeNumber;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add mode to the list of available modes
|
// Add mode to the list of available modes
|
||||||
//
|
//
|
||||||
|
@ -1620,6 +1636,15 @@ BiosVideoCheckForVbe (
|
||||||
//
|
//
|
||||||
// Find the best mode to initialize
|
// Find the best mode to initialize
|
||||||
//
|
//
|
||||||
|
if ((PcdGet32 (PcdVideoHorizontalResolution) == 0x0) || (PcdGet32 (PcdVideoVerticalResolution) == 0x0)) {
|
||||||
|
DEBUG_CODE (
|
||||||
|
BIOS_VIDEO_MODE_DATA *ModeData;
|
||||||
|
ModeData = &BiosVideoPrivate->ModeData[HighestResolutionMode];
|
||||||
|
DEBUG ((EFI_D_INFO, "BiosVideo set highest resolution %d x %d\n",
|
||||||
|
ModeData->HorizontalResolution, ModeData->VerticalResolution));
|
||||||
|
);
|
||||||
|
PreferMode = HighestResolutionMode;
|
||||||
|
}
|
||||||
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, (UINT32) PreferMode);
|
Status = BiosVideoGraphicsOutputSetMode (&BiosVideoPrivate->GraphicsOutput, (UINT32) PreferMode);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
for (PreferMode = 0; PreferMode < ModeNumber; PreferMode ++) {
|
for (PreferMode = 0; PreferMode < ModeNumber; PreferMode ++) {
|
||||||
|
|
|
@ -78,3 +78,5 @@
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoSetTextVgaModeEnable
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoSetTextVgaModeEnable
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable
|
||||||
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable
|
gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution
|
||||||
|
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution
|
||||||
|
|
Loading…
Reference in New Issue