gma hsw: Implement CDClk switching
For Haswell, we only read out the current CDClk setting and work with
that (CDClk is supposed to be set only once per boot, so we leave that
to the firmware). Broadwell supports actual frequency switching, with
the following limits:
o a fuse may restrict us to 450MHz,
o ULX supports at most 450MHz w/o additional cooling,
o ULT supports at most 540MHz w/o additional cooling,
o others support up to 675MHz.
We assume there is no `additional cooling`. With the CDClk now being
switchable, we have to update `DP_Aux_Request` to assume the current
CDClk frequency instead of the default.
Dot clocks, on these platforms, may run with full CDClk speed.
Change-Id: I8fb23a49b334f9f0045884c3af4087764397b941
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/35717
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/haswell_shared/hw-gfx-gma-power_and_clocks_haswell.ads b/common/haswell_shared/hw-gfx-gma-power_and_clocks_haswell.ads
index 7c5a647..2762d82 100644
--- a/common/haswell_shared/hw-gfx-gma-power_and_clocks_haswell.ads
+++ b/common/haswell_shared/hw-gfx-gma-power_and_clocks_haswell.ads
@@ -12,6 +12,8 @@
-- GNU General Public License for more details.
--
+with HW.GFX.GMA.Config_Helpers;
+
private package HW.GFX.GMA.Power_And_Clocks_Haswell is
procedure PSR_Off;
@@ -21,6 +23,16 @@
procedure Initialize;
+ procedure Limit_Dotclocks
+ (Configs : in out Pipe_Configs;
+ CDClk_Switch : out Boolean)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Update_CDClk (Configs : in out Pipe_Configs)
+ with
+ Post => Config_Helpers.Stable_FB (Configs'Old, Configs);
+ procedure Enable_CDClk is null;
+
procedure Power_Set_To (Configs : Pipe_Configs);
procedure Power_Up (Old_Configs, New_Configs : Pipe_Configs);
procedure Power_Down (Old_Configs, Tmp_Configs, New_Configs : Pipe_Configs);