gma: Begin Tiger Lake (TGL) integration
Tiger Lake's integrated graphics engine is built off an entirely new
igfx architecture named "Iris Xe". This patch adds just enough support
to compile for Tiger Lake. Fortunately, the backlight programming
hasn't changed since SKL, so with a little bit of hacking, one can
also have libgfxinit turn on the backlight to verify something is
working and running.
The first pass through the support will focus mostly on the eDP panel,
then Type-C ports (both in fixed/native mode [DP/HDMI] and in Type-C
DP Alt Mode). TBT will not be mostly ignored in this first pass, as
it is not as widely used (yet?) as the other protocols.
This patch includes changes to fix ironlake gnatprove errors caused by
the new PCH_HDMI_A port definition.
Tested on google/voxel, with DEBUG_ADA_CODE enabled.
Tested on google/skolas, with DEBUG_ADA_CODE enabled.
This patch leaves the following unresolved gnatprove errors:
- hw-gfx-gma-port_detect.ads:17:14:
warning: subprogram "Initialize" has no effect
- hw-gfx-gma-port_detect.ads:20:07:
warning: unused variable "Port"
- hw-gfx-gma-port_detect.ads:23:14:
warning: subprogram "Clear_Hotplug_Detect" has no effect
- hw-gfx-gma-connectors.ads:39:14:
warning: subprogram "Post_Off" has no effect
- hw-gfx-gma-connectors.ads:42:14:
warning: subprogram "Post_All_Off" has no effect
These errors will by addressed by the proper implementation of these
procedures.
Change-Id: I84f15837856ecc5ec8df18b39d3989885cd550d4
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/70887
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/ironlake/hw-gfx-gma-port_detect.adb b/common/ironlake/hw-gfx-gma-port_detect.adb
index 7efadeb..599c2cd 100644
--- a/common/ironlake/hw-gfx-gma-port_detect.adb
+++ b/common/ironlake/hw-gfx-gma-port_detect.adb
@@ -15,6 +15,7 @@
with HW.GFX.GMA.Config;
with HW.GFX.GMA.Registers;
with HW.GFX.GMA.Config_Helpers;
+with HW.GFX.GMA.PCH.HDMI;
package body HW.GFX.GMA.Port_Detect
is
@@ -25,7 +26,7 @@
SHOTPLUG_CTL_DETECT_MASK : constant := 16#0003_0303#;
- type PCH_Digital_Port_Value is array (PCH_HDMI_Port) of Word32;
+ type PCH_Digital_Port_Value is array (PCH.HDMI.IRL_PCH_HDMI_Port) of Word32;
SHOTPLUG_CTL_HPD_INPUT_ENABLE : constant PCH_Digital_Port_Value :=
(PCH_HDMI_B => 1 * 2 ** 4,
PCH_HDMI_C => 1 * 2 ** 12,
@@ -43,7 +44,7 @@
PCH_HDMI_C => 1 * 2 ** 9,
PCH_HDMI_D => 1 * 2 ** 17);
- type PCH_Digital_Regs is array (PCH_HDMI_Port) of Registers.Registers_Index;
+ type PCH_Digital_Regs is array (PCH.HDMI.IRL_PCH_HDMI_Port) of Registers.Registers_Index;
PCH_HDMI : constant PCH_Digital_Regs :=
(PCH_HDMI_B => Registers.PCH_HDMIB,
PCH_HDMI_C => Registers.PCH_HDMIC,
@@ -60,7 +61,7 @@
HDMI_Detected,
DP_Detected : Boolean;
- type PCH_Port_To_GMA_Port is array (PCH_HDMI_Port) of Port_Type;
+ type PCH_Port_To_GMA_Port is array (PCH.HDMI.IRL_PCH_HDMI_Port) of Port_Type;
To_Digital_Port : constant PCH_Port_To_GMA_Port :=
(PCH_HDMI_B => HDMI1,
PCH_HDMI_C => HDMI2,
@@ -87,7 +88,7 @@
Config.Valid_Port (eDP) := eDP_Detected;
-- PCH_HDMI_[BCD], PCH_DP_[BCD] share hotplug registers
- for PCH_Port in PCH_HDMI_Port loop
+ for PCH_Port in PCH.HDMI.IRL_PCH_HDMI_Port loop
Registers.Is_Set_Mask
(Register => PCH_HDMI (PCH_Port),
Mask => PCH_DIGI_PORT_DETECTED,