mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-01 00:10:14 +01:00
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.
This commit is contained in:
parent
b8755ff7c3
commit
01f6afcfea
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue