From aa91bb52025338ced775360130b77b8b312e0516 Mon Sep 17 00:00:00 2001 From: Nico Huber Date: Mon, 7 Nov 2016 12:51:20 +0100 Subject: [PATCH] gma: Add parameter to Scan_Ports to limit number of pipes In some configurations (e.g. textmode) we know that we'll only enable a limited number of pipes. So let's skip additional port probing in Scan_Ports() that would only waste time otherwise. Change-Id: I496e84cfe8bb170a6b500f64461db4c837c439fd Signed-off-by: Nico Huber Reviewed-on: https://review.coreboot.org/17278 Tested-by: Nico Huber Reviewed-by: Stefan Reinauer --- common/hw-gfx-gma.adb | 5 +++-- common/hw-gfx-gma.ads | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb index d156494119..b64cc91399 100644 --- a/common/hw-gfx-gma.adb +++ b/common/hw-gfx-gma.adb @@ -344,7 +344,8 @@ is procedure Scan_Ports (Configs : out Configs_Type; - Ports : in Port_List) + Ports : in Port_List; + Max_Pipe : in Config_Index := Config_Index'Last) is Raw_EDID : EDID.Raw_EDID_Data := (others => 16#00#); Port_Idx : Port_List_Range := Port_List_Range'First; @@ -356,7 +357,7 @@ is Mode => Invalid_Mode, Framebuffer => Default_FB)); - for Config_Idx in Config_Index loop + for Config_Idx in Config_Index range Config_Index'First .. Max_Pipe loop while Ports (Port_Idx) /= Disabled loop if not Port_Configured (Configs, Ports (Port_Idx)) then Configs (Config_Idx).Port := Ports (Port_Idx); diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads index ed240ca642..8967ee86b0 100644 --- a/common/hw-gfx-gma.ads +++ b/common/hw-gfx-gma.ads @@ -80,7 +80,8 @@ is procedure Scan_Ports (Configs : out Configs_Type; - Ports : in Port_List); + Ports : in Port_List; + Max_Pipe : in Config_Index := Config_Index'Last); procedure Auto_Configure (Configs : in out Configs_Type; Keep_Power : in Boolean := False);