gma: Export backlight control interface
Change-Id: I5a157d7849124fd3b4cca8f9de1d605092fd3c5e
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/43668
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index d1ae1a0..851686e 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -402,6 +402,40 @@
----------------------------------------------------------------------------
+ procedure Backlight_On (Port : Active_Port_Type)
+ with
+ Refined_Global => (In_Out => Registers.Register_State)
+ is
+ begin
+ Panel.Backlight_On (Config_Helpers.To_Panel (Port));
+ end Backlight_On;
+
+ procedure Backlight_Off (Port : Active_Port_Type)
+ with
+ Refined_Global => (In_Out => Registers.Register_State)
+ is
+ begin
+ Panel.Backlight_Off (Config_Helpers.To_Panel (Port));
+ end Backlight_Off;
+
+ procedure Set_Brightness (Port : Active_Port_Type; Level : Word32)
+ with
+ Refined_Global => (In_Out => Registers.Register_State)
+ is
+ begin
+ Panel.Set_Backlight (Config_Helpers.To_Panel (Port), Level);
+ end Set_Brightness;
+
+ procedure Get_Max_Brightness (Port : Active_Port_Type; Level : out Word32)
+ with
+ Refined_Global => (In_Out => Registers.Register_State)
+ is
+ begin
+ Panel.Get_Max_Backlight (Config_Helpers.To_Panel (Port), Level);
+ end Get_Max_Brightness;
+
+ ----------------------------------------------------------------------------
+
procedure Initialize
(Write_Delay : in Word64 := 0;
Clean_State : in Boolean := False;