From 55d219394ad6af8e25ff604bcbb49d5a551bd348 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 22 Aug 2007 10:43:39 -0700 Subject: Merge PCI-rework support and "classic" PCI interface support into one tree First pass at merging both trees. So far, this has only been tested on the PCI-rework build on a PCI G450. --- src/mga_dac3026.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mga_dac3026.c') 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", -- cgit v1.2.3