mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 00:26:30 +00:00
gma: Add option to keep port power after Scan_Ports()
This is useful when we only want to probe for connected displays while another entity currently controls the outputs. Also introduce an `All_Ports` list, that can be used when it's unknown which ports are actually implemented (the default now, when no port list is provided to `Scan_Ports()`). Change-Id: I5d8e289a907fe99c673084afbce54da65ba98e9c Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/18123 Tested-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
@@ -166,9 +166,10 @@ is
|
||||
end Probe_Port;
|
||||
|
||||
procedure Scan_Ports
|
||||
(Configs : out Pipe_Configs;
|
||||
Ports : in Port_List;
|
||||
Max_Pipe : in Pipe_Index := Pipe_Index'Last)
|
||||
(Configs : out Pipe_Configs;
|
||||
Ports : in Port_List := All_Ports;
|
||||
Max_Pipe : in Pipe_Index := Pipe_Index'Last;
|
||||
Keep_Power : in Boolean := False)
|
||||
is
|
||||
Probe_Internal : Boolean := False;
|
||||
|
||||
@@ -211,7 +212,9 @@ is
|
||||
end loop;
|
||||
|
||||
-- Restore power settings
|
||||
Power_And_Clocks.Power_Set_To (Cur_Configs);
|
||||
if not Keep_Power then
|
||||
Power_And_Clocks.Power_Set_To (Cur_Configs);
|
||||
end if;
|
||||
|
||||
-- Turn panel power off if probing failed.
|
||||
if Probe_Internal and not Port_Configured (Configs, Internal) then
|
||||
|
||||
@@ -17,10 +17,13 @@ is
|
||||
|
||||
type Port_List_Range is range 0 .. 7;
|
||||
type Port_List is array (Port_List_Range) of Port_Type;
|
||||
All_Ports : constant Port_List :=
|
||||
(DP1, DP2, DP3, HDMI1, HDMI2, HDMI3, Analog, Internal);
|
||||
|
||||
procedure Scan_Ports
|
||||
(Configs : out Pipe_Configs;
|
||||
Ports : in Port_List;
|
||||
Max_Pipe : in Pipe_Index := Pipe_Index'Last);
|
||||
(Configs : out Pipe_Configs;
|
||||
Ports : in Port_List := All_Ports;
|
||||
Max_Pipe : in Pipe_Index := Pipe_Index'Last;
|
||||
Keep_Power : in Boolean := False);
|
||||
|
||||
end HW.GFX.GMA.Display_Probing;
|
||||
|
||||
Reference in New Issue
Block a user