Attention is currently required from: Martin Roth, Matt DeVillier, Angel Pons.
Hello Nico Huber, Patrick Georgi, Martin Roth, Matt DeVillier,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/51133
to look at the new patch set (#11).
Change subject: Add support to switch LSPCON modes
......................................................................
Add support to switch LSPCON modes
LSPCON is a highly-cursed level shifter and protocol converter chip. It
is primarily used to convert DisplayPort into HDMI 2.0, since some Intel
iGPUs do not have native HDMI 2.0 support. The chip defaults to LS mode.
Add code to detect LSPCON chips and put them in protocol converter mode.
This way, the LSPCON behaves like a regular DisplayPort sink. This needs
to be done before any DPCD accesses, because the LSPCON does not respond
to DPCD accesses in level shifter mode.
Tested on Purism Librem Mini v1 (WHL-U), HDMI port can now light up.
Change-Id: Idfa9bdff47a6591000cd5092d64a4cd4f8dbdc8d
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M common/Makefile.inc
A common/hw-gfx-dp_dual_mode.adb
A common/hw-gfx-dp_dual_mode.ads
M common/hw-gfx-gma-connector_info.adb
A common/hw-gfx-gma-dp_dual_mode.ads
5 files changed, 265 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/33/51133/11
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/51133
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Idfa9bdff47a6591000cd5092d64a4cd4f8dbdc8d
Gerrit-Change-Number: 51133
Gerrit-PatchSet: 11
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Martin Roth, Matt DeVillier, Angel Pons.
Hello Nico Huber, Patrick Georgi, Martin Roth, Matt DeVillier,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/51133
to look at the new patch set (#10).
Change subject: Add support to switch LSPCON modes
......................................................................
Add support to switch LSPCON modes
LSPCON is a highly-cursed level shifter and protocol converter chip. It
is primarily used to convert DisplayPort into HDMI 2.0, since some Intel
iGPUs do not have native HDMI 2.0 support. The chip defaults to LS mode.
Add code to detect LSPCON chips and put them in protocol converter mode.
This way, the LSPCON behaves like a regular DisplayPort sink. This needs
to be done before any DPCD accesses, because the LSPCON does not respond
to DPCD accesses in level shifter mode.
Tested on Purism Librem Mini v1 (WHL-U), HDMI port can now light up.
Change-Id: Idfa9bdff47a6591000cd5092d64a4cd4f8dbdc8d
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M common/Makefile.inc
A common/hw-gfx-dp_dual_mode.adb
A common/hw-gfx-dp_dual_mode.ads
M common/hw-gfx-gma-connector_info.adb
A common/hw-gfx-gma-dp_dual_mode.ads
5 files changed, 264 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/33/51133/10
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/51133
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Idfa9bdff47a6591000cd5092d64a4cd4f8dbdc8d
Gerrit-Change-Number: 51133
Gerrit-PatchSet: 10
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Matt DeVillier, Arthur Heymans.
Hello Nico Huber, Matt DeVillier, Arthur Heymans,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/libgfxinit/+/51122
to look at the new patch set (#4).
Change subject: gfx dp_aux: Add I2C_{Read,Write}_Byte procedures
......................................................................
gfx dp_aux: Add I2C_{Read,Write}_Byte procedures
These will be used to switch LSPCON modes in subsequent commits.
Change-Id: Ib66b073691282d0c89710b0591484d4123e039b7
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M common/hw-gfx-dp_aux_ch.adb
M common/hw-gfx-dp_aux_ch.ads
2 files changed, 49 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/22/51122/4
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/51122
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: Ib66b073691282d0c89710b0591484d4123e039b7
Gerrit-Change-Number: 51122
Gerrit-PatchSet: 4
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-Attention: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newpatchset
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/52824 )
Change subject: dp aux: Add TODO and pre-condition for I2C writes
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
See CB:52826 for a solution
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/52824
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: If7566fc7b701c8a36d9e8a0af5beb7a84a558ee3
Gerrit-Change-Number: 52824
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Comment-Date: Sun, 02 May 2021 14:06:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Jason Glenesk, Martin Roth, Marshall Dawson, Zheng Bao, Felix Held.
Bao Zheng has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/52756 )
Change subject: amdfwtool: Allocate a little more space for each table
......................................................................
Patch Set 1:
(1 comment)
File util/amdfwtool/amdfwtool.c:
https://review.coreboot.org/c/coreboot/+/52756/comment/aaa3ec38_684b98da
PS1, Line 74: 2
> from my understanding of the code TABLE_REDUNDANCE needs to be an integer multiple of TABLE_ALIGNMEN […]
Ack.
The 2 is just a number which is picked randomly and seems to be reasonable. Defining it as a macro so we can expand it in the future.
--
To view, visit https://review.coreboot.org/c/coreboot/+/52756
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id18db19c711b1ff7e694041408a5c4d30a9384ca
Gerrit-Change-Number: 52756
Gerrit-PatchSet: 1
Gerrit-Owner: Bao Zheng <fishbaozi(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Attention: Zheng Bao
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Sun, 02 May 2021 14:02:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: comment
Attention is currently required from: Angel Pons.
Hello Angel Pons,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/52826
to review the following change.
Change subject: dp aux: Handle partially acked multi-byte I2C writes
......................................................................
dp aux: Handle partially acked multi-byte I2C writes
There is another case when we have to keep querying the I2C status
after starting a write transaction: When some bytes were already acked,
we receive an I2C-ACK for them and the number of bytes ack'ed. So
re-write the loop such that it always continues until one of these
conditions occur:
* We receive an I2C-ACK without additional data: This means
all remaining bytes have been ack'ed.
* The summed up number of transferred bytes reaches the
number of written bytes.
* We get an I2C-Defer but have re-tried too often without
getting additional ACKs.
* We get an I2C-NAK.
Change-Id: I794dc1587f56b81539d1d4796f754644172f89b7
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-dp_aux_ch.adb
1 file changed, 27 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/26/52826/1
diff --git a/common/hw-gfx-dp_aux_ch.adb b/common/hw-gfx-dp_aux_ch.adb
index b8eb510..44467e7 100644
--- a/common/hw-gfx-dp_aux_ch.adb
+++ b/common/hw-gfx-dp_aux_ch.adb
@@ -181,8 +181,12 @@
is
Request : DP_Defs.Aux_Request;
+ Xfered : Natural := 0;
+ Tries : Natural := 0;
+ Max_Defers : constant := 7;
+
Response : DP_Defs.Aux_Response;
- Ignored_Response_Length : DP_Defs.Aux_Response_Length;
+ Response_Length : DP_Defs.Aux_Response_Length;
begin
Fill_Aux_Request
(Request => Request,
@@ -190,21 +194,34 @@
Address => Address,
Length => Length);
Request (4 .. Length + 4 - 1) := Data (0 .. Length - 1);
- for Try in Positive range 1 .. 7 loop
- pragma Warnings (GNATprove, Off,
- "unused assignment to ""Ignored_Response_Length""",
- Reason => "No response expected here");
+
+ loop
Do_Aux_Request
(Port => Port,
Request => Request,
Request_Length => (if Is_Empty (Request) then 3 else 4 + Length),
Response => Response,
- Response_Length => Ignored_Response_Length,
+ Response_Length => Response_Length,
Success => Success);
- exit when not (Success and Is_I2C_Defer (Response));
+ exit when not Success;
- -- Command was already AUX-acked. Thus, only query for
- -- new status from now on until we get I2C-acked too.
+ if Is_I2C_Ack (Response) then
+ if Response_Length <= 1 then
+ Xfered := Length;
+ else
+ Xfered := Xfered + Natural'Min (Natural (Response (1)), Length - Xfered);
+ Tries := 0;
+ end if;
+ exit when Xfered = Length;
+ elsif Is_I2C_Defer (Response) then
+ exit when Tries >= Max_Defers;
+ Tries := Tries + 1;
+ else -- Nak
+ exit;
+ end if;
+
+ -- Command was already AUX-acked. Thus, only query for new
+ -- status from now on until we got all bytes I2C-acked too.
Fill_Aux_Request
(Request => Request,
Command => (Command and DP_AUX_I2C_MOT) or DP_AUX_I2C_WR_STATUS_REQ,
@@ -212,7 +229,7 @@
Length => 0);
Time.U_Delay (500);
end loop;
- Success := Success and then Is_I2C_Ack (Response);
+ Success := Success and then (Is_I2C_Ack (Response) and Xfered = Length);
end I2C_Out_Packet;
procedure I2C_In_Packet
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/52826
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I794dc1587f56b81539d1d4796f754644172f89b7
Gerrit-Change-Number: 52826
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange