gfx, gma: Move Requires_Scaling() up into GFX
Change-Id: Ie6f855b128ad6d195e5c0a6fb16a6b9a64422b7b
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26765
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index dffb81a..e800f7c 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -161,10 +161,6 @@
Cur_Configs : Pipe_Configs with Part_Of => State;
- function Requires_Scaling (FB : Framebuffer_Type; Mode : Mode_Type)
- return Boolean is
- (Rotated_Width (FB) /= Mode.H_Visible or
- Rotated_Height (FB) /= Mode.V_Visible);
function Requires_Scaling (Pipe_Cfg : Pipe_Config) return Boolean is
(Requires_Scaling (Pipe_Cfg.Framebuffer, Pipe_Cfg.Mode));
diff --git a/common/hw-gfx.ads b/common/hw-gfx.ads
index 1464b97..71182da 100644
--- a/common/hw-gfx.ads
+++ b/common/hw-gfx.ads
@@ -192,4 +192,9 @@
function FB_Size (FB : Framebuffer_Type) return Pos32 is
(Pixel_To_Bytes (FB.Stride * FB.V_Stride, FB));
+ function Requires_Scaling (FB : Framebuffer_Type; Mode : Mode_Type)
+ return Boolean is
+ (Rotated_Width (FB) /= Mode.H_Visible or
+ Rotated_Height (FB) /= Mode.V_Visible);
+
end HW.GFX;