summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Kettenis <mark.kettenis@xs4all.nl>2009-06-04 11:27:07 -0600
committerMatthieu Herrb <matthieu.herrb@laas.fr>2009-06-04 11:37:25 -0600
commit2c022e126c027d20b4b060e31cccb012265cec6a (patch)
treea37e36c951d5dc1de5833205ec1aac4ccd75ef41 /src
parent1b36ca0c453191e4837cea25794731b166df19f7 (diff)
Only map a 64k block of registers.
The driver tries to map a block of registers that is too large. The mmio registers consist of two blocks of 64k. The first 64k provide a little-endian view, the second 64k provide a big-endian view. However the driver always tries to map 128k. And mapping 128k from the offset where the big-endian view starts will fail on OpenBSD. This changes things such that the driver maps just 64k. There is no reason to map the big-endian view on little-endian machines. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Diffstat (limited to 'src')
-rw-r--r--src/glint_driver.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glint_driver.c b/src/glint_driver.c
index 9f82fb9..26c06a3 100644
--- a/src/glint_driver.c
+++ b/src/glint_driver.c
@@ -2292,13 +2292,13 @@ GLINTMapMem(ScrnInfoPtr pScrn)
*/
#ifndef XSERVER_LIBPCIACCESS
pGlint->IOBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
- pGlint->PciTag, pGlint->IOAddress, 0x20000);
+ pGlint->PciTag, pGlint->IOAddress, 0x10000);
#else
{
void** result = (void**)&pGlint->IOBase;
int err = pci_device_map_range(pGlint->PciInfo,
pGlint->IOAddress,
- 0x20000,
+ 0x10000,
PCI_DEV_MAP_FLAG_WRITABLE,
result);
@@ -2366,9 +2366,9 @@ GLINTUnmapMem(ScrnInfoPtr pScrn)
* Unmap IO registers to virtual address space
*/
#ifndef XSERVER_LIBPCIACCESS
- xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pGlint->IOBase, 0x20000);
+ xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pGlint->IOBase, 0x10000);
#else
- pci_device_unmap_range(pGlint->PciInfo, pGlint->IOBase, 0x20000);
+ pci_device_unmap_range(pGlint->PciInfo, pGlint->IOBase, 0x10000);
#endif
pGlint->IOBase = NULL;