Re: [edk2] [PATCH v3 07/16] ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl

2018-03-21 Thread Evan Lloyd
Reviewed-by: Evan Lloyd <evan.ll...@arm.com>

> -Original Message-
> From: edk2-devel <edk2-devel-boun...@lists.01.org> On Behalf Of Girish
> Pathak
> Sent: 20 March 2018 16:12
> To: edk2-devel@lists.01.org
> Cc: nd <n...@arm.com>; Stephanie Hughes-Fitt  f...@arm.com>; leif.lindh...@linaro.org; ard.biesheu...@linaro.org
> Subject: [edk2] [PATCH v3 07/16] ArmPlatformPkg: PL111Lcd: Combine
> two writes to LCDControl
> 
> 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.pat...@arm.com>
> Signed-off-by: Evan Lloyd <evan.ll...@arm.com>
> ---
>  ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> index
> 287e3ca272c0c19f8045a3bf4e69a092d8da6fd8..465cb6845437f57d15f05
> a271d1b01f634e11b56 100644
> --- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> +++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
> @@ -137,11 +137,7 @@ LcdSetMode (
> 
>// PL111_REG_LCD_CONTROL
>LcdControl = PL111_CTRL_LCD_EN | PL111_CTRL_LCD_BPP (LcdBpp) |
> -   PL111_CTRL_LCD_TFT | PL111_CTRL_BGR;
> -  MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);
> -
> -  // Turn on power to the LCD Panel
> -  LcdControl |= PL111_CTRL_LCD_PWR;
> +   PL111_CTRL_LCD_TFT | PL111_CTRL_LCD_PWR |
> + PL111_CTRL_BGR;
>MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);
> 
>return EFI_SUCCESS;
> --
> 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
> 
> 
> ___
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 07/16] ArmPlatformPkg: PL111Lcd: Combine two writes to LCDControl

2018-03-20 Thread Girish Pathak
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 
Signed-off-by: Evan Lloyd 
---
 ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c 
b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
index 
287e3ca272c0c19f8045a3bf4e69a092d8da6fd8..465cb6845437f57d15f05a271d1b01f634e11b56
 100644
--- a/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
+++ b/ArmPlatformPkg/Library/PL111Lcd/PL111Lcd.c
@@ -137,11 +137,7 @@ LcdSetMode (
 
   // PL111_REG_LCD_CONTROL
   LcdControl = PL111_CTRL_LCD_EN | PL111_CTRL_LCD_BPP (LcdBpp) |
-   PL111_CTRL_LCD_TFT | PL111_CTRL_BGR;
-  MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);
-
-  // Turn on power to the LCD Panel
-  LcdControl |= PL111_CTRL_LCD_PWR;
+   PL111_CTRL_LCD_TFT | PL111_CTRL_LCD_PWR | PL111_CTRL_BGR;
   MmioWrite32 (PL111_REG_LCD_CONTROL, LcdControl);
 
   return EFI_SUCCESS;
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel