ArmPlatformPkg/LcdGraphicsOutputDxe: check PrimeCell ID before initializing
[mirror_edk2.git] / ArmPlatformPkg / Drivers / LcdGraphicsOutputDxe / LcdGraphicsOutputDxe.h
CommitLineData
7d0f2f23 1/** @file\r
2\r
3 Copyright (c) 2011, ARM Ltd. All rights reserved.<BR>\r
4 This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution. The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php\r
8\r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12**/\r
13\r
14#ifndef __ARM_VE_GRAPHICS_DXE_H__\r
15#define __ARM_VE_GRAPHICS_DXE_H__\r
16\r
17\r
18#include <Base.h>\r
3723a71a 19\r
20#include <Library/DebugLib.h>\r
21#include <Library/LcdPlatformLib.h>\r
22#include <Library/PcdLib.h>\r
7d0f2f23 23#include <Library/UefiLib.h>\r
3723a71a 24\r
7d0f2f23 25#include <Protocol/DevicePath.h>\r
26\r
7d0f2f23 27\r
28//\r
29// Device structures\r
30//\r
31typedef struct {\r
32 VENDOR_DEVICE_PATH Guid;\r
33 EFI_DEVICE_PATH_PROTOCOL End;\r
34} LCD_GRAPHICS_DEVICE_PATH;\r
35\r
36typedef struct {\r
4d83284a 37 UINT32 Signature;\r
7d0f2f23 38 EFI_HANDLE Handle;\r
39 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo;\r
40 EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE Mode;\r
41 EFI_GRAPHICS_OUTPUT_PROTOCOL Gop;\r
42 LCD_GRAPHICS_DEVICE_PATH DevicePath;\r
43 EFI_EVENT ExitBootServicesEvent;\r
44} LCD_INSTANCE;\r
45\r
46#define LCD_INSTANCE_SIGNATURE SIGNATURE_32('l', 'c', 'd', '0')\r
47\r
48#define LCD_INSTANCE_FROM_GOP_THIS(a) CR (a, LCD_INSTANCE, Gop, LCD_INSTANCE_SIGNATURE)\r
49\r
50//\r
51// Function Prototypes\r
52//\r
53\r
54VOID\r
55LcdGraphicsExitBootServicesEvent (\r
56 IN EFI_EVENT Event,\r
57 IN VOID *Context\r
58);\r
59\r
60EFI_STATUS\r
61EFIAPI\r
62LcdGraphicsQueryMode (\r
63 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
64 IN UINT32 ModeNumber,\r
65 OUT UINTN *SizeOfInfo,\r
66 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
67);\r
68\r
69EFI_STATUS\r
70EFIAPI\r
71LcdGraphicsSetMode (\r
72 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
73 IN UINT32 ModeNumber\r
74);\r
75\r
76EFI_STATUS\r
77EFIAPI\r
78LcdGraphicsBlt (\r
79 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
80 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
81 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
82 IN UINTN SourceX,\r
83 IN UINTN SourceY,\r
84 IN UINTN DestinationX,\r
85 IN UINTN DestinationY,\r
86 IN UINTN Width,\r
87 IN UINTN Height,\r
88 IN UINTN Delta OPTIONAL\r
89);\r
90\r
91UINTN\r
92GetBytesPerPixel (\r
93 IN LCD_BPP Bpp\r
94 );\r
95\r
96EFI_STATUS\r
97EFIAPI\r
98GraphicsOutputDxeInitialize (\r
99 IN EFI_HANDLE ImageHandle,\r
100 IN EFI_SYSTEM_TABLE *SystemTable\r
101);\r
102\r
103EFI_STATUS\r
104InitializeDisplay (\r
105 IN LCD_INSTANCE* Instance\r
106);\r
107\r
108EFI_STATUS\r
9dc94d98 109LcdIdentify (\r
7d0f2f23 110 VOID\r
111);\r
112\r
113EFI_STATUS\r
114LcdInitialize (\r
115 EFI_PHYSICAL_ADDRESS VramBaseAddress\r
116);\r
117\r
118EFI_STATUS\r
119LcdSetMode (\r
120 IN UINT32 ModeNumber\r
121);\r
122\r
123VOID\r
124LcdShutdown (\r
125 VOID\r
126);\r
127\r
128#endif /* __ARM_VE_GRAPHICS_DXE_H__ */\r