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/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 491a88f..72df4ed 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -73,13 +73,9 @@
for I in 1 .. 2 loop
if Config_Helpers.To_Display_Type (Port) = DP then
-- May need power and CDClk to read EDID
- declare
- Temp_Configs : Pipe_Configs := Cur_Configs;
- begin
- Temp_Configs (Primary).Port := Port;
- Power_And_Clocks.Power_Up (Cur_Configs, Temp_Configs);
- Power_And_Clocks.Enable_CDClk;
- end;
+ Power_And_Clocks.Power_Up (Port, Success);
+ exit when not Success;
+ Power_And_Clocks.Enable_CDClk;
declare
DP_Port : constant GMA.DP_Port :=
@@ -134,7 +130,7 @@
Success : out Boolean)
with Pre => True
is
- Raw_EDID : EDID.Raw_EDID_Data := (others => 16#00#);
+ Raw_EDID : EDID.Raw_EDID_Data with Relaxed_Initialization;
begin
Success := Config.Valid_Port (Port);