[coreboot-gerrit] Change in libgfxinit[master]: dp training: Fix channel equalization phase

Nico Huber (Code Review) gerrit at coreboot.org
Tue Aug 29 00:09:04 CEST 2017


Nico Huber has submitted this change and it was merged. ( https://review.coreboot.org/21215 )

Change subject: dp training: Fix channel equalization phase
......................................................................

dp training: Fix channel equalization phase

First, allow updates to voltage swing too during channel equalization.
Spec just says to adjust the settings as requested.

Second, the loop conditions differ from the clock recovery phase. We
have only 6 tries in total but no particular order is enforced.

Change-Id: I4673390d8c0f9a5642702872e5b4ab11f54797c7
Signed-off-by: Nico Huber <nico.h at gmx.de>
Reviewed-on: https://review.coreboot.org/21215
Reviewed-by: Felix Held <felix-coreboot at felixheld.de>
---
M common/hw-gfx-dp_training.adb
1 file changed, 4 insertions(+), 15 deletions(-)

Approvals:
  Felix Held: Looks good to me, approved
  Nico Huber: Verified



diff --git a/common/hw-gfx-dp_training.adb b/common/hw-gfx-dp_training.adb
index 19aa4d3..e7411d0 100644
--- a/common/hw-gfx-dp_training.adb
+++ b/common/hw-gfx-dp_training.adb
@@ -1,5 +1,6 @@
 --
 -- Copyright (C) 2015-2016 secunet Security Networks AG
+-- Copyright (C) 2017 Nico Huber <nico.h at gmx.de>
 --
 -- This program is free software; you can redistribute it and/or modify
 -- it under the terms of the GNU General Public License as published by
@@ -244,7 +245,8 @@
       EQ_Done := Success and then DP_Info.All_EQ_Done (Status, Link);
       Success := Success and then (CR_Done or not CR_Was_Done);
 
-      if Success and not CR_Done then
+      -- Voltage swing may be updated during channel equalization too.
+      if Success and not EQ_Done then
          Train_Set.Voltage_Swing :=
             DP_Info.Max_Requested_VS (Status, Link);
          if Train_Set.Voltage_Swing > Max_V_Swing (Port)
@@ -366,25 +368,12 @@
       end if;
 
       if Success then
-         Retries := 0;
-         for Tries in 1 .. 32 loop
-            pragma Loop_Invariant (Retries <= Max_Retry);
-
+         for Tries in 1 .. 6 loop
             Time.U_Delay (EQ_Delay);
 
-            Last_Train_Set := Train_Set;
             Sink_Adjust_Training
               (Port, DP, Link, Train_Set, CR_Done, EQ_Done, Success);
             exit when EQ_Done or not Success;
-
-            if Train_Set.Pre_Emph = Last_Train_Set.Pre_Emph then
-               exit when Retries = Max_Retry;
-               Retries := Retries + 1;
-            else
-               exit when Last_Train_Set.Pre_Emph =
-                  Max_Pre_Emph (Port, Last_Train_Set);
-               Retries := 0;
-            end if;
 
             Set_Signal_Levels (Port, Link, Train_Set);
             Sink_Set_Signal_Levels (Port, DP, Link, Train_Set, Success);

-- 
To view, visit https://review.coreboot.org/21215
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4673390d8c0f9a5642702872e5b4ab11f54797c7
Gerrit-Change-Number: 21215
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
Gerrit-Reviewer: Felix Held <felix-coreboot at felixheld.de>
Gerrit-Reviewer: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20170828/0f8ab789/attachment.html>


More information about the coreboot-gerrit mailing list