summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Library/HdLcd/HdLcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPlatformPkg/Library/HdLcd/HdLcd.c')
-rw-r--r--ArmPlatformPkg/Library/HdLcd/HdLcd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Library/HdLcd/HdLcd.c b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
index 96f2bf437f..5396dde3ba 100644
--- a/ArmPlatformPkg/Library/HdLcd/HdLcd.c
+++ b/ArmPlatformPkg/Library/HdLcd/HdLcd.c
@@ -73,6 +73,8 @@ LcdSetMode (
SCAN_TIMINGS *Horizontal;
SCAN_TIMINGS *Vertical;
+ EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
+
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION ModeInfo;
// Set the video mode timings and other relevant information
@@ -96,7 +98,14 @@ LcdSetMode (
return Status;
}
- if (ModeInfo.PixelFormat == PixelBlueGreenRedReserved8BitPerColor) {
+ // By default PcdArmHdLcdSwapBlueRedSelect is set to false
+ // However on the Juno platform HW lines for BLUE and RED are swapped
+ // Therefore PcdArmHdLcdSwapBlueRedSelect is set to TRUE for the Juno platform
+ PixelFormat = FixedPcdGetBool (PcdArmHdLcdSwapBlueRedSelect)
+ ? PixelRedGreenBlueReserved8BitPerColor
+ : PixelBlueGreenRedReserved8BitPerColor;
+
+ if (ModeInfo.PixelFormat == PixelFormat) {
MmioWrite32 (HDLCD_REG_RED_SELECT, (8 << 8) | 16);
MmioWrite32 (HDLCD_REG_BLUE_SELECT, (8 << 8) | 0);
} else {