gma pipe_setup: Replace Update_Offset() with Setup_FB()
Beside updates to the framebuffer offset in memory, Setup_FB() allows
changes to size, position, tiling and rotation, too. Basically every-
thing but changes to BPC (which would need an update in the transcoder
configuration on pre-Broadwell hardware, too).
It is not clear if the updates work fully synchronous on all hardware
generations. Though, tests on APL have shown a glitch free transition
so far.
Change-Id: I3c8352315390d9c4d2fb2a7e09355b5fe4089421
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/23165
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/common/hw-gfx-gma-pipe_setup.ads b/common/hw-gfx-gma-pipe_setup.ads
index 3ef5dcf..33d543e 100644
--- a/common/hw-gfx-gma-pipe_setup.ads
+++ b/common/hw-gfx-gma-pipe_setup.ads
@@ -36,7 +36,16 @@
procedure All_Off;
- procedure Update_Offset (Pipe : Pipe_Index; Framebuffer : Framebuffer_Type);
+ procedure Setup_FB
+ (Pipe : Pipe_Index;
+ Mode : Mode_Type;
+ Framebuffer : Framebuffer_Type)
+ with
+ Pre =>
+ Rotated_Width (Framebuffer) <= Mode.H_Visible and
+ Rotated_Height (Framebuffer) <= Mode.V_Visible and
+ (Framebuffer.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET or
+ Framebuffer.Height + Framebuffer.Start_Y <= Framebuffer.V_Stride);
private