diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-27 19:11:11 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-27 19:11:11 +0000 |
commit | 212aac55fd13e985cebf88042f40479c01ac2e44 (patch) | |
tree | bcd42f5b5525bc76b3c86fd6825b45a4a0b77f6f /OvmfPkg/QemuVideoDxe/Gop.c | |
parent | 8e4585bb6cdd32d7586de48662cd0aba69cbea58 (diff) | |
download | edk2-platforms-212aac55fd13e985cebf88042f40479c01ac2e44.tar.xz |
QemuVideo: prepare to support more hardware
Move to a table-driven hardware detection. Add a table with PCI IDs,
card name and variant enum. Use the table for hardware detection and
initialization. Rename Cirrus-specific data and code to carry "cirrus"
in the name.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13967 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/QemuVideoDxe/Gop.c')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Gop.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index d364630c47..bd49ee9139 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -181,7 +181,17 @@ Routine Description: return EFI_OUT_OF_RESOURCES;
}
- InitializeGraphicsMode (Private, &QemuVideoVideoModes[ModeData->ModeNumber]);
+ switch (Private->Variant) {
+ case QEMU_VIDEO_CIRRUS_5430:
+ case QEMU_VIDEO_CIRRUS_5446:
+ InitializeCirrusGraphicsMode (Private, &QemuVideoCirrusModes[ModeData->ModeNumber]);
+ break;
+ default:
+ ASSERT (FALSE);
+ gBS->FreePool (Private->LineBuffer);
+ Private->LineBuffer = NULL;
+ return EFI_DEVICE_ERROR;
+ }
This->Mode->Mode = ModeNumber;
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
|