mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 08:04:07 +02:00
OvmfPkg/QemuVideoDxe: ignore display resolutions smaller than 640x480
GraphicsConsoleDxe will assert in case the resolution is too small. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
58035e8b5e
commit
391666da2c
@ -293,6 +293,8 @@ QemuVideoBochsEdid (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
|
UINT32 X;
|
||||||
|
UINT32 Y;
|
||||||
|
|
||||||
if (Private->Variant != QEMU_VIDEO_BOCHS_MMIO) {
|
if (Private->Variant != QEMU_VIDEO_BOCHS_MMIO) {
|
||||||
return;
|
return;
|
||||||
@ -344,16 +346,24 @@ QemuVideoBochsEdid (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
*XRes = Private->Edid[56] | ((Private->Edid[58] & 0xf0) << 4);
|
X = Private->Edid[56] | ((Private->Edid[58] & 0xf0) << 4);
|
||||||
*YRes = Private->Edid[59] | ((Private->Edid[61] & 0xf0) << 4);
|
Y = Private->Edid[59] | ((Private->Edid[61] & 0xf0) << 4);
|
||||||
DEBUG ((
|
DEBUG ((
|
||||||
DEBUG_INFO,
|
DEBUG_INFO,
|
||||||
"%a: default resolution: %dx%d\n",
|
"%a: default resolution: %dx%d\n",
|
||||||
__func__,
|
__func__,
|
||||||
*XRes,
|
X,
|
||||||
*YRes
|
Y
|
||||||
));
|
));
|
||||||
|
|
||||||
|
if ((X < 640) || (Y < 480)) {
|
||||||
|
/* ignore hint, GraphicsConsoleDxe needs 640x480 or larger */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
*XRes = X;
|
||||||
|
*YRes = Y;
|
||||||
|
|
||||||
if (PcdGet8 (PcdVideoResolutionSource) == 0) {
|
if (PcdGet8 (PcdVideoResolutionSource) == 0) {
|
||||||
Status = PcdSet32S (PcdVideoHorizontalResolution, *XRes);
|
Status = PcdSet32S (PcdVideoHorizontalResolution, *XRes);
|
||||||
ASSERT_RETURN_ERROR (Status);
|
ASSERT_RETURN_ERROR (Status);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user