OvmfPkg/QemuVideoDxe: simplify InitializeBochsGraphicsMode

struct QEMU_VIDEO_MODE_DATA has all the data needed to set the video
mode, there is no need to take the extra indirection and use
struct QEMU_VIDEO_BOCHS_MODES.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Gerd Hoffmann
2022-01-17 10:58:14 +01:00
committed by mergify[bot]
parent 929804b172
commit 7f25ddbc03
4 changed files with 10 additions and 11 deletions

View File

@@ -987,14 +987,14 @@ VgaOutb (
VOID
InitializeBochsGraphicsMode (
QEMU_VIDEO_PRIVATE_DATA *Private,
QEMU_VIDEO_BOCHS_MODES *ModeData
QEMU_VIDEO_MODE_DATA *ModeData
)
{
DEBUG ((
DEBUG_INFO,
"InitializeBochsGraphicsMode: %dx%d @ %d\n",
ModeData->Width,
ModeData->Height,
ModeData->HorizontalResolution,
ModeData->VerticalResolution,
ModeData->ColorDepth
));
@@ -1007,10 +1007,10 @@ InitializeBochsGraphicsMode (
BochsWrite (Private, VBE_DISPI_INDEX_Y_OFFSET, 0);
BochsWrite (Private, VBE_DISPI_INDEX_BPP, (UINT16)ModeData->ColorDepth);
BochsWrite (Private, VBE_DISPI_INDEX_XRES, (UINT16)ModeData->Width);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_WIDTH, (UINT16)ModeData->Width);
BochsWrite (Private, VBE_DISPI_INDEX_YRES, (UINT16)ModeData->Height);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_HEIGHT, (UINT16)ModeData->Height);
BochsWrite (Private, VBE_DISPI_INDEX_XRES, (UINT16)ModeData->HorizontalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_WIDTH, (UINT16)ModeData->HorizontalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_YRES, (UINT16)ModeData->VerticalResolution);
BochsWrite (Private, VBE_DISPI_INDEX_VIRT_HEIGHT, (UINT16)ModeData->VerticalResolution);
BochsWrite (
Private,