Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/libgfxinit/+/48825 )
Change subject: gma: Always add rotated FB page mapping on y-tiling ......................................................................
gma: Always add rotated FB page mapping on y-tiling
Y-tiling is usually only used to allow rotated framebuffers. If one display is rotated but others aren't, we need a GTT mapping for each case. To help with that, always map it both ways if y-tiling is used.
Change-Id: I934a36ba620d99108c7259fcaae13f92abf8cd64 Signed-off-by: Nico Huber nico.huber@secunet.com --- M common/hw-gfx-gma.adb 1 file changed, 6 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/25/48825/1
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb index 1c1ff6e..e2461a7 100644 --- a/common/hw-gfx-gma.adb +++ b/common/hw-gfx-gma.adb @@ -652,10 +652,11 @@ (Valid_Stride (FB) and FB_First_Page (FB) in GTT_Range and FB_Last_Page (FB) + 256 in GTT_Range and - (not Rotation_90 (FB) or + (FB.Tiling /= Y_Tiled or (FB_First_Page (FB) mod 64 = 0 and - FB_Last_Page (FB) + 256 + GTT_Rotation_Offset in GTT_Range and - FB.Offset >= Word32 (GTT_Rotation_Offset) * GTT_Page_Size))); + FB_Last_Page (FB) + 256 + GTT_Rotation_Offset in GTT_Range)) and + (not Rotation_90 (FB) or + FB.Offset >= Word32 (GTT_Rotation_Offset) * GTT_Page_Size));
-- Also check that we don't overflow the GTT's 39-bit space -- (always true with a 32-bit base) @@ -708,7 +709,7 @@ Registers.Write_GTT (Idx, Phys_Addr, True); end loop;
- if Rotation_90 (FB) and FB.Tiling = Y_Tiled and FB.V_Stride >= 32 then + if FB.Tiling = Y_Tiled and FB.V_Stride >= 32 then declare V_Pages : constant Natural := Natural (FB.V_Stride) / 32; Bytes_Per_Row : constant GTT_Address_Type := @@ -819,7 +820,7 @@ Post => (if Valid then Valid_FB (FB)) is GTT_Off : constant Natural := - (if Rotation_90 (FB) then GTT_Rotation_Offset else 0); + (if FB.Tiling = Y_Tiled then GTT_Rotation_Offset else 0);
GTT_Size, Aperture_Size : Natural; Stolen_Size : Stolen_Size_Range;