Commit 69769f9a authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Preserve VGACNTR bits from the BIOS

My Fujistsu-Siemens Lifebook S6010 doesn't like to resume from
S3 unless VGACNTR has been restore to the original value. The BIOS
value in this case was 0x0124008E. Setting the "VGA disable" bit
doesn't interfere with the S3 resume fortunately.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: default avatarThomas Richter <richter@rus.uni-stuttgart.de>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent b6b5d049
...@@ -1676,6 +1676,8 @@ struct drm_i915_private { ...@@ -1676,6 +1676,8 @@ struct drm_i915_private {
*/ */
struct workqueue_struct *dp_wq; struct workqueue_struct *dp_wq;
uint32_t bios_vgacntr;
/* Old dri1 support infrastructure, beware the dragons ya fools entering /* Old dri1 support infrastructure, beware the dragons ya fools entering
* here! */ * here! */
struct i915_dri1_state dri1; struct i915_dri1_state dri1;
......
...@@ -12727,7 +12727,11 @@ static void i915_disable_vga(struct drm_device *dev) ...@@ -12727,7 +12727,11 @@ static void i915_disable_vga(struct drm_device *dev)
vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); vga_put(dev->pdev, VGA_RSRC_LEGACY_IO);
udelay(300); udelay(300);
I915_WRITE(vga_reg, VGA_DISP_DISABLE); /*
* Fujitsu-Siemens Lifebook S6010 (830) has problems resuming
* from S3 without preserving (some of?) the other bits.
*/
I915_WRITE(vga_reg, dev_priv->bios_vgacntr | VGA_DISP_DISABLE);
POSTING_READ(vga_reg); POSTING_READ(vga_reg);
} }
...@@ -12816,6 +12820,8 @@ void intel_modeset_init(struct drm_device *dev) ...@@ -12816,6 +12820,8 @@ void intel_modeset_init(struct drm_device *dev)
intel_shared_dpll_init(dev); intel_shared_dpll_init(dev);
/* save the BIOS value before clobbering it */
dev_priv->bios_vgacntr = I915_READ(i915_vgacntrl_reg(dev));
/* Just disable it once at startup */ /* Just disable it once at startup */
i915_disable_vga(dev); i915_disable_vga(dev);
intel_setup_outputs(dev); intel_setup_outputs(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment