]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl
authorGirish Pathak <girish.pathak@arm.com>
Wed, 14 Feb 2018 11:52:46 +0000 (11:52 +0000)
committerLeif Lindholm <leif.lindholm@linaro.org>
Mon, 23 Apr 2018 11:00:46 +0000 (12:00 +0100)
Currenty bit LcdPwr of the LCDControl register is enabled immediately
after setting other bits of the LCDControl register. This two write
sequence is unnecessary. This change removes this extra write by setting
LcdPwr bit along with other bits of the LcdControl register.

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>
ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c

index 287e3ca272c0c19f8045a3bf4e69a092d8da6fd8..465cb6845437f57d15f05a271d1b01f634e11b56 100644 (file)
@@ -137,11 +137,7 @@ LcdSetMode (
 \r
   // PL111_REG_LCD_CONTROL\r
   LcdControl = PL111_CTRL_LCD_EN | PL111_CTRL_LCD_BPP (LcdBpp) |\r
-               PL111_CTRL_LCD_TFT | PL111_CTRL_BGR;\r
-  MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);\r
-\r
-  // Turn on power to the LCD Panel\r
-  LcdControl |= PL111_CTRL_LCD_PWR;\r
+               PL111_CTRL_LCD_TFT | PL111_CTRL_LCD_PWR | PL111_CTRL_BGR;\r
   MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);\r
 \r
   return EFI_SUCCESS;\r