Nico Huber has uploaded this change for review.

View Change

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;

To view, visit change 35529. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Iaa25e774d38c7af12150523739d902cf8e758674
Gerrit-Change-Number: 35529
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: newchange