ArmPlatformPkg/LcdPlatformLib: Produce the protocols EFI_EDID_DISCOVERED_PROTOCOL and EFI_EDID_ACTIVE_PROTOCOL

These two EDID protocols are excepted to be produced by the GOP.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12860 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2011-12-14 10:35:04 +00:00
parent 84c35dd305
commit 6d8d736334
4 changed files with 138 additions and 88 deletions

View File

@ -13,9 +13,13 @@
#include <PiDxe.h>
#include <Library/LcdPlatformLib.h>
#include <Library/IoLib.h>
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
#include <Library/LcdPlatformLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/EdidDiscovered.h>
#include <Protocol/EdidActive.h>
#include <Drivers/PL111Lcd.h>
@ -50,14 +54,33 @@ CLCD_RESOLUTION mResolutions[] = {
}
};
EFI_EDID_DISCOVERED_PROTOCOL mEdidDiscovered = {
0,
NULL
};
EFI_EDID_ACTIVE_PROTOCOL mEdidActive = {
0,
NULL
};
EFI_STATUS
LcdPlatformInitializeDisplay (
VOID
IN EFI_HANDLE Handle
)
{
EFI_STATUS Status;
MmioWrite32(ARM_EB_SYS_CLCD_REG, 1);
// Install the EDID Protocols
Status = gBS->InstallMultipleProtocolInterfaces(
&Handle,
&gEfiEdidDiscoveredProtocolGuid, &mEdidDiscovered,
&gEfiEdidActiveProtocolGuid, &mEdidActive,
NULL
);
return EFI_SUCCESS;
}

View File

@ -21,6 +21,8 @@
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/Cpu.h>
#include <Protocol/EdidDiscovered.h>
#include <Protocol/EdidActive.h>
#include <ArmPlatform.h>
@ -123,12 +125,37 @@ LCD_RESOLUTION mResolutions[] = {
}
};
EFI_EDID_DISCOVERED_PROTOCOL mEdidDiscovered = {
0,
NULL
};
EFI_EDID_ACTIVE_PROTOCOL mEdidActive = {
0,
NULL
};
EFI_STATUS
LcdPlatformInitializeDisplay (
VOID
) {
IN EFI_HANDLE Handle
)
{
EFI_STATUS Status;
// Set the FPGA multiplexer to select the video output from the motherboard or the daughterboard
return ArmPlatformSysConfigSet (SYS_CFG_MUXFPGA, PL111_CLCD_SITE);
Status = ArmPlatformSysConfigSet (SYS_CFG_MUXFPGA, PL111_CLCD_SITE);
if (!EFI_ERROR(Status)) {
// Install the EDID Protocols
Status = gBS->InstallMultipleProtocolInterfaces(
&Handle,
&gEfiEdidDiscoveredProtocolGuid, &mEdidDiscovered,
&gEfiEdidActiveProtocolGuid, &mEdidActive,
NULL
);
}
return Status;
}
EFI_STATUS

View File

@ -125,7 +125,7 @@ InitializeDisplay (
goto EXIT_ERROR_LCD_SHUTDOWN;
}
Status = LcdPlatformInitializeDisplay ();
Status = LcdPlatformInitializeDisplay (Instance->Handle);
if (EFI_ERROR(Status)) {
goto EXIT_ERROR_LCD_SHUTDOWN;
}

View File

@ -158,7 +158,7 @@ typedef enum {
EFI_STATUS
LcdPlatformInitializeDisplay (
VOID
IN EFI_HANDLE Handle
);
EFI_STATUS