示例#1
0
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
	checkDevMem(TRUE);
	pVidMem->linearSupported = useDevMem;
	pVidMem->mapMem = mapVidMem;
	pVidMem->unmapMem = unmapVidMem;

	if (useDevMem)
		pci_system_init_dev_mem(devMemFd);

#ifdef HAS_MTRR_SUPPORT
	if (useDevMem) {
		if (cleanMTRR()) {
			pVidMem->setWC = setWC;
			pVidMem->undoWC = undoWC;
		}
	}
#endif
#if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__)
	pVidMem->setWC = NetBSDsetWC;
	pVidMem->undoWC = NetBSDundoWC;
#endif
	pVidMem->initialised = TRUE;
}
示例#2
0
文件: lynx_video.c 项目: aosm/X11
void
xf86OSInitVidMem(VidMemInfoPtr pVidMem)
{
  pVidMem->linearSupported = TRUE;
  pVidMem->mapMem = MapVidMem;
  pVidMem->unmapMem = UnMapVidMem;
  pVidMem->setWC = 0;
  pVidMem->undoWC = 0;
#ifdef HAS_MTRR_SUPPORT
  if (cleanMTRR()) {
	pVidMem->setWC = setWC;
	pVidMem->undoWC = undoWC;
  }
#endif
  pVidMem->initialised = TRUE;
}