]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430UgaDraw.c
1. add DxeI2c Library in OptionRomPkg.
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430UgaDraw.c
index 75b1d24c8af6f097b6df3b1c59a25fbc82f59b2f..59613fb5f0bf3646f3abf1c6cbdec1f9351e1175 100644 (file)
@@ -1,16 +1,16 @@
 /** @file\r
-  This file produces the graphics abstration of UGA Draw. 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 UGA Draw. 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
-  Copyright (c) 2006, 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
+  Copyright (c) 2006, 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
+  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
 **/\r
 \r
@@ -95,7 +95,7 @@ CirrusLogic5430UgaDrawSetMode (
       return EFI_OUT_OF_RESOURCES;\r
     }\r
 \r
-    InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[Index]);\r
+    InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[Private->ModeData[Index].ModeNumber]);\r
 \r
     Private->CurrentMode            = Index;\r
 \r
@@ -380,7 +380,6 @@ CirrusLogic5430UgaDrawConstructor (
   )\r
 {\r
   EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
-  UINTN                 Index;\r
 \r
   //\r
   // Fill in Private->UgaDraw protocol\r
@@ -394,15 +393,7 @@ CirrusLogic5430UgaDrawConstructor (
   //\r
   // Initialize the private data\r
   //\r
-  Private->MaxMode      = CIRRUS_LOGIC_5430_MODE_COUNT;\r
-  Private->CurrentMode  = 0;\r
-  for (Index = 0; Index < Private->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->CurrentMode            = 0;\r
   Private->HardwareNeedsStarting  = TRUE;\r
   Private->LineBuffer             = NULL;\r
 \r