]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
1. add DxeI2c Library in OptionRomPkg.
[mirror_edk2.git] / OptionRomPkg / CirrusLogic5430Dxe / CirrusLogic5430.h
index 719cf7c9cb4189cb3db2db97e5d37ea39aca8399..f7d92821aa0d043c6cfe4750f5221abf07bc308c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Cirrus Logic 5430 Controller Driver\r
 \r
-  Copyright (c) 2006, Intel Corporation\r
+  Copyright (c) 2006 - 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
 #include <Protocol/GraphicsOutput.h>\r
 #include <Protocol/PciIo.h>\r
 #include <Protocol/DriverSupportedEfiVersion.h>\r
+#include <Protocol/EdidOverride.h>\r
+#include <Protocol/EdidDiscovered.h>\r
+#include <Protocol/EdidActive.h>\r
+#include <Protocol/DevicePath.h>\r
 \r
 #include <Library/DebugLib.h>\r
 #include <Library/UefiDriverEntryPoint.h>\r
@@ -32,6 +36,9 @@
 #include <Library/PcdLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
 #include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/DxeI2cLib.h>\r
 \r
 #include <IndustryStandard/pci22.h>\r
 //\r
@@ -48,6 +55,7 @@
 #define CIRRUS_LOGIC_5430_MODE_COUNT         3\r
 \r
 typedef struct {\r
+  UINT32  ModeNumber;\r
   UINT32  HorizontalResolution;\r
   UINT32  VerticalResolution;\r
   UINT32  ColorDepth;\r
@@ -68,6 +76,10 @@ typedef struct {
   UINT64                                OriginalPciAttributes;\r
   EFI_UGA_DRAW_PROTOCOL                 UgaDraw;\r
   EFI_GRAPHICS_OUTPUT_PROTOCOL          GraphicsOutput;\r
+  EFI_EDID_DISCOVERED_PROTOCOL          EdidDiscovered;\r
+  EFI_EDID_ACTIVE_PROTOCOL              EdidActive;\r
+  EFI_DEVICE_PATH_PROTOCOL              *GopDevicePath;\r
+  EFI_DEVICE_PATH_PROTOCOL              *UgaDevicePath;\r
   UINTN                                 CurrentMode;\r
   UINTN                                 MaxMode;\r
   CIRRUS_LOGIC_5430_MODE_DATA           ModeData[CIRRUS_LOGIC_5430_MODE_COUNT];\r
@@ -128,6 +140,18 @@ extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL  gCirrusLogic5430DriverSupporte
 #define PALETTE_INDEX_REGISTER  0x3c8\r
 #define PALETTE_DATA_REGISTER   0x3c9\r
 \r
+#define ACPI_ADR_DISPLAY_TYPE_VGA               1\r
+\r
+#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \\r
+          ((UINT32) ( (((_DeviceIdScheme) & 0x1) << 31) |  \\r
+                      (((_HeadId)         & 0x7) << 18) |  \\r
+                      (((_NonVgaOutput)   & 0x1) << 17) |  \\r
+                      (((_BiosCanDetect)  & 0x1) << 16) |  \\r
+                      (((_VendorInfo)     & 0xf) << 12) |  \\r
+                      (((_Type)           & 0xf) << 8)  |  \\r
+                      (((_Port)           & 0xf) << 4)  |  \\r
+                       ((_Index)          & 0xf) ))\r
+\r
 //\r
 // UGA Draw Hardware abstraction internal worker functions\r
 //\r
@@ -407,4 +431,9 @@ inw (
   UINTN                           Address\r
   );\r
 \r
+EFI_STATUS\r
+CirrusLogic5430VideoModeSetup (\r
+  CIRRUS_LOGIC_5430_PRIVATE_DATA  *Private\r
+  );\r
+\r
 #endif\r