dp_info: Refactor debug output for DP settings
Shuffle things around to let the caller decide when to output the
settings. This removes spurious "DP" outputs for FDI configuration
which reuses the DP_Info infrastructure.
Change-Id: I9e6d6946002ef758b6c31f7de797dc6d329cae74
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18116
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
diff --git a/common/hw-gfx-dp_info.adb b/common/hw-gfx-dp_info.adb
index 0427f48..7ac4556 100644
--- a/common/hw-gfx-dp_info.adb
+++ b/common/hw-gfx-dp_info.adb
@@ -1,5 +1,5 @@
--
--- Copyright (C) 2015-2016 secunet Security Networks AG
+-- Copyright (C) 2015-2017 secunet Security Networks AG
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
@@ -138,15 +138,6 @@
Success := Success and
Link.Lane_Count <= Link.Receiver_Caps.Max_Lane_Count;
- pragma Debug (Success, Debug.Put ("Trying DP settings: Symbol Rate = "));
- pragma Debug (Success, Debug.Put_Int32
- (Int32 (DP_Symbol_Rate (Link.Bandwidth))));
- pragma Debug (Success, Debug.Put ("; Lane Count = "));
- pragma Debug (Success, Debug.Put_Int32
- (Int32 (Lane_Count_As_Integer (Link.Lane_Count))));
- pragma Debug (Success, Debug.New_Line);
- pragma Debug (Success, Debug.New_Line);
-
pragma Debug (not Success, Debug.Put_Line
("Mode requirements exceed available bandwidth!"));
end Preferred_Link_Setting;
@@ -167,17 +158,19 @@
else
Success := False;
end if;
-
- pragma Debug (Success, Debug.Put ("Trying DP settings: Symbol Rate = "));
- pragma Debug (Success, Debug.Put_Int32
- (Int32 (DP_Symbol_Rate (Link.Bandwidth))));
- pragma Debug (Success, Debug.Put ("; Lane Count = "));
- pragma Debug (Success, Debug.Put_Int32
- (Int32 (Lane_Count_As_Integer (Link.Lane_Count))));
- pragma Debug (Success, Debug.New_Line);
- pragma Debug (Success, Debug.New_Line);
end Next_Link_Setting;
+ procedure Dump_Link_Setting (Link : DP_Link)
+ is
+ begin
+ Debug.Put ("Trying DP settings: Symbol Rate = ");
+ Debug.Put_Int32 (Int32 (DP_Symbol_Rate (Link.Bandwidth)));
+ Debug.Put ("; Lane Count = ");
+ Debug.Put_Int32 (Int32 (Lane_Count_As_Integer (Link.Lane_Count)));
+ Debug.New_Line;
+ Debug.New_Line;
+ end Dump_Link_Setting;
+
----------------------------------------------------------------------------
procedure Calculate_M_N