gma connectors: Add a Prepare() step
Prepare() will be used to adapt a `Port_Config' to platform quirks.
For instance the FDI usage on Ironlake, USB-C usage on Tiger Lake.
Change-Id: I2fb3ed026077f0371112682b90bea751a28bf994
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/462
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index e26e751..2a7b7a6 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -162,6 +162,10 @@
Connector_Info.Preferred_Link_Setting (Port_Cfg, Success);
end if;
+ if Success then
+ Connectors.Prepare (Pipe_Cfg.Port, Port_Cfg, Success);
+ end if;
+
-- loop over all possible DP-lane configurations
-- (non-DP ports use a single fake configuration)
while Success loop
@@ -217,6 +221,9 @@
end if;
Connector_Info.Next_Link_Setting (Port_Cfg, Success);
+ exit when not Success;
+
+ Connectors.Prepare (Pipe_Cfg.Port, Port_Cfg, Success);
end loop;
if Success then