Nico Huber submitted this change.

View Change

Approvals: Nico Huber: Verified Arthur Heymans: Looks good to me, approved
gma ilk hdmi: Add workaround for enable-bit quirk

The HDMI-enable bit is quirky, too. We are supposed to always set
it twice.

Change-Id: I9d093ff9a3178e01638f65b0607bc8d08c009978
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/libgfxinit/+/35784
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
---
M common/ironlake/hw-gfx-gma-pch-hdmi.adb
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/common/ironlake/hw-gfx-gma-pch-hdmi.adb b/common/ironlake/hw-gfx-gma-pch-hdmi.adb
index 9426a86..15d4e9f 100644
--- a/common/ironlake/hw-gfx-gma-pch-hdmi.adb
+++ b/common/ironlake/hw-gfx-gma-pch-hdmi.adb
@@ -66,6 +66,10 @@
PCH_TRANSCODER_SELECT (FDI_Port) or
PCH_HDMI_SDVO_ENCODING_HDMI or
Polarity);
+ Registers.Posting_Read (PCH_HDMI (Port_Cfg.PCH_Port));
+ -- Set enable a second time, hardware may miss the first.
+ Registers.Set_Mask (PCH_HDMI (Port_Cfg.PCH_Port), PCH_HDMI_ENABLE);
+ Registers.Posting_Read (PCH_HDMI (Port_Cfg.PCH_Port));
end On;

----------------------------------------------------------------------------
@@ -97,6 +101,9 @@
-- Reenable with transcoder A selected to switch.
Registers.Set_Mask (PCH_HDMI (Port), PCH_HDMI_ENABLE);
Registers.Posting_Read (PCH_HDMI (Port));
+ -- Set enable a second time, hardware may miss the first.
+ Registers.Set_Mask (PCH_HDMI (Port), PCH_HDMI_ENABLE);
+ Registers.Posting_Read (PCH_HDMI (Port));
Registers.Unset_Mask (PCH_HDMI (Port), PCH_HDMI_ENABLE);
Registers.Posting_Read (PCH_HDMI (Port));
end if;

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

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I9d093ff9a3178e01638f65b0607bc8d08c009978
Gerrit-Change-Number: 35784
Gerrit-PatchSet: 4
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: merged