gma pipe_setup: Work around a PFIT_CONTROL quirk on G45
In legacy VGA mode the pillarbox scaling mode fails to display anything, so just
always force 'auto' mode, which will have the output stretched to fullscreen.
Change-Id: Ie7b7be06b5c5bd5569e8a6645dd9359660f7a51a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/28255
Reviewed-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma-pipe_setup.adb b/common/hw-gfx-gma-pipe_setup.adb
index 50b63e5..a237de7 100644
--- a/common/hw-gfx-gma-pipe_setup.adb
+++ b/common/hw-gfx-gma-pipe_setup.adb
@@ -552,8 +552,15 @@
when Secondary => GMCH_PFIT_CONTROL_SELECT_PIPE_B,
when others => 0);
+ -- Work around a quirk:
+ -- In legacy VGA mode Pillarbox fails to display anything so just force
+ -- 'auto' mode on all displays, which will the output stretched to
+ -- fullscreen .
PF_Ctrl_Scaling : constant Word32 :=
- GMCH_PFIT_CONTROL_SCALING (Scaling_Type (Framebuffer, Mode));
+ (if Framebuffer.Offset = VGA_PLANE_FRAMEBUFFER_OFFSET then
+ GMCH_PFIT_CONTROL_SCALING (Uniform)
+ else
+ GMCH_PFIT_CONTROL_SCALING (Scaling_Type (Framebuffer, Mode)));
In_Use : Boolean;
begin