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:
@@ -13,9 +13,13 @@
|
|||||||
|
|
||||||
#include <PiDxe.h>
|
#include <PiDxe.h>
|
||||||
|
|
||||||
#include <Library/LcdPlatformLib.h>
|
|
||||||
#include <Library/IoLib.h>
|
|
||||||
#include <Library/DebugLib.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>
|
#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
|
EFI_STATUS
|
||||||
LcdPlatformInitializeDisplay (
|
LcdPlatformInitializeDisplay (
|
||||||
VOID
|
IN EFI_HANDLE Handle
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
MmioWrite32(ARM_EB_SYS_CLCD_REG, 1);
|
MmioWrite32(ARM_EB_SYS_CLCD_REG, 1);
|
||||||
|
|
||||||
|
// Install the EDID Protocols
|
||||||
|
Status = gBS->InstallMultipleProtocolInterfaces(
|
||||||
|
&Handle,
|
||||||
|
&gEfiEdidDiscoveredProtocolGuid, &mEdidDiscovered,
|
||||||
|
&gEfiEdidActiveProtocolGuid, &mEdidActive,
|
||||||
|
NULL
|
||||||
|
);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
#include <Library/UefiBootServicesTableLib.h>
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
|
||||||
#include <Protocol/Cpu.h>
|
#include <Protocol/Cpu.h>
|
||||||
|
#include <Protocol/EdidDiscovered.h>
|
||||||
|
#include <Protocol/EdidActive.h>
|
||||||
|
|
||||||
#include <ArmPlatform.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
|
EFI_STATUS
|
||||||
LcdPlatformInitializeDisplay (
|
LcdPlatformInitializeDisplay (
|
||||||
VOID
|
IN EFI_HANDLE Handle
|
||||||
) {
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
// Set the FPGA multiplexer to select the video output from the motherboard or the daughterboard
|
// 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
|
EFI_STATUS
|
||||||
|
@@ -125,7 +125,7 @@ InitializeDisplay (
|
|||||||
goto EXIT_ERROR_LCD_SHUTDOWN;
|
goto EXIT_ERROR_LCD_SHUTDOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = LcdPlatformInitializeDisplay ();
|
Status = LcdPlatformInitializeDisplay (Instance->Handle);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
goto EXIT_ERROR_LCD_SHUTDOWN;
|
goto EXIT_ERROR_LCD_SHUTDOWN;
|
||||||
}
|
}
|
||||||
|
@@ -158,7 +158,7 @@ typedef enum {
|
|||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
LcdPlatformInitializeDisplay (
|
LcdPlatformInitializeDisplay (
|
||||||
VOID
|
IN EFI_HANDLE Handle
|
||||||
);
|
);
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
Reference in New Issue
Block a user