gfx, gma: Move inline functions into private package parts
Change-Id: I3adb9776e87953997a0cd430f366956dfcb2b6f0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26764
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads
index 7403a86..1464b97 100644
--- a/common/hw-gfx.ads
+++ b/common/hw-gfx.ads
@@ -51,19 +51,6 @@
Offset : Word32;
end record;
- function Rotation_90 (FB : Framebuffer_Type) return Boolean is
- (FB.Rotation = Rotated_90 or FB.Rotation = Rotated_270);
-
- function Rotated_Width (FB : Framebuffer_Type) return Pos16 is
- (if Rotation_90 (FB) then Pos16 (FB.Height) else Pos16 (FB.Width));
- function Rotated_Height (FB : Framebuffer_Type) return Pos16 is
- (if Rotation_90 (FB) then Pos16 (FB.Width) else Pos16 (FB.Height));
-
- function Pixel_To_Bytes (Pixel : Pixel_Type; FB : Framebuffer_Type)
- return Int32 is (Pixel * Pos32 (FB.BPC) / (8 / 4));
- function FB_Size (FB : Framebuffer_Type) return Pos32 is
- (Pixel_To_Bytes (FB.Stride * FB.V_Stride, FB));
-
Default_FB : constant Framebuffer_Type := Framebuffer_Type'
(Width => 1,
Height => 1,
@@ -190,4 +177,19 @@
Invalid_Mode : constant Mode_Type := Mode_Type'
(Frequency_Type'First, 1, 1, 1, 1, 1, 1, 1, 1, False, False, Auto_BPC);
+private
+
+ function Rotation_90 (FB : Framebuffer_Type) return Boolean is
+ (FB.Rotation = Rotated_90 or FB.Rotation = Rotated_270);
+
+ function Rotated_Width (FB : Framebuffer_Type) return Pos16 is
+ (if Rotation_90 (FB) then Pos16 (FB.Height) else Pos16 (FB.Width));
+ function Rotated_Height (FB : Framebuffer_Type) return Pos16 is
+ (if Rotation_90 (FB) then Pos16 (FB.Width) else Pos16 (FB.Height));
+
+ function Pixel_To_Bytes (Pixel : Pixel_Type; FB : Framebuffer_Type)
+ return Int32 is (Pixel * Pos32 (FB.BPC) / (8 / 4));
+ function FB_Size (FB : Framebuffer_Type) return Pos32 is
+ (Pixel_To_Bytes (FB.Stride * FB.V_Stride, FB));
+
end HW.GFX;