3 Copyright (c) 2017, Linaro, Ltd. All rights reserved.
4 Copyright (c) 2018, Arm Limited. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
11 #include <Uefi/UefiBaseType.h>
12 #include <Library/DebugLib.h>
13 #include <Library/LcdPlatformLib.h>
15 /** Platform related initialization function.
17 @param[in] Handle Handle to the LCD device instance.
19 @retval EFI_UNSUPPORTED Interface is not supported.
22 LcdPlatformInitializeDisplay (
27 return EFI_UNSUPPORTED
;
30 /** Allocate VRAM memory in DRAM for the framebuffer
31 (unless it is reserved already).
33 The allocated address can be used to set the framebuffer.
35 @param[out] VramBaseAddress A pointer to the framebuffer address.
36 @param[out] VramSize A pointer to the size of the frame
39 @retval EFI_UNSUPPORTED Interface is not supported.
43 OUT EFI_PHYSICAL_ADDRESS
* VramBaseAddress
,
48 return EFI_UNSUPPORTED
;
51 /** Return total number of modes supported.
53 Note: Valid mode numbers are 0 to MaxMode - 1
54 See Section 12.9 of the UEFI Specification 2.7
56 @retval UINT32 Zero number of modes supported
57 in a NULL library implementation.
60 LcdPlatformGetMaxMode (
68 /** Set the requested display mode.
70 @param[in] ModeNumber Mode Number.
72 @retval EFI_UNSUPPORTED Interface is not supported.
80 return EFI_UNSUPPORTED
;
83 /** Return information for the requested mode number.
85 @param[in] ModeNumber Mode Number.
86 @param[out] Info Pointer for returned mode information
89 @retval EFI_UNSUPPORTED Interface is not supported.
93 LcdPlatformQueryMode (
95 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION
*Info
99 return EFI_UNSUPPORTED
;
102 /** Return display timing information for the requested mode number.
104 @param[in] ModeNumber Mode Number.
106 @param[out] HRes Pointer to horizontal resolution.
107 @param[out] HSync Pointer to horizontal sync width.
108 @param[out] HBackPorch Pointer to horizontal back porch.
109 @param[out] HFrontPorch Pointer to horizontal front porch.
110 @param[out] VRes Pointer to vertical resolution.
111 @param[out] VSync Pointer to vertical sync width.
112 @param[out] VBackPorch Pointer to vertical back porch.
113 @param[out] VFrontPorch Pointer to vertical front porch.
115 @retval EFI_UNSUPPORTED Interface is not supported.
118 LcdPlatformGetTimings (
119 IN UINT32 ModeNumber
,
120 OUT SCAN_TIMINGS
**Horizontal
,
121 OUT SCAN_TIMINGS
**Vertical
125 return EFI_UNSUPPORTED
;
128 /** Return bits per pixel information for a mode number.
130 @param[in] ModeNumber Mode Number.
132 @param[out] Bpp Pointer to value bits per pixel information.
134 @retval EFI_UNSUPPORTED Interface is not supported.
139 IN UINT32 ModeNumber
,
144 return EFI_UNSUPPORTED
;