[coreboot-gerrit] Change in libgfxinit[master]: gma: Clear "fence" registers during initialization
Nico Huber (Code Review)
gerrit at coreboot.org
Mon Aug 21 12:56:43 CEST 2017
Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/20601 )
Change subject: gma: Clear "fence" registers during initialization
......................................................................
gma: Clear "fence" registers during initialization
These registers are used to mark certain GTT regions as tiled.
Change-Id: Ic2cd61c0c1b42990ed955d7f77a428a2b9dbabd5
Signed-off-by: Nico Huber <nico.h at gmx.de>
Reviewed-on: https://review.coreboot.org/20601
Reviewed-by: Arthur Heymans <arthur at aheymans.xyz>
---
M common/hw-gfx-gma-registers.adb
M common/hw-gfx-gma-registers.ads
M common/hw-gfx-gma.adb
3 files changed, 18 insertions(+), 0 deletions(-)
Approvals:
Nico Huber: Verified
Arthur Heymans: Looks good to me, approved
diff --git a/common/hw-gfx-gma-registers.adb b/common/hw-gfx-gma-registers.adb
index 9e52c78..4a22564 100644
--- a/common/hw-gfx-gma-registers.adb
+++ b/common/hw-gfx-gma-registers.adb
@@ -61,6 +61,21 @@
----------------------------------------------------------------------------
+ procedure Clear_Fences
+ is
+ Fence_Regs_Base : constant :=
+ (case Config.CPU is
+ when Ironlake => 16#00_3000#,
+ when Sandybridge .. Skylake => 16#10_0000#);
+ subtype Fence_Range is Registers_Range range 0 .. 63;
+ begin
+ for Idx in Fence_Range loop
+ Regs.Write (Fence_Regs_Base / Register_Width + Idx, 0);
+ end loop;
+ end Clear_Fences;
+
+ ----------------------------------------------------------------------------
+
procedure Write_GTT
(GTT_Page : GTT_Range;
Device_Address : GTT_Address_Type;
diff --git a/common/hw-gfx-gma-registers.ads b/common/hw-gfx-gma-registers.ads
index 63df8be..2a01aab 100644
--- a/common/hw-gfx-gma-registers.ads
+++ b/common/hw-gfx-gma-registers.ads
@@ -1529,6 +1529,8 @@
Mask_Unset : Word32;
Mask_Set : Word32);
+ procedure Clear_Fences;
+
pragma Warnings (Off, "declaration of ""Write_GTT"" hides one at *");
procedure Write_GTT
(GTT_Page : GTT_Range;
diff --git a/common/hw-gfx-gma.adb b/common/hw-gfx-gma.adb
index 387d6bd..94f3ceb 100644
--- a/common/hw-gfx-gma.adb
+++ b/common/hw-gfx-gma.adb
@@ -401,6 +401,7 @@
Connectors.Post_All_Off;
PLLs.All_Off;
Power_And_Clocks.Post_All_Off;
+ Registers.Clear_Fences;
else
-- According to PRMs, VGA plane is the only thing
-- that's enabled by default after reset.
--
To view, visit https://review.coreboot.org/20601
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2cd61c0c1b42990ed955d7f77a428a2b9dbabd5
Gerrit-Change-Number: 20601
Gerrit-PatchSet: 4
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur at aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter at users.sourceforge.net>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170821/ba7c1438/attachment.html>
More information about the coreboot-gerrit
mailing list