diff options
-rw-r--r-- | src/mga_g_crtc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mga_g_crtc.c b/src/mga_g_crtc.c index 7f3d90f..d428b3d 100644 --- a/src/mga_g_crtc.c +++ b/src/mga_g_crtc.c @@ -725,9 +725,10 @@ state_restore(xf86CrtcPtr crtc, MgaCrtcStatePtr state, if (vga_flags & VGA_SR_FONTS) MGAG200SERestoreFonts(scrn, vga); } else - vgaHWRestore(scrn, vga, vga_flags); + vgaHWRestore(scrn, vga, vga_flags & ~VGA_SR_CMAP); - MGAGRestorePalette(scrn, vga->DAC); + if (vga_flags & VGA_SR_CMAP) + MGAGRestorePalette(scrn, vga->DAC); /* * this is needed to properly restore start address @@ -853,7 +854,7 @@ crtc_restore(xf86CrtcPtr crtc) MgaCrtcDataPtr data = MGACRTCDATAPTR(crtc); MGAPtr pMga = MGAPTR(crtc->scrn); vgaHWPtr vga = VGAHWPTR(crtc->scrn); - int vga_flags = VGA_SR_MODE; + int vga_flags = VGA_SR_MODE | VGA_SR_CMAP; if (pMga->Primary) vga_flags |= VGA_SR_FONTS; |