aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2014-12-16 11:38:37 -0500
committerJani Nikula <jani.nikula@intel.com>2014-12-18 08:46:28 -0500
commit01f5a6261cea395f72877aeb7c2fe2d42e1b1e00 (patch)
treeac6bc7ea5571cdbbda193c915be07081ba303131
parent7d47559ee84b3ac206aa9e675606fafcd7c0b500 (diff)
Revert "drm/i915: Preserve VGACNTR bits from the BIOS"
The VGA_2X_MODE bit apparently affects the display even when the VGA plane is disabled. The bit will set by the BIOS when the panel width is at least 1280 pixels. So by preserving the bit from the BIOS we end up with corrupted display on machines with such high res panels. I only have 1024x768 panels on my gen2 machines so never ran into this problem. The original reason for preserving the VGACNTR register was to make my 830 survive S3 with acpi_sleep=s3_bios option. However after further 830 fixes that option is no longer needed to make S3 work and preserving VGACNTR doesn't seem to be necessary without it, so we can just revert the entire patch. This reverts commit 69769f9a422bfc62e17399da3590c5e31ac37f24 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri Aug 15 01:22:08 2014 +0300 drm/i915: Preserve VGACNTR bits from the BIOS Cc: Bruno Prémont <bonbons@linux-vserver.org> Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87171 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 63bcda5541ec..3c710bb88a5c 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1756,8 +1756,6 @@ struct drm_i915_private {
1756 */ 1756 */
1757 struct workqueue_struct *dp_wq; 1757 struct workqueue_struct *dp_wq;
1758 1758
1759 uint32_t bios_vgacntr;
1760
1761 /* Abstract the submission mechanism (legacy ringbuffer or execlists) away */ 1759 /* Abstract the submission mechanism (legacy ringbuffer or execlists) away */
1762 struct { 1760 struct {
1763 int (*do_execbuf)(struct drm_device *dev, struct drm_file *file, 1761 int (*do_execbuf)(struct drm_device *dev, struct drm_file *file,
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 03d0b0cb8e05..97c5513ea1c8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13060,11 +13060,7 @@ static void i915_disable_vga(struct drm_device *dev)
13060 vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); 13060 vga_put(dev->pdev, VGA_RSRC_LEGACY_IO);
13061 udelay(300); 13061 udelay(300);
13062 13062
13063 /* 13063 I915_WRITE(vga_reg, VGA_DISP_DISABLE);
13064 * Fujitsu-Siemens Lifebook S6010 (830) has problems resuming
13065 * from S3 without preserving (some of?) the other bits.
13066 */
13067 I915_WRITE(vga_reg, dev_priv->bios_vgacntr | VGA_DISP_DISABLE);
13068 POSTING_READ(vga_reg); 13064 POSTING_READ(vga_reg);
13069} 13065}
13070 13066
@@ -13149,8 +13145,6 @@ void intel_modeset_init(struct drm_device *dev)
13149 13145
13150 intel_shared_dpll_init(dev); 13146 intel_shared_dpll_init(dev);
13151 13147
13152 /* save the BIOS value before clobbering it */
13153 dev_priv->bios_vgacntr = I915_READ(i915_vgacntrl_reg(dev));
13154 /* Just disable it once at startup */ 13148 /* Just disable it once at startup */
13155 i915_disable_vga(dev); 13149 i915_disable_vga(dev);
13156 intel_setup_outputs(dev); 13150 intel_setup_outputs(dev);