diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 40 |
2 files changed, 35 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 84365cd22092..ba0550222269 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -2122,9 +2122,13 @@ | |||
2122 | * Please check the detailed lore in the commit message for for experimental | 2122 | * Please check the detailed lore in the commit message for for experimental |
2123 | * evidence. | 2123 | * evidence. |
2124 | */ | 2124 | */ |
2125 | #define PORTD_HOTPLUG_LIVE_STATUS (1 << 29) | 2125 | #define PORTD_HOTPLUG_LIVE_STATUS_G4X (1 << 29) |
2126 | #define PORTC_HOTPLUG_LIVE_STATUS (1 << 28) | 2126 | #define PORTC_HOTPLUG_LIVE_STATUS_G4X (1 << 28) |
2127 | #define PORTB_HOTPLUG_LIVE_STATUS (1 << 27) | 2127 | #define PORTB_HOTPLUG_LIVE_STATUS_G4X (1 << 27) |
2128 | /* VLV DP/HDMI bits again match Bspec */ | ||
2129 | #define PORTD_HOTPLUG_LIVE_STATUS_VLV (1 << 27) | ||
2130 | #define PORTC_HOTPLUG_LIVE_STATUS_VLV (1 << 28) | ||
2131 | #define PORTB_HOTPLUG_LIVE_STATUS_VLV (1 << 29) | ||
2128 | #define PORTD_HOTPLUG_INT_STATUS (3 << 21) | 2132 | #define PORTD_HOTPLUG_INT_STATUS (3 << 21) |
2129 | #define PORTC_HOTPLUG_INT_STATUS (3 << 19) | 2133 | #define PORTC_HOTPLUG_INT_STATUS (3 << 19) |
2130 | #define PORTB_HOTPLUG_INT_STATUS (3 << 17) | 2134 | #define PORTB_HOTPLUG_INT_STATUS (3 << 17) |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 689b832f7551..5ede4e8e290d 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -3009,18 +3009,34 @@ g4x_dp_detect(struct intel_dp *intel_dp) | |||
3009 | return status; | 3009 | return status; |
3010 | } | 3010 | } |
3011 | 3011 | ||
3012 | switch (intel_dig_port->port) { | 3012 | if (IS_VALLEYVIEW(dev)) { |
3013 | case PORT_B: | 3013 | switch (intel_dig_port->port) { |
3014 | bit = PORTB_HOTPLUG_LIVE_STATUS; | 3014 | case PORT_B: |
3015 | break; | 3015 | bit = PORTB_HOTPLUG_LIVE_STATUS_VLV; |
3016 | case PORT_C: | 3016 | break; |
3017 | bit = PORTC_HOTPLUG_LIVE_STATUS; | 3017 | case PORT_C: |
3018 | break; | 3018 | bit = PORTC_HOTPLUG_LIVE_STATUS_VLV; |
3019 | case PORT_D: | 3019 | break; |
3020 | bit = PORTD_HOTPLUG_LIVE_STATUS; | 3020 | case PORT_D: |
3021 | break; | 3021 | bit = PORTD_HOTPLUG_LIVE_STATUS_VLV; |
3022 | default: | 3022 | break; |
3023 | 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 | } | ||
3024 | } | 3040 | } |
3025 | 3041 | ||
3026 | if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0) | 3042 | if ((I915_READ(PORT_HOTPLUG_STAT) & bit) == 0) |