diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb index 4420a660b0..97792cf800 100644 --- a/common/hw-gfx-gma-display_probing.adb +++ b/common/hw-gfx-gma-display_probing.adb @@ -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 diff --git a/common/hw-gfx-gma-display_probing.ads b/common/hw-gfx-gma-display_probing.ads index 3d1e9147ad..f5cd839bd1 100644 --- a/common/hw-gfx-gma-display_probing.ads +++ b/common/hw-gfx-gma-display_probing.ads @@ -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;