diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-09-03 04:16:07 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-09-04 04:14:06 -0400 |
commit | bc5133d595a0ddfaaa5edb4b077f44d92cc8fb0d (patch) | |
tree | 81c1a0f0be1cf7e53aba94aff10e5cc116f7e460 | |
parent | 1c132b44f0eabaaf801e79a3e4b98770431a4274 (diff) |
drm/i915/dp: move TPS3 logic to where it's used
There is no need to have a separate flag for tps3 as the information is
only used at one location. Move the logic there to make it easier to
follow.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 31 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 1 |
2 files changed, 17 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index f8f4d99440c1..9a6fb5dbf021 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -3812,13 +3812,25 @@ intel_dp_start_link_train(struct intel_dp *intel_dp) | |||
3812 | void | 3812 | void |
3813 | intel_dp_complete_link_train(struct intel_dp *intel_dp) | 3813 | intel_dp_complete_link_train(struct intel_dp *intel_dp) |
3814 | { | 3814 | { |
3815 | struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); | ||
3816 | struct drm_device *dev = dig_port->base.base.dev; | ||
3815 | bool channel_eq = false; | 3817 | bool channel_eq = false; |
3816 | int tries, cr_tries; | 3818 | int tries, cr_tries; |
3817 | uint32_t DP = intel_dp->DP; | 3819 | uint32_t DP = intel_dp->DP; |
3818 | uint32_t training_pattern = DP_TRAINING_PATTERN_2; | 3820 | uint32_t training_pattern = DP_TRAINING_PATTERN_2; |
3819 | 3821 | ||
3820 | /* Training Pattern 3 for HBR2 or 1.2 devices that support it*/ | 3822 | /* |
3821 | if (intel_dp->link_rate == 540000 || intel_dp->use_tps3) | 3823 | * Training Pattern 3 for HBR2 or 1.2 devices that support it. |
3824 | * | ||
3825 | * Intel platforms that support HBR2 also support TPS3. TPS3 support is | ||
3826 | * also mandatory for downstream devices that support HBR2. | ||
3827 | * | ||
3828 | * Due to WaDisableHBR2 SKL < B0 is the only exception where TPS3 is | ||
3829 | * supported but still not enabled. | ||
3830 | */ | ||
3831 | if (intel_dp->link_rate == 540000 || | ||
3832 | (intel_dp_source_supports_hbr2(dev) && | ||
3833 | drm_dp_tps3_supported(intel_dp->dpcd))) | ||
3822 | training_pattern = DP_TRAINING_PATTERN_3; | 3834 | training_pattern = DP_TRAINING_PATTERN_3; |
3823 | 3835 | ||
3824 | /* channel equalization */ | 3836 | /* channel equalization */ |
@@ -4000,18 +4012,9 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp) | |||
4000 | } | 4012 | } |
4001 | } | 4013 | } |
4002 | 4014 | ||
4003 | /* Training Pattern 3 support, Intel platforms that support HBR2 alone | 4015 | DRM_DEBUG_KMS("Display Port TPS3 support: source %s, sink %s\n", |
4004 | * have support for TP3 hence that check is used along with dpcd check | 4016 | intel_dp_source_supports_hbr2(dev) ? "yes" : "no", |
4005 | * to ensure TP3 can be enabled. | 4017 | drm_dp_tps3_supported(intel_dp->dpcd) ? "yes" : "no"); |
4006 | * SKL < B0: due it's WaDisableHBR2 is the only exception where TP3 is | ||
4007 | * supported but still not enabled. | ||
4008 | */ | ||
4009 | if (drm_dp_tps3_supported(intel_dp->dpcd) && | ||
4010 | intel_dp_source_supports_hbr2(dev)) { | ||
4011 | intel_dp->use_tps3 = true; | ||
4012 | DRM_DEBUG_KMS("Displayport TPS3 supported\n"); | ||
4013 | } else | ||
4014 | intel_dp->use_tps3 = false; | ||
4015 | 4018 | ||
4016 | /* Intermediate frequency support */ | 4019 | /* Intermediate frequency support */ |
4017 | if (is_edp(intel_dp) && | 4020 | if (is_edp(intel_dp) && |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 40e825d6a26f..2bdd5449b889 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -746,7 +746,6 @@ struct intel_dp { | |||
746 | enum pipe pps_pipe; | 746 | enum pipe pps_pipe; |
747 | struct edp_power_seq pps_delays; | 747 | struct edp_power_seq pps_delays; |
748 | 748 | ||
749 | bool use_tps3; | ||
750 | bool can_mst; /* this port supports mst */ | 749 | bool can_mst; /* this port supports mst */ |
751 | bool is_mst; | 750 | bool is_mst; |
752 | int active_mst_links; | 751 | int active_mst_links; |