From: Girish Pathak <[email protected]>

None of the ArmPlatformSys*  functions return EFI_TIMEOUT. Hence checking
this in the do {} while loop in LcdPlatformSetMode is wrong. Therefore
remove this comparision and as a result remove the do {} while loop.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Girish Pathak <[email protected]>
Signed-off-by: Evan Lloyd <[email protected]>
---
 ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 
12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git 
a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c 
b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
index 
7b258f1fc9291ed2086da1e32dd5d0c7e4818dbd..a6c4f414685db907a3fbc9a009969be8a09f7415
 100644
--- 
a/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
+++ 
b/ArmPlatformPkg/ArmVExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
@@ -229,25 +229,21 @@ LcdPlatformSetMode (
   }
 
   // Set the video mode oscillator
-  do {
   Status = ArmPlatformSysConfigSetDevice (
               SYS_CFG_OSC_SITE1,
               FixedPcdGet32 (PcdHdLcdVideoModeOscId),
               mResolutions[ModeNumber].OscFreq
               );
-  } while (Status == EFI_TIMEOUT);
   if (EFI_ERROR (Status)) {
     ASSERT_EFI_ERROR (Status);
     return Status;
   }
 
   // Set the DVI into the new mode
-  do {
-    Status = ArmPlatformSysConfigSet (
-               SYS_CFG_DVIMODE,
-               mResolutions[ModeNumber].Mode
-               );
-  } while (Status == EFI_TIMEOUT);
+  Status = ArmPlatformSysConfigSet (
+              SYS_CFG_DVIMODE,
+              mResolutions[ModeNumber].Mode
+              );
   if (EFI_ERROR (Status)) {
     ASSERT_EFI_ERROR (Status);
     return Status;
-- 
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to