gma: Introduce Pipe_Config.Scaler_Available()

G45 provides only a single panel fitter. Therefore, we can only enable
a single pipe that requires scaling. Scaler_Available() tells us if a
panel fitter is available for a given pipe. We use the result to filter
invalid configurations early.

Change-Id: Ie05bfb58318e79edc8ab81598458e620ffdcb2ab
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26768
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma-config_helpers.adb b/common/hw-gfx-gma-config_helpers.adb
index 128b52b..b7f4833 100644
--- a/common/hw-gfx-gma-config_helpers.adb
+++ b/common/hw-gfx-gma-config_helpers.adb
@@ -188,9 +188,10 @@
    -- Validates that a given configuration should work with
    -- a given framebuffer.
    function Validate_Config
-     (FB    : Framebuffer_Type;
-      Mode  : Mode_Type;
-      Pipe  : Pipe_Index)
+     (FB                : Framebuffer_Type;
+      Mode              : Mode_Type;
+      Pipe              : Pipe_Index;
+      Scaler_Available  : Boolean)
       return Boolean
    is
    begin
@@ -206,7 +207,8 @@
       return
          ((Rotated_Width (FB) = Mode.H_Visible and
            Rotated_Height (FB) = Mode.V_Visible) or
-          (Rotated_Width (FB) <= Config.Maximum_Scalable_Width (Pipe) and
+          (Scaler_Available and
+           Rotated_Width (FB) <= Config.Maximum_Scalable_Width (Pipe) and
            Rotated_Width (FB) <= Mode.H_Visible and
            Rotated_Height (FB) <= Mode.V_Visible)) and
          (FB.Offset /= VGA_PLANE_FRAMEBUFFER_OFFSET or Pipe = Primary) and