gma: Split out config derivation and port probing

The GMA package has grown way too big. Move derivation of the internal
configuration into new package `Config_Helpers`, EDID probing into new
package `Display_Probing`.

Change-Id: Ib49ac7b00367be4295d18dba3afd1a0692e0497f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17757
Reviewed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index baf16da..114f87e 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -47,8 +47,6 @@
       HDMI2, -- or DVI
       HDMI3, -- or DVI
       Analog);
-   type Port_List_Range is range 0 .. 7;
-   type Port_List is array (Port_List_Range) of Port_Type;
 
    type Pipe_Config is record
       Port        : Port_Type;
@@ -78,10 +76,6 @@
 
    procedure Legacy_VGA_Off;
 
-   procedure Scan_Ports
-     (Configs  :    out Pipe_Configs;
-      Ports    : in     Port_List;
-      Max_Pipe : in     Pipe_Index := Pipe_Index'Last);
    procedure Update_Outputs (Configs : Pipe_Configs);
 
    pragma Warnings (GNATprove, Off, "subprogram ""Dump_Configs"" has no effect",
@@ -99,6 +93,17 @@
 
 private
 
+   ----------------------------------------------------------------------------
+   -- State tracking for the currently configured pipes
+
+   Cur_Configs : Pipe_Configs with Part_Of => State;
+
+   ----------------------------------------------------------------------------
+   -- 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);
 
    subtype Digital_Port is GPU_Port range DIGI_A .. DIGI_E;