Add Tiling setting to Framebuffer
Beside linear framebuffers, we can, on Intel hardware, easily support X
and Y tiled framebuffers too. If we access the framebuffer through the
aperture window, we can let the hardware handle the tiling.
Tiling generally divides the framebuffer into rectangular pieces of
fixed size where each piece, or tile, is represented by one page of
memory. Even inside one tile, the pixels are not always ordered linearly
but either in a row-major (aka. X tiled) or column-major (aka. Y tiled)
manner.
Change-Id: I3e6f93caa8f2485a5792d72cfe2e8b3902add7a3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22707
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/gfxtest/hw-gfx-gma-gfx_test.adb b/gfxtest/hw-gfx-gma-gfx_test.adb
index d870401..ef6c91d 100644
--- a/gfxtest/hw-gfx-gma-gfx_test.adb
+++ b/gfxtest/hw-gfx-gma-gfx_test.adb
@@ -157,6 +157,7 @@
Height => Height_Type (Mode.V_Visible),
BPC => 8,
Stride => Width_Type ((Word32 (Mode.H_Visible) + 15) and not 15),
+ Tiling => Linear,
Offset => Offset);
Offset := Offset + Word32 (FB.Stride * FB.Height * 4);
end Calc_Framebuffer;