summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2008-01-28 21:05:22 -0800
committerJesse Barnes <jesse.barnes@intel.com>2008-01-28 21:05:22 -0800
commit01f6afcfea9d315ad1473045da141bfc95bcb7e6 (patch)
treee5ea6c6fb26001423991080329a4cb0e32995714 /linux-core
parentb8755ff7c33baac2abe5b5fe00897b33a896a098 (diff)
Fix hibernate save/restore of VGA attribute regs
In hibernate, we may end up calling the VGA save regs function twice, so we need to make sure it's idempotent. That means leaving ARX in index mode after the first save operation. Fixes hibernate on 965.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_drv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-core/i915_drv.c b/linux-core/i915_drv.c
index a5f60ee1..5f2e6adc 100644
--- a/linux-core/i915_drv.c
+++ b/linux-core/i915_drv.c
@@ -192,6 +192,7 @@ static void i915_save_vga(struct drm_device *dev)
dev_priv->saveAR[i] = i915_read_ar(st01, i, 0);
inb(st01);
outb(dev_priv->saveAR_INDEX, VGA_AR_INDEX);
+ inb(st01);
/* Graphics controller registers */
for (i = 0; i < 9; i++)
@@ -257,6 +258,7 @@ static void i915_restore_vga(struct drm_device *dev)
i915_write_ar(st01, i, dev_priv->saveAR[i], 0);
inb(st01); /* switch back to index mode */
outb(dev_priv->saveAR_INDEX | 0x20, VGA_AR_INDEX);
+ inb(st01);
/* VGA color palette registers */
outb(dev_priv->saveDACMASK, VGA_DACMASK);