2018-01-15 18:45:49 +01:00
|
|
|
/** @file
|
|
|
|
|
|
|
|
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
|
2017-09-26 22:15:12 +02:00
|
|
|
Copyright (c) 2018, Arm Limited. All rights reserved.
|
2018-01-15 18:45:49 +01:00
|
|
|
|
2019-04-04 01:03:21 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2018-01-15 18:45:49 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#include <Base.h>
|
|
|
|
#include <Uefi/UefiBaseType.h>
|
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/LcdPlatformLib.h>
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Platform related initialization function.
|
|
|
|
|
|
|
|
@param[in] Handle Handle to the LCD device instance.
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformInitializeDisplay (
|
|
|
|
IN EFI_HANDLE Handle
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Allocate VRAM memory in DRAM for the framebuffer
|
|
|
|
(unless it is reserved already).
|
|
|
|
|
|
|
|
The allocated address can be used to set the framebuffer.
|
|
|
|
|
|
|
|
@param[out] VramBaseAddress A pointer to the framebuffer address.
|
|
|
|
@param[out] VramSize A pointer to the size of the frame
|
|
|
|
buffer in bytes
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformGetVram (
|
|
|
|
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
|
|
|
|
OUT UINTN* VramSize
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Return total number of modes supported.
|
|
|
|
|
|
|
|
Note: Valid mode numbers are 0 to MaxMode - 1
|
|
|
|
See Section 12.9 of the UEFI Specification 2.7
|
|
|
|
|
|
|
|
@retval UINT32 Zero number of modes supported
|
|
|
|
in a NULL library implementation.
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
UINT32
|
|
|
|
LcdPlatformGetMaxMode (
|
|
|
|
VOID
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Set the requested display mode.
|
|
|
|
|
|
|
|
@param[in] ModeNumber Mode Number.
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformSetMode (
|
|
|
|
IN UINT32 ModeNumber
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Return information for the requested mode number.
|
|
|
|
|
|
|
|
@param[in] ModeNumber Mode Number.
|
|
|
|
@param[out] Info Pointer for returned mode information
|
|
|
|
(on success).
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformQueryMode (
|
|
|
|
IN UINT32 ModeNumber,
|
|
|
|
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Return display timing information for the requested mode number.
|
|
|
|
|
|
|
|
@param[in] ModeNumber Mode Number.
|
|
|
|
|
|
|
|
@param[out] HRes Pointer to horizontal resolution.
|
|
|
|
@param[out] HSync Pointer to horizontal sync width.
|
|
|
|
@param[out] HBackPorch Pointer to horizontal back porch.
|
|
|
|
@param[out] HFrontPorch Pointer to horizontal front porch.
|
|
|
|
@param[out] VRes Pointer to vertical resolution.
|
|
|
|
@param[out] VSync Pointer to vertical sync width.
|
|
|
|
@param[out] VBackPorch Pointer to vertical back porch.
|
|
|
|
@param[out] VFrontPorch Pointer to vertical front porch.
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformGetTimings (
|
|
|
|
IN UINT32 ModeNumber,
|
2017-09-26 22:15:22 +02:00
|
|
|
OUT SCAN_TIMINGS **Horizontal,
|
|
|
|
OUT SCAN_TIMINGS **Vertical
|
2018-01-15 18:45:49 +01:00
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|
|
|
|
|
2017-09-26 22:15:12 +02:00
|
|
|
/** Return bits per pixel information for a mode number.
|
|
|
|
|
|
|
|
@param[in] ModeNumber Mode Number.
|
|
|
|
|
|
|
|
@param[out] Bpp Pointer to value bits per pixel information.
|
|
|
|
|
|
|
|
@retval EFI_UNSUPPORTED Interface is not supported.
|
|
|
|
|
|
|
|
**/
|
2018-01-15 18:45:49 +01:00
|
|
|
EFI_STATUS
|
|
|
|
LcdPlatformGetBpp (
|
|
|
|
IN UINT32 ModeNumber,
|
|
|
|
OUT LCD_BPP* Bpp
|
|
|
|
)
|
|
|
|
{
|
|
|
|
ASSERT (FALSE);
|
|
|
|
return EFI_UNSUPPORTED;
|
|
|
|
}
|