gma: Publish Read_EDID()

Might be useful in coreboot to read the raw EDID.

Change-Id: I13d28a4434de3b0699a3475dd96febfdf75639f0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/31454
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 9f756f6..cd2a452 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -13,7 +13,6 @@
 --
 
 with HW.GFX.I2C;
-with HW.GFX.EDID;
 with HW.GFX.GMA.Config;
 with HW.GFX.GMA.Config_Helpers;
 with HW.GFX.GMA.I2C;
@@ -56,8 +55,6 @@
      (Raw_EDID :    out EDID.Raw_EDID_Data;
       Port     : in     Active_Port_Type;
       Success  :    out Boolean)
-   with
-      Post => (if Success then EDID.Valid (Raw_EDID))
    is
       Raw_EDID_Length : GFX.I2C.Transfer_Length := Raw_EDID'Length;
    begin
diff --git a/common/hw-gfx-gma-display_probing.ads b/common/hw-gfx-gma-display_probing.ads
index f5cd839..e51de88 100644
--- a/common/hw-gfx-gma-display_probing.ads
+++ b/common/hw-gfx-gma-display_probing.ads
@@ -12,6 +12,8 @@
 -- GNU General Public License for more details.
 --
 
+with HW.GFX.EDID;
+
 package HW.GFX.GMA.Display_Probing
 is
 
@@ -20,6 +22,13 @@
    All_Ports : constant Port_List :=
      (DP1, DP2, DP3, HDMI1, HDMI2, HDMI3, Analog, Internal);
 
+   procedure Read_EDID
+     (Raw_EDID :    out EDID.Raw_EDID_Data;
+      Port     : in     Active_Port_Type;
+      Success  :    out Boolean)
+   with
+      Post => (if Success then EDID.Valid (Raw_EDID));
+
    procedure Scan_Ports
      (Configs     :    out Pipe_Configs;
       Ports       : in     Port_List := All_Ports;
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index b9c627b..8b1c85a 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -58,6 +58,8 @@
       HDMI2, -- or DVI
       HDMI3, -- or DVI
       Analog);
+   subtype Active_Port_Type is Port_Type
+      range Port_Type'Succ (Disabled) .. Port_Type'Last;
 
    type Cursor_Mode is (No_Cursor, ARGB_Cursor);
    type Cursor_Size is (Cursor_64x64, Cursor_128x128, Cursor_256x256);
@@ -235,9 +237,6 @@
    ----------------------------------------------------------------------------
    -- Internal representation of a single pipe's configuration
 
-   subtype Active_Port_Type is Port_Type
-      range Port_Type'Succ (Disabled) .. Port_Type'Last;
-
    type GPU_Port is (DIGI_A, DIGI_B, DIGI_C, DIGI_D, DIGI_E, LVDS, VGA);
 
    subtype Digital_Port is GPU_Port range DIGI_A .. DIGI_E;