diff options
author | yuchenlin <yuchenlin@synology.com> | 2018-11-02 11:23:59 +0800 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2018-11-20 20:24:04 +0100 |
commit | 1358ecb77fea69108a8b1eb00f5b1ea709460fe1 (patch) | |
tree | 5f9ad61cbd1e5d85757fe513c18046fbe97f6cf6 /OvmfPkg/QemuVideoDxe/Gop.c | |
parent | 29d8a4d4abb1785e51366b6fda68198c37927e36 (diff) | |
download | edk2-1358ecb77fea69108a8b1eb00f5b1ea709460fe1.zip edk2-1358ecb77fea69108a8b1eb00f5b1ea709460fe1.tar.gz edk2-1358ecb77fea69108a8b1eb00f5b1ea709460fe1.tar.bz2 |
Revert "OvmfPkg/QemuVideoDxe: VMWare SVGA device support"
This reverts commit c137d95081690d4877fbeb5f1856972e84ac32f2.
The VMWare SVGA model now -- since commit 104bd1dc70 in QEMU --
falls back to stdvga (that is, Bochs) if we don't setup VMWare SVGA
FIFO.
To simplify QemuVideoDxe, we don't intend to implement the VMWare SVGA
FIFO setup feature. It means our current VMW SVGA driver code is
basically dead. To simplify the problem, we will replace the old
VMWare SVGA driver to Bochs interface. It should work on all QEMU
version.
The first step for using Bochs interface is to revert old driver.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: yuchenlin <yuchenlin@synology.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
(cherry picked from commit 98856a724c2acdc0094220d4de615a557dad0f88)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg/QemuVideoDxe/Gop.c')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Gop.c | 65 |
1 files changed, 5 insertions, 60 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index c9941ef..d490fa7 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -13,7 +13,6 @@ **/
-#include <IndustryStandard/VmwareSvga.h>
#include "Qemu.h"
STATIC
@@ -79,46 +78,6 @@ QemuVideoCompleteModeData ( return EFI_SUCCESS;
}
-STATIC
-EFI_STATUS
-QemuVideoVmwareSvgaCompleteModeData (
- IN QEMU_VIDEO_PRIVATE_DATA *Private,
- OUT EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode
- )
-{
- EFI_STATUS Status;
- EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
- EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *FrameBufDesc;
- UINT32 BytesPerLine, FbOffset, BytesPerPixel;
-
- Info = Mode->Info;
- CopyMem (Info, &Private->VmwareSvgaModeInfo[Mode->Mode], sizeof (*Info));
- BytesPerPixel = Private->ModeData[Mode->Mode].ColorDepth / 8;
- BytesPerLine = Info->PixelsPerScanLine * BytesPerPixel;
-
- FbOffset = VmwareSvgaRead (Private, VmwareSvgaRegFbOffset);
-
- Status = Private->PciIo->GetBarAttributes (
- Private->PciIo,
- PCI_BAR_IDX1,
- NULL,
- (VOID**) &FrameBufDesc
- );
- if (EFI_ERROR (Status)) {
- return EFI_DEVICE_ERROR;
- }
-
- Mode->FrameBufferBase = FrameBufDesc->AddrRangeMin + FbOffset;
- Mode->FrameBufferSize = BytesPerLine * Info->VerticalResolution;
- Mode->FrameBufferSize = EFI_PAGES_TO_SIZE (
- EFI_SIZE_TO_PAGES (Mode->FrameBufferSize)
- );
-
- FreePool (FrameBufDesc);
- return Status;
-}
-
-
//
// Graphics Output Protocol Member Functions
//
@@ -167,14 +126,10 @@ Routine Description: *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- if (Private->Variant == QEMU_VIDEO_VMWARE_SVGA) {
- CopyMem (*Info, &Private->VmwareSvgaModeInfo[ModeNumber], sizeof (**Info));
- } else {
- ModeData = &Private->ModeData[ModeNumber];
- (*Info)->HorizontalResolution = ModeData->HorizontalResolution;
- (*Info)->VerticalResolution = ModeData->VerticalResolution;
- QemuVideoCompleteModeInfo (ModeData, *Info);
- }
+ ModeData = &Private->ModeData[ModeNumber];
+ (*Info)->HorizontalResolution = ModeData->HorizontalResolution;
+ (*Info)->VerticalResolution = ModeData->VerticalResolution;
+ QemuVideoCompleteModeInfo (ModeData, *Info);
return EFI_SUCCESS;
}
@@ -224,12 +179,6 @@ Routine Description: case QEMU_VIDEO_BOCHS:
InitializeBochsGraphicsMode (Private, &QemuVideoBochsModes[ModeData->InternalModeIndex]);
break;
- case QEMU_VIDEO_VMWARE_SVGA:
- InitializeVmwareSvgaGraphicsMode (
- Private,
- &QemuVideoBochsModes[ModeData->InternalModeIndex]
- );
- break;
default:
ASSERT (FALSE);
return EFI_DEVICE_ERROR;
@@ -240,11 +189,7 @@ Routine Description: This->Mode->Info->VerticalResolution = ModeData->VerticalResolution;
This->Mode->SizeOfInfo = sizeof(EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);
- if (Private->Variant == QEMU_VIDEO_VMWARE_SVGA) {
- QemuVideoVmwareSvgaCompleteModeData (Private, This->Mode);
- } else {
- QemuVideoCompleteModeData (Private, This->Mode);
- }
+ QemuVideoCompleteModeData (Private, This->Mode);
//
// Re-initialize the frame buffer configure when mode changes.
|