Nico Huber merged this change.

View Change

Approvals: Nico Huber: Verified HAOUAS Elyes: Looks good to me, but someone else must approve Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
dp training: Always end with normal output

The DP spec mandates that we return to normal output when we abandon
a failed training, before we disable the output. However, the sequence
suggested by Intel always disables the output, even if we try another
time or another frequency. So we also always return to normal frame
delivery.

On Ivy Bridge, failure to return to normal output resulted in inability
to disable the display pipe and to restart the training. Thus, after a
failed training, further attempts were futile.

Change-Id: Ie1f19f2e1d1af62b402ad1dc41373d3d4437e976
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/32731
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Nico Huber <nico.h@gmx.de>
---
M common/hw-gfx-dp_training.adb
1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/common/hw-gfx-dp_training.adb b/common/hw-gfx-dp_training.adb
index a2d00a7..079d49c 100644
--- a/common/hw-gfx-dp_training.adb
+++ b/common/hw-gfx-dp_training.adb
@@ -1,5 +1,5 @@
--
--- Copyright (C) 2015-2016 secunet Security Networks AG
+-- Copyright (C) 2015-2016, 2019 secunet Security Networks AG
-- Copyright (C) 2017 Nico Huber <nico.h@gmx.de>
--
-- This program is free software; you can redistribute it and/or modify
@@ -382,20 +382,14 @@
end loop;
end if;

- if Success then
- if EQ_Done then
- -- Set_Pattern (TP_None) includes sending the Idle Pattern,
- -- so tell sink first.
- Sink_Set_Training_Pattern
- (DP, Link, DP_Info.TP_None, Success);
- else
- Success := False;
- end if;
- end if;
+ -- Set_Pattern (TP_None) includes sending the Idle Pattern,
+ -- so tell sink first.
+ Sink_Set_Training_Pattern
+ (DP, Link, DP_Info.TP_None, Success);
+ Set_Pattern (Port, Link, DP_Info.TP_None);

- if Success then
- Set_Pattern (Port, Link, DP_Info.TP_None);
- else
+ Success := Success and then EQ_Done;
+ if not Success then
Off (Port);
end if;
end Train_DP;

To view, visit change 32731. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Ie1f19f2e1d1af62b402ad1dc41373d3d4437e976
Gerrit-Change-Number: 32731
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: merged