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.adb b/common/hw-gfx-gma.adb
index 4a1264c..809881a 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -285,9 +285,12 @@
 
             -- update framebuffer offset only
             elsif New_Config.Port /= Disabled and
-                  Cur_Config.Framebuffer /= New_Config.Framebuffer
+                  Cur_Config.Framebuffer /= New_Config.Framebuffer and
+                  Config_Helpers.Validate_Config
+                    (New_Config.Framebuffer, New_Config.Mode, Pipe)
             then
-               Display_Controller.Update_Offset (Pipe, New_Config.Framebuffer);
+               Display_Controller.Setup_FB
+                 (Pipe, New_Config.Mode, New_Config.Framebuffer);
                Cur_Config := New_Config;
             end if;
          end;