MdeModulePkg/GraphicsConsole: Don't re-set video output mode
Fixes display resolution issues with booting OS X
This commit is contained in:
@ -499,19 +499,6 @@ GraphicsConsoleControllerDriverStart (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ModeNumber != Private->GraphicsOutput->Mode->Mode) {
|
|
||||||
//
|
|
||||||
// Current graphics mode is not set or is not set to the mode which we has found,
|
|
||||||
// set the new graphic mode.
|
|
||||||
//
|
|
||||||
Status = Private->GraphicsOutput->SetMode (Private->GraphicsOutput, ModeNumber);
|
|
||||||
if (EFI_ERROR (Status)) {
|
|
||||||
//
|
|
||||||
// The mode set operation failed
|
|
||||||
//
|
|
||||||
goto Error;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
} else if (FeaturePcdGet (PcdUgaConsumeSupport)) {
|
||||||
//
|
//
|
||||||
// At first try to set user-defined resolution
|
// At first try to set user-defined resolution
|
||||||
@ -764,23 +751,6 @@ CheckModeSupported (
|
|||||||
&Info
|
&Info
|
||||||
);
|
);
|
||||||
if (!EFI_ERROR (Status)) {
|
if (!EFI_ERROR (Status)) {
|
||||||
if ((Info->HorizontalResolution == HorizontalResolution) &&
|
|
||||||
(Info->VerticalResolution == VerticalResolution)) {
|
|
||||||
if ((GraphicsOutput->Mode->Info->HorizontalResolution == HorizontalResolution) &&
|
|
||||||
(GraphicsOutput->Mode->Info->VerticalResolution == VerticalResolution)) {
|
|
||||||
//
|
|
||||||
// If video device has been set to this mode, we do not need to SetMode again
|
|
||||||
//
|
|
||||||
FreePool (Info);
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
|
|
||||||
if (!EFI_ERROR (Status)) {
|
|
||||||
FreePool (Info);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
FreePool (Info);
|
FreePool (Info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user