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.adb b/common/hw-gfx-gma.adb
index 7c336a2..2bc6554 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -565,6 +565,8 @@
(others => Pipe_Config'
(Port => Disabled,
Framebuffer => HW.GFX.Default_FB,
+ Alignment => Alignment'First,
+ Scaling => Scaling'First,
Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
Config.Variable := Config.Initial_Settings;
@@ -683,11 +685,15 @@
(Primary =>
(Port => Analog,
Framebuffer => HW.GFX.Default_FB,
+ Alignment => Center,
+ Scaling => Fit,
Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode),
others =>
(Port => Disabled,
Framebuffer => HW.GFX.Default_FB,
+ Alignment => Alignment'First,
+ Scaling => Scaling'First,
Cursor => Default_Cursor,
Mode => HW.GFX.Invalid_Mode));
begin