From a915739887477b28d924ecc8417ee107d125bd6c Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 6 Sep 2009 18:48:27 +0000 Subject: Switched to xorg-server-1.6.99.900.tar.gz --- .../hw/xfree86/os-support/linux/Makefile.am | 3 +- .../hw/xfree86/os-support/linux/Makefile.in | 64 ++++++++-------- .../hw/xfree86/os-support/linux/int10/linux.c | 36 +++------ .../os-support/linux/int10/vm86/linux_vm86.c | 4 +- xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c | 22 +++--- xorg-server/hw/xfree86/os-support/linux/lnx_agp.c | 24 +++--- xorg-server/hw/xfree86/os-support/linux/lnx_apm.c | 19 ++--- xorg-server/hw/xfree86/os-support/linux/lnx_axp.c | 26 +++---- xorg-server/hw/xfree86/os-support/linux/lnx_bell.c | 2 +- xorg-server/hw/xfree86/os-support/linux/lnx_font.c | 14 +--- xorg-server/hw/xfree86/os-support/linux/lnx_init.c | 85 +++++++--------------- xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c | 2 +- .../hw/xfree86/os-support/linux/lnx_video.c | 44 +++++------ 13 files changed, 135 insertions(+), 210 deletions(-) (limited to 'xorg-server/hw/xfree86/os-support/linux') diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.am b/xorg-server/hw/xfree86/os-support/linux/Makefile.am index da1dcf690..1239c8f6b 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.am @@ -26,13 +26,12 @@ XORG_CFLAGS += -DHAVE_APM endif liblinux_la_SOURCES = lnx_init.c lnx_video.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ - $(srcdir)/../shared/stdResource.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(PLATFORM_PCI_SUPPORT) diff --git a/xorg-server/hw/xfree86/os-support/linux/Makefile.in b/xorg-server/hw/xfree86/os-support/linux/Makefile.in index 51eb3a366..013662154 100644 --- a/xorg-server/hw/xfree86/os-support/linux/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/linux/Makefile.in @@ -40,8 +40,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/linux DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -51,26 +54,26 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ - $(top_builddir)/include/kdrive-config.h + $(top_builddir)/include/kdrive-config.h \ + $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @LINUX_ALPHA_TRUE@liblinux_la_DEPENDENCIES = liblinuxev56.la -am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_pci.c \ - lnx_agp.c lnx_kmod.c lnx_bell.c \ - $(srcdir)/../shared/bios_mmap.c $(srcdir)/../shared/VTsw_usl.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/vidmem.c \ - $(srcdir)/../shared/sigio.c $(srcdir)/../shared/stdResource.c \ +am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_agp.c \ + lnx_kmod.c lnx_bell.c $(srcdir)/../shared/bios_mmap.c \ + $(srcdir)/../shared/VTsw_usl.c $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/sigio.c \ lnx_acpi.c lnx_apm.c $(srcdir)/lnx_axp.c \ $(srcdir)/../shared/xf86Axp.c $(srcdir)/../shared/ia64Pci.c @LNXACPI_TRUE@am__objects_1 = lnx_acpi.lo lnx_apm.lo @LNXAPM_TRUE@am__objects_2 = lnx_apm.lo @LINUX_ALPHA_FALSE@@LINUX_IA64_TRUE@am__objects_3 = ia64Pci.lo @LINUX_ALPHA_TRUE@am__objects_3 = lnx_axp.lo xf86Axp.lo -am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_pci.lo \ - lnx_agp.lo lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo \ - posix_tty.lo vidmem.lo sigio.lo stdResource.lo \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) +am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_agp.lo \ + lnx_kmod.lo lnx_bell.lo bios_mmap.lo VTsw_usl.lo posix_tty.lo \ + vidmem.lo sigio.lo $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) liblinuxev56_la_LIBADD = am__liblinuxev56_la_SOURCES_DIST = lnx_ev56.c @@ -102,6 +105,7 @@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ @@ -122,9 +126,12 @@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -153,7 +160,9 @@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ DRIPROTO_LIBS = @DRIPROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_LIBS = @DRI_LIBS@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ @@ -162,9 +171,13 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ +F77 = @F77@ +FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GL_CFLAGS = @GL_CFLAGS@ @@ -203,12 +216,13 @@ LTCOMPILE = @LTCOMPILE@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ -MESA_SOURCE = @MESA_SOURCE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ @@ -228,7 +242,6 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -238,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -251,11 +265,10 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ -VENDOR_NAME = @VENDOR_NAME@ +V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ -VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ +WINDRES = @WINDRES@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ @@ -291,6 +304,7 @@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDL_INCS = @XSDL_INCS@ @@ -315,7 +329,6 @@ YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ -abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ @@ -338,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -369,7 +383,9 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ +shavedir = @shavedir@ srcdir = @srcdir@ +symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ @@ -387,13 +403,12 @@ noinst_LTLIBRARIES = liblinux.la $(am__append_1) @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c lnx_apm.c @LNXAPM_TRUE@APM_SRCS = lnx_apm.c liblinux_la_SOURCES = lnx_init.c lnx_video.c \ - lnx_pci.c lnx_agp.c lnx_kmod.c lnx_bell.c \ + lnx_agp.c lnx_kmod.c lnx_bell.c \ $(srcdir)/../shared/bios_mmap.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ - $(srcdir)/../shared/stdResource.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(PLATFORM_PCI_SUPPORT) @@ -476,11 +491,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_bell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Axp.Plo@am__quote@ @@ -540,13 +553,6 @@ sigio.lo: $(srcdir)/../shared/sigio.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c -stdResource.lo: $(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stdResource.lo -MD -MP -MF $(DEPDIR)/stdResource.Tpo -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/stdResource.Tpo $(DEPDIR)/stdResource.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/stdResource.c' object='stdResource.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stdResource.lo `test -f '$(srcdir)/../shared/stdResource.c' || echo '$(srcdir)/'`$(srcdir)/../shared/stdResource.c - lnx_axp.lo: $(srcdir)/lnx_axp.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lnx_axp.lo -MD -MP -MF $(DEPDIR)/lnx_axp.Tpo -c -o lnx_axp.lo `test -f '$(srcdir)/lnx_axp.c' || echo '$(srcdir)/'`$(srcdir)/lnx_axp.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/lnx_axp.Tpo $(DEPDIR)/lnx_axp.Plo diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 8274bbbfb..0cf3507c3 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -115,9 +115,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) if ((!vidMem) || (!sysMem)) { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (!sysMem) { -#ifdef DEBUG - ErrorF("Mapping sys bios area\n"); -#endif + DebugF("Mapping sys bios area\n"); if ((sysMem = mmap((void *)(SYS_BIOS), BIOS_SIZE, PROT_READ | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, SYS_BIOS)) @@ -128,9 +126,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) } } if (!vidMem) { -#ifdef DEBUG - ErrorF("Mapping VRAM area\n"); -#endif + DebugF("Mapping VRAM area\n"); if ((vidMem = mmap((void *)(V_RAM), VRAM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, V_RAM)) @@ -162,9 +158,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) (pointer)xnfcalloc(1, ALLOC_ENTRIES(pagesize)); if (!xf86IsEntityPrimary(entityIndex)) { -#ifdef DEBUG - ErrorF("Mapping high memory area\n"); -#endif + DebugF("Mapping high memory area\n"); if ((high_mem = shmget(counter++, HIGH_MEM_SIZE, IPC_CREAT | SHM_R | SHM_W)) == -1) { if (errno == ENOSYS) @@ -176,9 +170,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) goto error1; } } else { -#ifdef DEBUG - ErrorF("Mapping Video BIOS\n"); -#endif + DebugF("Mapping Video BIOS\n"); videoBiosMapped = TRUE; if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if ((vMem = mmap((void *)(V_BIOS), SYS_BIOS - V_BIOS, @@ -195,9 +187,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) } ((linuxInt10Priv*)pInt->private)->highMem = high_mem; -#ifdef DEBUG - ErrorF("Mapping 640kB area\n"); -#endif + DebugF("Mapping 640kB area\n"); if ((low_mem = shmget(counter++, V_RAM, IPC_CREAT | SHM_R | SHM_W)) == -1) { xf86DrvMsg(screen, X_ERROR, @@ -229,16 +219,12 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) Int10Current = pInt; -#ifdef DEBUG - ErrorF("Mapping int area\n"); -#endif + DebugF("Mapping int area\n"); if (xf86ReadBIOS(0, 0, (unsigned char *)0, LOW_PAGE_SIZE) < 0) { xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n"); goto error3; } -#ifdef DEBUG - ErrorF("done\n"); -#endif + DebugF("done\n"); /* * Read in everything between V_BIOS and SYS_BIOS as some system BIOSes * have executable code there. Note that xf86ReadBIOS() can only bring in @@ -246,17 +232,13 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) */ if (!videoBiosMapped) { memset((pointer)V_BIOS, 0, SYS_BIOS - V_BIOS); -#ifdef DEBUG - ErrorF("Reading BIOS\n"); -#endif + DebugF("Reading BIOS\n"); for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (xf86ReadBIOS(cs, 0, (pointer)cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long)cs); -#ifdef DEBUG - ErrorF("done\n"); -#endif + DebugF("done\n"); } if (xf86IsEntityPrimary(entityIndex) && !(initPrimary(options))) { diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c b/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c index 9412b07a4..34afd9502 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c @@ -172,9 +172,7 @@ vm86_GP_fault(xf86Int10InfoPtr pInt) break; case 0xf4: -#ifdef DEBUG - ErrorF("hlt at %p\n", lina); -#endif + DebugF("hlt at %p\n", lina); return FALSE; case 0x0f: diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c index bb975cc5d..5fad19451 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c @@ -133,23 +133,22 @@ lnxACPIOpen(void) int fd; struct sockaddr_un addr; int r = -1; + static int warned = 0; -#ifdef DEBUG - ErrorF("ACPI: OSPMOpen called\n"); -#endif + DebugF("ACPI: OSPMOpen called\n"); if (ACPIihPtr || !xf86Info.pmFlag) return NULL; -#ifdef DEBUG - ErrorF("ACPI: Opening device\n"); -#endif + DebugF("ACPI: Opening device\n"); if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, ACPI_SOCKET); if ((r = connect(fd, (struct sockaddr*)&addr, sizeof(addr))) == -1) { - xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, - strerror(errno)); + if (!warned) + xf86MsgVerb(X_WARNING,3,"Open ACPI failed (%s) (%s)\n", + ACPI_SOCKET, strerror(errno)); + warned = 1; shutdown(fd, 2); close(fd); return NULL; @@ -160,6 +159,7 @@ lnxACPIOpen(void) xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; ACPIihPtr = xf86AddGeneralHandler(fd,xf86HandlePMEvents,NULL); xf86MsgVerb(X_INFO,3,"Open ACPI successful (%s)\n", ACPI_SOCKET); + warned = 0; return lnxCloseACPI; } @@ -168,10 +168,8 @@ static void lnxCloseACPI(void) { int fd; - -#ifdef DEBUG - ErrorF("ACPI: Closing device\n"); -#endif + + DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { fd = xf86RemoveGeneralHandler(ACPIihPtr); shutdown(fd, 2); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c index ded9e0fae..61437406d 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_agp.c @@ -43,7 +43,7 @@ static Bool initDone = FALSE; * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ -_X_EXPORT Bool +Bool xf86GARTCloseScreen(int screenNum) { if(gartFd != -1) { @@ -116,13 +116,13 @@ GARTInit(int screenNum) return TRUE; } -_X_EXPORT Bool -xf86AgpGARTSupported() +Bool +xf86AgpGARTSupported(void) { return GARTInit(-1); } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { struct _agp_info agpinf; @@ -155,7 +155,7 @@ xf86GetAGPInfo(int screenNum) info->systemPages = agpinf.pg_system; info->usedPages = agpinf.pg_used; - xf86DrvMsg(screenNum, X_INFO, "Kernel reported %d total, %d used\n", agpinf.pg_total, agpinf.pg_used); + xf86DrvMsg(screenNum, X_INFO, "Kernel reported %zu total, %zu used\n", agpinf.pg_total, agpinf.pg_used); return info; } @@ -165,7 +165,7 @@ xf86GetAGPInfo(int screenNum) * count instead of using acquiredScreen? */ -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -183,7 +183,7 @@ xf86AcquireGART(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) @@ -213,7 +213,7 @@ xf86ReleaseGART(int screenNum) return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { @@ -251,7 +251,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, return alloc.key; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || acquiredScreen != screenNum) @@ -278,7 +278,7 @@ xf86DeallocateGARTMemory(int screenNum, int key) } /* Bind GART memory with "key" at "offset" */ -_X_EXPORT Bool +Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { struct _agp_bind bind; @@ -321,7 +321,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset) /* Unbind GART memory with "key" */ -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { struct _agp_unbind unbind; @@ -353,7 +353,7 @@ xf86UnbindGARTMemory(int screenNum, int key) /* XXX Interface may change. */ -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup setup; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c index 16ac80db8..4ccc7d662 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c @@ -160,15 +160,11 @@ lnxAPMOpen(void) { int fd, pfd; -#ifdef DEBUG - ErrorF("APM: OSPMOpen called\n"); -#endif + DebugF("APM: OSPMOpen called\n"); if (APMihPtr || !xf86Info.pmFlag) return NULL; -#ifdef DEBUG - ErrorF("APM: Opening device\n"); -#endif + DebugF("APM: Opening device\n"); if ((fd = open( APM_DEVICE, O_RDWR )) > -1) { if (access( APM_PROC, R_OK ) || ((pfd = open( APM_PROC, O_RDONLY)) == -1)) { @@ -180,11 +176,10 @@ lnxAPMOpen(void) close(pfd); xf86PMGetEventFromOs = lnxPMGetEventFromOs; xf86PMConfirmEventToOs = lnxPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd,xf86HandlePMEvents,NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); xf86MsgVerb(X_INFO,3,"Open APM successful\n"); return lnxCloseAPM; } - xf86MsgVerb(X_INFO,3,"No APM support in BIOS or kernel\n"); return NULL; } @@ -192,12 +187,10 @@ static void lnxCloseAPM(void) { int fd; - -#ifdef DEBUG - ErrorF("APM: Closing device\n"); -#endif + + DebugF("APM: Closing device\n"); if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c index e8b6d4749..8571c048b 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_axp.c @@ -49,7 +49,7 @@ static AXP axpList[] = { {"Miata",NULL,NULL,PYXIS_CIA}, {"Ruffian",NULL,NULL,PYXIS_CIA}, {"Nautilus",NULL,NULL,IRONGATE}, - {NULL,NULL,NULL,NONE} + {NULL,NULL,NULL,SYS_NONE} }; @@ -69,21 +69,15 @@ lnxGetAXP(void) switch (count) { case 1: sscanf(res, "cpu model : %s",cpu); -#ifdef DEBUG - ErrorF("CPU %s\n",cpu); -#endif + DebugF("CPU %s\n",cpu); break; case 5: sscanf(res, "system type : %s",systype); -#ifdef DEBUG - ErrorF("system type : %s\n",systype); -#endif + DebugF("system type : %s\n",systype); break; case 6: sscanf(res, "system variation : %s",sysvari); -#ifdef DEBUG - ErrorF("system variation: %s\n",sysvari); -#endif + DebugF("system variation: %s\n",sysvari); break; } count++; @@ -131,12 +125,12 @@ extern unsigned int _dense_inb(unsigned long); extern unsigned int _dense_inw(unsigned long); extern unsigned int _dense_inl(unsigned long); -_X_EXPORT void (*_alpha_outb)(char, unsigned long) = _outb; -_X_EXPORT void (*_alpha_outw)(short, unsigned long) = _outw; -_X_EXPORT void (*_alpha_outl)(int, unsigned long) = _outl; -_X_EXPORT unsigned int (*_alpha_inb)(unsigned long) = _inb; -_X_EXPORT unsigned int (*_alpha_inw)(unsigned long) = _inw; -_X_EXPORT unsigned int (*_alpha_inl)(unsigned long) = _inl; +void (*_alpha_outb)(char, unsigned long) = _outb; +void (*_alpha_outw)(short, unsigned long) = _outw; +void (*_alpha_outl)(int, unsigned long) = _outl; +unsigned int (*_alpha_inb)(unsigned long) = _inb; +unsigned int (*_alpha_inw)(unsigned long) = _inw; +unsigned int (*_alpha_inl)(unsigned long) = _inl; static long _alpha_iobase_query(unsigned, int, int, int); long (*_iobase)(unsigned, int, int, int) = _alpha_iobase_query; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c index 702dfa675..75cdd3ebc 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_bell.c @@ -34,7 +34,7 @@ #include "xf86Priv.h" #include "xf86_OSproc.h" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { if (xf86Info.consoleFd == -1 || !pitch || !loudness) diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_font.c b/xorg-server/hw/xfree86/os-support/linux/lnx_font.c index e9a5b6aef..d6fc283c0 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_font.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_font.c @@ -65,9 +65,7 @@ getfont(int *width, int *height, op.flags = 0; SYSCALL(result = ioctl(xf86Info.consoleFd, KDFONTOP, &op)); -#ifdef DEBUG - ErrorF("Console font read: h: %i count: %i\n",op.height,op.charcount); -#endif + DebugF("Console font read: h: %i count: %i\n",op.height,op.charcount); if (!result) { @@ -130,9 +128,7 @@ lnx_savefont(void) int fd; int width = 32, height = 32, charcount = 2048; -#ifdef DEBUG - ErrorF("SAVE font\n"); -#endif + DebugF("SAVE font\n"); #if CHECK_OS_VERSION /* Check if the kernel has full support for this */ @@ -172,7 +168,7 @@ lnx_savefont(void) return FALSE; } - size = (width + 7)/8 * 32 * charcount; + size = bits_to_bytes(width) * 32 * charcount; fontdata = (unsigned char *)xnfalloc(size); if (!fontdata) { xf86Msg(X_WARNING, @@ -247,9 +243,7 @@ lnx_restorefont(void) { if (lnxfont.data == NULL) return FALSE; -#ifdef DEBUG - ErrorF("RESTORE font\n"); -#endif + DebugF("RESTORE font\n"); #if 0 /* must wack the height to make the kernel reprogram the VGA registers */ if (!setfont(lnxfont.width, lnxfont.height + 1, lnxfont.charcount, diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index 7f408573a..5a6db8081 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -39,12 +39,6 @@ #include -#ifdef USE_DEV_FB -extern char *getenv(const char *); -#include -char *fb_dev_name; -#endif - static Bool KeepTty = FALSE; static int VTnum = -1; static Bool VTSwitch = TRUE; @@ -80,9 +74,11 @@ saveVtPerms(void) static void restoreVtPerms(void) { - /* Set the terminal permissions back to before we started. */ - chown("/dev/tty0", vtPermSave[0], vtPermSave[1]); - chown(vtname, vtPermSave[2], vtPermSave[3]); + if (geteuid() == 0) { + /* Set the terminal permissions back to before we started. */ + (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]); + (void)chown(vtname, vtPermSave[2], vtPermSave[3]); + } } static void *console_handler; @@ -100,10 +96,6 @@ xf86OpenConsole(void) struct vt_mode VT; struct vt_stat vts; MessageType from = X_PROBED; -#ifdef USE_DEV_FB - struct fb_var_screeninfo var; - int fbfd; -#endif char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; @@ -150,22 +142,6 @@ xf86OpenConsole(void) close(fd); } -#ifdef USE_DEV_FB - if (!ShareVTs) - { - fb_dev_name=getenv("FRAMEBUFFER"); - if (!fb_dev_name) - fb_dev_name="/dev/fb0current"; - - if ((fbfd = open(fb_dev_name, O_RDONLY)) < 0) - FatalError("xf86OpenConsole: Cannot open %s (%s)\n", - fb_dev_name, strerror(errno)); - - if (ioctl(fbfd, FBIOGET_VSCREENINFO, &var) < 0) - FatalError("xf86OpenConsole: Unable to get screen info %s\n", - strerror(errno)); - } -#endif xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); if (!KeepTty) { @@ -210,20 +186,22 @@ xf86OpenConsole(void) xf86Msg(X_WARNING, "xf86OpenConsole: Could not save ownership of VT\n"); - /* change ownership of the vt */ - if (chown(vtname, getuid(), getgid()) < 0) - xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n", - vtname, strerror(errno)); - - /* - * the current VT device we're running on is not "console", we want - * to grab all consoles too - * - * Why is this needed?? - */ - if (chown("/dev/tty0", getuid(), getgid()) < 0) - xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n", - strerror(errno)); + if (geteuid() == 0) { + /* change ownership of the vt */ + if (chown(vtname, getuid(), getgid()) < 0) + xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n", + vtname, strerror(errno)); + + /* + * the current VT device we're running on is not + * "console", we want to grab all consoles too + * + * Why is this needed?? + */ + if (chown("/dev/tty0", getuid(), getgid()) < 0) + xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n", + strerror(errno)); + } } /* @@ -308,19 +286,7 @@ xf86OpenConsole(void) /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ - -#ifdef USE_DEV_FB - /* copy info to new console */ - var.yoffset=0; - var.xoffset=0; - if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &var)) - FatalError("Unable to set screen info\n"); - close(fbfd); -#endif - } else { /* ShareVTs */ - close(xf86Info.consoleFd); } - signal(SIGUSR2, xf86ReloadInputDevs); } else { /* serverGeneration != 1 */ if (!ShareVTs && VTSwitch) { @@ -340,7 +306,7 @@ xf86OpenConsole(void) } void -xf86CloseConsole() +xf86CloseConsole(void) { struct vt_mode VT; #if defined(DO_OS_FONTRESTORE) @@ -348,7 +314,10 @@ xf86CloseConsole() int vtno = -1; #endif - if (ShareVTs) return; + if (ShareVTs) { + close(xf86Info.consoleFd); + return; + } if (console_handler) { xf86RemoveGeneralHandler(console_handler); @@ -447,7 +416,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) } void -xf86UseMsg() +xf86UseMsg(void) { ErrorF("vtXX use the specified VT number\n"); ErrorF("-keeptty "); diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c index 4e6f2d25d..0b9493d27 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c @@ -36,7 +36,7 @@ * Return: * 0 for failure, 1 for success */ -_X_EXPORT int +int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 688106af4..73409dfba 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -292,9 +292,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size, lbase = lbase >> 1, d_size <<= 1); while (d_size > n_size) d_size = d_size >> 1; -#ifdef DEBUG - ErrorF("WC_BASE: 0x%lx WC_END: 0x%lx\n",base,base+d_size-1); -#endif + DebugF("WC_BASE: 0x%lx WC_END: 0x%lx\n",base,base+d_size-1); n_base += d_size; n_size -= d_size; if (n_size) { @@ -424,11 +422,9 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) realBase = Base & ~(getpagesize() - 1); alignOff = Base - realBase; -#ifdef DEBUG - ErrorF("base: %lx, realBase: %lx, alignOff: %lx \n", + DebugF("base: %lx, realBase: %lx, alignOff: %lx \n", Base,realBase,alignOff); -#endif - + #if defined(__ia64__) || defined(__arm__) || defined(__s390__) #ifndef MAP_WRITECOMBINED #define MAP_WRITECOMBINED 0x00010000 @@ -469,9 +465,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) " (0x%08lx,0x%lx) (%s)\n", Base, Size, strerror(errno)); } -#ifdef DEBUG - ErrorF("base: %lx aligned base: %lx\n",base, base + alignOff); -#endif + DebugF("base: %lx aligned base: %lx\n",base, base + alignOff); return (char *)base + alignOff; } #endif /* !(__sparc__) */ @@ -481,10 +475,8 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) { memType alignOff = (memType)Base - ((memType)Base & ~(getpagesize() - 1)); - -#ifdef DEBUG - ErrorF("alignment offset: %lx\n",alignOff); -#endif + + DebugF("alignment offset: %lx\n",alignOff); munmap((caddr_t)((memType)Base - alignOff), (Size + alignOff)); } @@ -494,7 +486,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) /***************************************************************************/ #if defined(__powerpc__) -_X_EXPORT volatile unsigned char *ioBase = NULL; +volatile unsigned char *ioBase = NULL; #ifndef __NR_pciconfig_iobase #define __NR_pciconfig_iobase 200 @@ -502,7 +494,7 @@ _X_EXPORT volatile unsigned char *ioBase = NULL; #endif -_X_EXPORT Bool +Bool xf86EnableIO(void) { #if defined(__powerpc__) @@ -551,7 +543,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { if (!ExtendedEnabled) @@ -869,23 +861,23 @@ writeSparseNB32(int Value, pointer Base, register unsigned long Offset) return; } -_X_EXPORT void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8)(int Value, pointer Base, unsigned long Offset) = writeDense8; -_X_EXPORT void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16)(int Value, pointer Base, unsigned long Offset) = writeDense16; -_X_EXPORT void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32)(int Value, pointer Base, unsigned long Offset) = writeDense32; -_X_EXPORT void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8)(int Value, pointer Base, unsigned long Offset) = writeDenseNB8; -_X_EXPORT void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16)(int Value, pointer Base, unsigned long Offset) = writeDenseNB16; -_X_EXPORT void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32)(int Value, pointer Base, unsigned long Offset) = writeDenseNB32; -_X_EXPORT int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio8)(pointer Base, unsigned long Offset) = readDense8; -_X_EXPORT int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio16)(pointer Base, unsigned long Offset) = readDense16; -_X_EXPORT int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) +int (*xf86ReadMmio32)(pointer Base, unsigned long Offset) = readDense32; #endif /* __alpha__ */ -- cgit v1.2.3