summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Include
diff options
context:
space:
mode:
authorGirish Pathak <girish.pathak at arm.com>2017-09-26 21:15:12 +0100
committerLeif Lindholm <leif.lindholm@linaro.org>2018-04-23 12:00:23 +0100
commit4257dfaa61b66115c52624ba1547de7bb1124aa0 (patch)
tree94a1577b638fc46a1a6e3b88a909489d4dd7484a /ArmPlatformPkg/Include
parentb1b69d2606e8995d08bf25e3ed286c20034bfba3 (diff)
downloadedk2-4257dfaa61b66115c52624ba1547de7bb1124aa0.tar.gz
edk2-4257dfaa61b66115c52624ba1547de7bb1124aa0.tar.bz2
edk2-4257dfaa61b66115c52624ba1547de7bb1124aa0.zip
ArmPlatformPkg: Tidy Lcd code: Updated comments
There is no functional modification in this change some comments are modified and a few new comments are added. This is to prevent mixing formatting changes with functional changes. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Girish Pathak <girish.pathak@arm.com> Signed-off-by: Evan Lloyd <evan.lloyd@arm.com> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPlatformPkg/Include')
-rw-r--r--ArmPlatformPkg/Include/Library/LcdPlatformLib.h92
1 files changed, 72 insertions, 20 deletions
diff --git a/ArmPlatformPkg/Include/Library/LcdPlatformLib.h b/ArmPlatformPkg/Include/Library/LcdPlatformLib.h
index 3d13e41797..e51e78640a 100644
--- a/ArmPlatformPkg/Include/Library/LcdPlatformLib.h
+++ b/ArmPlatformPkg/Include/Library/LcdPlatformLib.h
@@ -18,9 +18,7 @@
#define LCD_VRAM_SIZE SIZE_8MB
-//
// Modes definitions
-//
#define VGA 0
#define SVGA 1
#define XGA 2
@@ -29,9 +27,7 @@
#define UXGA 5
#define HD 6
-//
// VGA Mode: 640 x 480
-//
#define VGA_H_RES_PIXELS 640
#define VGA_V_RES_PIXELS 480
#define VGA_OSC_FREQUENCY 23750000 /* 0x016A6570 */
@@ -44,9 +40,7 @@
#define VGA_V_FRONT_PORCH ( 3 - 1)
#define VGA_V_BACK_PORCH ( 13 - 1)
-//
// SVGA Mode: 800 x 600
-//
#define SVGA_H_RES_PIXELS 800
#define SVGA_V_RES_PIXELS 600
#define SVGA_OSC_FREQUENCY 38250000 /* 0x0247A610 */
@@ -59,9 +53,7 @@
#define SVGA_V_FRONT_PORCH ( 3 - 1)
#define SVGA_V_BACK_PORCH ( 17 - 1)
-//
// XGA Mode: 1024 x 768
-//
#define XGA_H_RES_PIXELS 1024
#define XGA_V_RES_PIXELS 768
#define XGA_OSC_FREQUENCY 63500000 /* 0x03C8EEE0 */
@@ -74,9 +66,7 @@
#define XGA_V_FRONT_PORCH ( 3 - 1)
#define XGA_V_BACK_PORCH ( 23 - 1)
-//
// SXGA Mode: 1280 x 1024
-//
#define SXGA_H_RES_PIXELS 1280
#define SXGA_V_RES_PIXELS 1024
#define SXGA_OSC_FREQUENCY 109000000 /* 0x067F3540 */
@@ -89,9 +79,7 @@
#define SXGA_V_FRONT_PORCH ( 3 - 1)
#define SXGA_V_BACK_PORCH ( 29 - 1)
-//
// WSXGA+ Mode: 1680 x 1050
-//
#define WSXGA_H_RES_PIXELS 1680
#define WSXGA_V_RES_PIXELS 1050
#define WSXGA_OSC_FREQUENCY 147000000 /* 0x08C30AC0 */
@@ -104,9 +92,7 @@
#define WSXGA_V_FRONT_PORCH ( 4 - 1)
#define WSXGA_V_BACK_PORCH ( 41 - 1)
-//
// UXGA Mode: 1600 x 1200
-//
#define UXGA_H_RES_PIXELS 1600
#define UXGA_V_RES_PIXELS 1200
#define UXGA_OSC_FREQUENCY 161000000 /* 0x0998AA40 */
@@ -119,9 +105,7 @@
#define UXGA_V_FRONT_PORCH ( 3 - 1)
#define UXGA_V_BACK_PORCH ( 38 - 1)
-//
// HD Mode: 1920 x 1080
-//
#define HD_H_RES_PIXELS 1920
#define HD_V_RES_PIXELS 1080
#define HD_OSC_FREQUENCY 165000000 /* 0x09D5B340 */
@@ -134,10 +118,7 @@
#define HD_V_FRONT_PORCH ( 3 - 1)
#define HD_V_BACK_PORCH ( 32 - 1)
-//
// Colour Masks
-//
-
#define LCD_24BPP_RED_MASK 0x00FF0000
#define LCD_24BPP_GREEN_MASK 0x0000FF00
#define LCD_24BPP_BLUE_MASK 0x000000FF
@@ -158,7 +139,7 @@
#define LCD_12BPP_444_BLUE_MASK 0x0000000F
#define LCD_12BPP_444_RESERVED_MASK 0x0000F000
-/** The enumeration indexes maps the PL111 LcdBpp values used in the LCD Control
+/** The enumeration maps the PL111 LcdBpp values used in the LCD Control
Register
**/
typedef enum {
@@ -172,33 +153,94 @@ typedef enum {
LCD_BITS_PER_PIXEL_12_444
} LCD_BPP;
+/** Platform related initialization function.
+
+ @param[in] Handle Handle to the LCD device instance.
+
+ @retval EFI_SUCCESS Plaform library initialized successfully.
+ @retval !(EFI_SUCCESS) Other errors.
+**/
EFI_STATUS
LcdPlatformInitializeDisplay (
IN EFI_HANDLE Handle
);
+/** Allocate VRAM memory in DRAM for the framebuffer
+ (unless it is reserved already).
+
+ The allocated address can be used to set the framebuffer.
+
+ @param[out] VramBaseAddress A pointer to the framebuffer address.
+ @param[out] VramSize A pointer to the size of the frame
+ buffer in bytes
+
+ @retval EFI_SUCCESS Frame buffer memory allocated successfully.
+ @retval !(EFI_SUCCESS) Other errors.
+**/
EFI_STATUS
LcdPlatformGetVram (
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
OUT UINTN* VramSize
);
+/** Return total number of modes supported.
+
+ Note: Valid mode numbers are 0 to MaxMode - 1
+ See Section 12.9 of the UEFI Specification 2.7
+
+ @retval UINT32 Mode Number.
+**/
UINT32
LcdPlatformGetMaxMode (
VOID
);
+/** Set the requested display mode.
+
+ @param[in] ModeNumber Mode Number.
+
+ @retval EFI_SUCCESS Mode set successfully.
+ @retval EFI_INVALID_PARAMETER Requested mode not found.
+ @retval !(EFI_SUCCESS) Other errors.
+**/
EFI_STATUS
LcdPlatformSetMode (
IN UINT32 ModeNumber
);
+/** Return information for the requested mode number.
+
+ @param[in] ModeNumber Mode Number.
+ @param[out] Info Pointer for returned mode information
+ (on success).
+
+ @retval EFI_SUCCESS Mode information for the requested mode
+ returned successfully.
+ @retval EFI_INVALID_PARAMETER Requested mode not found.
+**/
EFI_STATUS
LcdPlatformQueryMode (
IN UINT32 ModeNumber,
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info
);
+/** Return display timing information for the requested mode number.
+
+ @param[in] ModeNumber Mode Number.
+
+ @param[out] HRes Pointer to horizontal resolution.
+ @param[out] HSync Pointer to horizontal sync width.
+ @param[out] HBackPorch Pointer to horizontal back porch.
+ @param[out] HFrontPorch Pointer to horizontal front porch.
+ @param[out] VRes Pointer to vertical resolution.
+ @param[out] VSync Pointer to vertical sync width.
+ @param[out] VBackPorch Pointer to vertical back porch.
+ @param[out] VFrontPorch Pointer to vertical front porch.
+
+ @retval EFI_SUCCESS Display timing information for the requested
+ mode returned successfully.
+ @retval EFI_INVALID_PARAMETER Requested mode not found.
+**/
EFI_STATUS
LcdPlatformGetTimings (
IN UINT32 ModeNumber,
@@ -212,6 +254,16 @@ LcdPlatformGetTimings (
OUT UINT32* VFrontPorch
);
+/** Return bits per pixel information for a mode number.
+
+ @param[in] ModeNumber Mode Number.
+
+ @param[out] Bpp Pointer to value bits per pixel information.
+
+ @retval EFI_SUCCESS Bit per pixel information for the requested
+ mode returned successfully.
+ @retval EFI_INVALID_PARAMETER Requested mode not found.
+**/
EFI_STATUS
LcdPlatformGetBpp (
IN UINT32 ModeNumber,