gma config: Initialize stateful configs late
Defer initialization of config variables until GMA.Initialize().
Change-Id: I9192c9a7c4d67e4af7f3e26659489f58998ae832
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/27066
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index b62ebce..1d97adb 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -370,13 +370,11 @@
Success : out Boolean)
with
Refined_Global =>
- (In_Out =>
- (Config.Variable, Dev.PCI_State,
- Registers.Register_State, Port_IO.State),
- Input =>
- (Time.State),
+ (Input => (Time.State),
+ In_Out => (Dev.PCI_State, Registers.Register_State, Port_IO.State),
Output =>
- (Dev.Address_State,
+ (Config.Variable,
+ Dev.Address_State,
Registers.Address_State,
PLLs.State, Panel.Panel_State,
Cur_Configs, Allocated_PLLs,
@@ -444,6 +442,7 @@
Framebuffer => HW.GFX.Default_FB,
Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
+ Config.Variable := Config.Initial_Settings;
PLLs.Initialize;
Dev.Initialize (Success);