drm/i915/icl: Add DDI HDMI level selection for ICL
authorManasi Navare <manasi.d.navare@intel.com>
Tue, 22 May 2018 00:25:41 +0000 (17:25 -0700)
committerPaulo Zanoni <paulo.r.zanoni@intel.com>
Tue, 12 Jun 2018 21:11:39 +0000 (14:11 -0700)
This patch adds a proper HDMI DDI entry level for vswing
programming sequences on ICL.

Spec doesn't specify any default for HDMI tables,
so let's pick the last entry as the default for now
to stay consistent with older platform like CNL.

Cc: Rakshmi Bhatia <rakshmi.bhatia@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180522002558.29262-8-paulo.r.zanoni@intel.com
drivers/gpu/drm/i915/intel_ddi.c

index b344e0fe08fd5c949bf945e951cf2eb9254307cd..ca73387bd5964f8b9faf82dc2f83307355b9b991 100644 (file)
@@ -915,7 +915,14 @@ static int intel_ddi_hdmi_level(struct drm_i915_private *dev_priv, enum port por
 
        level = dev_priv->vbt.ddi_port_info[port].hdmi_level_shift;
 
-       if (IS_CANNONLAKE(dev_priv)) {
+       if (IS_ICELAKE(dev_priv)) {
+               if (port == PORT_A || port == PORT_B)
+                       icl_get_combo_buf_trans(dev_priv, port,
+                                               INTEL_OUTPUT_HDMI, &n_entries);
+               else
+                       n_entries = ARRAY_SIZE(icl_mg_phy_ddi_translations);
+               default_entry = n_entries - 1;
+       } else if (IS_CANNONLAKE(dev_priv)) {
                cnl_get_buf_trans_hdmi(dev_priv, &n_entries);
                default_entry = n_entries - 1;
        } else if (IS_GEN9_LP(dev_priv)) {