gma: Avoid dynamic stack usage in status dumping procedures
`Dump_Configs ()` is not only used for debugging, we can avoid the
dynamic stack usage by getting rid of the concatenation operation.
While we are at it, also take care of `Dump_Link_Status ()`.
Change-Id: Icc07566977fac43d7403784ea6454c3cd668b683
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/534
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 33f8ef6..3ad37e6 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -1070,9 +1070,11 @@
else
Debug.Put (" ");
end if;
- Debug.Put_Line (Pipe_Names (Pipe) & " =>");
- Debug.Put_Line
- (" (Port => " & Port_Names (Configs (Pipe).Port) & ",");
+ Debug.Put (Pipe_Names (Pipe));
+ Debug.Put_Line (" =>");
+ Debug.Put (" (Port => ");
+ Debug.Put (Port_Names (Configs (Pipe).Port));
+ Debug.Put_Line (",");
Debug.Put_Line (" Framebuffer =>");
Debug.Put (" (Width => ");
Debug.Put_Int32 (Configs (Pipe).Framebuffer.Width);
@@ -1093,9 +1095,11 @@
Debug.Put_Int32 (Configs (Pipe).Framebuffer.V_Stride);
Debug.Put_Line (",");
Debug.Put (" Tiling => ");
- Debug.Put_Line (Tilings (Configs (Pipe).Framebuffer.Tiling) & ",");
+ Debug.Put (Tilings (Configs (Pipe).Framebuffer.Tiling));
+ Debug.Put_Line (",");
Debug.Put (" Rotation => ");
- Debug.Put_Line (Rotations (Configs (Pipe).Framebuffer.Rotation) & ",");
+ Debug.Put (Rotations (Configs (Pipe).Framebuffer.Rotation));
+ Debug.Put_Line (",");
Debug.Put (" Offset => ");
Debug.Put_Word32 (Configs (Pipe).Framebuffer.Offset);
Debug.Put_Line (",");
@@ -1130,14 +1134,18 @@
Debug.Put (" V_Total => ");
Debug.Put_Int32 (Configs (Pipe).Mode.V_Total);
Debug.Put_Line (",");
- Debug.Put_Line (" H_Sync_Active_High => " &
- (if Configs (Pipe).Mode.H_Sync_Active_High
- then "True,"
- else "False,"));
- Debug.Put_Line (" V_Sync_Active_High => " &
- (if Configs (Pipe).Mode.V_Sync_Active_High
- then "True,"
- else "False,"));
+ Debug.Put (" H_Sync_Active_High => ");
+ if Configs (Pipe).Mode.H_Sync_Active_High then
+ Debug.Put_Line ("True,");
+ else
+ Debug.Put_Line ( "False,");
+ end if;
+ Debug.Put (" V_Sync_Active_High => ");
+ if Configs (Pipe).Mode.V_Sync_Active_High then
+ Debug.Put_Line ("True,");
+ else
+ Debug.Put_Line ("False,");
+ end if;
Debug.Put (" BPC => ");
Debug.Put_Int64 (Configs (Pipe).Mode.BPC);
if Pipe /= Pipe_Index'Last then