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-config_helpers.adb b/common/hw-gfx-gma-config_helpers.adb
index ede140c..07fa087 100644
--- a/common/hw-gfx-gma-config_helpers.adb
+++ b/common/hw-gfx-gma-config_helpers.adb
@@ -32,13 +32,14 @@
         (case Config.Gen is
             when G45 =>                -- everything on GMCH
                (case Port is
-                   when Internal     => LVDS,
+                   when LVDS         => LVDS,
+                   when eDP          => DIGI_A, -- n/a, actually
                    when HDMI1 | DP1  => DIGI_B,
                    when HDMI2 | DP2  => DIGI_C,
                    when HDMI3 | DP3  => DIGI_D,
                    when Analog       => VGA),
             when Ironlake =>           -- everything but eDP through FDI/PCH
-              (if Config.Internal_Is_EDP and then Port = Internal then
+              (if Port = eDP then
                   DIGI_A
                else
                  (case Pipe is   -- FDIs are fixed to the CPU pipe
@@ -47,7 +48,8 @@
                      when Tertiary  => DIGI_D)),
             when others =>             -- everything but VGA directly on CPU
               (case Port is
-                  when Internal     => DIGI_A,  -- LVDS not available
+                  when LVDS         => LVDS,    -- n/a, actually
+                  when eDP          => DIGI_A,
                   when HDMI1 | DP1  => DIGI_B,
                   when HDMI2 | DP2  => DIGI_C,
                   when HDMI3 | DP3  => DIGI_D,
@@ -59,7 +61,8 @@
    begin
       return
         (case Port is
-            when Internal  => PCH_LVDS,   -- will be ignored if Internal is DP
+            when LVDS      => PCH_LVDS,
+            when eDP       => PCH_LVDS,   -- n/a, actually
             when Analog    => PCH_DAC,
             when HDMI1     => PCH_HDMI_B,
             when HDMI2     => PCH_HDMI_C,
@@ -74,7 +77,8 @@
    begin
       return Display_Type'
         (case Port is
-            when Internal        => Config.Internal_Display,
+            when LVDS            => LVDS,
+            when eDP             => DP,
             when Analog          => VGA,
             when HDMI1 .. HDMI3  => HDMI,
             when DP1 .. DP3      => DP);