From 3d5096753de45d03d34066129d7f78b686002a6c Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 7 Oct 2021 15:44:56 +0200 Subject: [PATCH] Fixed the Cirrus Logic CL-GD 54xx reset handler to avoid excess mapping disables on non-PCI cards. --- src/video/vid_cl54xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/video/vid_cl54xx.c b/src/video/vid_cl54xx.c index 730bfe503..7ba2efb3c 100644 --- a/src/video/vid_cl54xx.c +++ b/src/video/vid_cl54xx.c @@ -3746,19 +3746,20 @@ gd54xx_reset(void *priv) io_sethandler(0x03c0, 0x0020, gd54xx_in, NULL, NULL, gd54xx_out, NULL, NULL, gd54xx); mem_mapping_disable(&gd54xx->vgablt_mapping); - if (gd54xx->has_bios) + if (gd54xx->has_bios && gd54xx->pci) mem_mapping_disable(&gd54xx->bios_rom.mapping); memset(gd54xx->pci_regs, 0x00, 256); - gd543x_recalc_mapping(gd54xx); - mem_mapping_set_p(&svga->mapping, gd54xx); mem_mapping_disable(&gd54xx->mmio_mapping); mem_mapping_disable(&gd54xx->linear_mapping); mem_mapping_disable(&gd54xx->aperture2_mapping); mem_mapping_disable(&gd54xx->vgablt_mapping); + gd543x_recalc_mapping(gd54xx); + gd54xx_recalc_banking(gd54xx); + svga->hwcursor.yoff = svga->hwcursor.xoff = 0; if (gd54xx->id >= CIRRUS_ID_CLGD5420) {