gma: Add GPU_Port types that are convenient for GMCH to use
Change-Id: I9120d084637d36a7e2276fcf3f630b3f7ed32509
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25407
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/haswell_shared/hw-gfx-gma-connectors.adb b/common/haswell_shared/hw-gfx-gma-connectors.adb
index 0d0ed71..2b29f99 100644
--- a/common/haswell_shared/hw-gfx-gma-connectors.adb
+++ b/common/haswell_shared/hw-gfx-gma-connectors.adb
@@ -41,8 +41,11 @@
is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
-
- DDI.Pre_On (Port_Cfg, PLL_Hint, Success);
+ if Port_Cfg.Port in Digital_Port then
+ DDI.Pre_On (Port_Cfg, PLL_Hint, Success);
+ else
+ Success := False; -- Should not happen
+ end if;
end Pre_On;
procedure Post_On
@@ -53,13 +56,16 @@
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
- DDI.Post_On (Port_Cfg);
+ if Port_Cfg.Port in Digital_Port then
+ DDI.Post_On (Port_Cfg);
- if Port_Cfg.Port = DIGI_A then
- Panel.Backlight_On;
+ if Port_Cfg.Port = DIGI_A then
+ Panel.Backlight_On;
+ end if;
+ Success := True;
+ else
+ Success := False; -- Should not happen
end if;
-
- Success := True;
end Post_On;
----------------------------------------------------------------------------
@@ -79,8 +85,9 @@
is
begin
pragma Debug (Debug.Put_Line (GNAT.Source_Info.Enclosing_Entity));
-
- DDI.Off (Port_Cfg.Port);
+ if Port_Cfg.Port in Digital_Port then
+ DDI.Off (Port_Cfg.Port);
+ end if;
end Post_Off;
----------------------------------------------------------------------------