]> git.proxmox.com Git - mirror_edk2.git/commitdiff
sync tracker to remove duplicate display mode in ConOut virtual handle GOP instance.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2008 05:55:46 +0000 (05:55 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 9 Jan 2008 05:55:46 +0000 (05:55 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4533 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c

index babf3c6cd147948347015006ebd1a7f8e037f3c5..8e49c480972686426c5fd3ea1e4f7a729d48056d 100644 (file)
@@ -170,7 +170,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mConOut = {
     NULL\r
   },\r
   (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,\r
-  (TEXT_OUT_GOP_MODE *) NULL,\r
+  (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,\r
+  0,\r
   0,\r
   TRUE,\r
   {\r
@@ -233,7 +234,8 @@ STATIC TEXT_OUT_SPLITTER_PRIVATE_DATA mStdErr = {
     NULL\r
   },\r
   (EFI_GRAPHICS_OUTPUT_BLT_PIXEL *) NULL,\r
-  (TEXT_OUT_GOP_MODE *) NULL,\r
+  (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *) NULL,\r
+  0,\r
   0,\r
   TRUE,\r
   {\r
@@ -663,6 +665,7 @@ ConSplitterTextOutConstructor (
   )\r
 {\r
   EFI_STATUS  Status;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  *Info;\r
 \r
   //\r
   // Copy protocols template\r
@@ -722,21 +725,24 @@ ConSplitterTextOutConstructor (
     }\r
     //\r
     // Setup the DevNullGraphicsOutput to 800 x 600 x 32 bits per pixel\r
+    // DevNull will be updated to user-defined mode after driver has started.\r
     //\r
-    if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (TEXT_OUT_GOP_MODE))) == NULL) {\r
+    if ((ConOutPrivate->GraphicsOutputModeBuffer = AllocateZeroPool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION))) == NULL) {\r
       return EFI_OUT_OF_RESOURCES;\r
     }\r
-    ConOutPrivate->GraphicsOutputModeBuffer[0].HorizontalResolution = 800;\r
-    ConOutPrivate->GraphicsOutputModeBuffer[0].VerticalResolution = 600;\r
+    Info = &ConOutPrivate->GraphicsOutputModeBuffer[0];\r
+    Info->Version = 0;\r
+    Info->HorizontalResolution = 800;\r
+    Info->VerticalResolution = 600;\r
+    Info->PixelFormat = PixelBltOnly;\r
+    Info->PixelsPerScanLine = 800;\r
+    CopyMem (ConOutPrivate->GraphicsOutput.Mode->Info, Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
+    ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
 \r
     //\r
     // Initialize the following items, theset items remain unchanged in GraphicsOutput->SetMode()\r
-    //  GraphicsOutputMode->Info->Version, GraphicsOutputMode->Info->PixelFormat\r
-    //  GraphicsOutputMode->SizeOfInfo, GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize\r
+    // GraphicsOutputMode->FrameBufferBase, GraphicsOutputMode->FrameBufferSize\r
     //\r
-    ConOutPrivate->GraphicsOutput.Mode->Info->Version = 0;\r
-    ConOutPrivate->GraphicsOutput.Mode->Info->PixelFormat = PixelBltOnly;\r
-    ConOutPrivate->GraphicsOutput.Mode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
     ConOutPrivate->GraphicsOutput.Mode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;\r
     ConOutPrivate->GraphicsOutput.Mode->FrameBufferSize = 0;\r
 \r
@@ -2464,14 +2470,15 @@ Returns:
 {\r
   EFI_STATUS                           Status;\r
   UINTN                                Index;\r
-  TEXT_OUT_GOP_MODE                    *Mode;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Mode;\r
   UINTN                                SizeOfInfo;\r
   EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE    *CurrentGraphicsOutputMode;\r
-  TEXT_OUT_GOP_MODE                    *ModeBuffer;\r
-  TEXT_OUT_GOP_MODE                    *MatchedMode;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *ModeBuffer;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *MatchedMode;\r
   UINTN                                NumberIndex;\r
   BOOLEAN                              Match;\r
+  BOOLEAN                              AlreadyExist;\r
 \r
   if ((GraphicsOutput == NULL) && (UgaDraw == NULL)) {\r
     return EFI_UNSUPPORTED;\r
@@ -2479,6 +2486,17 @@ Returns:
 \r
   CurrentGraphicsOutputMode = Private->GraphicsOutput.Mode;\r
 \r
+  Index        = 0;\r
+\r
+  if (Private->CurrentNumberOfUgaDraw != 0) {\r
+    //\r
+    // If any UGA device has already been added, then there is no need to\r
+    // calculate intersection of display mode of different GOP/UGA device,\r
+    // since only one display mode will be exported (i.e. user-defined mode)\r
+    //\r
+    goto Done;\r
+  }\r
+\r
   if (GraphicsOutput != NULL) {\r
     if (Private->CurrentNumberOfGraphicsOutput == 0) {\r
         //\r
@@ -2494,7 +2512,7 @@ Returns:
         //\r
         // Allocate resource for the private mode buffer\r
         //\r
-        ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * GraphicsOutput->Mode->MaxMode);\r
+        ModeBuffer = AllocatePool (GraphicsOutput->Mode->SizeOfInfo * GraphicsOutput->Mode->MaxMode);\r
         if (ModeBuffer == NULL) {\r
           return EFI_OUT_OF_RESOURCES;\r
         }\r
@@ -2510,8 +2528,7 @@ Returns:
           if (EFI_ERROR (Status)) {\r
             return Status;\r
           }\r
-          Mode->HorizontalResolution = Info->HorizontalResolution;\r
-          Mode->VerticalResolution = Info->VerticalResolution;\r
+          CopyMem (Mode, Info, SizeOfInfo);\r
           Mode++;\r
           FreePool (Info);\r
         }\r
@@ -2519,7 +2536,7 @@ Returns:
       //\r
       // Check intersection of display mode\r
       //\r
-      ModeBuffer = AllocatePool (sizeof (TEXT_OUT_GOP_MODE) * CurrentGraphicsOutputMode->MaxMode);\r
+      ModeBuffer = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION) * CurrentGraphicsOutputMode->MaxMode);\r
       if (ModeBuffer == NULL) {\r
         return EFI_OUT_OF_RESOURCES;\r
       }\r
@@ -2535,7 +2552,7 @@ Returns:
             return Status;\r
           }\r
           if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&\r
-              (Info->VerticalResolution == Mode->VerticalResolution)){\r
+              (Info->VerticalResolution == Mode->VerticalResolution)) {\r
             Match = TRUE;\r
             FreePool (Info);\r
             break;\r
@@ -2544,8 +2561,28 @@ Returns:
         }\r
 \r
         if (Match) {\r
-          CopyMem (MatchedMode, Mode, sizeof (TEXT_OUT_GOP_MODE));\r
-          MatchedMode++;\r
+          AlreadyExist = FALSE;\r
+\r
+          for (Info = ModeBuffer; Info < MatchedMode; Info++) {\r
+            if ((Info->HorizontalResolution == Mode->HorizontalResolution) &&\r
+                (Info->VerticalResolution == Mode->VerticalResolution)) {\r
+              AlreadyExist = TRUE;\r
+              break;\r
+            }\r
+          }\r
+\r
+          if (!AlreadyExist) {\r
+            CopyMem (MatchedMode, Mode, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
+\r
+            //\r
+            // Physical frame buffer is no longer available, change PixelFormat to PixelBltOnly\r
+            //\r
+            MatchedMode->Version = 0;\r
+            MatchedMode->PixelFormat = PixelBltOnly;\r
+            ZeroMem (&MatchedMode->PixelInformation, sizeof (EFI_PIXEL_BITMASK));\r
+\r
+            MatchedMode++;\r
+          }\r
         }\r
 \r
         Mode++;\r
@@ -2560,7 +2597,7 @@ Returns:
       //\r
       // Physical frame buffer is no longer available when there are more than one physical GOP devices\r
       //\r
-      CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (TEXT_OUT_GOP_MODE));\r
+      CurrentGraphicsOutputMode->MaxMode = (UINT32) (((UINTN) MatchedMode - (UINTN) ModeBuffer) / sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
       CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;\r
       ZeroMem (&CurrentGraphicsOutputMode->Info->PixelInformation, sizeof (EFI_PIXEL_BITMASK));\r
       CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
@@ -2584,21 +2621,19 @@ Returns:
       Index = 0;\r
     }\r
 \r
-    //\r
-    // Current mode number may need update now, so set it to an invalide mode number\r
-    //\r
-    CurrentGraphicsOutputMode->Mode = 0xffff;\r
-  } else {\r
+  }\r
+  if (UgaDraw != NULL) {\r
     //\r
     // For UGA device, it's inconvenient to retrieve all the supported display modes.\r
     // To simplify the implementation, only add one resolution(800x600, 32bit color depth) as defined in UEFI spec\r
     //\r
     CurrentGraphicsOutputMode->MaxMode = 1;\r
-    CurrentGraphicsOutputMode->Info->Version = 0;\r
-    CurrentGraphicsOutputMode->Info->HorizontalResolution = 800;\r
-    CurrentGraphicsOutputMode->Info->VerticalResolution = 600;\r
-    CurrentGraphicsOutputMode->Info->PixelFormat = PixelBltOnly;\r
-    CurrentGraphicsOutputMode->Info->PixelsPerScanLine = 800;\r
+    Info = CurrentGraphicsOutputMode->Info;\r
+    Info->Version = 0;\r
+    Info->HorizontalResolution = 800;\r
+    Info->VerticalResolution = 600;\r
+    Info->PixelFormat = PixelBltOnly;\r
+    Info->PixelsPerScanLine = 800;\r
     CurrentGraphicsOutputMode->SizeOfInfo = sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION);\r
     CurrentGraphicsOutputMode->FrameBufferBase = (EFI_PHYSICAL_ADDRESS) NULL;\r
     CurrentGraphicsOutputMode->FrameBufferSize = 0;\r
@@ -2606,26 +2641,33 @@ Returns:
     //\r
     // Update the private mode buffer\r
     //\r
-    ModeBuffer = &Private->GraphicsOutputModeBuffer[0];\r
-    ModeBuffer->HorizontalResolution = 800;\r
-    ModeBuffer->VerticalResolution   = 600;\r
+    CopyMem (&Private->GraphicsOutputModeBuffer[0], Info, sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION));\r
 \r
     //\r
-    // Current mode is unknow now, set it to an invalid mode number 0xffff\r
+    // Only mode 0 is available to be set\r
     //\r
-    CurrentGraphicsOutputMode->Mode = 0xffff;\r
     Index = 0;\r
   }\r
 \r
+Done:\r
+\r
+  if (GraphicsOutput != NULL) {\r
+    Private->CurrentNumberOfGraphicsOutput++;\r
+  }\r
+  if (UgaDraw != NULL) {\r
+    Private->CurrentNumberOfUgaDraw++;\r
+  }\r
+\r
   //\r
   // Force GraphicsOutput mode to be set,\r
   // regardless whether the console is in EfiConsoleControlScreenGraphics or EfiConsoleControlScreenText mode\r
   //\r
   Private->HardwareNeedsStarting = TRUE;\r
+  //\r
+  // Current mode number may need update now, so set it to an invalid mode number\r
+  //\r
   Status = Private->GraphicsOutput.SetMode (&Private->GraphicsOutput, (UINT32) Index);\r
 \r
-  Private->CurrentNumberOfGraphicsOutput++;\r
-\r
   return Status;\r
 }\r
 \r
@@ -2737,7 +2779,7 @@ Returns:
     //\r
     // The new console supports the same mode of the current console so sync up\r
     //\r
-    DevNullSyncGopStdOut (Private);\r
+    DevNullSyncStdOut (Private);\r
   } else {\r
     //\r
     // If ConOut, then set the mode to Mode #0 which us 80 x 25\r
@@ -2781,6 +2823,14 @@ Returns:
     if (TextOutList->TextOut == TextOut) {\r
       CopyMem (TextOutList, TextOutList + 1, sizeof (TEXT_OUT_AND_GOP_DATA) * Index);\r
       CurrentNumOfConsoles--;\r
+    if (FeaturePcdGet (PcdConOutGopSupport)) {\r
+      if (TextOutList->UgaDraw != NULL) {\r
+        Private->CurrentNumberOfUgaDraw--;\r
+      }\r
+      if (TextOutList->GraphicsOutput != NULL) {\r
+        Private->CurrentNumberOfGraphicsOutput--;\r
+      }\r
+    }\r
       break;\r
     }\r
 \r
index 74d7b7dc767ff0ce1060ec6d69176f64dccf08f8..587c6c115a04c33899f98198d766d90bbe13c8dc 100644 (file)
@@ -106,7 +106,7 @@ typedef struct {
   UINTN                              CurrentNumberOfExConsoles;\r
   EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  **TextInExList;\r
   UINTN                              TextInExListCount;\r
-  LIST_ENTRY                         NotifyList;    \r
+  LIST_ENTRY                         NotifyList;\r
 \r
 \r
   EFI_SIMPLE_POINTER_PROTOCOL        SimplePointer;\r
@@ -120,7 +120,7 @@ typedef struct {
   UINTN                              CurrentNumberOfAbsolutePointers;\r
   EFI_ABSOLUTE_POINTER_PROTOCOL      **AbsolutePointerList;\r
   UINTN                              AbsolutePointerListCount;\r
-  BOOLEAN                            AbsoluteInputEventSignalState; \r
+  BOOLEAN                            AbsoluteInputEventSignalState;\r
 \r
   BOOLEAN                            PasswordEnabled;\r
   CHAR16                             Password[MAX_STD_IN_PASSWORD];\r
@@ -171,11 +171,6 @@ typedef struct {
   BOOLEAN                          TextOutEnabled;\r
 } TEXT_OUT_AND_GOP_DATA;\r
 \r
-typedef struct {\r
-  UINT32                     HorizontalResolution;\r
-  UINT32                     VerticalResolution;\r
-} TEXT_OUT_GOP_MODE;\r
-\r
 typedef struct {\r
   UINT64                             Signature;\r
   EFI_HANDLE                         VirtualHandle;\r
@@ -191,8 +186,9 @@ typedef struct {
 \r
   EFI_GRAPHICS_OUTPUT_PROTOCOL       GraphicsOutput;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *GraphicsOutputBlt;\r
-  TEXT_OUT_GOP_MODE                  *GraphicsOutputModeBuffer;\r
+  EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  *GraphicsOutputModeBuffer;\r
   UINTN                              CurrentNumberOfGraphicsOutput;\r
+  UINTN                              CurrentNumberOfUgaDraw;\r
   BOOLEAN                            HardwareNeedsStarting;\r
 \r
   EFI_CONSOLE_CONTROL_PROTOCOL       ConsoleControl;\r
@@ -446,14 +442,14 @@ ConSplitterAbsolutePointerReset (
 \r
   Returns:\r
     EFI_SUCCESS           - The device was reset.\r
-    EFI_DEVICE_ERROR      - The device is not functioning correctly and could \r
+    EFI_DEVICE_ERROR      - The device is not functioning correctly and could\r
                             not be reset.\r
-                            \r
+\r
 --*/\r
 ;\r
 \r
 EFI_STATUS\r
-EFIAPI \r
+EFIAPI\r
 ConSplitterAbsolutePointerGetState (\r
   IN EFI_ABSOLUTE_POINTER_PROTOCOL   *This,\r
   IN OUT EFI_ABSOLUTE_POINTER_STATE  *State\r
@@ -470,9 +466,9 @@ ConSplitterAbsolutePointerGetState (
   Returns:\r
     EFI_SUCCESS           - The state of the pointer device was returned in State..\r
     EFI_NOT_READY         - The state of the pointer device has not changed since the last call to\r
-                            GetState().                                                           \r
+                            GetState().\r
     EFI_DEVICE_ERROR      - A device error occurred while attempting to retrieve the pointer\r
-                            device's current state.                                         \r
+                            device's current state.\r
 --*/\r
 ;\r
 \r
@@ -964,7 +960,7 @@ ConSplitterTextInResetEx (
 \r
   Returns:\r
     EFI_SUCCESS           - The device was reset.\r
-    EFI_DEVICE_ERROR      - The device is not functioning properly and could \r
+    EFI_DEVICE_ERROR      - The device is not functioning properly and could\r
                             not be reset.\r
 \r
 --*/\r
@@ -979,20 +975,20 @@ ConSplitterTextInReadKeyStrokeEx (
 /*++\r
 \r
   Routine Description:\r
-    Reads the next keystroke from the input device. The WaitForKey Event can \r
+    Reads the next keystroke from the input device. The WaitForKey Event can\r
     be used to test for existance of a keystroke via WaitForEvent () call.\r
 \r
   Arguments:\r
     This       - Protocol instance pointer.\r
-    KeyData    - A pointer to a buffer that is filled in with the keystroke \r
+    KeyData    - A pointer to a buffer that is filled in with the keystroke\r
                  state data for the key that was pressed.\r
 \r
   Returns:\r
     EFI_SUCCESS           - The keystroke information was returned.\r
     EFI_NOT_READY         - There was no keystroke data availiable.\r
-    EFI_DEVICE_ERROR      - The keystroke information was not returned due to \r
+    EFI_DEVICE_ERROR      - The keystroke information was not returned due to\r
                             hardware errors.\r
-    EFI_INVALID_PARAMETER - KeyData is NULL.                        \r
+    EFI_INVALID_PARAMETER - KeyData is NULL.\r
 \r
 --*/\r
 ;\r
@@ -1010,17 +1006,17 @@ ConSplitterTextInSetState (
 \r
   Arguments:\r
     This                  - Protocol instance pointer.\r
-    KeyToggleState        - A pointer to the EFI_KEY_TOGGLE_STATE to set the \r
+    KeyToggleState        - A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
                             state for the input device.\r
-                          \r
-  Returns:                \r
+\r
+  Returns:\r
     EFI_SUCCESS           - The device state was set successfully.\r
-    EFI_DEVICE_ERROR      - The device is not functioning correctly and could \r
+    EFI_DEVICE_ERROR      - The device is not functioning correctly and could\r
                             not have the setting adjusted.\r
     EFI_UNSUPPORTED       - The device does not have the ability to set its state.\r
-    EFI_INVALID_PARAMETER - KeyToggleState is NULL.                       \r
+    EFI_INVALID_PARAMETER - KeyToggleState is NULL.\r
 \r
---*/   \r
+--*/\r
 ;\r
 \r
 EFI_STATUS\r
@@ -1038,18 +1034,18 @@ ConSplitterTextInRegisterKeyNotify (
 \r
   Arguments:\r
     This                    - Protocol instance pointer.\r
-    KeyData                 - A pointer to a buffer that is filled in with the keystroke \r
+    KeyData                 - A pointer to a buffer that is filled in with the keystroke\r
                               information data for the key that was pressed.\r
-    KeyNotificationFunction - Points to the function to be called when the key \r
-                              sequence is typed specified by KeyData.                        \r
-    NotifyHandle            - Points to the unique handle assigned to the registered notification.                          \r
+    KeyNotificationFunction - Points to the function to be called when the key\r
+                              sequence is typed specified by KeyData.\r
+    NotifyHandle            - Points to the unique handle assigned to the registered notification.\r
 \r
   Returns:\r
     EFI_SUCCESS             - The notification function was registered successfully.\r
     EFI_OUT_OF_RESOURCES    - Unable to allocate resources for necesssary data structures.\r
-    EFI_INVALID_PARAMETER   - KeyData or NotifyHandle is NULL.                       \r
-                              \r
---*/   \r
+    EFI_INVALID_PARAMETER   - KeyData or NotifyHandle is NULL.\r
+\r
+--*/\r
 ;\r
 \r
 EFI_STATUS\r
@@ -1064,15 +1060,15 @@ ConSplitterTextInUnregisterKeyNotify (
     Remove a registered notification function from a particular keystroke.\r
 \r
   Arguments:\r
-    This                    - Protocol instance pointer.    \r
+    This                    - Protocol instance pointer.\r
     NotificationHandle      - The handle of the notification function being unregistered.\r
 \r
   Returns:\r
     EFI_SUCCESS             - The notification function was unregistered successfully.\r
     EFI_INVALID_PARAMETER   - The NotificationHandle is invalid.\r
-    EFI_NOT_FOUND           - Can not find the matching entry in database.  \r
-                              \r
---*/   \r
+    EFI_NOT_FOUND           - Can not find the matching entry in database.\r
+\r
+--*/\r
 ;\r
 VOID\r
 EFIAPI\r
@@ -1369,7 +1365,7 @@ DevNullTextOutEnableCursor (
 ;\r
 \r
 EFI_STATUS\r
-DevNullSyncGopStdOut (\r
+DevNullSyncStdOut (\r
   IN  TEXT_OUT_SPLITTER_PRIVATE_DATA  *Private\r
   )\r
 ;\r
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