summaryrefslogtreecommitdiff
path: root/OvmfPkg/QemuVideoDxe/Initialize.c
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2014-03-03 08:40:59 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-03-03 08:40:59 +0000
commitcd1526101469cb639c7166c0b750c5ebb810a446 (patch)
tree9a512eff25a7f7a23cf35928595820ae3c19932d /OvmfPkg/QemuVideoDxe/Initialize.c
parent96b5f3977773b71702f67d99f5b758c1a184d2bf (diff)
downloadedk2-platforms-cd1526101469cb639c7166c0b750c5ebb810a446.tar.xz
OvmfPkg: QemuVideoDxe: clarify QEMU_VIDEO_MODE_DATA.ModeNumber
The field name "ModeNumber" in QEMU_VIDEO_MODE_DATA is misleading -- it is not immediately obvious whether this field carries a client-visible mode number, in the GOP sense, or an internal, card type specific mode index. After checking all references, rename the field to "InternalModeIndex". Also, when filling in the card type independent QEMU_VIDEO_MODE_DATA array from the card type specific mode array, distinguish the GOP mode number from the internal mode index in the debug message. This patch effects no functional changes. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15287 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/QemuVideoDxe/Initialize.c')
-rw-r--r--OvmfPkg/QemuVideoDxe/Initialize.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initialize.c
index 37744786cb..af3b6af47c 100644
--- a/OvmfPkg/QemuVideoDxe/Initialize.c
+++ b/OvmfPkg/QemuVideoDxe/Initialize.c
@@ -182,14 +182,15 @@ QemuVideoCirrusModeSetup (
ModeData = Private->ModeData;
VideoMode = &QemuVideoCirrusModes[0];
for (Index = 0; Index < QEMU_VIDEO_CIRRUS_MODE_COUNT; Index ++) {
- ModeData->ModeNumber = Index;
+ ModeData->InternalModeIndex = Index;
ModeData->HorizontalResolution = VideoMode->Width;
ModeData->VerticalResolution = VideoMode->Height;
ModeData->ColorDepth = VideoMode->ColorDepth;
ModeData->RefreshRate = VideoMode->RefreshRate;
DEBUG ((EFI_D_INFO,
- "Adding Cirrus Video Mode %d: %dx%d, %d-bit, %d Hz\n",
- ModeData->ModeNumber,
+ "Adding Mode %d as Cirrus Internal Mode %d: %dx%d, %d-bit, %d Hz\n",
+ (INT32) (ModeData - Private->ModeData),
+ ModeData->InternalModeIndex,
ModeData->HorizontalResolution,
ModeData->VerticalResolution,
ModeData->ColorDepth,
@@ -237,14 +238,15 @@ QemuVideoBochsModeSetup (
ModeData = Private->ModeData;
VideoMode = &QemuVideoBochsModes[0];
for (Index = 0; Index < QEMU_VIDEO_BOCHS_MODE_COUNT; Index ++) {
- ModeData->ModeNumber = Index;
+ ModeData->InternalModeIndex = Index;
ModeData->HorizontalResolution = VideoMode->Width;
ModeData->VerticalResolution = VideoMode->Height;
ModeData->ColorDepth = VideoMode->ColorDepth;
ModeData->RefreshRate = 60;
DEBUG ((EFI_D_INFO,
- "Adding Bochs Video Mode %d: %dx%d, %d-bit, %d Hz\n",
- ModeData->ModeNumber,
+ "Adding Mode %d as Bochs Internal Mode %d: %dx%d, %d-bit, %d Hz\n",
+ (INT32) (ModeData - Private->ModeData),
+ ModeData->InternalModeIndex,
ModeData->HorizontalResolution,
ModeData->VerticalResolution,
ModeData->ColorDepth,