Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/35529 )
Change subject: gma config_helpers: Add Maximum_Dotclock() function ......................................................................
gma config_helpers: Add Maximum_Dotclock() function
Change-Id: Iaa25e774d38c7af12150523739d902cf8e758674 Signed-off-by: Nico Huber nico.h@gmx.de --- M common/hw-gfx-gma-config_helpers.adb M common/hw-gfx-gma-config_helpers.ads 2 files changed, 14 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/29/35529/1
diff --git a/common/hw-gfx-gma-config_helpers.adb b/common/hw-gfx-gma-config_helpers.adb index a86af9e..8614787 100644 --- a/common/hw-gfx-gma-config_helpers.adb +++ b/common/hw-gfx-gma-config_helpers.adb @@ -79,6 +79,18 @@ when DP1 .. DP3 => DP); end To_Display_Type;
+ function Maximum_Dotclock (Configs : Pipe_Configs) return Frequency_Type + is + Max : Frequency_Type := Frequency_Type'First; + begin + for I in Pipe_Index loop + if Max < Configs (I).Mode.Dotclock then + Max := Configs (I).Mode.Dotclock; + end if; + end loop; + return Max; + end Maximum_Dotclock; + ----------------------------------------------------------------------------
-- Prepares link rate and lane count settings for an FDI connection. diff --git a/common/hw-gfx-gma-config_helpers.ads b/common/hw-gfx-gma-config_helpers.ads index a2aeb06..4756af2 100644 --- a/common/hw-gfx-gma-config_helpers.ads +++ b/common/hw-gfx-gma-config_helpers.ads @@ -28,6 +28,8 @@
function To_Display_Type (Port : Active_Port_Type) return Display_Type;
+ function Maximum_Dotclock (Configs : Pipe_Configs) return Frequency_Type; + procedure Fill_Port_Config (Port_Cfg : out Port_Config; Pipe : in Pipe_Index;