gma registers: Add procedures to set fence registers
Through fence registers, we can tell the hardware which parts of the
aperture cover tiled framebuffers. Only legacy X and Y tiling is sup-
ported. According to `i915_reg.h` there are 16 fence registers from
G4x on and 32 from Ivy Bridge on (this only partially matches docu-
mentation: Haswell has 16 regs documented and the fence registers
were not documented at all before).
Change-Id: I02edc99b315e24dc175c6f93aff627e59cb1ff0b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/22708
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index 4ef37ef..339b429 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -286,6 +286,14 @@
when Ironlake .. Haswell => 4,
when Broadwell .. Skylake => 8);
+ Fence_Base : constant := (case CPU is
+ when Ironlake => 16#0000_3000#,
+ when Sandybridge .. Skylake => 16#0010_0000#);
+
+ Fence_Count : constant := (case CPU is
+ when Ironlake .. Sandybridge => 16,
+ when Ivybridge .. Skylake => 32);
+
----------------------------------------------------------------------------
use type HW.Word16;