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