]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/ehl/dsi: Set lane latency optimization for DW1
authorVandita Kulkarni <vandita.kulkarni@intel.com>
Wed, 19 Jun 2019 23:31:33 +0000 (16:31 -0700)
committerJosé Roberto de Souza <jose.souza@intel.com>
Thu, 20 Jun 2019 20:17:52 +0000 (13:17 -0700)
EHL has 2 additional steps in the DSI sequence, this is one of then
the lane latency optimization for DW1.

BSpec: 20597
Cc: Uma Shankar <uma.shankar@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619233134.20009-1-jose.souza@intel.com
drivers/gpu/drm/i915/display/icl_dsi.c
drivers/gpu/drm/i915/i915_reg.h

index 74448e6bf749c309774936d232808b86a010ad81..8b4d589be4b42de9a6339ad51520575f77302837 100644 (file)
@@ -403,6 +403,19 @@ static void gen11_dsi_config_phy_lanes_sequence(struct intel_encoder *encoder)
                tmp &= ~FRC_LATENCY_OPTIM_MASK;
                tmp |= FRC_LATENCY_OPTIM_VAL(0x5);
                I915_WRITE(ICL_PORT_TX_DW2_GRP(port), tmp);
+
+               /* For EHL set latency optimization for PCS_DW1 lanes */
+               if (IS_ELKHARTLAKE(dev_priv)) {
+                       tmp = I915_READ(ICL_PORT_PCS_DW1_AUX(port));
+                       tmp &= ~LATENCY_OPTIM_MASK;
+                       tmp |= LATENCY_OPTIM_VAL(0);
+                       I915_WRITE(ICL_PORT_PCS_DW1_AUX(port), tmp);
+
+                       tmp = I915_READ(ICL_PORT_PCS_DW1_LN0(port));
+                       tmp &= ~LATENCY_OPTIM_MASK;
+                       tmp |= LATENCY_OPTIM_VAL(0x1);
+                       I915_WRITE(ICL_PORT_PCS_DW1_GRP(port), tmp);
+               }
        }
 
 }
index 02c7f8c6c20b0ccafef10de127b626b410a07b2c..969c3b23d519817b75d71eff7e866dccef241034 100644 (file)
@@ -1896,6 +1896,8 @@ enum i915_power_well_id {
 #define ICL_PORT_PCS_DW1_GRP(port)     _MMIO(_ICL_PORT_PCS_DW_GRP(1, port))
 #define ICL_PORT_PCS_DW1_LN0(port)     _MMIO(_ICL_PORT_PCS_DW_LN(1, 0, port))
 #define   COMMON_KEEPER_EN             (1 << 26)
+#define   LATENCY_OPTIM_MASK           (0x3 << 2)
+#define   LATENCY_OPTIM_VAL(x)         ((x) << 2)
 
 /* CNL/ICL Port TX registers */
 #define _CNL_PORT_TX_AE_GRP_OFFSET             0x162340