gma power: Allow to explicitly enable DDI/Aux power

We used to enable power for DP-aux channels quite implicitly by faking
configs that use a specific port.  As Tiger Lake requires us to enable
a DDI port's power late during the modesetting sequence,  we introduce
a new API for such cases, and also use it for the DP-aux case.

Tested on HSW, and BXT & CFL where we enable PW2 explicitly now.

Change-Id: I1fd6348ff4855557166495613c6a181f85a818f4
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/461
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks.adb b/common/skylake/hw-gfx-gma-power_and_clocks.adb
index 2841208..acc4753 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks.adb
+++ b/common/skylake/hw-gfx-gma-power_and_clocks.adb
@@ -409,6 +409,18 @@
       end loop;
    end Power_Set_To;
 
+   procedure Power_Up (Port : Active_Port_Type; Success : out Boolean) is
+   begin
+      case Port is
+         when eDP          => PD_On (DDI_AE);
+         when DP1 | HDMI1  => PD_On (PW2); PD_On (DDI_B);
+         when DP2 | HDMI2  => PD_On (PW2); PD_On (DDI_C);
+         when DP3 | HDMI3  => PD_On (PW2); PD_On (DDI_D);
+         when others       => null;
+      end case;
+      Success := True;
+   end Power_Up;
+
    procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs) is
    begin
       for PD in Dynamic_Domain loop
diff --git a/common/skylake/hw-gfx-gma-power_and_clocks.ads b/common/skylake/hw-gfx-gma-power_and_clocks.ads
index e4f2611..f7c5abe 100644
--- a/common/skylake/hw-gfx-gma-power_and_clocks.ads
+++ b/common/skylake/hw-gfx-gma-power_and_clocks.ads
@@ -32,6 +32,7 @@
    procedure Enable_CDClk is null;
 
    procedure Power_Set_To (Configs : Pipe_Configs);
+   procedure Power_Up (Port : Active_Port_Type; Success : out Boolean);
    procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
    procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);