aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>2015-10-05 03:01:13 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-10-06 04:53:52 -0400
commit2493f21f56316ad55508f173463ebf0b3f0a15bb (patch)
treef0bb36ed759d5dfcc9b6cb337a8b316938297e66 /drivers/gpu/drm/i915
parent0b5e88dc25ee6c9040c0355e6e025dcbc9c8de92 (diff)
drm/i915: Rename DP link training functions
The link training functions had confusing names. The start function actually does the clock recovery phase of the link training, and the complete function does the channel equalization. So call them that instead. Also, every call to intel_dp_start_link_train() was followed by a call to intel_dp_complete_link_train(), so add a new start function that calls clock_recory and channel_equalization. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c1
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c22
-rw-r--r--drivers/gpu/drm/i915/intel_dp_mst.c1
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h1
4 files changed, 13 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index b3f1748fab97..b25e99a432fb 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2320,7 +2320,6 @@ static void intel_ddi_pre_enable(struct intel_encoder *intel_encoder)
2320 2320
2321 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); 2321 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
2322 intel_dp_start_link_train(intel_dp); 2322 intel_dp_start_link_train(intel_dp);
2323 intel_dp_complete_link_train(intel_dp);
2324 if (port != PORT_A || INTEL_INFO(dev)->gen >= 9) 2323 if (port != PORT_A || INTEL_INFO(dev)->gen >= 9)
2325 intel_dp_stop_link_train(intel_dp); 2324 intel_dp_stop_link_train(intel_dp);
2326 } else if (type == INTEL_OUTPUT_HDMI) { 2325 } else if (type == INTEL_OUTPUT_HDMI) {
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 19cbc2ef542c..8d34ca7b287a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2604,7 +2604,6 @@ static void intel_enable_dp(struct intel_encoder *encoder)
2604 2604
2605 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); 2605 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
2606 intel_dp_start_link_train(intel_dp); 2606 intel_dp_start_link_train(intel_dp);
2607 intel_dp_complete_link_train(intel_dp);
2608 intel_dp_stop_link_train(intel_dp); 2607 intel_dp_stop_link_train(intel_dp);
2609 2608
2610 if (crtc->config->has_audio) { 2609 if (crtc->config->has_audio) {
@@ -3691,8 +3690,8 @@ static void intel_dp_set_idle_link_train(struct intel_dp *intel_dp)
3691} 3690}
3692 3691
3693/* Enable corresponding port and start training pattern 1 */ 3692/* Enable corresponding port and start training pattern 1 */
3694void 3693static void
3695intel_dp_start_link_train(struct intel_dp *intel_dp) 3694intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
3696{ 3695{
3697 struct drm_encoder *encoder = &dp_to_dig_port(intel_dp)->base.base; 3696 struct drm_encoder *encoder = &dp_to_dig_port(intel_dp)->base.base;
3698 struct drm_device *dev = encoder->dev; 3697 struct drm_device *dev = encoder->dev;
@@ -3805,8 +3804,8 @@ intel_dp_start_link_train(struct intel_dp *intel_dp)
3805 intel_dp->DP = DP; 3804 intel_dp->DP = DP;
3806} 3805}
3807 3806
3808void 3807static void
3809intel_dp_complete_link_train(struct intel_dp *intel_dp) 3808intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
3810{ 3809{
3811 struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); 3810 struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
3812 struct drm_device *dev = dig_port->base.base.dev; 3811 struct drm_device *dev = dig_port->base.base.dev;
@@ -3859,7 +3858,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
3859 if (!drm_dp_clock_recovery_ok(link_status, 3858 if (!drm_dp_clock_recovery_ok(link_status,
3860 intel_dp->lane_count)) { 3859 intel_dp->lane_count)) {
3861 intel_dp->train_set_valid = false; 3860 intel_dp->train_set_valid = false;
3862 intel_dp_start_link_train(intel_dp); 3861 intel_dp_link_training_clock_recovery(intel_dp);
3863 intel_dp_set_link_train(intel_dp, &DP, 3862 intel_dp_set_link_train(intel_dp, &DP,
3864 training_pattern | 3863 training_pattern |
3865 DP_LINK_SCRAMBLING_DISABLE); 3864 DP_LINK_SCRAMBLING_DISABLE);
@@ -3876,7 +3875,7 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
3876 /* Try 5 times, then try clock recovery if that fails */ 3875 /* Try 5 times, then try clock recovery if that fails */
3877 if (tries > 5) { 3876 if (tries > 5) {
3878 intel_dp->train_set_valid = false; 3877 intel_dp->train_set_valid = false;
3879 intel_dp_start_link_train(intel_dp); 3878 intel_dp_link_training_clock_recovery(intel_dp);
3880 intel_dp_set_link_train(intel_dp, &DP, 3879 intel_dp_set_link_train(intel_dp, &DP,
3881 training_pattern | 3880 training_pattern |
3882 DP_LINK_SCRAMBLING_DISABLE); 3881 DP_LINK_SCRAMBLING_DISABLE);
@@ -3909,6 +3908,13 @@ void intel_dp_stop_link_train(struct intel_dp *intel_dp)
3909 DP_TRAINING_PATTERN_DISABLE); 3908 DP_TRAINING_PATTERN_DISABLE);
3910} 3909}
3911 3910
3911void
3912intel_dp_start_link_train(struct intel_dp *intel_dp)
3913{
3914 intel_dp_link_training_clock_recovery(intel_dp);
3915 intel_dp_link_training_channel_equalization(intel_dp);
3916}
3917
3912static void 3918static void
3913intel_dp_link_down(struct intel_dp *intel_dp) 3919intel_dp_link_down(struct intel_dp *intel_dp)
3914{ 3920{
@@ -4377,7 +4383,6 @@ go_again:
4377 !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) { 4383 !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) {
4378 DRM_DEBUG_KMS("channel EQ not ok, retraining\n"); 4384 DRM_DEBUG_KMS("channel EQ not ok, retraining\n");
4379 intel_dp_start_link_train(intel_dp); 4385 intel_dp_start_link_train(intel_dp);
4380 intel_dp_complete_link_train(intel_dp);
4381 intel_dp_stop_link_train(intel_dp); 4386 intel_dp_stop_link_train(intel_dp);
4382 } 4387 }
4383 4388
@@ -4468,7 +4473,6 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
4468 DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n", 4473 DRM_DEBUG_KMS("%s: channel EQ not ok, retraining\n",
4469 intel_encoder->base.name); 4474 intel_encoder->base.name);
4470 intel_dp_start_link_train(intel_dp); 4475 intel_dp_start_link_train(intel_dp);
4471 intel_dp_complete_link_train(intel_dp);
4472 intel_dp_stop_link_train(intel_dp); 4476 intel_dp_stop_link_train(intel_dp);
4473 } 4477 }
4474} 4478}
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index ca4d0220ecd4..15372598b2c3 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -188,7 +188,6 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder)
188 188
189 189
190 intel_dp_start_link_train(intel_dp); 190 intel_dp_start_link_train(intel_dp);
191 intel_dp_complete_link_train(intel_dp);
192 intel_dp_stop_link_train(intel_dp); 191 intel_dp_stop_link_train(intel_dp);
193 } 192 }
194 193
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 563c4f1e3685..e320825abd95 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1217,7 +1217,6 @@ bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
1217void intel_dp_set_link_params(struct intel_dp *intel_dp, 1217void intel_dp_set_link_params(struct intel_dp *intel_dp,
1218 const struct intel_crtc_state *pipe_config); 1218 const struct intel_crtc_state *pipe_config);
1219void intel_dp_start_link_train(struct intel_dp *intel_dp); 1219void intel_dp_start_link_train(struct intel_dp *intel_dp);
1220void intel_dp_complete_link_train(struct intel_dp *intel_dp);
1221void intel_dp_stop_link_train(struct intel_dp *intel_dp); 1220void intel_dp_stop_link_train(struct intel_dp *intel_dp);
1222void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode); 1221void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode);
1223void intel_dp_encoder_destroy(struct drm_encoder *encoder); 1222void intel_dp_encoder_destroy(struct drm_encoder *encoder);