diff options
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bc0b7aa0ab96..7395f6a389a5 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -9152,6 +9152,23 @@ static void intel_sanitize_encoder(struct intel_encoder *encoder) | |||
9152 | * the crtc fixup. */ | 9152 | * the crtc fixup. */ |
9153 | } | 9153 | } |
9154 | 9154 | ||
9155 | static void i915_redisable_vga(struct drm_device *dev) | ||
9156 | { | ||
9157 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
9158 | u32 vga_reg; | ||
9159 | |||
9160 | if (HAS_PCH_SPLIT(dev)) | ||
9161 | vga_reg = CPU_VGACNTRL; | ||
9162 | else | ||
9163 | vga_reg = VGACNTRL; | ||
9164 | |||
9165 | if (I915_READ(vga_reg) != VGA_DISP_DISABLE) { | ||
9166 | DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n"); | ||
9167 | I915_WRITE(vga_reg, VGA_DISP_DISABLE); | ||
9168 | POSTING_READ(vga_reg); | ||
9169 | } | ||
9170 | } | ||
9171 | |||
9155 | /* Scan out the current hw modeset state, sanitizes it and maps it into the drm | 9172 | /* Scan out the current hw modeset state, sanitizes it and maps it into the drm |
9156 | * and i915 state tracking structures. */ | 9173 | * and i915 state tracking structures. */ |
9157 | void intel_modeset_setup_hw_state(struct drm_device *dev, | 9174 | void intel_modeset_setup_hw_state(struct drm_device *dev, |
@@ -9260,6 +9277,8 @@ void intel_modeset_setup_hw_state(struct drm_device *dev, | |||
9260 | intel_set_mode(&crtc->base, &crtc->base.mode, | 9277 | intel_set_mode(&crtc->base, &crtc->base.mode, |
9261 | crtc->base.x, crtc->base.y, crtc->base.fb); | 9278 | crtc->base.x, crtc->base.y, crtc->base.fb); |
9262 | } | 9279 | } |
9280 | |||
9281 | i915_redisable_vga(dev); | ||
9263 | } else { | 9282 | } else { |
9264 | intel_modeset_update_staged_output_state(dev); | 9283 | intel_modeset_update_staged_output_state(dev); |
9265 | } | 9284 | } |