diff options
Diffstat (limited to 'src/mga_dac3026.c')
-rw-r--r-- | src/mga_dac3026.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mga_dac3026.c b/src/mga_dac3026.c index 9926017..254f6e2 100644 --- a/src/mga_dac3026.c +++ b/src/mga_dac3026.c @@ -746,8 +746,13 @@ MGA3026Restore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, for (i = 0; i < 6; i++) OUTREG16(0x1FDE, (mgaReg->ExtVga[i] << 8) | i); +#ifdef PCIACCESS pci_device_cfg_write_bits(pMga->PciInfo, OPTION_MASK, mgaReg->Option, PCI_OPTION_REG); +#else + pciSetBitsLong(pMga->PciTag, PCI_OPTION_REG, OPTION_MASK, + mgaReg->Option); +#endif MGA_NOT_HAL( /* select pixel clock PLL as clock source */ @@ -866,8 +871,12 @@ MGA3026Save(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, MGARegPtr mgaReg, for (i = 0; i < DACREGSIZE; i++) mgaReg->DacRegs[i] = inTi3026(MGADACregs[i]); +#ifdef PCIACCESS pci_device_cfg_read_u32(pMga->PciInfo, & mgaReg->Option, PCI_OPTION_REG); +#else + mgaReg->Option = pciReadLong(pMga->PciTag, PCI_OPTION_REG); +#endif #ifdef DEBUG ErrorF("read: %02X %02X %02X %02X %02X %02X %08lX\n", |