From af37b41eecdf303293ad637e02078521caf5f55d Mon Sep 17 00:00:00 2001 From: matthieu Date: Fri, 18 Dec 2009 22:47:56 +0000 Subject: [PATCH] Adapt to modular X.Org. --- .../hw/xfree86/os-support/bsd/hppa_video.c | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/xserver/hw/xfree86/os-support/bsd/hppa_video.c b/xserver/hw/xfree86/os-support/bsd/hppa_video.c index ce5211e84..f26341c50 100644 --- a/xserver/hw/xfree86/os-support/bsd/hppa_video.c +++ b/xserver/hw/xfree86/os-support/bsd/hppa_video.c @@ -1,5 +1,4 @@ -/* $XFree86$ */ -/* $OpenBSD: hppa_video.c,v 1.1 2006/11/28 20:29:31 matthieu Exp $ */ +/* $OpenBSD: hppa_video.c,v 1.2 2009/12/18 22:47:56 matthieu Exp $ */ /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat @@ -25,17 +24,17 @@ * */ -/* $XConsortium: bsd_video.c /main/10 1996/10/25 11:37:57 kaleb $ */ +#ifdef HAVE_XORG_CONFIG_H +#include +#endif -#include "X.h" +#include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" -/* #include "bus/Pci.h" */ - #ifndef MAP_FAILED #define MAP_FAILED ((caddr_t)-1) #endif @@ -55,6 +54,9 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->linearSupported = TRUE; pVidMem->mapMem = hppaMapVidMem; pVidMem->unmapMem = hppaUnmapVidMem; +#if HAVE_PCI_SYSTEM_INIT_DEV_MEM + pci_system_init_dev_mem(xf86Info.screenFd); +#endif pVidMem->initialised = TRUE; } @@ -68,12 +70,13 @@ hppaMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) pointer base; #ifdef DEBUG - ErrorF("mapVidMem %lx, %lx, fd = %d\n", Base, Size, fd); + xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d\n", + Base, Size, fd); #endif base = mmap(0, Size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, Base); if (base == MAP_FAILED) - FatalError("%s: could not mmap screen [s=%x,a=%x] (%s)", + FatalError("%s: could not mmap screen [s=%lx,a=%lx] (%s)", "xf86MapVidMem", Size, Base, strerror(errno)); return base; @@ -98,26 +101,14 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, /* Interrupt Handling section */ /***************************************************************************/ -Bool -xf86DisableInterrupts() -{ - - return(TRUE); -} - -void -xf86EnableInterrupts() -{ - - return; -} - +#ifdef X_PRIVSEP /* * Do all initialisation that need root privileges */ void xf86PrivilegedInit(void) { - /* pciInit(); */ + /* pci_system_init(); */ xf86OpenConsole(); } +#endif