gma: Split `Internal` port type into `eDP` & `LVDS`

We used to have a single type `Internal`, in the GMA interface, to
represent the port for any internal panel. This seemed suitable as
all mainboard targets used the additional panel logic (power se-
quencing, backlight) only with either one of the eDP and LVDS ports.

However, the hardware allows to combine the panel logic also with
other ports. And some of the regular DP ports are even mentioned as
alternatives to the dedicated eDP port.

As a first step towards supporting such less common combinations,
we get rid of the single `Internal` type. All the panel logic still
assumes that either the dedicated eDP or the LVDS port is used for
an internal display. We introduce `Internal_Port_Type` to represent
eDP and LVDS, for this. But it should vanish, once the panel logic
is adapted.

Change-Id: Iadf3c11bd35d085cf47a961e800b0d96b79f62f5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/38239
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb
index 0d7cd37..df88492 100644
--- a/common/hw-gfx-gma-display_probing.adb
+++ b/common/hw-gfx-gma-display_probing.adb
@@ -76,7 +76,7 @@
             declare
                DP_Port : constant GMA.DP_Port :=
                  (case Port is
-                     when Internal  => DP_A,
+                     when eDP       => DP_A,
                      when DP1       => DP_B,
                      when DP2       => DP_C,
                      when DP3       => DP_D,
@@ -118,7 +118,7 @@
       Success := Config.Valid_Port (Port);
 
       if Success then
-         if Port = Internal then
+         if Port in Internal_Port_Type then
             Panel.Wait_On;
          end if;
          Read_EDID (Raw_EDID, Port, Success);
@@ -176,7 +176,7 @@
       -- Turn panel on early to probe other ports during the power on delay.
       for Idx in Port_List_Range loop
          exit when Ports (Idx) = Disabled;
-         if Ports (Idx) = Internal then
+         if Ports (Idx) in Internal_Port_Type then
             Panel.On (Wait => False);
             Probe_Internal := True;
             exit;
@@ -211,7 +211,9 @@
       end if;
 
       -- Turn panel power off if probing failed.
-      if Probe_Internal and not Port_Configured (Configs, Internal) then
+      if Probe_Internal and not
+         (Port_Configured (Configs, eDP) or Port_Configured (Configs, LVDS))
+      then
          Panel.Off;
       end if;
    end Scan_Ports;