summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Library
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/Library
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/Library')
-rw-r--r--ArmPlatformPkg/Library/HdLcd/HdLcd.c26
-rw-r--r--ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.c65
-rw-r--r--ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c24
3 files changed, 109 insertions, 6 deletions
diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
index 2cd1be9d25..be4ccfdc1f 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
@@ -1,4 +1,5 @@
/** @file
+ This file contains the platform independent parts of HdLcd
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
@@ -21,10 +22,6 @@
#include "HdLcd.h"
-/** This file contains all the bits of the Lcd that are
- platform independent.
-**/
-
STATIC
UINTN
GetBytesPerPixel (
@@ -51,6 +48,12 @@ GetBytesPerPixel (
}
}
+/** Initialize display.
+
+ @param[in] VramBaseAddress Address of the framebuffer.
+
+ @retval EFI_SUCCESS Display initialization successful.
+**/
EFI_STATUS
LcdInitialize (
IN EFI_PHYSICAL_ADDRESS VramBaseAddress
@@ -82,6 +85,14 @@ LcdInitialize (
return EFI_SUCCESS;
}
+/** Set requested mode of the display.
+
+ @param[in] ModeNumber Display mode number.
+
+ @retval EFI_SUCCESS Display mode set successfully.
+ @retval EFI_DEVICE_ERROR Reurns an error if display timing
+ information is not available.
+**/
EFI_STATUS
LcdSetMode (
IN UINT32 ModeNumber
@@ -150,6 +161,8 @@ LcdSetMode (
return EFI_SUCCESS;
}
+/** De-initializes the display.
+**/
VOID
LcdShutdown (
VOID
@@ -159,6 +172,11 @@ LcdShutdown (
MmioWrite32 (HDLCD_REG_COMMAND, HDLCD_DISABLE);
}
+/** Check for presence of HDLCD.
+
+ @retval EFI_SUCCESS Returns success if platform implements a HDLCD
+ controller.
+**/
EFI_STATUS
LcdIdentify (
VOID
diff --git a/ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.c b/ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.c
index b78d9a3bbd..b76894c534 100644
--- a/ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.c
+++ b/ArmPlatformPkg/Library/LcdPlatformNullLib/LcdPlatformNullLib.c
@@ -1,6 +1,7 @@
/** @file
Copyright (c) 2017, Linaro, Ltd. All rights reserved.
+ Copyright (c) 2018, Arm Limited. All rights reserved.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -17,6 +18,12 @@
#include <Library/DebugLib.h>
#include <Library/LcdPlatformLib.h>
+/** Platform related initialization function.
+
+ @param[in] Handle Handle to the LCD device instance.
+
+ @retval EFI_UNSUPPORTED Interface is not supported.
+**/
EFI_STATUS
LcdPlatformInitializeDisplay (
IN EFI_HANDLE Handle
@@ -26,6 +33,17 @@ LcdPlatformInitializeDisplay (
return EFI_UNSUPPORTED;
}
+/** 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_UNSUPPORTED Interface is not supported.
+**/
EFI_STATUS
LcdPlatformGetVram (
OUT EFI_PHYSICAL_ADDRESS* VramBaseAddress,
@@ -36,6 +54,14 @@ LcdPlatformGetVram (
return EFI_UNSUPPORTED;
}
+/** 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 Zero number of modes supported
+ in a NULL library implementation.
+**/
UINT32
LcdPlatformGetMaxMode (
VOID
@@ -45,6 +71,12 @@ LcdPlatformGetMaxMode (
return 0;
}
+/** Set the requested display mode.
+
+ @param[in] ModeNumber Mode Number.
+
+ @retval EFI_UNSUPPORTED Interface is not supported.
+**/
EFI_STATUS
LcdPlatformSetMode (
IN UINT32 ModeNumber
@@ -54,6 +86,15 @@ LcdPlatformSetMode (
return EFI_UNSUPPORTED;
}
+/** Return information for the requested mode number.
+
+ @param[in] ModeNumber Mode Number.
+ @param[out] Info Pointer for returned mode information
+ (on success).
+
+ @retval EFI_UNSUPPORTED Interface is not supported.
+
+**/
EFI_STATUS
LcdPlatformQueryMode (
IN UINT32 ModeNumber,
@@ -64,6 +105,21 @@ LcdPlatformQueryMode (
return EFI_UNSUPPORTED;
}
+/** 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_UNSUPPORTED Interface is not supported.
+**/
EFI_STATUS
LcdPlatformGetTimings (
IN UINT32 ModeNumber,
@@ -81,6 +137,15 @@ LcdPlatformGetTimings (
return EFI_UNSUPPORTED;
}
+/** 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_UNSUPPORTED Interface is not supported.
+
+**/
EFI_STATUS
LcdPlatformGetBpp (
IN UINT32 ModeNumber,
diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
index 3f3f7019f1..ccd7a4d1d4 100644
--- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
+++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
@@ -1,4 +1,5 @@
/** @file
+ This file contains the platform independent parts of PL111Lcd
Copyright (c) 2011-2018, ARM Ltd. All rights reserved.<BR>
@@ -19,9 +20,12 @@
#include "PL111Lcd.h"
-/** This file contains all the bits of the PL111 that are
- platform independent.
+/** Check for presence of PL111.
+ @retval EFI_SUCCESS Returns success if platform implements a
+ PL111 controller.
+
+ @retval EFI_NOT_FOUND PL111 display controller not found the plaform.
**/
EFI_STATUS
LcdIdentify (
@@ -45,6 +49,12 @@ LcdIdentify (
return EFI_NOT_FOUND;
}
+/** Initialize display.
+
+ @param[in] VramBaseAddress Address of the framebuffer.
+
+ @retval EFI_SUCCESS Initialization of display successful.
+**/
EFI_STATUS
LcdInitialize (
IN EFI_PHYSICAL_ADDRESS VramBaseAddress
@@ -60,6 +70,14 @@ LcdInitialize (
return EFI_SUCCESS;
}
+/** Set requested mode of the display.
+
+ @param[in] ModeNumbe Display mode number.
+
+ @retval EFI_SUCCESS Display mode set successfuly.
+ @retval EFI_DEVICE_ERROR It returns an error if display timing
+ information is not available.
+**/
EFI_STATUS
LcdSetMode (
IN UINT32 ModeNumber
@@ -130,6 +148,8 @@ LcdSetMode (
return EFI_SUCCESS;
}
+/** De-initializes the display.
+*/
VOID
LcdShutdown (
VOID