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>
This commit is contained in:
Nico Huber 2020-07-21 12:17:19 +02:00 committed by Nico Huber
parent 994971af45
commit bc0588e482
2 changed files with 52 additions and 0 deletions

View File

@ -402,6 +402,40 @@ is
----------------------------------------------------------------------------
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;

View File

@ -169,6 +169,24 @@ is
----------------------------------------------------------------------------
procedure Backlight_On (Port : Active_Port_Type)
with
Global => (In_Out => Device_State);
procedure Backlight_Off (Port : Active_Port_Type)
with
Global => (In_Out => Device_State);
procedure Set_Brightness (Port : Active_Port_Type; Level : Word32)
with
Global => (In_Out => Device_State);
procedure Get_Max_Brightness (Port : Active_Port_Type; Level : out Word32)
with
Global => (In_Out => Device_State);
----------------------------------------------------------------------------
procedure Write_GTT
(GTT_Page : GTT_Range;
Device_Address : GTT_Address_Type;