]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.h
ArmPlatformPkg: create hw-agnostic LcdGraphicsOutputDxe driver
[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
2671d898 21#include <Library/LcdHwLib.h>\r
3723a71a 22#include <Library/LcdPlatformLib.h>\r
23#include <Library/PcdLib.h>\r
7d0f2f23 24#include <Library/UefiLib.h>\r
3723a71a 25\r
7d0f2f23 26#include <Protocol/DevicePath.h>\r
27\r
7d0f2f23 28\r
29//\r
30// Device structures\r
31//\r
32typedef struct {\r
33 VENDOR_DEVICE_PATH Guid;\r
34 EFI_DEVICE_PATH_PROTOCOL End;\r
35} LCD_GRAPHICS_DEVICE_PATH;\r
36\r
37typedef struct {\r
4d83284a 38 UINT32 Signature;\r
7d0f2f23 39 EFI_HANDLE Handle;\r
40 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo;\r
41 EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE Mode;\r
42 EFI_GRAPHICS_OUTPUT_PROTOCOL Gop;\r
43 LCD_GRAPHICS_DEVICE_PATH DevicePath;\r
44 EFI_EVENT ExitBootServicesEvent;\r
45} LCD_INSTANCE;\r
46\r
47#define LCD_INSTANCE_SIGNATURE SIGNATURE_32('l', 'c', 'd', '0')\r
48\r
49#define LCD_INSTANCE_FROM_GOP_THIS(a) CR (a, LCD_INSTANCE, Gop, LCD_INSTANCE_SIGNATURE)\r
50\r
51//\r
52// Function Prototypes\r
53//\r
54\r
55VOID\r
56LcdGraphicsExitBootServicesEvent (\r
57 IN EFI_EVENT Event,\r
58 IN VOID *Context\r
59);\r
60\r
61EFI_STATUS\r
62EFIAPI\r
63LcdGraphicsQueryMode (\r
64 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
65 IN UINT32 ModeNumber,\r
66 OUT UINTN *SizeOfInfo,\r
67 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
68);\r
69\r
70EFI_STATUS\r
71EFIAPI\r
72LcdGraphicsSetMode (\r
73 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
74 IN UINT32 ModeNumber\r
75);\r
76\r
77EFI_STATUS\r
78EFIAPI\r
79LcdGraphicsBlt (\r
80 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
81 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
82 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
83 IN UINTN SourceX,\r
84 IN UINTN SourceY,\r
85 IN UINTN DestinationX,\r
86 IN UINTN DestinationY,\r
87 IN UINTN Width,\r
88 IN UINTN Height,\r
89 IN UINTN Delta OPTIONAL\r
90);\r
91\r
92UINTN\r
93GetBytesPerPixel (\r
94 IN LCD_BPP Bpp\r
95 );\r
96\r
97EFI_STATUS\r
98EFIAPI\r
99GraphicsOutputDxeInitialize (\r
100 IN EFI_HANDLE ImageHandle,\r
101 IN EFI_SYSTEM_TABLE *SystemTable\r
102);\r
103\r
104EFI_STATUS\r
105InitializeDisplay (\r
106 IN LCD_INSTANCE* Instance\r
107);\r
108\r
7d0f2f23 109#endif /* __ARM_VE_GRAPHICS_DXE_H__ */\r