From c57944cd9aaac717d4d4ada44626e35925b39bbd Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 24 Jul 2004 17:02:49 +0000 Subject: [PATCH] Check for mmio before restoring crtc/crtc2 pitch registers --- hw/kdrive/ati/ati.c | 7 +++++-- 1 file 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);