Merge from upstreams in preparation for xserver 1.17
This commit is contained in:
parent
f3bbc4bb2c
commit
c9ee5288a7
@ -1371,6 +1371,18 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
|
||||
/* Override on users request */
|
||||
WriteCombine
|
||||
= xf86ReturnOptValBool(pRendition->Options, OPTION_FBWC, WriteCombine);
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
mapOption = PCI_DEV_MAP_FLAG_WRITABLE;
|
||||
if (WriteCombine)
|
||||
mapOption |= PCI_DEV_MAP_FLAG_WRITE_COMBINE;
|
||||
|
||||
err = pci_device_map_range(pRendition->PciInfo,
|
||||
pRendition->PciInfo->regions[0].base_addr,
|
||||
pRendition->PciInfo->regions[0].size,
|
||||
mapOption, (void *)&pRendition->board.vmem_base);
|
||||
|
||||
return (err == 0);
|
||||
#else
|
||||
if (WriteCombine) {
|
||||
xf86DrvMsg(pScreenInfo->scrnIndex, X_CONFIG,
|
||||
("Requesting Write-Combined memory access\n"));
|
||||
@ -1381,12 +1393,6 @@ renditionMapMem(ScrnInfoPtr pScreenInfo)
|
||||
mapOption = VIDMEM_MMIO;
|
||||
}
|
||||
|
||||
#ifdef XSERVER_LIBPCIACCESS
|
||||
err = pci_device_map_region(pRendition->PciInfo, 0, TRUE);
|
||||
pRendition->board.vmem_base = pRendition->PciInfo->regions[0].memory;
|
||||
|
||||
return (err == 0);
|
||||
#else
|
||||
pRendition->board.vmem_base=
|
||||
xf86MapPciMem(pScreenInfo->scrnIndex, mapOption,
|
||||
pRendition->pcitag,
|
||||
@ -1415,7 +1421,7 @@ renditionUnmapMem(ScrnInfoPtr pScreenInfo)
|
||||
#else
|
||||
pci_device_unmap_range(pRendition->PciInfo,
|
||||
pRendition->board.vmem_base,
|
||||
pScreenInfo->videoRam * 1024);
|
||||
pRendition->PciInfo->regions[0].size);
|
||||
#endif
|
||||
return TRUE;
|
||||
#ifdef DEBUG0
|
||||
|
@ -14,9 +14,6 @@
|
||||
/* Everything using inb/outb, etc needs "compiler.h" */
|
||||
#include "compiler.h"
|
||||
|
||||
/* Drivers for PCI hardware need this */
|
||||
#include "xf86PciInfo.h"
|
||||
|
||||
/* Drivers that need to access the PCI config space directly need this */
|
||||
#include "xf86Pci.h"
|
||||
|
||||
@ -66,4 +63,8 @@
|
||||
|
||||
#include "compat-api.h"
|
||||
/* end of __RENDITION_H__ */
|
||||
|
||||
#define PCI_CHIP_V1000 0x0001
|
||||
#define PCI_CHIP_V2x00 0x2000
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user