]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c
sync tracker to remove duplicate display mode in ConOut virtual handle GOP instance.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitterGraphics.c
index d13d54007036bae56d68502ff74f860a216a6f8f..3f720ac380aef0f4a94bd3cc6ace17932438a9b4 100644 (file)
@@ -1,6 +1,6 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation\r
+Copyright (c) 2006 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -15,7 +15,7 @@ Module Name:
 \r
 Abstract:\r
 \r
-  Support for ConsoleControl protocol. Support for UGA Draw spliter.\r
+  Support for ConsoleControl protocol. Support for Graphics output spliter.\r
   Support for DevNull Console Out. This console uses memory buffers\r
   to represnt the console. It allows a console to start very early and\r
   when a new console is added it is synced up with the current console\r
@@ -39,13 +39,13 @@ ConSpliterConsoleControlGetMode (
 \r
   Routine Description:\r
     Return the current video mode information. Also returns info about existence\r
-    of UGA Draw devices in system, and if the Std In device is locked. All the\r
+    of Graphics Output devices or UGA Draw devices in system, and if the Std In device is locked. All the\r
     arguments are optional and only returned if a non NULL pointer is passed in.\r
 \r
   Arguments:\r
     This - Protocol instance pointer.\r
     Mode        - Are we in text of grahics mode.\r
-    UgaExists   - TRUE if UGA Spliter has found a UGA device\r
+    GopExists   - TRUE if GOP Spliter has found a GOP/UGA device\r
     StdInLocked - TRUE if StdIn device is keyboard locked\r
 \r
   Returns:\r
@@ -155,7 +155,7 @@ ConSpliterConsoleControlSetMode (
     }\r
   }\r
   if (Mode == EfiConsoleControlScreenText) {\r
-    DevNullSyncGopStdOut (Private);\r
+    DevNullSyncStdOut (Private);\r
   }\r
   return EFI_SUCCESS;\r
 }\r
@@ -189,7 +189,6 @@ ConSpliterGraphicsOutputQueryMode (
 --*/\r
 {\r
   TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private;\r
-  TEXT_OUT_GOP_MODE               *Mode;\r
 \r
   if (This == NULL || Info == NULL || SizeOfInfo == NULL || ModeNumber >= This->Mode->MaxMode) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -212,11 +211,7 @@ ConSpliterGraphicsOutputQueryMode (
 \r
   *SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
 \r
-  CopyMem (*Info, Private->GraphicsOutput.Mode->Info, *SizeOfInfo);\r
-  Mode = &Private->GraphicsOutputModeBuffer[ModeNumber];\r
-  (*Info)->HorizontalResolution = Mode->HorizontalResolution;\r
-  (*Info)->VerticalResolution = Mode->VerticalResolution;\r
-  (*Info)->PixelsPerScanLine = Mode->HorizontalResolution;\r
+  CopyMem (*Info, &Private->GraphicsOutputModeBuffer[ModeNumber], *SizeOfInfo);\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -248,7 +243,7 @@ Routine Description:
   TEXT_OUT_SPLITTER_PRIVATE_DATA         *Private;\r
   UINTN                                  Index;\r
   EFI_STATUS                             ReturnStatus;\r
-  TEXT_OUT_GOP_MODE                      *Mode;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION   *Mode;\r
   UINTN                                  Size;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL           *GraphicsOutput;\r
   UINTN                                  NumberIndex;\r
@@ -335,10 +330,7 @@ Routine Description:
 \r
   This->Mode->Mode = ModeNumber;\r
 \r
-  Info = This->Mode->Info;\r
-  Info->HorizontalResolution = Mode->HorizontalResolution;\r
-  Info->VerticalResolution   = Mode->VerticalResolution;\r
-  Info->PixelsPerScanLine    = Mode->HorizontalResolution;\r
+  CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo);\r
 \r
   //\r
   // Information is not enough here, so the following items remain unchanged:\r
@@ -1526,7 +1518,7 @@ DevNullTextOutEnableCursor (
 }\r
 \r
 EFI_STATUS\r
-DevNullSyncGopStdOut (\r
+DevNullSyncStdOut (\r
   IN  TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private\r
   )\r
 /*++\r