summaryrefslogtreecommitdiff
path: root/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-03 06:44:03 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-03 06:44:03 +0000
commit31f9e631176ef02829edcb537ec5caf04026c3f2 (patch)
treea9dadefcb240ef2830e33edbb1e4fdc29ebf9049 /OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
parentb7bef2a9fb22c891eb2a8284132bf67574d82839 (diff)
downloadedk2-platforms-31f9e631176ef02829edcb537ec5caf04026c3f2.tar.xz
1. add DxeI2c Library in OptionRomPkg.
2. produce EFI_EDID_DISCOVERED_PROTOCOL and EFI_EDID_ACTIVE_PROTOCOL in CirrusLogic5430 module. 3. consume EFI_OVERRIDE_PROTOCOL in CirrusLogic5430 module. 4. setup video mode according to EDID information in CirrusLogic5430 module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4479 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c')
-rw-r--r--OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c b/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
index 7fdb3e0f0a..b639edb4a8 100644
--- a/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
+++ b/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430GraphicsOutput.c
@@ -1,13 +1,13 @@
/*++
-Copyright (c) 2007, Intel Corporation
-All rights reserved. This program and the accompanying materials
-are licensed and made available under the terms and conditions of the BSD License
-which accompanies this distribution. The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php
-
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+Copyright (c) 2007, Intel Corporation
+All rights reserved. This program and the accompanying materials
+are licensed and made available under the terms and conditions of the BSD License
+which accompanies this distribution. The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name:
@@ -15,8 +15,8 @@ Module Name:
Abstract:
- This file produces the graphics abstration of Graphics Output Protocol. It is called by
- CirrusLogic5430.c file which deals with the EFI 1.1 driver model.
+ This file produces the graphics abstration of Graphics Output Protocol. It is called by
+ CirrusLogic5430.c file which deals with the EFI 1.1 driver model.
This file just does graphics.
--*/
@@ -127,7 +127,7 @@ Routine Description:
return EFI_OUT_OF_RESOURCES;
}
- InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[ModeNumber]);
+ InitializeGraphicsMode (Private, &CirrusLogic5430VideoModes[ModeData->ModeNumber]);
This->Mode->Mode = ModeNumber;
This->Mode->Info->HorizontalResolution = ModeData->HorizontalResolution;
@@ -444,7 +444,6 @@ CirrusLogic5430GraphicsOutputConstructor (
{
EFI_STATUS Status;
EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
- UINTN Index;
GraphicsOutput = &Private->GraphicsOutput;
@@ -471,17 +470,10 @@ CirrusLogic5430GraphicsOutputConstructor (
if (EFI_ERROR (Status)) {
return Status;
}
- Private->GraphicsOutput.Mode->MaxMode = CIRRUS_LOGIC_5430_MODE_COUNT;
- Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
- for (Index = 0; Index < Private->GraphicsOutput.Mode->MaxMode; Index++) {
- Private->ModeData[Index].HorizontalResolution = CirrusLogic5430VideoModes[Index].Width;
- Private->ModeData[Index].VerticalResolution = CirrusLogic5430VideoModes[Index].Height;
- Private->ModeData[Index].ColorDepth = 32;
- Private->ModeData[Index].RefreshRate = CirrusLogic5430VideoModes[Index].RefreshRate;
- }
-
- Private->HardwareNeedsStarting = TRUE;
- Private->LineBuffer = NULL;
+ Private->GraphicsOutput.Mode->MaxMode = (UINT32) Private->MaxMode;
+ Private->GraphicsOutput.Mode->Mode = GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER;
+ Private->HardwareNeedsStarting = TRUE;
+ Private->LineBuffer = NULL;
//
// Initialize the hardware