drm/i915/bxt: Set oscaledcompmethod to enable scale value
authorSonika Jindal <sonika.jindal@intel.com>
Thu, 24 Sep 2015 04:52:54 +0000 (10:22 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 Sep 2015 08:20:02 +0000 (10:20 +0200)
Bspec update tells that we have to enable oscaledcompmethod instead of
ouniqetrangenmethod for enabling scale value during swing programming.

v2: Adding back 'don't care' values to bxt_ddi_translations_dp and add
error message if ouniquetrangemethod was set (Imre)

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>(v1)
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_ddi.c

index 56157eb8719b91d7b396f76904bf7733a2e0cfae..184b1237a8681878c2d1e2fd7507d2c0f96ae50e 100644 (file)
@@ -1395,7 +1395,8 @@ enum skl_disp_power_wells {
 #define BXT_PORT_TX_DW3_LN0(port)      _PORT3(port, _PORT_TX_DW3_LN0_A,  \
                                                     _PORT_TX_DW3_LN0_B,  \
                                                     _PORT_TX_DW3_LN0_C)
-#define   UNIQE_TRANGE_EN_METHOD       (1 << 27)
+#define   SCALE_DCOMP_METHOD           (1 << 26)
+#define   UNIQUE_TRANGE_EN_METHOD      (1 << 27)
 
 #define _PORT_TX_DW4_LN0_A             0x162510
 #define _PORT_TX_DW4_LN0_B             0x6C510
index 205f61832d4af37fd2551cbf1f2843a6725a79f9..0e46679fde5a0a50eabb526cc3b70a3ddd522fd0 100644 (file)
@@ -2165,9 +2165,13 @@ static void bxt_ddi_vswing_sequence(struct drm_device *dev, u32 level,
        I915_WRITE(BXT_PORT_TX_DW2_GRP(port), val);
 
        val = I915_READ(BXT_PORT_TX_DW3_LN0(port));
-       val &= ~UNIQE_TRANGE_EN_METHOD;
+       val &= ~SCALE_DCOMP_METHOD;
        if (ddi_translations[level].enable)
-               val |= UNIQE_TRANGE_EN_METHOD;
+               val |= SCALE_DCOMP_METHOD;
+
+       if ((val & UNIQUE_TRANGE_EN_METHOD) && !(val & SCALE_DCOMP_METHOD))
+               DRM_ERROR("Disabled scaling while ouniqetrangenmethod was set");
+
        I915_WRITE(BXT_PORT_TX_DW3_GRP(port), val);
 
        val = I915_READ(BXT_PORT_TX_DW4_LN0(port));