ArmPlatformPkg: Redefine LcdPlatformGetTimings function
[mirror_edk2.git] / ArmPlatformPkg / Library / LcdPlatformNullLib / LcdPlatformNullLib.c
1 /** @file
2
3 Copyright (c) 2017, Linaro, Ltd. All rights reserved.
4 Copyright (c) 2018, Arm Limited. All rights reserved.
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #include <Base.h>
17 #include <Uefi/UefiBaseType.h>
18 #include <Library/DebugLib.h>
19 #include <Library/LcdPlatformLib.h>
20
21 /** Platform related initialization function.
22
23 @param[in] Handle Handle to the LCD device instance.
24
25 @retval EFI_UNSUPPORTED Interface is not supported.
26 **/
27 EFI_STATUS
28 LcdPlatformInitializeDisplay (
29 IN EFI_HANDLE Handle
30 )
31 {
32 ASSERT (FALSE);
33 return EFI_UNSUPPORTED;
34 }
35
36 /** Allocate VRAM memory in DRAM for the framebuffer
37 (unless it is reserved already).
38
39 The allocated address can be used to set the framebuffer.
40
41 @param[out] VramBaseAddress A pointer to the framebuffer address.
42 @param[out] VramSize A pointer to the size of the frame
43 buffer in bytes
44
45 @retval EFI_UNSUPPORTED Interface is not supported.
46 **/
47 EFI_STATUS
48 LcdPlatformGetVram (
49 OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
50 OUT UINTN* VramSize
51 )
52 {
53 ASSERT (FALSE);
54 return EFI_UNSUPPORTED;
55 }
56
57 /** Return total number of modes supported.
58
59 Note: Valid mode numbers are 0 to MaxMode - 1
60 See Section 12.9 of the UEFI Specification 2.7
61
62 @retval UINT32 Zero number of modes supported
63 in a NULL library implementation.
64 **/
65 UINT32
66 LcdPlatformGetMaxMode (
67 VOID
68 )
69 {
70 ASSERT (FALSE);
71 return 0;
72 }
73
74 /** Set the requested display mode.
75
76 @param[in] ModeNumber Mode Number.
77
78 @retval EFI_UNSUPPORTED Interface is not supported.
79 **/
80 EFI_STATUS
81 LcdPlatformSetMode (
82 IN UINT32 ModeNumber
83 )
84 {
85 ASSERT (FALSE);
86 return EFI_UNSUPPORTED;
87 }
88
89 /** Return information for the requested mode number.
90
91 @param[in] ModeNumber Mode Number.
92 @param[out] Info Pointer for returned mode information
93 (on success).
94
95 @retval EFI_UNSUPPORTED Interface is not supported.
96
97 **/
98 EFI_STATUS
99 LcdPlatformQueryMode (
100 IN UINT32 ModeNumber,
101 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
102 )
103 {
104 ASSERT (FALSE);
105 return EFI_UNSUPPORTED;
106 }
107
108 /** Return display timing information for the requested mode number.
109
110 @param[in] ModeNumber Mode Number.
111
112 @param[out] HRes Pointer to horizontal resolution.
113 @param[out] HSync Pointer to horizontal sync width.
114 @param[out] HBackPorch Pointer to horizontal back porch.
115 @param[out] HFrontPorch Pointer to horizontal front porch.
116 @param[out] VRes Pointer to vertical resolution.
117 @param[out] VSync Pointer to vertical sync width.
118 @param[out] VBackPorch Pointer to vertical back porch.
119 @param[out] VFrontPorch Pointer to vertical front porch.
120
121 @retval EFI_UNSUPPORTED Interface is not supported.
122 **/
123 EFI_STATUS
124 LcdPlatformGetTimings (
125 IN UINT32 ModeNumber,
126 OUT SCAN_TIMINGS **Horizontal,
127 OUT SCAN_TIMINGS **Vertical
128 )
129 {
130 ASSERT (FALSE);
131 return EFI_UNSUPPORTED;
132 }
133
134 /** Return bits per pixel information for a mode number.
135
136 @param[in] ModeNumber Mode Number.
137
138 @param[out] Bpp Pointer to value bits per pixel information.
139
140 @retval EFI_UNSUPPORTED Interface is not supported.
141
142 **/
143 EFI_STATUS
144 LcdPlatformGetBpp (
145 IN UINT32 ModeNumber,
146 OUT LCD_BPP* Bpp
147 )
148 {
149 ASSERT (FALSE);
150 return EFI_UNSUPPORTED;
151 }