aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorKrzysztof Mazur <krzysiek@podlesie.net>2012-12-19 05:03:41 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-19 06:39:34 -0500
commit0fde901f1ddd2ce0e380a6444f1fb7ca555859e9 (patch)
tree5602eef617d3961716c1824295ae940ac1d793e1 /drivers/gpu
parentdc9dd7a20fde95aa81a8307cde79c2dff9f83f3d (diff)
i915: ensure that VGA plane is disabled
Some broken systems (like HP nc6120) in some cases, usually after LID close/open, enable VGA plane, making display unusable (black screen on LVDS, some strange mode on VGA output). We used to disable VGA plane only once at startup. Now we also check, if VGA plane is still disabled while changing mode, and fix that if something changed it. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57434 Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c19
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
9155static 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. */
9157void intel_modeset_setup_hw_state(struct drm_device *dev, 9174void 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 }