gma hsw+: Add default value for HDMI buffer levels
Add a configuration option to override the default HDMI translation.
It's not exported yet, as we've never seen a non-default value being
used. So this is just to have a common place for the defaults.
Also sets the recommended default value for Broxton as defined in the
PRM.
Change-Id: I59fae0fb4f444d9193a98b6a0edf337ecbba3b62
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20165
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
diff --git a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
index 4440376..a7c1b9e 100644
--- a/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
+++ b/common/haswell_shared/hw-gfx-gma-connectors-ddi.adb
@@ -507,10 +507,16 @@
Port_Cfg.Display = HDMI and then
Port_Cfg.Port in DDI_Phy.DDI_Phy_Port
then
- DDI_Phy.Set_HDMI_Signal_Levels
- (Port => Port_Cfg.Port,
- Level => DDI_Phy.HDMI_Buf_Trans_Range'Last);
- Success := True;
+ declare
+ HDMI_Level : constant DDI_Phy.HDMI_Buf_Trans_Range :=
+ (if Config.DDI_HDMI_Buffer_Translation
+ in DDI_Phy.HDMI_Buf_Trans_Range
+ then Config.DDI_HDMI_Buffer_Translation
+ else Config.Default_DDI_HDMI_Buffer_Translation);
+ begin
+ DDI_Phy.Set_HDMI_Signal_Levels (Port_Cfg.Port, HDMI_Level);
+ Success := True;
+ end;
else
Success := True;
end if;