Hello Arthur Heymans, Matt DeVillier, Thomas Heijligen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/35716
to review the following change.
Change subject: gma irl: Handle CDClk and calculate dot-clock limits ......................................................................
gma irl: Handle CDClk and calculate dot-clock limits
This one is easy, the CDClk always runs at the same fixed rate. We only have to limit dot clocks to 90% of CDClk.
Change-Id: I475a276d050f5a109b44c02ee250c9f4a9ebe863 Signed-off-by: Nico Huber nico.h@gmx.de --- M common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb M common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads 2 files changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/16/35716/1
diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb index a7b1035..42aabbd 100644 --- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb +++ b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.adb @@ -51,7 +51,18 @@ Time.U_Delay (20); -- DMI latency end if;
+ Config.CDClk := Config.Default_CDClk_Freq; + Config.Max_CDClk := Config.Default_CDClk_Freq; Config.Raw_Clock := Config.Default_RawClk_Freq; end Initialize;
+ procedure Limit_Dotclocks + (Configs : in out Pipe_Configs; + CDClk_Switch : out Boolean) + is + begin + Config_Helpers.Limit_Dotclocks (Configs, Config.CDClk * 90 / 100); + CDClk_Switch := False; + end Limit_Dotclocks; + end HW.GFX.GMA.Power_And_Clocks_Ironlake; diff --git a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads index fc58d75..18b9c19 100644 --- a/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads +++ b/common/ironlake/hw-gfx-gma-power_and_clocks_ironlake.ads @@ -12,10 +12,19 @@ -- GNU General Public License for more details. --
+with HW.GFX.GMA.Config_Helpers; + private package HW.GFX.GMA.Power_And_Clocks_Ironlake is
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) is null; + procedure Pre_All_Off is null;
procedure Post_All_Off is null;