gma: Reverse meaning of GTT_Rotation_Offset

We used to add the second mapping for a 90 degree rotated frame-
buffer at `FB.Offset + GTT_Rotation_Offset` and patched the offset
when configuring the pipe. Instead, we expect the final offset in
`FB.Offset` (which should include `GTT_Rotation_Offset` when using
the default framebuffer setup.

Change-Id: I321a3db3af4b21eefbfc1bf0c2a7005feaf83c7a
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22864
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma.ads b/common/hw-gfx-gma.ads
index fadf437..77def8e 100644
--- a/common/hw-gfx-gma.ads
+++ b/common/hw-gfx-gma.ads
@@ -102,6 +102,15 @@
       Device_Address : GTT_Address_Type;
       Valid          : Boolean);
 
+   -- For the default framebuffer setup (see below) with 90 degree rotations,
+   -- we expect the offset which is used for the final scanout to be above
+   -- `GTT_Rotation_Offset`. So we can use `Offset - GTT_Rotation_Offset` for
+   -- the physical memory location and aperture mapping.
+   function Phys_Offset (FB : Framebuffer_Type) return Word32 is
+     (if Rotation_90 (FB)
+      then FB.Offset - Word32 (GTT_Rotation_Offset) * GTT_Page_Size
+      else FB.Offset);
+
    procedure Setup_Default_FB
      (FB       : in     Framebuffer_Type;
       Clear    : in     Boolean := True;