summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2008-09-15 02:33:25 +1000
committerDave Airlie <airlied@linux.ie>2008-09-15 02:33:25 +1000
commit9da29a371f7a12c5ebe225c94d0719d0cd6098e5 (patch)
treeb2b1db519d9a7e6b64618d897e1feee61b819b96
parent986464aa29077a131304b407e4da565f85c144ab (diff)
glint: fix build on alpha for pciaccess.
Redid patch from #17569 from jcristau@debian.org
-rw-r--r--src/glintpcirename.h6
-rw-r--r--src/pm3_dac.c12
2 files changed, 12 insertions, 6 deletions
diff --git a/src/glintpcirename.h b/src/glintpcirename.h
index c4beac6..9cd66c4 100644
--- a/src/glintpcirename.h
+++ b/src/glintpcirename.h
@@ -77,6 +77,9 @@ enum region_type {
#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value))
+#define PCI_WRITE_BYTE(_pcidev, _value, _offset) \
+ pciWriteByte(PCI_CFG_TAG(_pcidev), (_offset), (_value))
+
#else /* XSERVER_LIBPCIACCESS */
typedef struct pci_device *pciVideoPtr;
@@ -117,6 +120,9 @@ typedef struct pci_device *pciVideoPtr;
#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
pci_device_cfg_write_u32((_pcidev), (_value), (_offset))
+#define PCI_WRITE_BYTE(_pcidev, _value, _offset) \
+ pci_device_cfg_write_u8((_pcidev), (_value), (_offset))
+
#endif /* XSERVER_LIBPCIACCESS */
#endif /* SISPCIRENAME_H */
diff --git a/src/pm3_dac.c b/src/pm3_dac.c
index e11d190..9b1bd3b 100644
--- a/src/pm3_dac.c
+++ b/src/pm3_dac.c
@@ -437,9 +437,9 @@ Permedia3PreInit(ScrnInfoPtr pScrn)
"VX1 secondary enabling VGA before int10\n");
/* Enable VGA on the current card. */
- pciWriteByte( pGlint->PciTag, 0xf8, 0 );
- pciWriteByte( pGlint->PciTag, 0xf4, 0 );
- pciWriteByte( pGlint->PciTag, 0xfc, 0 );
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0, 0xf8);
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0, 0xf4);
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0, 0xfc);
/* The card we are on should be VGA-enabled now, so run int10. */
if (xf86LoadSubModule(pScrn, "int10")) {
@@ -455,9 +455,9 @@ Permedia3PreInit(ScrnInfoPtr pScrn)
"VX1 secondary disabling VGA after int10\n");
/* Finally, disable VGA on the current card. */
- pciWriteByte( pGlint->PciTag, 0xf8, 0x70 );
- pciWriteByte( pGlint->PciTag, 0xf4, 0x01 );
- pciWriteByte( pGlint->PciTag, 0xfc, 0x00 );
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0x70, 0xf8);
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0x01, 0xf4);
+ PCI_WRITE_BYTE(pGlint->PciInfo, 0x00, 0xfc);
}
}
#endif /* __alpha__ */