Add Rotation setting to Framebuffer

Add a Rotation setting to the Framebuffer type that tells us if the
framebuffer is rotated by 90, 180 or 270 degrees. The hardware should
rotate the picture in the opposite direction before display.

To support more complex memory layouts, we also add a V_Stride (ver-
tical stride) setting.

Change-Id: I6430fb44b5c9cfcf9fa58684a425e8c2e4647ac3
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/22710
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 ef6c91d..9a5ce0a 100644
--- a/gfxtest/hw-gfx-gma-gfx_test.adb
+++ b/gfxtest/hw-gfx-gma-gfx_test.adb
@@ -157,9 +157,11 @@
          Height   => Height_Type (Mode.V_Visible),
          BPC      => 8,
          Stride   => Width_Type ((Word32 (Mode.H_Visible) + 15) and not 15),
+         V_Stride => Height_Type (Mode.V_Visible),
          Tiling   => Linear,
+         Rotation => No_Rotation,
          Offset   => Offset);
-      Offset := Offset + Word32 (FB.Stride * FB.Height * 4);
+      Offset := Offset + Word32 (FB_Size (FB));
    end Calc_Framebuffer;
 
    Pipes : GMA.Pipe_Configs;