gma ironlake: Reorder panel power handling

The panel power sequencer sometimes waits very long without an expli-
cable cause. We can however skip waiting for the panel power sequence
if we're already done with the configuration.

This fixes a sporadic, useless delay of about 130ms on the T420.

Change-Id: I27bf9b8bbae8a7447cde7ea4b88231b1707698b3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17760
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/ironlake/hw-gfx-gma-connectors.adb b/common/ironlake/hw-gfx-gma-connectors.adb
index 3cf8c4e..e94ae2e 100644
--- a/common/ironlake/hw-gfx-gma-connectors.adb
+++ b/common/ironlake/hw-gfx-gma-connectors.adb
@@ -66,7 +66,8 @@
 
       if Port_Cfg.Port = DIGI_A then
          EDP.Pre_Training;
-         Success := True;
+         Panel.On (Wait => True);
+         EDP.Post_On (Port_Cfg.DP, Success);
       elsif Port_Cfg.Port in FDI.GPU_FDI_Port then
          declare
             FDI_Port : constant PCH.FDI_Port_Type :=
@@ -92,14 +93,7 @@
       end if;
 
       if Success and Is_Internal (Port_Cfg) then
-         Panel.On;
-      end if;
-
-      if Port_Cfg.Port = DIGI_A then
-         EDP.Post_On (Port_Cfg.DP, Success);
-      end if;
-
-      if Success and Is_Internal (Port_Cfg) then
+         Panel.On (Wait => False);
          Panel.Backlight_On;
       end if;
    end Post_On;