aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c43
1 files changed, 28 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 7df5085973e9..5ede4e8e290d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2638,7 +2638,6 @@ intel_dp_complete_link_train(struct intel_dp *intel_dp)
2638 2638
2639 if (cr_tries > 5) { 2639 if (cr_tries > 5) {
2640 DRM_ERROR("failed to train DP, aborting\n"); 2640 DRM_ERROR("failed to train DP, aborting\n");
2641 intel_dp_link_down(intel_dp);
2642 break; 2641 break;
2643 } 2642 }
2644 2643
@@ -2891,13 +2890,11 @@ intel_dp_check_link_status(struct intel_dp *intel_dp)
2891 2890
2892 /* Try to read receiver status if the link appears to be up */ 2891 /* Try to read receiver status if the link appears to be up */
2893 if (!intel_dp_get_link_status(intel_dp, link_status)) { 2892 if (!intel_dp_get_link_status(intel_dp, link_status)) {
2894 intel_dp_link_down(intel_dp);
2895 return; 2893 return;
2896 } 2894 }
2897 2895
2898 /* Now read the DPCD to see if it's actually running */ 2896 /* Now read the DPCD to see if it's actually running */
2899 if (!intel_dp_get_dpcd(intel_dp)) { 2897 if (!intel_dp_get_dpcd(intel_dp)) {
2900 intel_dp_link_down(intel_dp);
2901 return; 2898 return;
2902 } 2899 }
2903 2900
@@ -3012,18 +3009,34 @@ g4x_dp_detect(struct intel_dp *intel_dp)
3012 return status; 3009 return status;
3013 } 3010 }
3014 3011
3015 switch (intel_dig_port->port) { 3012 if (IS_VALLEYVIEW(dev)) {
3016 case PORT_B: 3013 switch (intel_dig_port->port) {
3017 bit = PORTB_HOTPLUG_LIVE_STATUS; 3014 case PORT_B:
3018 break; 3015 bit = PORTB_HOTPLUG_LIVE_STATUS_VLV;
3019 case PORT_C: 3016 break;
3020 bit = PORTC_HOTPLUG_LIVE_STATUS; 3017 case PORT_C:
3021 break; 3018 bit = PORTC_HOTPLUG_LIVE_STATUS_VLV;
3022 case PORT_D: 3019 break;
3023 bit = PORTD_HOTPLUG_LIVE_STATUS; 3020 case PORT_D:
3024 break; 3021 bit = PORTD_HOTPLUG_LIVE_STATUS_VLV;
3025 default: 3022 break;
3026 return connector_status_unknown; 3023 default:
3024 return connector_status_unknown;
3025 }
3026 } else {
3027 switch (intel_dig_port->port) {
3028 case PORT_B:
3029 bit = PORTB_HOTPLUG_LIVE_STATUS_G4X;
3030 break;
3031 case PORT_C:
3032 bit = PORTC_HOTPLUG_LIVE_STATUS_G4X;
3033 break;
3034 case PORT_D:
3035 bit = PORTD_HOTPLUG_LIVE_STATUS_G4X;
3036 break;
3037 default:
3038 return connector_status_unknown;
3039 }
3027 } 3040 }
3028 3041
3029 if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0) 3042 if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0)