diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2022-01-17 10:58:14 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-01-29 17:04:21 +0000 |
commit | 7f25ddbc03094da582d9fc667ab89615b865aab1 (patch) | |
tree | a1689b2de6a58b212953c5cf5e6515e7b4547981 /OvmfPkg | |
parent | 929804b1721b73452a977f31af2d7de83193301b (diff) | |
download | edk2-7f25ddbc03094da582d9fc667ab89615b865aab1.tar.gz edk2-7f25ddbc03094da582d9fc667ab89615b865aab1.tar.bz2 edk2-7f25ddbc03094da582d9fc667ab89615b865aab1.zip |
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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Driver.c | 14 | ||||
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Gop.c | 2 | ||||
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Initialize.c | 2 | ||||
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Qemu.h | 3 |
4 files changed, 10 insertions, 11 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Driver.c b/OvmfPkg/QemuVideoDxe/Driver.c index d9f0a2464a..b91909a14e 100644 --- a/OvmfPkg/QemuVideoDxe/Driver.c +++ b/OvmfPkg/QemuVideoDxe/Driver.c @@ -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,
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index 5ad0afe883..0c4dea7fb6 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -177,7 +177,7 @@ Routine Description: break;
case QEMU_VIDEO_BOCHS_MMIO:
case QEMU_VIDEO_BOCHS:
- InitializeBochsGraphicsMode (Private, &QemuVideoBochsModes[ModeData->InternalModeIndex]);
+ InitializeBochsGraphicsMode (Private, ModeData);
break;
default:
ASSERT (FALSE);
diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initialize.c index 533ec661d6..8a70cf8484 100644 --- a/OvmfPkg/QemuVideoDxe/Initialize.c +++ b/OvmfPkg/QemuVideoDxe/Initialize.c @@ -202,7 +202,7 @@ QemuVideoCirrusModeSetup ( ///
/// Table of supported video modes
///
-QEMU_VIDEO_BOCHS_MODES QemuVideoBochsModes[] = {
+STATIC QEMU_VIDEO_BOCHS_MODES QemuVideoBochsModes[] = {
{ 640, 480, 32 },
{ 800, 480, 32 },
{ 800, 600, 32 },
diff --git a/OvmfPkg/QemuVideoDxe/Qemu.h b/OvmfPkg/QemuVideoDxe/Qemu.h index 8f05898f86..fef648c967 100644 --- a/OvmfPkg/QemuVideoDxe/Qemu.h +++ b/OvmfPkg/QemuVideoDxe/Qemu.h @@ -150,7 +150,6 @@ extern UINT16 Seq_800_600_256_60[]; extern UINT8 Crtc_1024_768_256_60[];
extern UINT16 Seq_1024_768_256_60[];
extern QEMU_VIDEO_CIRRUS_MODES QemuVideoCirrusModes[];
-extern QEMU_VIDEO_BOCHS_MODES QemuVideoBochsModes[];
extern EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gQemuVideoComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gQemuVideoComponentName2;
@@ -414,7 +413,7 @@ InitializeCirrusGraphicsMode ( VOID
InitializeBochsGraphicsMode (
QEMU_VIDEO_PRIVATE_DATA *Private,
- QEMU_VIDEO_BOCHS_MODES *ModeData
+ QEMU_VIDEO_MODE_DATA *ModeData
);
VOID
|