diff options
author | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-05-09 15:23:49 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2008-08-19 08:45:10 -0700 |
commit | f485c553c23c67fd060fdea82f57128fd4a1749e (patch) | |
tree | 7cfced9cbc05dbf3d9b405a9ea937aa349625f60 | |
parent | 319ee20c9bd4f764297cf252723a23bb6a95051a (diff) |
Print error message when pci_device_map_range fails
-rw-r--r-- | src/nv_setup.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/nv_setup.c b/src/nv_setup.c index b057da1..bea0050 100644 --- a/src/nv_setup.c +++ b/src/nv_setup.c @@ -341,7 +341,10 @@ NVCommonSetup(ScrnInfoPtr pScrn) int FlatPanel = -1; /* really means the CRTC is slaved */ Bool Television = FALSE; void *tmp; - +#if XSERVER_LIBPCIACCESS + int err; +#endif + /* * Override VGA I/O routines. */ @@ -371,8 +374,12 @@ NVCommonSetup(ScrnInfoPtr pScrn) pVga->MMIOOffset = 0; #if XSERVER_LIBPCIACCESS - pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000, - PCI_DEV_MAP_FLAG_WRITABLE, &tmp); + err = pci_device_map_range(pNv->PciInfo, pNv->IOAddress, 0x01000000, + PCI_DEV_MAP_FLAG_WRITABLE, &tmp); + if (err != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "pci_device_map_range failed: %s\n", strerror(err)); + } #else tmp = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO | VIDMEM_READSIDEEFFECT, pNv->PciTag, pNv->IOAddress, 0x01000000); |