gma-display_probing: Only check display type on DVI-I

On DVI-I connectors the DDC is shared between the analog and digital
parts. To decide which path to take we checked the digital input bit
of the EDID. We did this overeagerly for all ports, which broke com-
patibility with DP adapters (the DP realm is very complex and we are
supposed to discover the whole downstream hierarchie, which obviously
would be overkill).

Change-Id: Ifc53e8ab985695e6e4ff1d42659826710a50eae9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20135
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 97792cf..96cf536 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -61,6 +61,16 @@
       return Sibling_Port (Port) /= Disabled;
    end Has_Sibling_Port;
 
+   function Is_DVI_I (Port : Active_Port_Type) return Boolean
+   with
+      Global => null
+   is
+   begin
+      return Config.Have_DVI_I and
+             (Port = Analog or
+              Config_Helpers.To_PCH_Port (Port) = Config.Analog_I2C_Port);
+   end Is_DVI_I;
+
    procedure Read_EDID
      (Raw_EDID :    out EDID.Raw_EDID_Data;
       Port     : in     Active_Port_Type;
@@ -134,8 +144,8 @@
       end if;
 
       if Success and then
-         (EDID.Compatible_Display
-            (Raw_EDID, Config_Helpers.To_Display_Type (Port)) and
+         ((not Is_DVI_I (Port) or EDID.Compatible_Display
+            (Raw_EDID, Config_Helpers.To_Display_Type (Port))) and
           EDID.Has_Preferred_Mode (Raw_EDID))
       then
          Pipe_Cfg.Port := Port;