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/Initialize.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/Initialize.c')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Initialize.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initialize.c index 2491733df9..a369e22988 100644 --- a/OvmfPkg/QemuVideoDxe/Initialize.c +++ b/OvmfPkg/QemuVideoDxe/Initialize.c @@ -143,7 +143,7 @@ UINT16 Seq_1024_768_32bpp_60[15] = { ///
/// Table of supported video modes
///
-QEMU_VIDEO_VIDEO_MODES QemuVideoVideoModes[] = {
+QEMU_VIDEO_CIRRUS_MODES QemuVideoCirrusModes[] = {
// { 640, 480, 8, 60, Crtc_640_480_256_60, Seq_640_480_256_60, 0xe3 },
// { 800, 600, 8, 60, Crtc_800_600_256_60, Seq_800_600_256_60, 0xef },
{ 640, 480, 32, 60, Crtc_640_480_32bpp_60, Seq_640_480_32bpp_60, 0xef },
@@ -154,38 +154,38 @@ QEMU_VIDEO_VIDEO_MODES QemuVideoVideoModes[] = { // { 960, 720, 32, 60, Crtc_960_720_32bpp_60, Seq_1024_768_32bpp_60, 0xef }
};
-#define QEMU_VIDEO_MODE_COUNT \
- (sizeof (QemuVideoVideoModes) / sizeof (QemuVideoVideoModes[0]))
+#define QEMU_VIDEO_CIRRUS_MODE_COUNT \
+ (sizeof (QemuVideoCirrusModes) / sizeof (QemuVideoCirrusModes[0]))
/**
Construct the valid video modes for QemuVideo.
**/
EFI_STATUS
-QemuVideoVideoModeSetup (
+QemuVideoCirrusModeSetup (
QEMU_VIDEO_PRIVATE_DATA *Private
)
{
UINT32 Index;
QEMU_VIDEO_MODE_DATA *ModeData;
- QEMU_VIDEO_VIDEO_MODES *VideoMode;
+ QEMU_VIDEO_CIRRUS_MODES *VideoMode;
//
// Setup Video Modes
//
Private->ModeData = AllocatePool (
- sizeof (Private->ModeData[0]) * QEMU_VIDEO_MODE_COUNT
+ sizeof (Private->ModeData[0]) * QEMU_VIDEO_CIRRUS_MODE_COUNT
);
ModeData = Private->ModeData;
- VideoMode = &QemuVideoVideoModes[0];
- for (Index = 0; Index < QEMU_VIDEO_MODE_COUNT; Index ++) {
+ VideoMode = &QemuVideoCirrusModes[0];
+ for (Index = 0; Index < QEMU_VIDEO_CIRRUS_MODE_COUNT; Index ++) {
ModeData->ModeNumber = Index;
ModeData->HorizontalResolution = VideoMode->Width;
ModeData->VerticalResolution = VideoMode->Height;
ModeData->ColorDepth = VideoMode->ColorDepth;
ModeData->RefreshRate = VideoMode->RefreshRate;
DEBUG ((EFI_D_INFO,
- "Adding Video Mode %d: %dx%d, %d-bit, %d Hz\n",
+ "Adding Cirrus Video Mode %d: %dx%d, %d-bit, %d Hz\n",
ModeData->ModeNumber,
ModeData->HorizontalResolution,
ModeData->VerticalResolution,
@@ -196,7 +196,7 @@ QemuVideoVideoModeSetup ( ModeData ++ ;
VideoMode ++;
}
- Private->MaxMode = QEMU_VIDEO_MODE_COUNT;
+ Private->MaxMode = QEMU_VIDEO_CIRRUS_MODE_COUNT;
return EFI_SUCCESS;
}
|