gma: Refactor Scan_Ports()

Factor the probing of a single port's EDID out. Not only to save some
indentation levels but also to make it more flexible for later en-
hancements.

Change-Id: I063787ac42174a02e83e3d5ed93c033f16d3df7a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/17753
Reviewed-by: Reto Buerki <reet@codelabs.ch>
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index ca61b06..1e38f02 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -107,11 +107,16 @@
 
    ----------------------------------------------------------------------------
 
+   Max_Pipe : constant Pipe_Index :=
+     (if CPU <= Sandybridge
+      then Secondary
+      else Tertiary);
+
    type Supported_Pipe_Array is array (Pipe_Index) of Boolean;
    Supported_Pipe : constant Supported_Pipe_Array :=
-     (Primary     => True,
-      Secondary   => True,
-      Tertiary    => CPU >= Ivybridge);
+     (Primary     => Primary     <= Max_Pipe,
+      Secondary   => Secondary   <= Max_Pipe,
+      Tertiary    => Tertiary    <= Max_Pipe);
 
    type Valid_Per_Port is array (Port_Type) of Boolean;
    type Valid_Per_GPU is array (CPU_Type) of Valid_Per_Port;