drm/i915 Call get_adjust_train() from clock recovery and channel eq
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Fri, 23 Oct 2015 10:01:46 +0000 (13:01 +0300)
committerAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Thu, 5 Nov 2015 13:14:56 +0000 (15:14 +0200)
Move the call to intel_dp_get_adjust_train() out of
intel_dp_update_link_train() and call it instead from the clock recovery
and channel equalization features. A follow up patch will remove the DP
register write from that function, so that it handles only the DPCD
write.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1445594525-7174-4-git-send-email-ander.conselvan.de.oliveira@intel.com
drivers/gpu/drm/i915/intel_dp.c

index 3b695c12606adfb41d392e2ff569d5c0d030357c..37d51d3ab26ac0191681103ead1727e26eb6cfe6 100644 (file)
@@ -3645,15 +3645,13 @@ intel_dp_reset_link_train(struct intel_dp *intel_dp,
 }
 
 static bool
-intel_dp_update_link_train(struct intel_dp *intel_dp,
-                          const uint8_t link_status[DP_LINK_STATUS_SIZE])
+intel_dp_update_link_train(struct intel_dp *intel_dp)
 {
        struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
        struct drm_i915_private *dev_priv =
                to_i915(intel_dig_port->base.base.dev);
        int ret;
 
-       intel_get_adjust_train(intel_dp, link_status);
        intel_dp_set_signal_levels(intel_dp);
 
        I915_WRITE(intel_dp->output_reg, intel_dp->DP);
@@ -3801,7 +3799,8 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
                voltage = intel_dp->train_set[0] & DP_TRAIN_VOLTAGE_SWING_MASK;
 
                /* Update training set as requested by target */
-               if (!intel_dp_update_link_train(intel_dp, link_status)) {
+               intel_get_adjust_train(intel_dp, link_status);
+               if (!intel_dp_update_link_train(intel_dp)) {
                        DRM_ERROR("failed to update link training\n");
                        break;
                }
@@ -3888,7 +3887,8 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
                }
 
                /* Update training set as requested by target */
-               if (!intel_dp_update_link_train(intel_dp, link_status)) {
+               intel_get_adjust_train(intel_dp, link_status);
+               if (!intel_dp_update_link_train(intel_dp)) {
                        DRM_ERROR("failed to update link training\n");
                        break;
                }