From: Girish Pathak <girish.pathak at arm.com>

None of the ArmPlatformSys*  functions returns 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]>
Reviewed-by: Ard Biesheuvel <[email protected]>
---
 Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c | 22 
++++++++------------
 1 file changed, 9 insertions(+), 13 deletions(-)

diff --git 
a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c 
b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
index 
d6d63295688f9aa5a6b24cee142760609439941d..cd62cd61883dcd78c72aa614466c6f714cc73fc4
 100644
--- a/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
+++ b/Platform/ARM/VExpressPkg/Library/HdLcdArmVExpressLib/HdLcdArmVExpress.c
@@ -230,25 +230,21 @@ LcdPlatformSetMode (
   }
 
   // Set the video mode oscillator
-  do {
-    Status = ArmPlatformSysConfigSetDevice (
-               SYS_CFG_OSC_SITE1,
-               FixedPcdGet32 (PcdHdLcdVideoModeOscId),
-               mResolutions[ModeNumber].OscFreq
-               );
-  } while (Status == EFI_TIMEOUT);
+  Status = ArmPlatformSysConfigSetDevice (
+             SYS_CFG_OSC_SITE1,
+             FixedPcdGet32 (PcdHdLcdVideoModeOscId),
+             mResolutions[ModeNumber].OscFreq
+             );
   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