gma config_helpers: Pass only the modeline to Validate_Config()
Validate_Config() had the full `Port_Config` as parameter, though we
only accessed the modeline. Make that explicit so we can also call it
when we don't have the full config available.
Change-Id: Ia4620d1ffa1a3cd098d721d84f2453f2dc19da2a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/23163
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma-config_helpers.ads b/common/hw-gfx-gma-config_helpers.ads
index 1dc2390..4853634 100644
--- a/common/hw-gfx-gma-config_helpers.ads
+++ b/common/hw-gfx-gma-config_helpers.ads
@@ -40,15 +40,15 @@
use type HW.Pos32;
pragma Warnings (GNAT, On, """Integer_32"" is already use-visible *");
function Validate_Config
- (FB : Framebuffer_Type;
- Port_Cfg : Port_Config;
- Pipe : Pipe_Index)
+ (FB : Framebuffer_Type;
+ Mode : Mode_Type;
+ Pipe : Pipe_Index)
return Boolean
with
Post =>
(if Validate_Config'Result then
- Rotated_Width (FB) <= Port_Cfg.Mode.H_Visible and
- Rotated_Height (FB) <= Port_Cfg.Mode.V_Visible and
+ Rotated_Width (FB) <= Mode.H_Visible and
+ Rotated_Height (FB) <= Mode.V_Visible and
(FB.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET or
FB.Height + FB.Start_Y <= FB.V_Stride));