<div dir="ltr">Reviewed-by: Rodrigo Vivi <<a href="mailto:rodrigo.vivi@intel.com">rodrigo.vivi@intel.com</a>></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 4, 2014 at 4:26 AM, Damien Lespiau <span dir="ltr"><<a href="mailto:damien.lespiau@intel.com" target="_blank">damien.lespiau@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Skylake doesn't use the pre-charge field now, but, instead, we need to<br>
specify the total number of SYNC pulses for the SYNC phase (pre-charge +<br>
SYNC pattern pules). Let's use the default value (32) for that.<br>
<br>
v3: increase DP AUX TX timeout as 400us is not to be used on SKL<br>
    apparently (Jesse).<br>
<br>
Signed-off-by: Damien Lespiau <<a href="mailto:damien.lespiau@intel.com">damien.lespiau@intel.com</a>><br>
---<br>
 drivers/gpu/drm/i915/i915_reg.h |  1 +<br>
 drivers/gpu/drm/i915/intel_dp.c | 20 +++++++++++++++++++-<br>
 2 files changed, 20 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h<br>
index 087085c..acd0a7b 100644<br>
--- a/drivers/gpu/drm/i915/i915_reg.h<br>
+++ b/drivers/gpu/drm/i915/i915_reg.h<br>
@@ -3630,6 +3630,7 @@ enum punit_power_well {<br>
 #define   DP_AUX_CH_CTL_PRECHARGE_TEST     (1 << 11)<br>
 #define   DP_AUX_CH_CTL_BIT_CLOCK_2X_MASK    (0x7ff)<br>
 #define   DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT   0<br>
+#define   DP_AUX_CH_CTL_SYNC_PULSE_SKL(c)   ((c) - 1)<br>
<br>
 /*<br>
  * Computing GMCH M and N values for the Display Port link<br>
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c<br>
index 4560ced..5755f59 100644<br>
--- a/drivers/gpu/drm/i915/intel_dp.c<br>
+++ b/drivers/gpu/drm/i915/intel_dp.c<br>
@@ -529,6 +529,21 @@ static uint32_t i9xx_get_aux_send_ctl(struct intel_dp *intel_dp,<br>
               (aux_clock_divider << DP_AUX_CH_CTL_BIT_CLOCK_2X_SHIFT);<br>
 }<br>
<br>
+static uint32_t skl_get_aux_send_ctl(struct intel_dp *intel_dp,<br>
+                                     bool has_aux_irq,<br>
+                                     int send_bytes,<br>
+                                     uint32_t unused)<br>
+{<br>
+       return DP_AUX_CH_CTL_SEND_BUSY |<br>
+              DP_AUX_CH_CTL_DONE |<br>
+              (has_aux_irq ? DP_AUX_CH_CTL_INTERRUPT : 0) |<br>
+              DP_AUX_CH_CTL_TIME_OUT_ERROR |<br>
+              DP_AUX_CH_CTL_TIME_OUT_1600us |<br>
+              DP_AUX_CH_CTL_RECEIVE_ERROR |<br>
+              (send_bytes << DP_AUX_CH_CTL_MESSAGE_SIZE_SHIFT) |<br>
+              DP_AUX_CH_CTL_SYNC_PULSE_SKL(32);<br>
+}<br>
+<br>
 static int<br>
 intel_dp_aux_ch(struct intel_dp *intel_dp,<br>
                uint8_t *send, int send_bytes,<br>
@@ -4747,7 +4762,10 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,<br>
        else<br>
                intel_dp->get_aux_clock_divider = i9xx_get_aux_clock_divider;<br>
<br>
-       intel_dp->get_aux_send_ctl = i9xx_get_aux_send_ctl;<br>
+       if (INTEL_INFO(dev)->gen >= 9)<br>
+               intel_dp->get_aux_send_ctl = skl_get_aux_send_ctl;<br>
+       else<br>
+               intel_dp->get_aux_send_ctl = i9xx_get_aux_send_ctl;<br>
<br>
        /* Preserve the current hw state. */<br>
        intel_dp->DP = I915_READ(intel_dp->output_reg);<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
Intel-gfx mailing list<br>
<a href="mailto:Intel-gfx@lists.freedesktop.org">Intel-gfx@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/intel-gfx" target="_blank">http://lists.freedesktop.org/mailman/listinfo/intel-gfx</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Rodrigo Vivi</div><div>Blog: <a href="http://blog.vivi.eng.br" target="_blank">http://blog.vivi.eng.br</a></div><div> </div>
</div>