/** @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 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ 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
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
\r
Private = CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS (This);\r
\r
- if ((BltOperation < 0) || (BltOperation >= EfiUgaBltMax)) {\r
+ if ((UINT32)BltOperation >= EfiUgaBltMax) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r
)\r
{\r
EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
- UINTN Index;\r
\r
//\r
// Fill in Private->UgaDraw protocol\r
//\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