]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
1. add DxeI2c Library in OptionRomPkg.
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430GraphicsOutput.c
index 7fdb3e0f0adfbc443fc549bee28e01117fb0ce48..b639edb4a859f579974226ce2ac5b5e24ac29e52 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2007, 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2007, 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -15,8 +15,8 @@ Module Name:
 \r
 Abstract:\r
 \r
-  This file produces the graphics abstration of Graphics Output Protocol. It is called by \r
-  CirrusLogic5430.c file which deals with the EFI 1.1 driver model. \r
+  This file produces the graphics abstration of Graphics Output Protocol. It is called by\r
+  CirrusLogic5430.c file which deals with the EFI 1.1 driver model.\r
   This file just does graphics.\r
 \r
 --*/\r
@@ -127,7 +127,7 @@ Routine Description:
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
-  InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[ModeNumber]);\r
+  InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[ModeData->ModeNumber]);\r
 \r
   This->Mode->Mode = ModeNumber;\r
   This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;\r
@@ -444,7 +444,6 @@ CirrusLogic5430GraphicsOutputConstructor (
 {\r
   EFI_STATUS                   Status;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
-  UINTN                        Index;\r
 \r
 \r
   GraphicsOutput            = &Private->GraphicsOutput;\r
@@ -471,17 +470,10 @@ CirrusLogic5430GraphicsOutputConstructor (
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
-  Private->GraphicsOutput.Mode->MaxMode = CIRRUS_LOGIC_5430_MODE_COUNT;\r
-  Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;\r
-  for (Index = 0; Index < Private->GraphicsOutput.Mode->MaxMode; Index++) {\r
-    Private->ModeData[Index].HorizontalResolution = CirrusLogic5430VideoModes[Index].Width;\r
-    Private->ModeData[Index].VerticalResolution   = CirrusLogic5430VideoModes[Index].Height;\r
-    Private->ModeData[Index].ColorDepth           = 32;\r
-    Private->ModeData[Index].RefreshRate          = CirrusLogic5430VideoModes[Index].RefreshRate;\r
-  }\r
-\r
-  Private->HardwareNeedsStarting  = TRUE;\r
-  Private->LineBuffer             = NULL;\r
+  Private->GraphicsOutput.Mode->MaxMode = (UINT32) Private->MaxMode;\r
+  Private->GraphicsOutput.Mode->Mode    = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;\r
+  Private->HardwareNeedsStarting        = TRUE;\r
+  Private->LineBuffer                   = NULL;\r
 \r
   //\r
   // Initialize the hardware\r