Revert "OvmfPkg/QemuVideoDxe: VMWare SVGA device support"
This reverts commit c137d95081
.
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>
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user