gma: Validate maximum scalable width

Change-Id: Iba8199a2451e1976ac8aa0f8632d0846fc0caeb4
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17261
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index 1ba66a2..7a83e77 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -228,4 +228,22 @@
                                  24_000_000),
          when Skylake      => 24_000_000);
 
+   ----------------------------------------------------------------------------
+
+   -- Maximum source width with enabled scaler. This only accounts
+   -- for simple 1:1 pipe:scaler mappings.
+
+   type Width_Per_Pipe is array (Config_Index) of Width_Type;
+
+   Maximum_Scalable_Width : constant Width_Per_Pipe :=
+     (case CPU is
+         when Ironlake..Haswell =>
+           (Primary     => 4096,
+            Secondary   => 2048,
+            Tertiary    => 2048),
+         when Broadwell..Skylake =>
+           (Primary     => 4096,
+            Secondary   => 4096,
+            Tertiary    => 4096));
+
 end HW.GFX.GMA.Config;