summaryrefslogtreecommitdiff
path: root/src/clientlx.c
diff options
context:
space:
mode:
authorJames Cloos <cloos@jhcloos.com>2007-09-03 06:07:32 -0400
committerJames Cloos <cloos@jhcloos.com>2007-09-03 06:07:32 -0400
commit6fde3fd6d34e7252ee16422b19896d71b1622039 (patch)
treef14ab2b9dd93d9097d5f2c8a4085ee2b81a6f7fc /src/clientlx.c
parent4bfc1e1ea11604e3af150a4228663cb1cb1bf9f3 (diff)
parent923176f5aad777b4023003a457bb77da21373389 (diff)
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-mga
Diffstat (limited to 'src/clientlx.c')
-rw-r--r--src/clientlx.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/clientlx.c b/src/clientlx.c
index 306d3ed..9c6ab50 100644
--- a/src/clientlx.c
+++ b/src/clientlx.c
@@ -67,7 +67,11 @@ ULONG ClientReadConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
ASSERT_HANDLER(pBoard);
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_cfg_read_u8(pMga->PciInfo, pucByte, ulOffset);
+#else
*pucByte = pciReadByte(pMga->PciTag,ulOffset);
+#endif
return 0;
}
@@ -95,7 +99,11 @@ ULONG ClientReadConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
ASSERT_HANDLER(pBoard);
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_cfg_read_u32(pMga->PciInfo, (uint32_t *) pulDword, ulOffset);
+#else
*pulDword = pciReadLong(pMga->PciTag,ulOffset);
+#endif
return 0;
}
@@ -123,7 +131,11 @@ ULONG ClientWriteConfigSpaceByte(LPBOARDHANDLE pBoard, ULONG ulOffset,
ASSERT_HANDLER(pBoard);
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_cfg_write_u8(pMga->PciInfo, ucByte, ulOffset);
+#else
pciWriteByte(pMga->PciTag,ulOffset, ucByte);
+#endif
return 0;
}
@@ -151,7 +163,11 @@ ULONG ClientWriteConfigSpaceDword(LPBOARDHANDLE pBoard, ULONG ulOffset,
ASSERT_HANDLER(pBoard);
+#ifdef XSERVER_LIBPCIACCESS
+ pci_device_cfg_write_u32(pMga->PciInfo, (uint32_t) ulDword, ulOffset);
+#else
pciWriteLong(pMga->PciTag,ulOffset, ulDword);
+#endif
return 0;
}