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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user