summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2004-07-24 17:02:49 +0000
committerKeith Packard <keithp@keithp.com>2004-07-24 17:02:49 +0000
commitc57944cd9aaac717d4d4ada44626e35925b39bbd (patch)
tree167de4913e6510bd2d778906e373c1acf46465d3
parent5fdff8b95e8f90221a46717c2f84715ab238460c (diff)
Check for mmio before restoring crtc/crtc2 pitch registers
-rw-r--r--hw/kdrive/ati/ati.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/kdrive/ati/ati.c b/hw/kdrive/ati/ati.c
index d421d0c33..470f66042 100644
--- a/hw/kdrive/ati/ati.c
+++ b/hw/kdrive/ati/ati.c
@@ -612,8 +612,11 @@ ATIRestore(KdCardInfo *card)
ATICardInfo *atic = card->driver;
char *mmio = atic->reg_base;
- MMIO_OUT32(mmio, ATI_REG_CRTC_PITCH, atic->crtc_pitch);
- MMIO_OUT32(mmio, ATI_REG_CRTC2_PITCH, atic->crtc2_pitch);
+ if (mmio)
+ {
+ MMIO_OUT32(mmio, ATI_REG_CRTC_PITCH, atic->crtc_pitch);
+ MMIO_OUT32(mmio, ATI_REG_CRTC2_PITCH, atic->crtc2_pitch);
+ }
ATIUnmapReg(card, atic);
atic->backend_funcs.restore(card);