gma: Add `Alignment` and `Scaling` to `Pipe_Config`

Allow to configure where a smaller framebuffer is placed in a bigger
scanout picture, and if and how it should be scaled.  These settings
are ignored for now.

These settings are somewhat similar to `Rotation`,  as they describe
how the framebuffer will be processed.  The program drawing into the
framebuffer, however, doesn't have to know about the final placement
of the picture. Hence we'll put these new settings directly into the
`Pipe_Config` and not into `Framebuffer`.

Change-Id: I88a46f83f8d2d80e16373e6639a637b664488f22
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/517
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Thomas Heijligen <src@posteo.de>
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index 69cc41b..76424d6 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -96,6 +96,15 @@
    subtype Physical_HDMI_Ports is Port_Type range HDMI1 .. HDMI_TC4;
    subtype Physical_USBC_Ports is Port_Type range USBC1 .. USBC4;
 
+   type Alignment is
+     (Top_Left, Top, Top_Right,
+      Left, Center, Right,
+      Bottom_Left, Bottom, Bottom_Right);
+   type Scaling is
+     (None,       -- Copy framebuffer contents 1:1
+      Fit,        -- Scale up to fit the available space, maintaining aspect ratio
+      Stretch);   -- Scale up to fill the entire space, ignoring aspect ratio
+
    type Cursor_Mode is (No_Cursor, ARGB_Cursor);
    type Cursor_Size is (Cursor_64x64, Cursor_128x128, Cursor_256x256);
    Cursor_Width : constant array (Cursor_Size) of Width_Type := (64, 128, 256);
@@ -119,6 +128,8 @@
    type Pipe_Config is record
       Port        : Port_Type;
       Framebuffer : Framebuffer_Type;
+      Alignment   : GMA.Alignment;
+      Scaling     : GMA.Scaling;
       Cursor      : Cursor_Type;
       Mode        : Mode_Type;
    end record;