diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/hw/xfree86 | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/hw/xfree86')
289 files changed, 11481 insertions, 9431 deletions
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am index 98d7ec806..b97ebd79f 100644 --- a/xorg-server/hw/xfree86/Makefile.am +++ b/xorg-server/hw/xfree86/Makefile.am @@ -12,56 +12,67 @@ if XF86UTILS XF86UTILS_SUBDIR = utils endif +if XAA +XAA_SUBDIR = xaa +endif + +if VGAHW +VGAHW_SUBDIR = vgahw +endif + +if VBE +VBE_SUBDIR = vbe +endif + +if INT10MODULE +INT10_SUBDIR = int10 +endif + DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ - ramdac shadowfb vbe vgahw xaa \ +SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \ + ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) -DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ +DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc bin_PROGRAMS = Xorg +Xorg_SOURCES = xorg.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ -Xorg_SOURCES = xorg.c - -# libxorgos and libcommon need symbols from each other -noinst_LTLIBRARIES = libosandcommon.la -libosandcommon_la_SOURCES = osandcommon.c -libosandcommon_la_LIBADD = \ +noinst_LTLIBRARIES = libxorg.la +libxorg_la_SOURCES = libxorg.c +libxorg_la_LIBADD = \ + $(XSERVER_LIBS) \ + loader/libloader.la \ os-support/libxorgos.la \ - common/libcommon.la - -osandcommon.c xorg.c: + common/libcommon.la \ + parser/libxf86config_internal.la \ + dixmods/libdixmods.la \ + modes/libxf86modes.la \ + ramdac/libramdac.la \ + ddc/libddc.la \ + i2c/libi2c.la \ + dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ + +libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD) + +libxorg.c xorg.c: touch $@ -DISTCLEANFILES = osandcommon.c xorg.c +DISTCLEANFILES = libxorg.c xorg.c -XORG_LIBS = \ - $(XSERVER_LIBS) \ - common/libinit.a \ - loader/libloader.a \ - libosandcommon.la \ - parser/libxf86config.a \ - dixmods/libdixmods.la \ - modes/libxf86modes.a \ - ramdac/libramdac.a \ - ddc/libddc.a \ - i2c/libi2c.a \ - dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la \ - $(top_builddir)/os/libos.la \ - @XORG_LIBS@ \ - dixmods/libxorgxkb.la - -Xorg_DEPENDENCIES = $(XORG_LIBS) -Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xorg_DEPENDENCIES = libxorg.la +Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @@ -69,6 +80,11 @@ BUILT_SOURCES = xorg.conf.example DISTCLEANFILES += xorg.conf.example xorg.conf.example.pre EXTRA_DIST = xorgconf.cpp +if XSERVER_DTRACE +# Re-add dtrace object code that gets lost when building static libraries +Xorg_LDADD += $(XSERVER_LIBS) +endif + if SOLARIS_ASM_INLINE # Needs to be built before any files are compiled when using Sun compilers # so in*/out* inline definitions are properly processed. @@ -91,10 +107,8 @@ if INSTALL_SETUID chmod u+s $(DESTDIR)$(bindir)/Xorg endif -optionsdir = $(libdir)/X11 -dist_options_DATA = Options - CPP_FILES_FLAGS = \ + $(MANDEFS) \ -DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \ -DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \ -DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \ diff --git a/xorg-server/hw/xfree86/Makefile.in b/xorg-server/hw/xfree86/Makefile.in index bf14751d7..32e339b6d 100644 --- a/xorg-server/hw/xfree86/Makefile.in +++ b/xorg-server/hw/xfree86/Makefile.in @@ -20,7 +20,6 @@ # (Replaces CppFileTarget from Imake) - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -40,17 +39,23 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -DIST_COMMON = $(dist_options_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/cpprules.in bin_PROGRAMS = Xorg$(EXEEXT) +# Re-add dtrace object code that gets lost when building static libraries +@XSERVER_DTRACE_TRUE@am__append_1 = $(XSERVER_LIBS) + # Needs to be built before any files are compiled when using Sun compilers # so in*/out* inline definitions are properly processed. -@SOLARIS_ASM_INLINE_TRUE@am__append_1 = os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il +@SOLARIS_ASM_INLINE_TRUE@am__append_2 = os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il subdir = hw/xfree86 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 @@ -60,25 +65,19 @@ 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) -libosandcommon_la_DEPENDENCIES = os-support/libxorgos.la \ - common/libcommon.la -am_libosandcommon_la_OBJECTS = osandcommon.lo -libosandcommon_la_OBJECTS = $(am_libosandcommon_la_OBJECTS) -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(optionsdir)" +am__DEPENDENCIES_1 = +am_libxorg_la_OBJECTS = libxorg.lo +libxorg_la_OBJECTS = $(am_libxorg_la_OBJECTS) +am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_Xorg_OBJECTS = xorg.$(OBJEXT) Xorg_OBJECTS = $(am_Xorg_OBJECTS) -am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) common/libinit.a \ - loader/libloader.a libosandcommon.la parser/libxf86config.a \ - dixmods/libdixmods.la modes/libxf86modes.a ramdac/libramdac.a \ - ddc/libddc.a i2c/libi2c.a dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la $(top_builddir)/os/libos.la \ - dixmods/libxorgxkb.la +@XSERVER_DTRACE_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) Xorg_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(Xorg_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -92,8 +91,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libosandcommon_la_SOURCES) $(Xorg_SOURCES) -DIST_SOURCES = $(libosandcommon_la_SOURCES) $(Xorg_SOURCES) +SOURCES = $(libxorg_la_SOURCES) $(Xorg_SOURCES) +DIST_SOURCES = $(libxorg_la_SOURCES) $(Xorg_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -101,28 +100,6 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -DATA = $(dist_options_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -161,6 +138,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@ @@ -181,9 +159,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@ @@ -212,7 +193,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@ @@ -221,9 +204,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@ @@ -262,12 +249,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@ @@ -287,7 +275,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@ @@ -297,6 +284,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -310,11 +298,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@ @@ -342,23 +329,7 @@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_INCS = @XORG_INCS@ -XORG_LIBS = \ - $(XSERVER_LIBS) \ - common/libinit.a \ - loader/libloader.a \ - libosandcommon.la \ - parser/libxf86config.a \ - dixmods/libdixmods.la \ - modes/libxf86modes.a \ - ramdac/libramdac.a \ - ddc/libddc.a \ - i2c/libi2c.a \ - dixmods/libxorgxkb.la \ - $(top_builddir)/mi/libmi.la \ - $(top_builddir)/os/libos.la \ - @XORG_LIBS@ \ - dixmods/libxorgxkb.la - +XORG_LIBS = @XORG_LIBS@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ @@ -366,6 +337,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@ @@ -390,7 +362,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@ @@ -413,6 +384,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -444,7 +416,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@ @@ -487,38 +461,53 @@ MANDEFS = \ @DRI_TRUE@DRI_SUBDIR = dri @DRI2_TRUE@DRI2_SUBDIR = dri2 @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils +@XAA_TRUE@XAA_SUBDIR = xaa +@VGAHW_TRUE@VGAHW_SUBDIR = vgahw +@VBE_TRUE@VBE_SUBDIR = vbe +@INT10MODULE_TRUE@INT10_SUBDIR = int10 DOC_SUBDIR = doc -SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support parser \ - ramdac shadowfb vbe vgahw xaa \ +SUBDIRS = common ddc i2c x86emu $(INT10_SUBDIR) fbdevhw os-support parser \ + ramdac shadowfb $(VBE_SUBDIR) $(VGAHW_SUBDIR) $(XAA_SUBDIR) \ xf8_16bpp loader dixmods exa modes \ $(DRI_SUBDIR) $(DRI2_SUBDIR) $(XF86UTILS_SUBDIR) $(DOC_SUBDIR) -DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \ +DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw xaa \ xf8_16bpp loader dixmods dri dri2 exa modes \ utils doc +Xorg_SOURCES = xorg.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ -Xorg_SOURCES = xorg.c - -# libxorgos and libcommon need symbols from each other -noinst_LTLIBRARIES = libosandcommon.la -libosandcommon_la_SOURCES = osandcommon.c -libosandcommon_la_LIBADD = \ +noinst_LTLIBRARIES = libxorg.la +libxorg_la_SOURCES = libxorg.c +libxorg_la_LIBADD = \ + $(XSERVER_LIBS) \ + loader/libloader.la \ os-support/libxorgos.la \ - common/libcommon.la - -DISTCLEANFILES = osandcommon.c xorg.c xorg.conf.example \ + common/libcommon.la \ + parser/libxf86config_internal.la \ + dixmods/libdixmods.la \ + modes/libxf86modes.la \ + ramdac/libramdac.la \ + ddc/libddc.la \ + i2c/libi2c.la \ + dixmods/libxorgxkb.la \ + $(top_builddir)/mi/libmi.la \ + $(top_builddir)/os/libos.la \ + @XORG_LIBS@ + +libxorg_la_DEPENDENCIES = $(libxorg_la_LIBADD) +DISTCLEANFILES = libxorg.c xorg.c xorg.conf.example \ xorg.conf.example.pre -Xorg_DEPENDENCIES = $(XORG_LIBS) -Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) +Xorg_DEPENDENCIES = libxorg.la +Xorg_LDADD = $(MAIN_LIB) libxorg.la $(XORG_SYS_LIBS) \ + $(XSERVER_SYS_LIBS) $(am__append_1) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) -BUILT_SOURCES = xorg.conf.example $(am__append_1) +BUILT_SOURCES = xorg.conf.example $(am__append_2) EXTRA_DIST = xorgconf.cpp -optionsdir = $(libdir)/X11 -dist_options_DATA = Options CPP_FILES_FLAGS = \ + $(MANDEFS) \ -DLOCALFONTPATH="\"$(BASE_FONT_PATH)/local\"" \ -DMISCFONTPATH="\"$(BASE_FONT_PATH)/misc\"" \ -DT1FONTPATH="\"$(BASE_FONT_PATH)/Type1\"" \ @@ -571,8 +560,8 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libosandcommon.la: $(libosandcommon_la_OBJECTS) $(libosandcommon_la_DEPENDENCIES) - $(LINK) $(libosandcommon_la_OBJECTS) $(libosandcommon_la_LIBADD) $(LIBS) +libxorg.la: $(libxorg_la_OBJECTS) $(libxorg_la_DEPENDENCIES) + $(LINK) $(libxorg_la_OBJECTS) $(libxorg_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @@ -626,7 +615,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osandcommon.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxorg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg.Po@am__quote@ .c.o: @@ -655,26 +644,6 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -install-dist_optionsDATA: $(dist_options_DATA) - @$(NORMAL_INSTALL) - test -z "$(optionsdir)" || $(MKDIR_P) "$(DESTDIR)$(optionsdir)" - @list='$(dist_options_DATA)'; test -n "$(optionsdir)" || list=; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(optionsdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(optionsdir)" || exit $$?; \ - done - -uninstall-dist_optionsDATA: - @$(NORMAL_UNINSTALL) - @list='$(dist_options_DATA)'; test -n "$(optionsdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(optionsdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(optionsdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -872,10 +841,10 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) +all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(optionsdir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -929,7 +898,7 @@ info: info-recursive info-am: -install-data-am: install-data-local install-dist_optionsDATA +install-data-am: install-data-local install-dvi: install-dvi-recursive @@ -975,7 +944,7 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA +uninstall-am: uninstall-binPROGRAMS .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ @@ -987,17 +956,16 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-data-local \ - install-dist_optionsDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-exec-local install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-dist_optionsDATA + install-data install-data-am install-data-local install-dvi \ + install-dvi-am install-exec install-exec-am install-exec-local \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS .pre: @@ -1006,7 +974,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_optionsDATA .man.pre.man: $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ -osandcommon.c xorg.c: +libxorg.c xorg.c: touch $@ @SOLARIS_ASM_INLINE_TRUE@os-support/solaris/solaris-@SOLARIS_INOUT_ARCH@.il: diff --git a/xorg-server/hw/xfree86/common/Makefile.am b/xorg-server/hw/xfree86/common/Makefile.am index b38c14a7d..ad27210cd 100644 --- a/xorg-server/hw/xfree86/common/Makefile.am +++ b/xorg-server/hw/xfree86/common/Makefile.am @@ -1,4 +1,3 @@ -noinst_LIBRARIES = libinit.a noinst_LTLIBRARIES = libcommon.la if XORG_BUS_SPARC @@ -7,7 +6,15 @@ endif if XV XVSOURCES = xf86xv.c xf86xvmc.c -XVSDKINCS = xf86xv.h xf86xvmc.h +XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h +endif + +if XF86VIDMODE +XF86VMODE_SDK = vidmodeproc.h +endif + +if DGA +DGASOURCES = xf86DGA.c endif XISOURCES = xf86Xinput.c xisb.c @@ -26,28 +33,26 @@ BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ - xf86Cursor.c xf86DGA.c xf86DPMS.c \ + xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ - xf86Option.c \ + xf86Option.c xf86Init.c xf86VGAarbiter.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) -nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Init.c -nodist_libinit_a_SOURCES = xf86Build.h +nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ - -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ + -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../modes + -I$(srcdir)/../modes -I$(srcdir)/../ramdac sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ - xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ - $(XVSDKINCS) xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86PciInfo.h xf86Priv.h xf86Privstr.h \ + xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) $(XF86VMODE_SDK) xorgVersion.h \ + xf86sbusBus.h xf86VGAarbiter.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) @@ -56,6 +61,7 @@ EXTRA_DIST = \ compiler.h \ fourcc.h \ scoasm.h \ + vidmodeproc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ @@ -65,7 +71,6 @@ EXTRA_DIST = \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ - xf86Resources.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ @@ -76,9 +81,10 @@ EXTRA_DIST = \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ - xf86Date.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ + xf86VGAarbiter.h \ + xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) if LNXACPI diff --git a/xorg-server/hw/xfree86/common/Makefile.in b/xorg-server/hw/xfree86/common/Makefile.in index f4ec5a585..9c300e4c5 100644 --- a/xorg-server/hw/xfree86/common/Makefile.in +++ b/xorg-server/hw/xfree86/common/Makefile.in @@ -16,7 +16,6 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -41,8 +40,11 @@ subdir = hw/xfree86/common DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xf86Build.h.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 @@ -52,38 +54,32 @@ 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 = xf86Build.h CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libinit_a_AR = $(AR) $(ARFLAGS) -libinit_a_LIBADD = -am_libinit_a_OBJECTS = xf86Init.$(OBJEXT) -nodist_libinit_a_OBJECTS = -libinit_a_OBJECTS = $(am_libinit_a_OBJECTS) \ - $(nodist_libinit_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_LIBADD = am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86ShowOpts.c \ xf86Bus.c xf86Config.c xf86Cursor.c xf86DGA.c xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c xf86Option.c \ - xf86VidMode.c xf86fbman.c xf86cmap.c xf86Helper.c xf86PM.c \ - xf86RAC.c xf86Xinput.c xisb.c xf86Mode.c xorgHelper.c xf86xv.c \ - xf86xvmc.c xf86pciBus.c xf86fbBus.c xf86noBus.c xf86sbusBus.c \ - xf86RandR.c -@XV_TRUE@am__objects_1 = xf86xv.lo xf86xvmc.lo -@XORG_BUS_SPARC_TRUE@am__objects_2 = xf86sbusBus.lo -am__objects_3 = xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ - $(am__objects_2) -am__objects_4 = xf86RandR.lo + xf86Init.c xf86VGAarbiter.c xf86VidMode.c xf86fbman.c \ + xf86cmap.c xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ + xf86Mode.c xorgHelper.c xf86xv.c xf86xvmc.c xf86pciBus.c \ + xf86fbBus.c xf86noBus.c xf86sbusBus.c xf86RandR.c +@DGA_TRUE@am__objects_1 = xf86DGA.lo +@XV_TRUE@am__objects_2 = xf86xv.lo xf86xvmc.lo +@XORG_BUS_SPARC_TRUE@am__objects_3 = xf86sbusBus.lo +am__objects_4 = xf86pciBus.lo xf86fbBus.lo xf86noBus.lo \ + $(am__objects_3) +am__objects_5 = xf86RandR.lo am_libcommon_la_OBJECTS = xf86Configure.lo xf86ShowOpts.lo xf86Bus.lo \ - xf86Config.lo xf86Cursor.lo xf86DGA.lo xf86DPMS.lo \ + xf86Config.lo xf86Cursor.lo $(am__objects_1) xf86DPMS.lo \ xf86Events.lo xf86Globals.lo xf86AutoConfig.lo xf86Option.lo \ - xf86VidMode.lo xf86fbman.lo xf86cmap.lo xf86Helper.lo \ - xf86PM.lo xf86RAC.lo xf86Xinput.lo xisb.lo xf86Mode.lo \ - xorgHelper.lo $(am__objects_1) $(am__objects_3) \ - $(am__objects_4) + xf86Init.lo xf86VGAarbiter.lo xf86VidMode.lo xf86fbman.lo \ + xf86cmap.lo xf86Helper.lo xf86PM.lo xf86Xinput.lo xisb.lo \ + xf86Mode.lo xorgHelper.lo $(am__objects_2) $(am__objects_4) \ + $(am__objects_5) nodist_libcommon_la_OBJECTS = xf86DefModeSet.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \ $(nodist_libcommon_la_OBJECTS) @@ -97,14 +93,13 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libinit_a_SOURCES) $(nodist_libinit_a_SOURCES) \ - $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) -DIST_SOURCES = $(libinit_a_SOURCES) $(am__libcommon_la_SOURCES_DIST) +SOURCES = $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) +DIST_SOURCES = $(am__libcommon_la_SOURCES_DIST) am__sdk_HEADERS_DIST = compiler.h fourcc.h xf86.h xf86Module.h \ - xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h \ - xf86Resources.h xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h \ - xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86Opt.h xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86cmap.h \ + xf86fbman.h xf86str.h xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h \ + xf86xvpriv.h vidmodeproc.h xorgVersion.h xf86sbusBus.h \ + xf86VGAarbiter.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -136,6 +131,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@ @@ -156,9 +152,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@ @@ -187,7 +186,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@ @@ -196,9 +197,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@ @@ -237,12 +242,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@ @@ -262,7 +268,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@ @@ -272,6 +277,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -285,11 +291,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@ @@ -325,6 +330,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@ @@ -349,7 +355,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@ @@ -372,6 +377,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -403,17 +409,20 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libinit.a noinst_LTLIBRARIES = libcommon.la @XORG_BUS_SPARC_TRUE@SBUS_SOURCES = xf86sbusBus.c @XV_TRUE@XVSOURCES = xf86xv.c xf86xvmc.c -@XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h +@XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h +@XF86VIDMODE_TRUE@XF86VMODE_SDK = vidmodeproc.h +@DGA_TRUE@DGASOURCES = xf86DGA.c XISOURCES = xf86Xinput.c xisb.c XISDKINCS = xf86Xinput.h xisb.h RANDRSOURCES = xf86RandR.c @@ -422,28 +431,26 @@ MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ - xf86Cursor.c xf86DGA.c xf86DPMS.c \ + xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ - xf86Option.c \ + xf86Option.c xf86Init.c xf86VGAarbiter.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ - xf86Helper.c xf86PM.c xf86RAC.c xf86Xinput.c xisb.c \ + xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) -nodist_libcommon_la_SOURCES = xf86DefModeSet.c -libinit_a_SOURCES = xf86Init.c -nodist_libinit_a_SOURCES = xf86Build.h +nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ - -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ + -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../modes + -I$(srcdir)/../modes -I$(srcdir)/../ramdac sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \ - xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \ - xf86cmap.h xf86fbman.h xf86str.h xf86RAC.h xf86Xinput.h xisb.h \ - $(XVSDKINCS) xorgVersion.h \ - xf86sbusBus.h xf86xvpriv.h + xf86PciInfo.h xf86Priv.h xf86Privstr.h \ + xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ + $(XVSDKINCS) $(XF86VMODE_SDK) xorgVersion.h \ + xf86sbusBus.h xf86VGAarbiter.h DISTCLEANFILES = xf86Build.h CLEANFILES = $(BUILT_SOURCES) @@ -451,6 +458,7 @@ EXTRA_DIST = \ compiler.h \ fourcc.h \ scoasm.h \ + vidmodeproc.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ @@ -460,7 +468,6 @@ EXTRA_DIST = \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ - xf86Resources.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ @@ -471,9 +478,10 @@ EXTRA_DIST = \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ - xf86Date.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ + xf86VGAarbiter.h \ + xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) @@ -515,13 +523,6 @@ $(am__aclocal_m4_deps): xf86Build.h: $(top_builddir)/config.status $(srcdir)/xf86Build.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libinit.a: $(libinit_a_OBJECTS) $(libinit_a_DEPENDENCIES) - -rm -f libinit.a - $(libinit_a_AR) libinit.a $(libinit_a_OBJECTS) $(libinit_a_LIBADD) - $(RANLIB) libinit.a - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ @@ -550,13 +551,13 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Events.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Helper.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Mode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86PM.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RAC.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86ShowOpts.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VGAarbiter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VidMode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Xinput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cmap.Plo@am__quote@ @@ -702,7 +703,7 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -738,8 +739,8 @@ maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -810,18 +811,18 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-sdkHEADERS install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-sdkHEADERS + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-sdkHEADERS install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ + uninstall-am uninstall-sdkHEADERS xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) diff --git a/xorg-server/hw/xfree86/common/compiler.h b/xorg-server/hw/xfree86/common/compiler.h index a14daea25..f5aa04ea9 100644 --- a/xorg-server/hw/xfree86/common/compiler.h +++ b/xorg-server/hw/xfree86/common/compiler.h @@ -55,6 +55,12 @@ # define DO_PROTOTYPES #endif +#ifndef _X_EXPORT +# include <X11/Xfuncproto.h> +#endif + +# include <pixman.h> /* for uint*_t types */ + /* Allow drivers to use the GCC-supported __inline__ and/or __inline. */ # ifndef __inline__ # if defined(__GNUC__) @@ -87,25 +93,26 @@ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ -extern void outb(unsigned short, unsigned char); -extern void outw(unsigned short, unsigned short); -extern void outl(unsigned short, unsigned int); -extern unsigned int inb(unsigned short); -extern unsigned int inw(unsigned short); -extern unsigned int inl(unsigned short); +extern _X_EXPORT void outb(unsigned short, unsigned char); +extern _X_EXPORT void outw(unsigned short, unsigned short); +extern _X_EXPORT void outl(unsigned short, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned short); +extern _X_EXPORT unsigned int inw(unsigned short); +extern _X_EXPORT unsigned int inl(unsigned short); # else /* __sparc__, __arm32__, __alpha__*/ -extern void outb(unsigned long, unsigned char); -extern void outw(unsigned long, unsigned short); -extern void outl(unsigned long, unsigned int); -extern unsigned int inb(unsigned long); -extern unsigned int inw(unsigned long); -extern unsigned int inl(unsigned long); +extern _X_EXPORT void outb(unsigned long, unsigned char); +extern _X_EXPORT void outw(unsigned long, unsigned short); +extern _X_EXPORT void outl(unsigned long, unsigned int); +extern _X_EXPORT unsigned int inb(unsigned long); +extern _X_EXPORT unsigned int inw(unsigned long); +extern _X_EXPORT unsigned int inl(unsigned long); # endif /* __sparc__, __arm32__, __alpha__ */ # endif /* __arm__ */ +# if defined(__powerpc__) && !defined(__OpenBSD__) extern unsigned long ldq_u(unsigned long *); extern unsigned long ldl_u(unsigned int *); extern unsigned long ldw_u(unsigned short *); @@ -118,9 +125,186 @@ extern void stl_brx(unsigned long, volatile unsigned char *, int); extern void stw_brx(unsigned short, volatile unsigned char *, int); extern unsigned long ldl_brx(volatile unsigned char *, int); extern unsigned short ldw_brx(volatile unsigned char *, int); +# endif /* __powerpc__ && !__OpenBSD */ + +# endif /* NO_INLINE || DO_PROTOTYPES */ + +# ifndef NO_INLINE +# ifdef __GNUC__ +# ifdef __i386__ + +# ifdef __SSE__ +# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") +# else +# define write_mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") +# endif + +# ifdef __SSE2__ +# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") +# else +# define mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") +# endif + +# elif defined __alpha__ + +# define mem_barrier() __asm__ __volatile__ ("mb" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("wmb" : : : "memory") + +# elif defined __amd64__ + +# define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") + +# elif defined __ia64__ + +# ifndef __INTEL_COMPILER +# define mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") +# define write_mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") +# else +# include "ia64intrin.h" +# define mem_barrier() __mf() +# define write_mem_barrier() __mf() +# endif + +# elif defined __mips__ + /* Note: sync instruction requires MIPS II instruction set */ +# define mem_barrier() \ + __asm__ __volatile__( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + ".set mips2\n\t" \ + "sync\n\t" \ + ".set pop" \ + : /* no output */ \ + : /* no input */ \ + : "memory") +# define write_mem_barrier() mem_barrier() + +# elif defined __powerpc__ + +# if defined(linux) && defined(__powerpc64__) +# include <linux/version.h> +# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) +# include <asm/memory.h> +# endif +# endif /* defined(linux) && defined(__powerpc64__) */ + +# ifndef eieio /* We deal with arch-specific eieio() routines above... */ +# define eieio() __asm__ __volatile__ ("eieio" ::: "memory") +# endif /* eieio */ +# define mem_barrier() eieio() +# define write_mem_barrier() eieio() +# elif defined __sparc__ + +# define barrier() __asm__ __volatile__ (".word 0x8143e00a" : : : "memory") +# define mem_barrier() /* XXX: nop for now */ +# define write_mem_barrier() /* XXX: nop for now */ +# endif +# endif /* __GNUC__ */ +# endif /* NO_INLINE */ + +# ifndef mem_barrier +# define mem_barrier() /* NOP */ +# endif + +# ifndef write_mem_barrier +# define write_mem_barrier() /* NOP */ # endif + +# ifndef NO_INLINE +# ifdef __GNUC__ + +/* Define some packed structures to use with unaligned accesses */ + +struct __una_u64 { uint64_t x __attribute__((packed)); }; +struct __una_u32 { uint32_t x __attribute__((packed)); }; +struct __una_u16 { uint16_t x __attribute__((packed)); }; + +/* Elemental unaligned loads */ + +static __inline__ uint64_t ldq_u(uint64_t *p) +{ + const struct __una_u64 *ptr = (const struct __una_u64 *) p; + return ptr->x; +} + +static __inline__ uint32_t ldl_u(uint32_t *p) +{ + const struct __una_u32 *ptr = (const struct __una_u32 *) p; + return ptr->x; +} + +static __inline__ uint16_t ldw_u(uint16_t *p) +{ + const struct __una_u16 *ptr = (const struct __una_u16 *) p; + return ptr->x; +} + +/* Elemental unaligned stores */ + +static __inline__ void stq_u(uint64_t val, uint64_t *p) +{ + struct __una_u64 *ptr = (struct __una_u64 *) p; + ptr->x = val; +} + +static __inline__ void stl_u(uint32_t val, uint32_t *p) +{ + struct __una_u32 *ptr = (struct __una_u32 *) p; + ptr->x = val; +} + +static __inline__ void stw_u(uint16_t val, uint16_t *p) +{ + struct __una_u16 *ptr = (struct __una_u16 *) p; + ptr->x = val; +} +# else /* !__GNUC__ */ + +static __inline__ uint64_t ldq_u(uint64_t *p) +{ + uint64_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ uint32_t ldl_u(uint32_t *p) +{ + uint32_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ uint16_t ldw_u(uint16_t *p) +{ + uint16_t ret; + memmove(&ret, p, sizeof(*p)); + return ret; +} + +static __inline__ void stq_u(uint64_t val, uint64_t *p) +{ + uint64_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +static __inline__ void stl_u(uint32_t val, uint32_t *p) +{ + uint32_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +static __inline__ void stw_u(uint16_t val, uint16_t *p) +{ + uint16_t tmp = val; + memmove(p, &tmp, sizeof(*p)); +} + +# endif /* __GNUC__ */ +# endif /* NO_INLINE */ + # ifndef NO_INLINE # ifdef __GNUC__ # if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) && (defined(__alpha__)) @@ -130,42 +314,42 @@ extern unsigned short ldw_brx(volatile unsigned char *, int); /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void (*_alpha_outb)(char val, unsigned long port); +extern _X_EXPORT void (*_alpha_outb)(char val, unsigned long port); static __inline__ void outb(unsigned long port, unsigned char val) { _alpha_outb(val, port); } -extern void (*_alpha_outw)(short val, unsigned long port); +extern _X_EXPORT void (*_alpha_outw)(short val, unsigned long port); static __inline__ void outw(unsigned long port, unsigned short val) { _alpha_outw(val, port); } -extern void (*_alpha_outl)(int val, unsigned long port); +extern _X_EXPORT void (*_alpha_outl)(int val, unsigned long port); static __inline__ void outl(unsigned long port, unsigned int val) { _alpha_outl(val, port); } -extern unsigned int (*_alpha_inb)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inb)(unsigned long port); static __inline__ unsigned int inb(unsigned long port) { return _alpha_inb(port); } -extern unsigned int (*_alpha_inw)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inw)(unsigned long port); static __inline__ unsigned int inw(unsigned long port) { return _alpha_inw(port); } -extern unsigned int (*_alpha_inl)(unsigned long port); +extern _X_EXPORT unsigned int (*_alpha_inl)(unsigned long port); static __inline__ unsigned int inl(unsigned long port) { @@ -182,12 +366,12 @@ inl(unsigned long port) /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ -extern void outb(unsigned int port, unsigned char val); -extern void outw(unsigned int port, unsigned short val); -extern void outl(unsigned int port, unsigned int val); -extern unsigned char inb(unsigned int port); -extern unsigned short inw(unsigned int port); -extern unsigned int inl(unsigned int port); +extern _X_EXPORT void outb(unsigned int port, unsigned char val); +extern _X_EXPORT void outw(unsigned int port, unsigned short val); +extern _X_EXPORT void outl(unsigned int port, unsigned int val); +extern _X_EXPORT unsigned char inb(unsigned int port); +extern _X_EXPORT unsigned short inw(unsigned int port); +extern _X_EXPORT unsigned int inl(unsigned int port); # endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */ @@ -196,292 +380,29 @@ extern unsigned int inl(unsigned int port); #include <machine/pio.h> #endif /* __NetBSD__ */ -/* - * inline functions to do unaligned accesses - * from linux/include/asm-alpha/unaligned.h - */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -struct __una_u64 { unsigned long x __attribute__((packed)); }; -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -/* - * Elemental unaligned loads - */ -/* let's try making these things static */ - -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ -# if defined(__GNUC__) - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extql %0,%2,%0\n\t" - "extqh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(7+(char *) r11))); - return r1 | r2; -# endif -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ -# if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extll %0,%2,%0\n\t" - "extlh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(3+(char *) r11))); - return r1 | r2; -# endif -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ -# if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -# else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extwl %0,%2,%0\n\t" - "extwh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(1+(char *) r11))); - return r1 | r2; -# endif -} - -/* - * Elemental unaligned stores - */ - -static __inline__ void stq_u(unsigned long r5, unsigned long * r11) -{ -# if defined(__GNUC__) - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "insqh %6,%7,%5\n\t" - "insql %6,%7,%4\n\t" - "mskqh %3,%7,%3\n\t" - "mskql %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(7+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -static __inline__ void stl_u(unsigned long r5, unsigned int * r11) -{ -# if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inslh %6,%7,%5\n\t" - "insll %6,%7,%4\n\t" - "msklh %3,%7,%3\n\t" - "mskll %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(3+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -static __inline__ void stw_u(unsigned long r5, unsigned short * r11) -{ -# if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -# else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inswh %6,%7,%5\n\t" - "inswl %6,%7,%4\n\t" - "mskwh %3,%7,%3\n\t" - "mskwl %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(1+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -# endif -} - -/* to flush the I-cache before jumping to code which just got loaded */ -# define PAL_imb 134 -# define istream_mem_barrier() \ - __asm__ __volatile__("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") -# define mem_barrier() __asm__ __volatile__("mb" : : : "memory") -# ifdef __ELF__ -# define write_mem_barrier() __asm__ __volatile__("wmb" : : : "memory") -# else /* ECOFF gas 2.6 doesn't know "wmb" :-( */ -# define write_mem_barrier() mem_barrier() -# endif - - # elif defined(linux) && defined(__ia64__) # include <inttypes.h> # include <sys/io.h> -struct __una_u64 { uint64_t x __attribute__((packed)); }; -struct __una_u32 { uint32_t x __attribute__((packed)); }; -struct __una_u16 { uint16_t x __attribute__((packed)); }; - -static __inline__ unsigned long -__uldq (const unsigned long * r11) -{ - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -__uldl (const unsigned int * r11) -{ - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -} - -static __inline__ unsigned long -__uldw (const unsigned short * r11) -{ - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -} - -static __inline__ void -__ustq (unsigned long r5, unsigned long * r11) -{ - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -} - -static __inline__ void -__ustl (unsigned long r5, unsigned int * r11) -{ - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -} - -static __inline__ void -__ustw (unsigned long r5, unsigned short * r11) -{ - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -} - -# define ldq_u(p) __uldq(p) -# define ldl_u(p) __uldl(p) -# define ldw_u(p) __uldw(p) -# define stq_u(v,p) __ustq(v,p) -# define stl_u(v,p) __ustl(v,p) -# define stw_u(v,p) __ustw(v,p) - -# ifndef __INTEL_COMPILER -# define mem_barrier() __asm__ __volatile__ ("mf" ::: "memory") -# define write_mem_barrier() __asm__ __volatile__ ("mf" ::: "memory") -# else -# include "ia64intrin.h" -# define mem_barrier() __mf() -# define write_mem_barrier() __mf() -# endif - -/* - * This is overkill, but for different reasons depending on where it is used. - * This is thus general enough to be used everywhere cache flushes are needed. - * It doesn't handle memory access serialisation by other processors, though. - */ -# ifndef __INTEL_COMPILER -# define ia64_flush_cache(Addr) \ - __asm__ __volatile__ ( \ - "fc.i %0;;;" \ - "sync.i;;;" \ - "mf;;;" \ - "srlz.i;;;" \ - :: "r"(Addr) : "memory") -# else -# define ia64_flush_cache(Addr) { \ - __fc(Addr);\ - __synci();\ - __mf();\ - __isrlz();\ - } -# endif # undef outb # undef outw # undef outl # undef inb # undef inw # undef inl -extern void outb(unsigned long port, unsigned char val); -extern void outw(unsigned long port, unsigned short val); -extern void outl(unsigned long port, unsigned int val); -extern unsigned int inb(unsigned long port); -extern unsigned int inw(unsigned long port); -extern unsigned int inl(unsigned long port); +extern _X_EXPORT void outb(unsigned long port, unsigned char val); +extern _X_EXPORT void outw(unsigned long port, unsigned short val); +extern _X_EXPORT void outl(unsigned long port, unsigned int val); +extern _X_EXPORT unsigned int inb(unsigned long port); +extern _X_EXPORT unsigned int inw(unsigned long port); +extern _X_EXPORT unsigned int inl(unsigned long port); -# elif defined(linux) && defined(__amd64__) +# elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__) # include <inttypes.h> -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) - -# define mem_barrier() \ - __asm__ __volatile__ ("lock; addl $0,0(%%rsp)": : :"memory") -# define write_mem_barrier() \ - __asm__ __volatile__ ("": : :"memory") - - static __inline__ void outb(unsigned short port, unsigned char val) { @@ -537,8 +458,6 @@ inl(unsigned short port) # define ASI_PL 0x88 # endif -# define barrier() __asm__ __volatile__(".word 0x8143e00a": : :"memory") - static __inline__ void outb(unsigned long port, unsigned char val) { @@ -771,98 +690,6 @@ xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset, : "r" (val), "r" (addr), "i" (ASI_PL)); } - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -# if defined(__arch64__) || defined(__sparcv9) -struct __una_u64 { unsigned long x __attribute__((packed)); }; -# endif -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -static __inline__ unsigned long ldq_u(unsigned long *p) -{ -# if defined(__GNUC__) -# if defined(__arch64__) || defined(__sparcv9) - const struct __una_u64 *ptr = (const struct __una_u64 *) p; -# else - const struct __una_u32 *ptr = (const struct __una_u32 *) p; -# endif - return ptr->x; -# else - unsigned long ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ unsigned long ldl_u(unsigned int *p) -{ -# if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) p; - return ptr->x; -# else - unsigned int ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ unsigned long ldw_u(unsigned short *p) -{ -# if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) p; - return ptr->x; -# else - unsigned short ret; - memmove(&ret, p, sizeof(*p)); - return ret; -# endif -} - -static __inline__ void stq_u(unsigned long val, unsigned long *p) -{ -# if defined(__GNUC__) -# if defined(__arch64__) || defined(__sparcv9) - struct __una_u64 *ptr = (struct __una_u64 *) p; -# else - struct __una_u32 *ptr = (struct __una_u32 *) p; -# endif - ptr->x = val; -# else - unsigned long tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -static __inline__ void stl_u(unsigned long val, unsigned int *p) -{ -# if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) p; - ptr->x = val; -# else - unsigned int tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -static __inline__ void stw_u(unsigned long val, unsigned short *p) -{ -# if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) p; - ptr->x = val; -# else - unsigned short tmp = val; - memmove(p, &tmp, sizeof(*p)); -# endif -} - -# define mem_barrier() /* XXX: nop for now */ -# define write_mem_barrier() /* XXX: nop for now */ - # elif defined(__mips__) || (defined(__arm32__) && !defined(__linux__)) # ifdef __arm32__ # define PORT_SIZE long @@ -870,7 +697,7 @@ static __inline__ void stw_u(unsigned long val, unsigned short *p) # define PORT_SIZE short # endif -unsigned int IOPortBase; /* Memory mapped I/O port area */ +_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) @@ -910,65 +737,7 @@ inl(unsigned PORT_SIZE port) # if defined(__mips__) -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(3+(char *) r11))); - return r1; -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(3+(char *) r11))); - return r1; -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ - unsigned long r1; - __asm__("lwr %0,%2\n\t" - "lwl %0,%3\n\t" - :"=&r" (r1) - :"r" (r11), - "m" (*r11), - "m" (*(unsigned long *)(1+(char *) r11))); - return r1; -} - # ifdef linux /* don't mess with other OSs */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads (and we don't support older - * versions anyway. Define some packed structures to talk about such things - * with. - */ - -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; - -static __inline__ void stw_u(unsigned long val, unsigned short *p) -{ - struct __una_u16 *ptr = (struct __una_u16 *) p; - ptr->x = val; -} - -static __inline__ void stl_u(unsigned long val, unsigned int *p) -{ - struct __una_u32 *ptr = (struct __una_u32 *) p; - ptr->x = val; -} - # if X_BYTE_ORDER == X_BIG_ENDIAN static __inline__ unsigned int xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset) @@ -993,62 +762,16 @@ xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, : "r" (val), "r" (addr)); } # endif - -# define mem_barrier() \ - __asm__ __volatile__( \ - "# prevent instructions being moved around\n\t" \ - ".set\tnoreorder\n\t" \ - "# 8 nops to fool the R4400 pipeline\n\t" \ - "nop;nop;nop;nop;nop;nop;nop;nop\n\t" \ - ".set\treorder" \ - : /* no output */ \ - : /* no input */ \ - : "memory") -# define write_mem_barrier() mem_barrier() - -# else /* !linux */ - -# define stq_u(v,p) stl_u(v,p) -# define stl_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*(unsigned char *)(p)+1) = ((v) >> 8); \ - (*(unsigned char *)(p)+2) = ((v) >> 16); \ - (*(unsigned char *)(p)+3) = ((v) >> 24) - -# define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*(unsigned char *)(p)+1) = ((v) >> 8) - -# define mem_barrier() /* NOP */ # endif /* !linux */ # endif /* __mips__ */ -# if defined(__arm32__) -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ -# endif /* __arm32__ */ - # elif (defined(linux) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__)) && defined(__powerpc__) # ifndef MAP_FAILED # define MAP_FAILED ((void *)-1) # endif -extern volatile unsigned char *ioBase; - -#if defined(linux) && defined(__powerpc64__) -# include <linux/version.h> -# if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -# include <asm/memory.h> -# endif -#endif /* defined(linux) && defined(__powerpc64__) */ -#ifndef eieio /* We deal with arch-specific eieio() routines above... */ -# define eieio() __asm__ __volatile__ ("eieio" ::: "memory") -#endif /* eieio */ +extern _X_EXPORT volatile unsigned char *ioBase; static __inline__ unsigned char xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) @@ -1248,36 +971,8 @@ inl(unsigned short port) return xf86ReadMmio32Le((void *)ioBase, port); } -# define ldq_u(p) ldl_u(p) -# define ldl_u(p) ((*(unsigned char *)(p)) | \ - (*((unsigned char *)(p)+1)<<8) | \ - (*((unsigned char *)(p)+2)<<16) | \ - (*((unsigned char *)(p)+3)<<24)) -# define ldw_u(p) ((*(unsigned char *)(p)) | \ - (*((unsigned char *)(p)+1)<<8)) - -# define stq_u(v,p) stl_u(v,p) -# define stl_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*((unsigned char *)(p)+1)) = ((v) >> 8); \ - (*((unsigned char *)(p)+2)) = ((v) >> 16); \ - (*((unsigned char *)(p)+3)) = ((v) >> 24) -# define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ - (*((unsigned char *)(p)+1)) = ((v) >> 8) - -# define mem_barrier() eieio() -# define write_mem_barrier() eieio() - #elif defined(__arm__) && defined(__linux__) -#define ldq_u(p) (*((unsigned long *)(p))) -#define ldl_u(p) (*((unsigned int *)(p))) -#define ldw_u(p) (*((unsigned short *)(p))) -#define stq_u(v,p) (*(unsigned long *)(p)) = (v) -#define stl_u(v,p) (*(unsigned int *)(p)) = (v) -#define stw_u(v,p) (*(unsigned short *)(p)) = (v) -#define mem_barrier() /* NOP */ -#define write_mem_barrier() /* NOP */ - /* for Linux on ARM, we use the LIBC inx/outx routines */ /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ @@ -1306,27 +1001,8 @@ xf_outl(unsigned short port, unsigned int val) #define outw xf_outw #define outl xf_outl -#define arm_flush_cache(addr) \ -do { \ - register unsigned long _beg __asm ("a1") = (unsigned long) (addr); \ - register unsigned long _end __asm ("a2") = (unsigned long) (addr) + 4;\ - register unsigned long _flg __asm ("a3") = 0; \ - __asm __volatile ("swi 0x9f0002 @ sys_cacheflush" \ - : "=r" (_beg) \ - : "0" (_beg), "r" (_end), "r" (_flg)); \ -} while (0) - # else /* ix86 */ -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ - # if !defined(__SUNPRO_C) # if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) # ifdef GCCUSESGAS @@ -1508,41 +1184,31 @@ inl(unsigned short port) # pragma asm partial_optimization inw # pragma asm partial_optimization inb # endif -# define ldq_u(p) (*((unsigned long *)(p))) -# define ldl_u(p) (*((unsigned int *)(p))) -# define ldw_u(p) (*((unsigned short *)(p))) -# define stq_u(v,p) (*(unsigned long *)(p)) = (v) -# define stl_u(v,p) (*(unsigned int *)(p)) = (v) -# define stw_u(v,p) (*(unsigned short *)(p)) = (v) -# define mem_barrier() /* NOP */ -# define write_mem_barrier() /* NOP */ # endif /* __GNUC__ */ # endif /* NO_INLINE */ # ifdef __alpha__ /* entry points for Mmio memory access routines */ -extern int (*xf86ReadMmio8)(void *, unsigned long); -extern int (*xf86ReadMmio16)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio8)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio16)(void *, unsigned long); # ifndef STANDALONE_MMIO -extern int (*xf86ReadMmio32)(void *, unsigned long); +extern _X_EXPORT int (*xf86ReadMmio32)(void *, unsigned long); # else /* Some DRI 3D drivers need MMIO_IN32. */ static __inline__ int xf86ReadMmio32(void *Base, unsigned long Offset) { - __asm__ __volatile__("mb" : : : "memory"); + mem_barrier(); return *(volatile unsigned int*)((unsigned long)Base+(Offset)); } # endif -extern void (*xf86WriteMmio8)(int, void *, unsigned long); -extern void (*xf86WriteMmio16)(int, void *, unsigned long); -extern void (*xf86WriteMmio32)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB8)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB16)(int, void *, unsigned long); -extern void (*xf86WriteMmioNB32)(int, void *, unsigned long); -extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); -extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); +extern _X_EXPORT void (*xf86WriteMmio8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmio32)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB8)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB16)(int, void *, unsigned long); +extern _X_EXPORT void (*xf86WriteMmioNB32)(int, void *, unsigned long); /* Some macros to hide the system dependencies for MMIO accesses */ /* Changed to kill noise generated by gcc's -Wcast-align */ @@ -1612,17 +1278,6 @@ extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); # define MMIO_MOVE32(base, offset, val) \ xf86WriteMmio32Be(base, offset, (CARD32)(val)) -static __inline__ void ppc_flush_icache(char *addr) -{ - __asm__ volatile ( - "dcbf 0,%0;" - "sync;" - "icbi 0,%0;" - "sync;" - "isync;" - : : "r"(addr) : "memory"); -} - # elif defined(__sparc__) || defined(sparc) || defined(__sparc) /* * Like powerpc, we provide byteswapping and no byteswapping functions @@ -1685,18 +1340,4 @@ static __inline__ void ppc_flush_icache(char *addr) # define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val) # endif /* __alpha__ */ - -/* - * With Intel, the version in os-support/misc/SlowBcopy.s is used. - * This avoids port I/O during the copy (which causes problems with - * some hardware). - */ -# ifdef __alpha__ -# define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count) -# define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count) -# else /* __alpha__ */ -# define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count) -# define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count) -# endif /* __alpha__ */ - #endif /* _COMPILER_H */ diff --git a/xorg-server/hw/xfree86/common/modeline2c.awk b/xorg-server/hw/xfree86/common/modeline2c.awk index 71a956e05..038e7e935 100644 --- a/xorg-server/hw/xfree86/common/modeline2c.awk +++ b/xorg-server/hw/xfree86/common/modeline2c.awk @@ -56,9 +56,6 @@ BEGIN { print "#include <xorg-config.h>" print "#endif" print "" - print "#ifdef __UNIXOS2__" - print "#define I_NEED_OS2_H" - print "#endif" print "#include \"xf86.h\"" print "#include \"xf86Config.h\"" print "#include \"xf86Priv.h\"" diff --git a/xorg-server/hw/xfree86/common/vidmodeproc.h b/xorg-server/hw/xfree86/common/vidmodeproc.h new file mode 100644 index 000000000..da4d05e1c --- /dev/null +++ b/xorg-server/hw/xfree86/common/vidmodeproc.h @@ -0,0 +1,77 @@ + +/* Prototypes for DGA functions that the DDX must provide */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#ifndef _VIDMODEPROC_H_ +#define _VIDMODEPROC_H_ + + +typedef enum { + VIDMODE_H_DISPLAY, + VIDMODE_H_SYNCSTART, + VIDMODE_H_SYNCEND, + VIDMODE_H_TOTAL, + VIDMODE_H_SKEW, + VIDMODE_V_DISPLAY, + VIDMODE_V_SYNCSTART, + VIDMODE_V_SYNCEND, + VIDMODE_V_TOTAL, + VIDMODE_FLAGS, + VIDMODE_CLOCK +} VidModeSelectMode; + +typedef enum { + VIDMODE_MON_VENDOR, + VIDMODE_MON_MODEL, + VIDMODE_MON_NHSYNC, + VIDMODE_MON_NVREFRESH, + VIDMODE_MON_HSYNC_LO, + VIDMODE_MON_HSYNC_HI, + VIDMODE_MON_VREFRESH_LO, + VIDMODE_MON_VREFRESH_HI +} VidModeSelectMonitor; + +typedef union { + pointer ptr; + int i; + float f; +} vidMonitorValue; + +extern _X_EXPORT void XFree86VidModeExtensionInit(void); + +extern _X_EXPORT Bool VidModeAvailable(int scrnIndex); +extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock); +extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom); +extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); +extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y); +extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock); +extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, pointer *monitor); +extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); +extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks); +extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode); +extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode); +extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, pointer mode); +extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock); +extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex); +extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); +extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); +extern _X_EXPORT pointer VidModeCreateMode(void); +extern _X_EXPORT void VidModeCopyMode(pointer modefrom, pointer modeto); +extern _X_EXPORT int VidModeGetModeValue(pointer mode, int valtyp); +extern _X_EXPORT void VidModeSetModeValue(pointer mode, int valtyp, int val); +extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx); +extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT Bool VidModeGetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); +extern _X_EXPORT int VidModeGetGammaRampSize(int scrnIndex); + +#endif + + diff --git a/xorg-server/hw/xfree86/common/xf86.h b/xorg-server/hw/xfree86/common/xf86.h index a32aa9bcc..e9266abd4 100644 --- a/xorg-server/hw/xfree86/common/xf86.h +++ b/xorg-server/hw/xfree86/common/xf86.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -55,24 +54,24 @@ #include "propertyst.h" /* General parameters */ -extern int xf86DoConfigure; -extern int xf86DoShowOptions; -extern Bool xf86DoModalias; -extern Bool xf86DoConfigurePass1; -extern DevPrivateKey xf86ScreenKey; -extern DevPrivateKey xf86CreateRootWindowKey; -extern DevPrivateKey xf86PixmapKey; -extern ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ -extern const unsigned char byte_reversed[256]; -extern ScrnInfoPtr xf86CurrentScreen; -extern Bool pciSlotClaimed; -extern Bool fbSlotClaimed; +extern _X_EXPORT int xf86DoConfigure; +extern _X_EXPORT int xf86DoShowOptions; +extern _X_EXPORT Bool xf86DoConfigurePass1; +extern _X_EXPORT DevPrivateKey xf86ScreenKey; +extern _X_EXPORT DevPrivateKey xf86CreateRootWindowKey; +extern _X_EXPORT DevPrivateKey xf86PixmapKey; +extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ +extern _X_EXPORT const unsigned char byte_reversed[256]; +extern _X_EXPORT Bool pciSlotClaimed; +extern _X_EXPORT Bool fbSlotClaimed; #if defined(__sparc__) || defined(__sparc) -extern Bool sbusSlotClaimed; +extern _X_EXPORT Bool sbusSlotClaimed; #endif -extern confDRIRec xf86ConfigDRI; -extern Bool xf86inSuspend; -extern Bool xf86DRI2Enabled(void); +extern _X_EXPORT confDRIRec xf86ConfigDRI; +extern _X_EXPORT Bool xf86inSuspend; +extern _X_EXPORT Bool xf86DRI2Enabled(void); + +extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */ #define XF86SCRNINFO(p) ((ScrnInfoPtr)dixLookupPrivate(&(p)->devPrivates, \ xf86ScreenKey)) @@ -94,285 +93,261 @@ extern Bool xf86DRI2Enabled(void); /* xf86Bus.c */ -Bool xf86CheckPciSlot( const struct pci_device * ); -int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, +extern _X_EXPORT Bool xf86CheckPciSlot( const struct pci_device * ); +extern _X_EXPORT int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, +extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *); +extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func); -Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); -void xf86FormatPciBusNumber(int busnum, char *buffer); -resPtr xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex); -int xf86GetFbInfoForScreen(int scrnIndex); -int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -void xf86EnableAccess(ScrnInfoPtr pScrn); -void xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn); -Bool xf86IsPrimaryPci(struct pci_device * pPci); +extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); +extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer); +extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex); +extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT void xf86EnableAccess(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci); /* new RAC */ -resPtr xf86AddResToList(resPtr rlist, resRange *Range, int entityIndex); -void xf86FreeResList(resPtr rlist); -void xf86ClaimFixedResources(resList list, int entityIndex); -Bool xf86DriverHasEntities(DriverPtr drvp); -void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); -void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, +extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp); +extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance); -int xf86GetNumEntityInstances(int entityIndex); -GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); -void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); -EntityInfoPtr xf86GetEntityInfo(int entityIndex); -struct pci_device * xf86GetPciInfoForEntity(int entityIndex); -Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, +extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex); +extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); +extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); +extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex); +extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer); -void xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type); -resPtr xf86RegisterResources(int entityIndex, resList list, - unsigned long Access); -Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); -void xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, - xf86SetAccessFuncPtr oldFuncs); -Bool xf86IsEntityPrimary(int entityIndex); -resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes); -resPtr xf86SetOperatingState(resList list, int entityIndex, int mask); -void xf86EnterServerState(xf86State state); -ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); -Bool xf86NoSharedResources(int screenIndex, resType res); -resPtr xf86FindIntersectOfLists(resPtr l1, resPtr l2); -void xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg); -Bool xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func); - -int xf86GetLastScrnFlag(int entityIndex); -void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); -Bool xf86IsEntityShared(int entityIndex); -void xf86SetEntityShared(int entityIndex); -Bool xf86IsEntitySharable(int entityIndex); -void xf86SetEntitySharable(int entityIndex); -Bool xf86IsPrimInitDone(int entityIndex); -void xf86SetPrimInitDone(int entityIndex); -void xf86ClearPrimInitDone(int entityIndex); -int xf86AllocateEntityPrivateIndex(void); -DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); +extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); +extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); +extern _X_EXPORT void xf86EnterServerState(xf86State state); +extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); + +extern _X_EXPORT int xf86GetLastScrnFlag(int entityIndex); +extern _X_EXPORT void xf86SetLastScrnFlag(int entityIndex, int scrnIndex); +extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex); +extern _X_EXPORT void xf86SetEntityShared(int entityIndex); +extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex); +extern _X_EXPORT void xf86SetEntitySharable(int entityIndex); +extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex); +extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex); +extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void); +extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); /* xf86Configure.c */ -GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, +extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset); /* xf86Cursor.c */ -void xf86LockZoom(ScreenPtr pScreen, int lock); -void xf86InitViewport(ScrnInfoPtr pScr); -void xf86SetViewport(ScreenPtr pScreen, int x, int y); -void xf86ZoomViewport(ScreenPtr pScreen, int zoom); -Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); -void *xf86GetPointerScreenFuncs(void); -void xf86InitOrigins(void); -void xf86ReconfigureLayout(void); +extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock); +extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr); +extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y); +extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom); +extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); +extern _X_EXPORT void *xf86GetPointerScreenFuncs(void); +extern _X_EXPORT void xf86InitOrigins(void); +extern _X_EXPORT void xf86ReconfigureLayout(void); /* xf86cvt.c */ -DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, +extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); /* xf86DPMS.c */ -Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); +extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); + +#ifdef DPMSExtension +extern _X_EXPORT int DPMSSet(ClientPtr client, int level); +extern _X_EXPORT Bool DPMSSupported(void); +#endif + /* xf86DGA.c */ -Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, +#ifdef XFreeXDGA +extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num); -Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); -xf86SetDGAModeProc xf86SetDGAMode; +extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); +extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode; +#endif /* xf86Events.c */ -void SetTimeSinceLastInputEvent(void); -pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveInputHandler(pointer handler); -void xf86DisableInputHandler(pointer handler); -void xf86EnableInputHandler(pointer handler); -pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); -int xf86RemoveGeneralHandler(pointer handler); -void xf86DisableGeneralHandler(pointer handler); -void xf86EnableGeneralHandler(pointer handler); -void xf86InterceptSignals(int *signo); -void xf86InterceptSigIll(void (*sigillhandler)(void)); -Bool xf86EnableVTSwitch(Bool new); -void xf86ProcessActionEvent(ActionEvent action, void *arg); -void xf86PrintBacktrace(void); +extern _X_EXPORT void SetTimeSinceLastInputEvent(void); +extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveInputHandler(pointer handler); +extern _X_EXPORT void xf86DisableInputHandler(pointer handler); +extern _X_EXPORT void xf86EnableInputHandler(pointer handler); +extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data); +extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler); +extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler); +extern _X_EXPORT void xf86InterceptSignals(int *signo); +extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler)(void)); +extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new); +extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg); +extern _X_EXPORT void xf86PrintBacktrace(void); /* xf86Helper.c */ -void xf86AddDriver(DriverPtr driver, pointer module, int flags); -void xf86DeleteDriver(int drvIndex); -ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); -void xf86DeleteScreen(int scrnIndex, int flags); -int xf86AllocateScrnInfoPrivateIndex(void); -Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); -Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, +extern _X_EXPORT void xf86AddDriver(DriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteDriver(int drvIndex); +extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); +extern _X_EXPORT void xf86DeleteScreen(int scrnIndex, int flags); +extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void); +extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); +extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, int depth24flags); -void xf86PrintDepthBpp(ScrnInfoPtr scrp); -Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); -Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); -Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); -void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); -void xf86SetBlackWhitePixels(ScreenPtr pScreen); -void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); -void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp); +extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); +extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); +extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); +extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); +extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen); +extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); +extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args); -void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, +extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _printf_attribute(4,5); -void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) +extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) _printf_attribute(3,4); -void xf86MsgVerb(MessageType type, int verb, const char *format, ...) +extern _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...) _printf_attribute(3,4); -void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); -void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); -const char *xf86TokenToString(SymTabPtr table, int token); -int xf86StringToToken(SymTabPtr table, const char *string); -void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); -void xf86PrintChipsets(const char *drvname, const char *drvmsg, +extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); +extern _X_EXPORT void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); +extern _X_EXPORT const char *xf86TokenToString(SymTabPtr table, int token); +extern _X_EXPORT int xf86StringToToken(SymTabPtr table, const char *string); +extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); +extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips); -int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); -int xf86MatchPciInstances(const char *driverName, int vendorID, +extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); +extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -void xf86GetClocks(ScrnInfoPtr pScrn, int num, +extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, int maskval, int knownclkindex, int knownclkvalue); -void xf86SetPriority(Bool up); -const char *xf86GetVisualName(int visual); -int xf86GetVerbosity(void); -Pix24Flags xf86GetPix24(void); -int xf86GetDepth(void); -rgb xf86GetWeight(void); -Gamma xf86GetGamma(void); -Bool xf86GetFlipPixels(void); -const char *xf86GetServerName(void); -Bool xf86ServerIsExiting(void); -Bool xf86ServerIsResetting(void); -Bool xf86ServerIsInitialising(void); -Bool xf86ServerIsOnlyDetecting(void); -Bool xf86ServerIsOnlyProbing(void); -Bool xf86CaughtSignal(void); -Bool xf86GetVidModeAllowNonLocal(void); -Bool xf86GetVidModeEnabled(void); -Bool xf86GetModInDevAllowNonLocal(void); -Bool xf86GetModInDevEnabled(void); -Bool xf86GetAllowMouseOpenFail(void); -Bool xf86IsPc98(void); -void xf86DisableRandR(void); -CARD32 xorgGetVersion(void); -CARD32 xf86GetModuleVersion(pointer module); -pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); -pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); -pointer xf86LoadOneModule(char *name, pointer optlist); -void xf86UnloadSubModule(pointer mod); -Bool xf86LoaderCheckSymbol(const char *name); -void xf86LoaderReqSymLists(const char **, ...); -void xf86LoaderReqSymbols(const char *, ...); -void xf86LoaderRefSymLists(const char **, ...); -void xf86LoaderRefSymbols(const char *, ...); -void xf86SetBackingStore(ScreenPtr pScreen); -void xf86SetSilkenMouse(ScreenPtr pScreen); -int xf86NewSerialNumber(WindowPtr p, pointer unused); -pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, +extern _X_EXPORT const char *xf86GetVisualName(int visual); +extern _X_EXPORT int xf86GetVerbosity(void); +extern _X_EXPORT Pix24Flags xf86GetPix24(void); +extern _X_EXPORT int xf86GetDepth(void); +extern _X_EXPORT rgb xf86GetWeight(void); +extern _X_EXPORT Gamma xf86GetGamma(void); +extern _X_EXPORT Bool xf86GetFlipPixels(void); +extern _X_EXPORT const char *xf86GetServerName(void); +extern _X_EXPORT Bool xf86ServerIsExiting(void); +extern _X_EXPORT Bool xf86ServerIsResetting(void); +extern _X_EXPORT Bool xf86ServerIsInitialising(void); +extern _X_EXPORT Bool xf86ServerIsOnlyDetecting(void); +extern _X_EXPORT Bool xf86CaughtSignal(void); +extern _X_EXPORT Bool xf86GetVidModeAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetVidModeEnabled(void); +extern _X_EXPORT Bool xf86GetModInDevAllowNonLocal(void); +extern _X_EXPORT Bool xf86GetModInDevEnabled(void); +extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); +extern _X_EXPORT Bool xf86IsPc98(void); +extern _X_EXPORT void xf86DisableRandR(void); +extern _X_EXPORT CARD32 xorgGetVersion(void); +extern _X_EXPORT CARD32 xf86GetModuleVersion(pointer module); +extern _X_EXPORT pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); +extern _X_EXPORT pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); +extern _X_EXPORT pointer xf86LoadOneModule(char *name, pointer optlist); +extern _X_EXPORT void xf86UnloadSubModule(pointer mod); +extern _X_EXPORT Bool xf86LoaderCheckSymbol(const char *name); +extern _X_EXPORT void xf86SetBackingStore(ScreenPtr pScreen); +extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen); +extern _X_EXPORT pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, char **adaptor_name, pointer *adaptor_options); -void xf86GetOS(const char **name, int *major, int *minor, int *teeny); -ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex,PciChipsets *p_chip, - resList res, EntityProc init, + void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, +extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private); + /* Obsolete! don't use */ -Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, - int entityIndex,PciChipsets *p_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -/* Obsolete! don't use */ -void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, - resList res, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); -Bool xf86IsScreenPrimary(int scrnIndex); -int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, +extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, + int entityIndex,PciChipsets *p_chip, + void *dummy, EntityProc init, + EntityProc enter, EntityProc leave, + pointer private); + +extern _X_EXPORT Bool xf86IsScreenPrimary(int scrnIndex); +extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value); -Bool xf86IsUnblank(int mode); - -_X_DEPRECATED void xf86AddModuleInfo(pointer info, pointer module); -_X_DEPRECATED void xf86DeleteModuleInfo(int idx); +extern _X_EXPORT Bool xf86IsUnblank(int mode); /* xf86Init.c */ -PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); -int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); +extern _X_EXPORT int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); /* xf86Mode.c */ -int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, +extern _X_EXPORT int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider); -const char *xf86ModeStatusToString(ModeStatus status); -ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, +extern _X_EXPORT const char *xf86ModeStatusToString(ModeStatus status); +extern _X_EXPORT ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy); -ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); -ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); +extern _X_EXPORT ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, int maxPitch, int virtualX, int virtualY); -ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, +extern _X_EXPORT ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags); -int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, +extern _X_EXPORT int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int minHeight, int maxHeight, int pitchInc, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); -void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); -void xf86PruneDriverModes(ScrnInfoPtr scrp); -void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); -void xf86PrintModes(ScrnInfoPtr scrp); -void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); -double xf86ModeHSync(const DisplayModeRec *mode); -double xf86ModeVRefresh(const DisplayModeRec *mode); -void xf86SetModeDefaultName(DisplayModePtr mode); -void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); -DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -Bool xf86ModesEqual(const DisplayModeRec *pMode1, +extern _X_EXPORT void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); +extern _X_EXPORT void xf86PruneDriverModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); +extern _X_EXPORT void xf86PrintModes(ScrnInfoPtr scrp); +extern _X_EXPORT void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); +extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec *mode); +extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec *mode); +extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); +extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); +extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); +extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); +extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2); -void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); -DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); +extern _X_EXPORT void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); +extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); /* xf86Option.c */ -void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); +extern _X_EXPORT void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); /* xf86RandR.c */ #ifdef RANDR -Bool xf86RandRInit (ScreenPtr pScreen); -void xf86RandRSetInitialMode (ScreenPtr pScreen); -Rotation xf86GetRotation(ScreenPtr pScreen); -Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, +extern _X_EXPORT Bool xf86RandRInit (ScreenPtr pScreen); +extern _X_EXPORT Rotation xf86GetRotation(ScreenPtr pScreen); +extern _X_EXPORT Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode); #endif /* xf86VidModeExtentionInit.c */ -Bool VidModeExtensionInit(ScreenPtr pScreen); +extern _X_EXPORT Bool VidModeExtensionInit(ScreenPtr pScreen); #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xorg-server/hw/xfree86/common/xf86AutoConfig.c b/xorg-server/hw/xfree86/common/xf86AutoConfig.c index a9a1fd207..b3c31fd70 100644 --- a/xorg-server/hw/xfree86/common/xf86AutoConfig.c +++ b/xorg-server/hw/xfree86/common/xf86AutoConfig.c @@ -144,11 +144,6 @@ static int videoPtrToDriverList(struct pci_device *dev, char *returnList[], int returnListMax) { - /* - * things not handled yet: - * cyrix/nsc. should be merged into geode anyway. - * xgi. - */ int i; /* Add more entries here if we ever return more than 4 drivers for any device */ @@ -156,11 +151,27 @@ videoPtrToDriverList(struct pci_device *dev, switch (dev->vendor_id) { + /* AMD Geode LX */ case 0x1022: - if (dev->device_id == 0x2081) { + if (dev->device_id == 0x2081) driverList[0] = "geode"; - driverList[1] = "amd"; - } + break; + /* older Geode products acquired by AMD still carry an NSC vendor_id */ + case 0x100B: + if (dev->device_id == 0x0030) { + /* NSC Geode GX2 specifically ... */ + driverList[0] = "geode"; + /* GX2 support started its life in the NSC tree and was later + forked by AMD for GEODE so we keep it as a backup */ + driverList[1] = "nsc"; + } else + /* ... or any other NSC Geode e.g. SC series */ + driverList[0] = "nsc"; + break; + /* Cyrix Geode GX1 */ + case 0x1078: + if (dev->device_id == 0x0104) + driverList[0] = "cyrix"; break; case 0x1142: driverList[0] = "apm"; break; case 0xedd8: driverList[0] = "ark"; break; @@ -168,18 +179,21 @@ videoPtrToDriverList(struct pci_device *dev, case 0x1002: driverList[0] = "ati"; break; case 0x102c: driverList[0] = "chips"; break; case 0x1013: driverList[0] = "cirrus"; break; + case 0x3d3d: driverList[0] = "glint"; break; + case 0x105d: driverList[0] = "i128"; break; case 0x8086: if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { driverList[0] = "i740"; + } else if (dev->device_id == 0x8108) { + break; /* "hooray" for poulsbo */ } else { driverList[0] = "intel"; - driverList[1] = "i810"; } break; case 0x102b: driverList[0] = "mga"; break; case 0x10c8: driverList[0] = "neomagic"; break; - case 0x105d: driverList[0] = "i128"; break; case 0x10de: case 0x12d2: driverList[0] = "nv"; break; + case 0x1106: driverList[0] = "openchrome"; break; case 0x1163: driverList[0] = "rendition"; break; case 0x5333: switch (dev->device_id) @@ -202,11 +216,11 @@ videoPtrToDriverList(struct pci_device *dev, else driverList[0] = "tdfx"; break; - case 0x3d3d: driverList[0] = "glint"; break; + case 0x1011: driverList[0] = "tga"; break; case 0x1023: driverList[0] = "trident"; break; - case 0x100c: driverList[0] = "tseng"; break; - case 0x1106: driverList[0] = "openchrome"; break; - case 0x15ad: driverList[0] = "vmware"; break; + case 0x100c: driverList[0] = "tseng"; break; + case 0x80ee: driverList[0] = "vboxvideo"; break; + case 0x15ad: driverList[0] = "vmware"; break; case 0x18ca: if (dev->device_id == 0x47) driverList[0] = "xgixp"; @@ -269,7 +283,7 @@ xf86AutoConfig(void) return (ret == CONFIG_OK); } -int +static int xchomp(char *line) { size_t len = 0; @@ -285,46 +299,6 @@ xchomp(char *line) return 0; } -GDevPtr -autoConfigDevice(GDevPtr preconf_device) -{ - GDevPtr ptr = NULL; - - if (!xf86configptr) { - return NULL; - } - - /* If there's a configured section with no driver chosen, use it */ - if (preconf_device) { - ptr = preconf_device; - } else { - ptr = xcalloc(1, sizeof(GDevRec)); - if (!ptr) { - return NULL; - } - ptr->chipID = -1; - ptr->chipRev = -1; - ptr->irq = -1; - - ptr->active = TRUE; - ptr->claimed = FALSE; - ptr->identifier = "Autoconfigured Video Device"; - ptr->driver = NULL; - } - if (!ptr->driver) { - ptr->driver = chooseVideoDriver(); - } - - /* TODO Handle multiple screen sections */ - if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) { - xf86ConfigLayout.screens->screen->device = ptr; - ptr->myScreenSection = xf86ConfigLayout.screens->screen; - } - xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); - - return ptr; -} - #ifdef __linux__ /* This function is used to provide a workaround for binary drivers that * don't export their PCI ID's properly. If distros don't end up using this @@ -448,8 +422,25 @@ listPossibleVideoDrivers(char *matches[], int nmatches) if (xf86Info.consoleFd >= 0) { struct vis_identifier visid; const char *cp; + extern char xf86SolarisFbDev[PATH_MAX]; + int iret; + + SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid)); + if (iret < 0) { + int fbfd; + + fbfd = open(xf86SolarisFbDev, O_RDONLY); + if (fbfd >= 0) { + SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid)); + close(fbfd); + } + } - if (ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid) >= 0) { + if (iret < 0) { + xf86Msg(X_WARNING, + "could not get frame buffer identifier from %s\n", + xf86SolarisFbDev); + } else { xf86Msg(X_PROBED, "console driver: %s\n", visid.name); /* Special case from before the general case was set */ @@ -529,7 +520,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches) } } -char* +static char* chooseVideoDriver(void) { char *chosen_driver = NULL; @@ -552,3 +543,43 @@ chooseVideoDriver(void) return chosen_driver; } + +GDevPtr +autoConfigDevice(GDevPtr preconf_device) +{ + GDevPtr ptr = NULL; + + if (!xf86configptr) { + return NULL; + } + + /* If there's a configured section with no driver chosen, use it */ + if (preconf_device) { + ptr = preconf_device; + } else { + ptr = xcalloc(1, sizeof(GDevRec)); + if (!ptr) { + return NULL; + } + ptr->chipID = -1; + ptr->chipRev = -1; + ptr->irq = -1; + + ptr->active = TRUE; + ptr->claimed = FALSE; + ptr->identifier = "Autoconfigured Video Device"; + ptr->driver = NULL; + } + if (!ptr->driver) { + ptr->driver = chooseVideoDriver(); + } + + /* TODO Handle multiple screen sections */ + if (xf86ConfigLayout.screens && !xf86ConfigLayout.screens->screen->device) { + xf86ConfigLayout.screens->screen->device = ptr; + ptr->myScreenSection = xf86ConfigLayout.screens->screen; + } + xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); + + return ptr; +} diff --git a/xorg-server/hw/xfree86/common/xf86Bus.c b/xorg-server/hw/xfree86/common/xf86Bus.c index b94d500f0..f0a0723f9 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.c +++ b/xorg-server/hw/xfree86/common/xf86Bus.c @@ -40,60 +40,28 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" +#include "xf86VGAarbiter.h" -#include "xf86RAC.h" #include "Pci.h" /* Entity data */ EntityPtr *xf86Entities = NULL; /* Bus slots claimed by drivers */ int xf86NumEntities = 0; static int xf86EntityPrivateCount = 0; -BusAccPtr xf86BusAccInfo = NULL; -static void -noopEnableDisable(void *arg) { } - -xf86AccessRec AccessNULL = { noopEnableDisable, noopEnableDisable, NULL }; - -xf86CurrentAccessRec xf86CurrentAccess = {NULL,NULL}; - -BusRec primaryBus = { BUS_NONE, {{0}}}; +BusRec primaryBus = { BUS_NONE, { 0 } }; static Bool xf86ResAccessEnter = FALSE; - -/* resource lists */ -resPtr Acc = NULL; - -/* predefined special resources */ -_X_EXPORT resRange resVgaExclusive[] = {_VGA_EXCLUSIVE, _END}; -_X_EXPORT resRange resVgaShared[] = {_VGA_SHARED, _END}; -_X_EXPORT resRange resVgaMemShared[] = {_VGA_SHARED_MEM,_END}; -_X_EXPORT resRange resVgaIoShared[] = {_VGA_SHARED_IO,_END}; -_X_EXPORT resRange resVgaUnusedExclusive[] = {_VGA_EXCLUSIVE_UNUSED, _END}; -_X_EXPORT resRange resVgaUnusedShared[] = {_VGA_SHARED_UNUSED, _END}; -_X_EXPORT resRange resVgaSparseExclusive[] = {_VGA_EXCLUSIVE_SPARSE, _END}; -_X_EXPORT resRange resVgaSparseShared[] = {_VGA_SHARED_SPARSE, _END}; -_X_EXPORT resRange res8514Exclusive[] = {_8514_EXCLUSIVE, _END}; -_X_EXPORT resRange res8514Shared[] = {_8514_SHARED, _END}; - -/* Flag: do we need RAC ? */ -static Bool needRAC = FALSE; static Bool doFramebufferMode = FALSE; -/* state change notification callback list */ -static StateChangeNotificationPtr StateChangeNotificationList; -static void notifyStateChange(xf86NotifyState state); - /* * Call the bus probes relevant to the architecture. * @@ -152,17 +120,10 @@ void xf86EntityInit(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityInit) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityInit(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } @@ -182,17 +143,10 @@ static void EntityEnter(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityEnter) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityEnter(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } @@ -200,32 +154,25 @@ static void EntityLeave(void) { int i; - xf86AccessPtr pacc; for (i = 0; i < xf86NumEntities; i++) if (xf86Entities[i]->entityLeave) { - if (xf86Entities[i]->access->busAcc) - ((BusAccPtr)xf86Entities[i]->access->busAcc)->set_f - (xf86Entities[i]->access->busAcc); - pacc = xf86Entities[i]->access->fallback; - pacc->AccessEnable(pacc->arg); xf86Entities[i]->entityLeave(i,xf86Entities[i]->private); - pacc->AccessDisable(pacc->arg); } } -_X_EXPORT Bool +Bool xf86IsEntityPrimary(int entityIndex) { EntityPtr pEnt = xf86Entities[entityIndex]; - if (primaryBus.type != pEnt->busType) return FALSE; + if (primaryBus.type != pEnt->bus.type) return FALSE; - switch (pEnt->busType) { + switch (pEnt->bus.type) { case BUS_PCI: return (pEnt->bus.id.pci == primaryBus.id.pci); case BUS_SBUS: - return (pEnt->sbusBusId.fbNum == primaryBus.id.sbus.fbNum); + return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum); default: return FALSE; } @@ -255,7 +202,7 @@ xf86DriverHasEntities(DriverPtr drvp) return FALSE; } -_X_EXPORT void +void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) { if (entityIndex == -1) @@ -270,8 +217,6 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) pScrn->entityList = xnfrealloc(pScrn->entityList, pScrn->numEntities * sizeof(int)); pScrn->entityList[pScrn->numEntities - 1] = entityIndex; - xf86Entities[entityIndex]->access->next = pScrn->access; - pScrn->access = xf86Entities[entityIndex]->access; xf86Entities[entityIndex]->inUse = TRUE; pScrn->entityInstanceList = xnfrealloc(pScrn->entityInstanceList, pScrn->numEntities * sizeof(int)); @@ -279,7 +224,7 @@ xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) pScrn->domainIOBase = xf86Entities[entityIndex]->domainIO; } -_X_EXPORT void +void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) { int i; @@ -299,7 +244,7 @@ xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) * XXX This needs to be updated for the case where a single entity may have * instances associated with more than one screen. */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86FindScreenForEntity(int entityIndex) { int i,j; @@ -317,30 +262,19 @@ xf86FindScreenForEntity(int entityIndex) return NULL; } -_X_EXPORT void +void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) { int i; - EntityAccessPtr *ptr = (EntityAccessPtr *)&pScrn->access; - EntityAccessPtr peacc; for (i = 0; i < pScrn->numEntities; i++) { if (pScrn->entityList[i] == entityIndex) { - peacc = xf86Entities[pScrn->entityList[i]]->access; - (*ptr) = peacc->next; - /* disable entity: call disable func */ - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - /* also disable fallback - just in case */ - if (peacc->fallback) - peacc->fallback->AccessDisable(peacc->fallback->arg); for (i++; i < pScrn->numEntities; i++) pScrn->entityList[i-1] = pScrn->entityList[i]; pScrn->numEntities--; xf86Entities[entityIndex]->inUse = FALSE; break; } - ptr = &(xf86Entities[pScrn->entityList[i]]->access->next); } } @@ -352,7 +286,6 @@ void xf86ClearEntityListForScreen(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - EntityAccessPtr peacc; int i, entityIndex; if (pScrn->entityList == NULL || pScrn->numEntities == 0) return; @@ -361,43 +294,13 @@ xf86ClearEntityListForScreen(int scrnIndex) entityIndex = pScrn->entityList[i]; xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ - peacc = xf86Entities[entityIndex]->access; - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - /* and the fallback function */ - if (peacc->fallback) - peacc->fallback->AccessDisable(peacc->fallback->arg); - /* shared resources are only needed when entity is active: remove */ - xf86DeallocateResourcesForEntity(entityIndex, ResShared); } xfree(pScrn->entityList); xfree(pScrn->entityInstanceList); - if (pScrn->CurrentAccess->pIoAccess == (EntityAccessPtr)pScrn->access) - pScrn->CurrentAccess->pIoAccess = NULL; - if (pScrn->CurrentAccess->pMemAccess == (EntityAccessPtr)pScrn->access) - pScrn->CurrentAccess->pMemAccess = NULL; pScrn->entityList = NULL; pScrn->entityInstanceList = NULL; } -void -xf86DeallocateResourcesForEntity(int entityIndex, unsigned long type) -{ - resPtr *pprev_next = &Acc; - resPtr res = Acc; - - while (res) { - if (res->entityIndex == entityIndex && - (type & ResAccMask & res->res_type)) - { - (*pprev_next) = res->next; - xfree(res); - } else - pprev_next = &(res->next); - res = (*pprev_next); - } -} - /* * Add an extra device section (GDevPtr) to an entity. */ @@ -423,12 +326,15 @@ xf86AddDevToEntity(int entityIndex, GDevPtr dev) * EntityRec struct to the drivers. The EntityRec structure itself * remains invisible to the driver. */ -_X_EXPORT EntityInfoPtr +EntityInfoPtr xf86GetEntityInfo(int entityIndex) { EntityInfoPtr pEnt; int i; + if (entityIndex == -1) + return NULL; + if (entityIndex >= xf86NumEntities) return NULL; @@ -437,7 +343,6 @@ xf86GetEntityInfo(int entityIndex) pEnt->location = xf86Entities[entityIndex]->bus; pEnt->active = xf86Entities[entityIndex]->active; pEnt->chipset = xf86Entities[entityIndex]->chipset; - pEnt->resources = xf86Entities[entityIndex]->resources; pEnt->driver = xf86Entities[entityIndex]->driver; if ( (xf86Entities[entityIndex]->devices) && (xf86Entities[entityIndex]->devices[0]) ) { @@ -451,7 +356,7 @@ xf86GetEntityInfo(int entityIndex) return pEnt; } -_X_EXPORT int +int xf86GetNumEntityInstances(int entityIndex) { if (entityIndex >= xf86NumEntities) @@ -460,7 +365,7 @@ xf86GetNumEntityInstances(int entityIndex) return xf86Entities[entityIndex]->numInstances; } -_X_EXPORT GDevPtr +GDevPtr xf86GetDevFromEntity(int entityIndex, int instance) { int i; @@ -481,72 +386,12 @@ xf86GetDevFromEntity(int entityIndex, int instance) } /* - * general generic disable function. - */ -static void -disableAccess(void) -{ - int i; - xf86AccessPtr pacc; - EntityAccessPtr peacc; - - /* call disable funcs and reset current access pointer */ - /* the entity specific access funcs are in an enabled */ - /* state - driver must restore their state explicitely */ - for (i = 0; i < xf86NumScreens; i++) { - peacc = xf86Screens[i]->CurrentAccess->pIoAccess; - while (peacc) { - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - peacc = peacc->next; - } - xf86Screens[i]->CurrentAccess->pIoAccess = NULL; - peacc = xf86Screens[i]->CurrentAccess->pMemAccess; - while (peacc) { - if (peacc->pAccess) - peacc->pAccess->AccessDisable(peacc->pAccess->arg); - peacc = peacc->next; - } - xf86Screens[i]->CurrentAccess->pMemAccess = NULL; - } - /* then call the generic entity disable funcs */ - for (i = 0; i < xf86NumEntities; i++) { - pacc = xf86Entities[i]->access->fallback; - pacc->AccessDisable(pacc->arg); - } -} - -static void -clearAccess(void) -{ - int i; - - /* call disable funcs and reset current access pointer */ - /* the entity specific access funcs are in an enabled */ - /* state - driver must restore their state explicitely */ - for (i = 0; i < xf86NumScreens; i++) { - xf86Screens[i]->CurrentAccess->pIoAccess = NULL; - xf86Screens[i]->CurrentAccess->pMemAccess = NULL; - } - -} - -/* - * Generic interface to bus specific code - add other buses here - */ - -/* * xf86AccessInit() - set up everything needed for access control * called only once on first server generation. */ void xf86AccessInit(void) { - initPciState(); - initPciBusState(); - DisablePciBusAccess(); - DisablePciAccess(); - xf86ResAccessEnter = TRUE; } @@ -564,12 +409,7 @@ xf86AccessEnter(void) * on enter we simply disable routing of special resources * to any bus and let the RAC code to "open" the right bridges. */ - PciBusStateEnter(); - DisablePciBusAccess(); - PciStateEnter(); - disableAccess(); EntityEnter(); - notifyStateChange(NOTIFY_ENTER); xf86EnterServerState(SETUP); xf86ResAccessEnter = TRUE; } @@ -588,35 +428,9 @@ xf86AccessLeave(void) { if (!xf86ResAccessEnter) return; - notifyStateChange(NOTIFY_LEAVE); - disableAccess(); - DisablePciBusAccess(); EntityLeave(); } -void -xf86AccessLeaveState(void) -{ - if (!xf86ResAccessEnter) - return; - xf86ResAccessEnter = FALSE; - PciStateLeave(); - PciBusStateLeave(); -} - -/* - * xf86AccessRestoreState() - Restore the access registers to the - * state before X was started. This is handy for framebuffers. - */ -static void -xf86AccessRestoreState(void) -{ - if (!xf86ResAccessEnter) - return; - PciStateLeave(); - PciBusStateLeave(); -} - /* * xf86EnableAccess() -- enable access to controlled resources. * To reduce latency when switching access the ScrnInfoRec has @@ -632,896 +446,14 @@ xf86AccessRestoreState(void) * by other resources! */ -_X_EXPORT void -xf86EnableAccess(ScrnInfoPtr pScrn) -{ - register EntityAccessPtr peAcc = (EntityAccessPtr) pScrn->access; - register EntityAccessPtr pceAcc; - register xf86AccessPtr pAcc; - EntityAccessPtr tmp; - -#ifdef DEBUG - ErrorF("Enable access %i\n",pScrn->scrnIndex); -#endif - - /* Entity is not under access control or currently enabled */ - if (!pScrn->access) { - if (pScrn->busAccess) { - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - } - return; - } - - switch (pScrn->resourceType) { - case IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - if (peAcc == pceAcc) { - return; - } - if (pScrn->CurrentAccess->pMemAccess == pceAcc) - pScrn->CurrentAccess->pMemAccess = NULL; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pIoAccess = (EntityAccessPtr) pScrn->access; - return; - - case MEM_IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - if (peAcc != pceAcc) { /* current Io != pAccess */ - tmp = pceAcc; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (peAcc != pceAcc /* current Mem != pAccess */ - && tmp !=pceAcc) { - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - } - } else { /* current Io == pAccess */ - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (pceAcc == peAcc) { /* current Mem == pAccess */ - return; - } - while (pceAcc) { /* current Mem != pAccess */ - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pMemAccess = - pScrn->CurrentAccess->pIoAccess = (EntityAccessPtr) pScrn->access; - return; - - case MEM: - pceAcc = pScrn->CurrentAccess->pMemAccess; - if (peAcc == pceAcc) { - return; - } - if (pScrn->CurrentAccess->pIoAccess == pceAcc) - pScrn->CurrentAccess->pIoAccess = NULL; - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) - pAcc->AccessDisable(pAcc->arg); - pceAcc = pceAcc->next; - } - if (pScrn->busAccess) - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - while (peAcc) { - pAcc = peAcc->pAccess; - if (pAcc) - pAcc->AccessEnable(pAcc->arg); - peAcc = peAcc->next; - } - pScrn->CurrentAccess->pMemAccess = (EntityAccessPtr) pScrn->access; - return; - - case NONE: - if (pScrn->busAccess) { - ((BusAccPtr)pScrn->busAccess)->set_f(pScrn->busAccess); - } - return; - } -} - -_X_EXPORT void -xf86SetCurrentAccess(Bool Enable, ScrnInfoPtr pScrn) -{ - EntityAccessPtr pceAcc2 = NULL; - register EntityAccessPtr pceAcc = NULL; - register xf86AccessPtr pAcc; - - - switch(pScrn->resourceType) { - case IO: - pceAcc = pScrn->CurrentAccess->pIoAccess; - break; - case MEM: - pceAcc = pScrn->CurrentAccess->pMemAccess; - break; - case MEM_IO: - pceAcc = pScrn->CurrentAccess->pMemAccess; - pceAcc2 = pScrn->CurrentAccess->pIoAccess; - break; - default: - break; - } - - while (pceAcc) { - pAcc = pceAcc->pAccess; - if (pAcc) { - if (Enable) { - pAcc->AccessEnable(pAcc->arg); - } else { - pAcc->AccessDisable(pAcc->arg); - } - } - pceAcc = pceAcc->next; - if (!pceAcc) { - pceAcc = pceAcc2; - pceAcc2 = NULL; - } - } -} - -_X_EXPORT void -xf86SetAccessFuncs(EntityInfoPtr pEnt, xf86SetAccessFuncPtr funcs, - xf86SetAccessFuncPtr oldFuncs) -{ - AccessFuncPtr rac; - - if (!xf86Entities[pEnt->index]->rac) - xf86Entities[pEnt->index]->rac = xnfcalloc(1,sizeof(AccessFuncRec)); - - rac = xf86Entities[pEnt->index]->rac; - - rac->mem_new = funcs->mem; - rac->io_new = funcs->io; - rac->io_mem_new = funcs->io_mem; - - rac->old = oldFuncs; -} - -/* - * Conflict checking - */ - -static memType -getMask(memType val) -{ - memType mask = 0; - memType tmp = 0; - - mask=~mask; - tmp = ~((~tmp) >> 1); - - while (!(val & tmp)) { - mask = mask >> 1; - val = val << 1; - } - return mask; -} - -/* - * checkConflictBlock() -- check for conflicts of a block resource range. - * If conflict is found return end of conflicting range. Else return 0. - */ -static memType -checkConflictBlock(resRange *range, resPtr pRes) -{ - memType val,tmp,prev; - int i; - - switch (pRes->res_type & ResExtMask) { - case ResBlock: - if (range->rBegin < pRes->block_end && - range->rEnd > pRes->block_begin) { -#ifdef DEBUG - ErrorF("b-b conflict w: %lx %lx\n", - pRes->block_begin,pRes->block_end); -#endif - return pRes->block_end < range->rEnd ? - pRes->block_end : range->rEnd; - } - return 0; - case ResSparse: - if (pRes->sparse_base > range->rEnd) return 0; - - val = (~pRes->sparse_mask | pRes->sparse_base) & getMask(range->rEnd); -#ifdef DEBUG - ErrorF("base = 0x%lx, mask = 0x%lx, begin = 0x%lx, end = 0x%lx ," - "val = 0x%lx\n", - pRes->sparse_base, pRes->sparse_mask, range->rBegin, - range->rEnd, val); -#endif - i = sizeof(memType) * 8; - tmp = prev = pRes->sparse_base; - - while (i) { - tmp |= 1<< (--i) & val; - if (tmp > range->rEnd) - tmp = prev; - else - prev = tmp; - } - if (tmp >= range->rBegin) { -#ifdef DEBUG - ErrorF("conflict found at: 0x%lx\n",tmp); - ErrorF("b-d conflict w: %lx %lx\n", - pRes->sparse_base,pRes->sparse_mask); -#endif - return tmp; - } - else - return 0; - } - return 0; -} - -/* - * checkConflictSparse() -- check for conflicts of a sparse resource range. - * If conflict is found return base of conflicting region. Else return 0. - */ -#define mt_max ~(memType)0 -#define length sizeof(memType) * 8 -static memType -checkConflictSparse(resRange *range, resPtr pRes) -{ - memType val, tmp, prev; - int i; - - switch (pRes->res_type & ResExtMask) { - case ResSparse: - tmp = pRes->sparse_mask & range->rMask; - if ((tmp & pRes->sparse_base) == (tmp & range->rBase)) { -#ifdef DEBUG - ErrorF("s-b conflict w: %lx %lx\n", - pRes->sparse_base,pRes->sparse_mask); -#endif - return pRes->sparse_mask; - } - return 0; - - case ResBlock: - if (pRes->block_end < range->rBase) return 0; - - val = (~range->rMask | range->rBase) & getMask(pRes->block_end); - i = length; - tmp = prev = range->rBase; - - while (i) { -#ifdef DEBUG - ErrorF("tmp = 0x%lx\n",tmp); -#endif - tmp |= 1<< (--i) & val; - if (tmp > pRes->block_end) - tmp = prev; - else - prev = tmp; - } - if (tmp < pRes->block_begin) - return 0; - else { - /* - * now we subdivide the block region in sparse regions - * with base values = 2^n and find the smallest mask. - * This might be done in a simpler way.... - */ - memType mask, m_mask = 0, base = pRes->block_begin; - int i; - while (base < pRes->block_end) { - for (i = 1; i < length; i++) - if ( base != (base & (mt_max << i))) break; - mask = mt_max >> (length - i); - do mask >>= 1; - while ((mask + base + 1) > pRes->block_end); - /* m_mask and are _inverted_ sparse masks */ - m_mask = mask > m_mask ? mask : m_mask; - base = base + mask + 1; - } -#ifdef DEBUG - ErrorF("conflict found at: 0x%lx\n",tmp); - ErrorF("b-b conflict w: %lx %lx\n", - pRes->block_begin,pRes->block_end); -#endif - return ~m_mask; - } - } - return 0; -} -#undef mt_max -#undef length - -/* - * needCheck() -- this function decides whether to check for conflicts - * depending on the types of the resource ranges and their locations - */ -static Bool -needCheck(resPtr pRes, unsigned long type, int entityIndex, xf86State state) -{ - /* the same entity shouldn't conflict with itself */ - ScrnInfoPtr pScrn; - int i; - BusType loc = BUS_NONE; - BusType r_loc = BUS_NONE; - - if ((pRes->res_type & ResTypeMask) != (type & ResTypeMask)) - return FALSE; - - /* - * Resources set by BIOS (ResBios) are allowed to conflict - * with resources marked (ResBios). - */ - if (pRes->res_type & type & ResBios) - return FALSE; - - if (type & pRes->res_type & ResUnused) - return FALSE; - - if (state == OPERATING) { - if (type & ResDisableOpr || pRes->res_type & ResDisableOpr) - return FALSE; - if (type & pRes->res_type & ResUnusedOpr) return FALSE; - /* - * Maybe we should have ResUnused set The resUnusedOpr - * bit, too. This way we could avoid this confusion - */ - if ((type & ResUnusedOpr && pRes->res_type & ResUnused) || - (type & ResUnused && pRes->res_type & ResUnusedOpr)) - return FALSE; - } - - if (entityIndex > -1) - loc = xf86Entities[entityIndex]->busType; - if (pRes->entityIndex > -1) - r_loc = xf86Entities[pRes->entityIndex]->busType; - - if ((type & ResAccMask) == ResShared && - (pRes->res_type & ResAccMask) == ResShared) - return FALSE; - - if (pRes->entityIndex == entityIndex) return FALSE; - - if (pRes->entityIndex > -1 && - (pScrn = xf86FindScreenForEntity(entityIndex))) { - for (i = 0; i < pScrn->numEntities; i++) - if (pScrn->entityList[i] == pRes->entityIndex) return FALSE; - } - return TRUE; -} - -/* - * checkConflict() - main conflict checking function which all other - * function call. - */ -static memType -checkConflict(resRange *rgp, resPtr pRes, int entityIndex, - xf86State state, Bool ignoreIdentical) -{ - memType ret; - - while(pRes) { - if (!needCheck(pRes,rgp->type, entityIndex ,state)) { - pRes = pRes->next; - continue; - } - switch (rgp->type & ResExtMask) { - case ResBlock: - if (rgp->rEnd < rgp->rBegin) { - xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - (long)rgp->rEnd, (long)rgp->rBegin); - return 0; - } - if ((ret = checkConflictBlock(rgp, pRes))) { - if (!ignoreIdentical || (rgp->rBegin != pRes->block_begin) - || (rgp->rEnd != pRes->block_end)) - return ret; - } - break; - case ResSparse: - if ((rgp->rBase & rgp->rMask) != rgp->rBase) { - xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" - "doesn't satisfy (base & mask = mask)\n", - (long)rgp->rBase, (long)rgp->rMask); - return 0; - } - if ((ret = checkConflictSparse(rgp, pRes))) { - if (!ignoreIdentical || (rgp->rBase != pRes->sparse_base) - || (rgp->rMask != pRes->sparse_mask)) - return ret; - } - break; - } - pRes = pRes->next; - } - return 0; -} - -/* - * xf86ChkConflict() - This function is the low level interface to - * the resource broker that gets exported. Tests all resources ie. - * performs test with SETUP flag. - */ -static memType -xf86ChkConflict(resRange *rgp, int entityIndex) -{ - return checkConflict(rgp, Acc, entityIndex, SETUP, FALSE); -} - -/* - * Resources List handling - */ - -static resPtr -xf86JoinResLists(resPtr rlist1, resPtr rlist2) -{ - resPtr pRes; - - if (!rlist1) - return rlist2; - - if (!rlist2) - return rlist1; - - for (pRes = rlist1; pRes->next; pRes = pRes->next) - ; - pRes->next = rlist2; - return rlist1; -} - -resPtr -xf86AddResToList(resPtr rlist, resRange *range, int entityIndex) -{ - resPtr new; - - switch (range->type & ResExtMask) { - case ResBlock: - if (range->rEnd < range->rBegin) { - xf86Msg(X_ERROR,"end of block range 0x%lx < begin 0x%lx\n", - (long)range->rEnd, (long)range->rBegin); - return rlist; - } - break; - case ResSparse: - if ((range->rBase & range->rMask) != range->rBase) { - xf86Msg(X_ERROR,"sparse io range (base: 0x%lx mask: 0x%lx)" - "doesn't satisfy (base & mask = mask)\n", - (long)range->rBase, (long)range->rMask); - return rlist; - } - break; - } - - new = xnfalloc(sizeof(resRec)); - /* - * Only background resources may be registered with ResBios - * and ResEstimated set. Other resources only set it for - * testing. - */ - if (entityIndex != (-1)) - range->type &= ~(ResBios | ResEstimated); - new->val = *range; - new->entityIndex = entityIndex; - new->next = rlist; - return new; -} - -_X_EXPORT void -xf86FreeResList(resPtr rlist) -{ - resPtr pRes; - - if (!rlist) - return; - - for (pRes = rlist->next; pRes; rlist = pRes, pRes = pRes->next) - xfree(rlist); - xfree(rlist); -} - -static resPtr -xf86DupResList(const resPtr rlist) -{ - resPtr pRes, ret, prev, new; - - if (!rlist) - return NULL; - - ret = xnfalloc(sizeof(resRec)); - *ret = *rlist; - prev = ret; - for (pRes = rlist->next; pRes; pRes = pRes->next) { - new = xnfalloc(sizeof(resRec)); - *new = *pRes; - prev->next = new; - prev = new; - } - return ret; -} - -static void -xf86PrintResList(int verb, resPtr list) -{ - int i = 0; - const char *s, *r; - resPtr tmp = list; - unsigned long type; - - if (!list) - return; - - type = ResMem; - r = "M"; - while (1) { - while (list) { - if ((list->res_type & ResPhysMask) == type) { - switch (list->res_type & ResExtMask) { - case ResBlock: - xf86ErrorFVerb(verb, - "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx (0x%lx)", - i, list->entityIndex, - (list->res_type & ResDomain) >> 24, - (long)list->block_begin, - (long)list->block_end, - (long)(list->block_end - - list->block_begin + 1)); - break; - case ResSparse: - xf86ErrorFVerb(verb, "\t[%d] %d\t%ld\t0x%08lx - 0x%08lx ", - i, list->entityIndex, - (list->res_type & ResDomain) >> 24, - (long)list->sparse_base, - (long)list->sparse_mask); - break; - default: - list = list->next; - continue; - } - xf86ErrorFVerb(verb, " %s", r); - switch (list->res_type & ResAccMask) { - case ResExclusive: - if (list->res_type & ResUnused) - s = "x"; - else - s = "X"; - break; - case ResShared: - if (list->res_type & ResUnused) - s = "s"; - else - s = "S"; - break; - default: - s = "?"; - } - xf86ErrorFVerb(verb, "%s", s); - switch (list->res_type & ResExtMask) { - case ResBlock: - s = "[B]"; - break; - case ResSparse: - s = "[S]"; - break; - default: - s = "[?]"; - } - xf86ErrorFVerb(verb, "%s", s); - if (list->res_type & ResInit) - xf86ErrorFVerb(verb, "t"); - if (list->res_type & ResBios) - xf86ErrorFVerb(verb, "(B)"); - if (list->res_type & ResBus) - xf86ErrorFVerb(verb, "(b)"); - if (list->res_type & ResOprMask) { - switch (list->res_type & ResOprMask) { - case ResUnusedOpr: - s = "(OprU)"; - break; - case ResDisableOpr: - s = "(OprD)"; - break; - default: - s = "(Opr?)"; - break; - } - xf86ErrorFVerb(verb, "%s", s); - } - xf86ErrorFVerb(verb, "\n"); - i++; - } - list = list->next; - } - if (type == ResIo) break; - type = ResIo; - r = "I"; - list = tmp; - } -} - -resPtr -xf86AddRangesToList(resPtr list, resRange *pRange, int entityIndex) -{ - while(pRange && pRange->type != ResEnd) { - list = xf86AddResToList(list,pRange,entityIndex); - pRange++; - } - return list; -} - void -xf86ResourceBrokerInit(void) -{ - Acc = NULL; - - /* Get the ranges used exclusively by the system */ - Acc = xf86AccResFromOS(Acc); - xf86MsgVerb(X_INFO, 3, "System resource ranges:\n"); - xf86PrintResList(3, Acc); -} - -/* - * Resource registration - */ - -static void -convertRange2Host(int entityIndex, resRange *pRange) -{ - if (pRange->type & ResBus) { - switch (xf86Entities[entityIndex]->busType) { - case BUS_PCI: - pciConvertRange2Host(entityIndex,pRange); - break; - default: - break; - } - - pRange->type &= ~ResBus; - } -} - -static void -xf86ConvertListToHost(int entityIndex, resPtr list) -{ - while (list) { - convertRange2Host(entityIndex, &list->val); - list = list->next; - } -} - -/* - * xf86RegisterResources() -- attempts to register listed resources. - * Returns a resPtr listing all resources not successfully registered, by - * which we mean, NULL. - */ - -_X_EXPORT resPtr -xf86RegisterResources(int entityIndex, resList list, unsigned long access) +xf86EnableAccess(ScrnInfoPtr pScrn) { - resRange range; - resList list_f = NULL; - - if (!list) - return NULL; + DebugF("Enable access %i\n",pScrn->scrnIndex); - while(list->type != ResEnd) { - range = *list; - - convertRange2Host(entityIndex,&range); - - if ((access != ResNone) && (access & ResAccMask)) { - range.type = (range.type & ~ResAccMask) | (access & ResAccMask); - } - range.type &= ~ResEstimated; /* Not allowed for drivers */ - Acc = xf86AddResToList(Acc,&range,entityIndex); - list++; - } - if (list_f) - xfree(list_f); - -#ifdef DEBUG - xf86MsgVerb(X_INFO, 3,"Resources after driver initialization\n"); - xf86PrintResList(3, Acc); -#endif - return NULL; - -} - -static void -busTypeSpecific(EntityPtr pEnt, xf86AccessPtr *acc_mem, - xf86AccessPtr *acc_io, xf86AccessPtr *acc_mem_io) -{ - switch (pEnt->bus.type) { - case BUS_SBUS: - *acc_mem = *acc_io = *acc_mem_io = &AccessNULL; - break; - case BUS_PCI: { - struct pci_device *const dev = pEnt->bus.id.pci; - - if ((dev != NULL) && ((void *)dev->user_data != NULL)) { - pciAccPtr const paccp = (pciAccPtr) dev->user_data; - - *acc_io = & paccp->ioAccess; - *acc_mem = & paccp->memAccess; - *acc_mem_io = & paccp->io_memAccess; - } - else { - /* FIXME: This is an error path. We should probably have an - * FIXME: assertion here or something. - */ - *acc_io = NULL; - *acc_mem = NULL; - *acc_mem_io = NULL; - } - break; - } - default: - *acc_mem = *acc_io = *acc_mem_io = NULL; - break; - } return; } -static void -setAccess(EntityPtr pEnt, xf86State state) -{ - - xf86AccessPtr acc_mem, acc_io, acc_mem_io; - xf86AccessPtr org_mem = NULL, org_io = NULL, org_mem_io = NULL; - int prop; - - busTypeSpecific(pEnt, &acc_mem, &acc_io, &acc_mem_io); - - /* The replacement function needs to handle _all_ shared resources */ - /* unless they are handeled locally and disabled otherwise */ - if (pEnt->rac) { - if (pEnt->rac->io_new) { - org_io = acc_io; - acc_io = pEnt->rac->io_new; - } - if (pEnt->rac->mem_new) { - org_mem = acc_mem; - acc_mem = pEnt->rac->mem_new; - } - if (pEnt->rac->io_mem_new) { - org_mem_io = acc_mem_io; - acc_mem_io = pEnt->rac->io_mem_new; - } - } - - if (state == OPERATING) { - prop = pEnt->entityProp; - switch(pEnt->entityProp & NEED_SHARED) { - case NEED_SHARED: - pEnt->access->rt = MEM_IO; - break; - case NEED_IO_SHARED: - pEnt->access->rt = IO; - break; - case NEED_MEM_SHARED: - pEnt->access->rt = MEM; - break; - default: - pEnt->access->rt = NONE; - } - } else { - prop = NEED_SHARED | NEED_MEM | NEED_IO; - pEnt->access->rt = MEM_IO; - } - - switch(pEnt->access->rt) { - case IO: - pEnt->access->pAccess = acc_io; - break; - case MEM: - pEnt->access->pAccess = acc_mem; - break; - case MEM_IO: - pEnt->access->pAccess = acc_mem_io; - break; - default: /* no conflicts at all */ - pEnt->access->pAccess = NULL; /* remove from RAC */ - break; - } - - if (org_io) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->io = org_io; - } else { - /* driver doesn't want it - enable generic access */ - org_io->AccessEnable(org_io->arg); - } - } - - if (org_mem_io) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->io_mem = org_mem_io; - } else { - /* driver doesn't want it - enable generic access */ - org_mem_io->AccessEnable(org_mem_io->arg); - } - } - - if (org_mem) { - /* does the driver want the old access func? */ - if (pEnt->rac->old) { - /* give it to the driver, leave state disabled */ - pEnt->rac->old->mem = org_mem; - } else { - /* driver doesn't want it - enable generic access */ - org_mem->AccessEnable(org_mem->arg); - } - } - - if (!(prop & NEED_MEM_SHARED)){ - if (prop & NEED_MEM) { - if (acc_mem) - acc_mem->AccessEnable(acc_mem->arg); - } else { - if (acc_mem) - acc_mem->AccessDisable(acc_mem->arg); - } - } - - if (!(prop & NEED_IO_SHARED)) { - if (prop & NEED_IO) { - if (acc_io) - acc_io->AccessEnable(acc_io->arg); - } else { - if (acc_io) - acc_io->AccessDisable(acc_io->arg); - } - } - - /* disable shared resources */ - if (pEnt->access->pAccess) - pEnt->access->pAccess->AccessDisable(pEnt->access->pAccess->arg); - - /* - * If device is not under access control it is enabled. - * If it needs bus routing do it here as it isn't bus - * type specific. Any conflicts should be checked at this - * stage - */ - if (!pEnt->access->pAccess - && (pEnt->entityProp & (state == SETUP ? NEED_VGA_ROUTED_SETUP : - NEED_VGA_ROUTED))) - ((BusAccPtr)pEnt->busAcc)->set_f(pEnt->busAcc); -} - - /* * xf86EnterServerState() -- set state the server is in. */ @@ -1546,11 +478,6 @@ SetSIGIOForState(xf86State state) void xf86EnterServerState(xf86State state) { - EntityPtr pEnt; - ScrnInfoPtr pScrn; - int i,j; - int needVGA = 0; - resType rt; /* * This is a good place to block SIGIO during SETUP state. * SIGIO should be blocked in SETUP state otherwise (u)sleep() @@ -1558,262 +485,12 @@ xf86EnterServerState(xf86State state) * We take care not to call xf86BlockSIGIO() twice. */ SetSIGIOForState(state); -#ifdef DEBUG if (state == SETUP) - ErrorF("Entering SETUP state\n"); + DebugF("Entering SETUP state\n"); else - ErrorF("Entering OPERATING state\n"); -#endif + DebugF("Entering OPERATING state\n"); - /* When servicing a dumb framebuffer we don't need to do anything */ - if (doFramebufferMode) return; - - for (i=0; i<xf86NumScreens; i++) { - pScrn = xf86Screens[i]; - j = pScrn->entityList[pScrn->numEntities - 1]; - pScrn->access = xf86Entities[j]->access; - - for (j = 0; j<xf86Screens[i]->numEntities; j++) { - pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - if (pEnt->entityProp & (state == SETUP ? NEED_VGA_ROUTED_SETUP - : NEED_VGA_ROUTED)) - xf86Screens[i]->busAccess = pEnt->busAcc; - } - if (xf86Screens[i]->busAccess) - needVGA ++; - } - - /* - * if we just have one screen we don't have RAC. - * Therefore just enable the screen and return. - */ - if (!needRAC) { - xf86EnableAccess(xf86Screens[0]); - notifyStateChange(NOTIFY_ENABLE); - return; - } - - if (state == SETUP) - notifyStateChange(NOTIFY_SETUP_TRANSITION); - else - notifyStateChange(NOTIFY_OPERATING_TRANSITION); - - clearAccess(); - for (i=0; i<xf86NumScreens;i++) { - - rt = NONE; - - for (j = 0; j<xf86Screens[i]->numEntities; j++) { - pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - setAccess(pEnt,state); - - if (pEnt->access->rt != NONE) { - if (rt != NONE && rt != pEnt->access->rt) - rt = MEM_IO; - else - rt = pEnt->access->rt; - } - } - xf86Screens[i]->resourceType = rt; - if (rt == NONE) { - xf86Screens[i]->access = NULL; - if (needVGA < 2) - xf86Screens[i]->busAccess = NULL; - } - -#ifdef DEBUG - if (xf86Screens[i]->busAccess) - ErrorF("Screen %i setting vga route\n",i); -#endif - switch (rt) { - case MEM_IO: - xf86MsgVerb(X_INFO, 3, "Screen %i shares mem & io resources\n",i); - break; - case IO: - xf86MsgVerb(X_INFO, 3, "Screen %i shares io resources\n",i); - break; - case MEM: - xf86MsgVerb(X_INFO, 3, "Screen %i shares mem resources\n",i); - break; - default: - xf86MsgVerb(X_INFO, 3, "Entity %i shares no resources\n",i); - break; - } - } - if (state == SETUP) - notifyStateChange(NOTIFY_SETUP); - else - notifyStateChange(NOTIFY_OPERATING); -} - -/* - * xf86SetOperatingState() -- Set ResOperMask for resources listed. - */ -_X_EXPORT resPtr -xf86SetOperatingState(resList list, int entityIndex, int mask) -{ - resPtr acc; - resPtr r_fail = NULL; - resRange range; - - while (list->type != ResEnd) { - range = *list; - convertRange2Host(entityIndex,&range); - - acc = Acc; - while (acc) { -#define MASK (ResTypeMask | ResExtMask) - if ((acc->entityIndex == entityIndex) - && (acc->val.a == range.a) && (acc->val.b == range.b) - && ((acc->val.type & MASK) == (range.type & MASK))) - break; -#undef MASK - acc = acc->next; - } - if (acc) - acc->val.type = (acc->val.type & ~ResOprMask) - | (mask & ResOprMask); - else { - r_fail = xf86AddResToList(r_fail,&range,entityIndex); - } - list ++; - } - - return r_fail; -} - -/* - * Stage specific code - */ - -/* - * xf86ClaimFixedResources() is used to allocate non-relocatable resources. - * This should only be done by a driver's Probe() function. - */ -_X_EXPORT void -xf86ClaimFixedResources(resList list, int entityIndex) -{ - resPtr ptr = NULL; - resRange range; - - if (!list) return; - - while (list->type !=ResEnd) { - range = *list; - - convertRange2Host(entityIndex,&range); - - range.type &= ~ResEstimated; /* Not allowed for drivers */ - switch (range.type & ResAccMask) { - case ResExclusive: - if (!xf86ChkConflict(&range, entityIndex)) { - Acc = xf86AddResToList(Acc, &range, entityIndex); - } else FatalError("xf86ClaimFixedResources conflict\n"); - break; - case ResShared: - /* at this stage the resources are just added to the - * EntityRec. After the Probe() phase this list is checked by - * xf86PostProbe(). All resources which don't - * conflict with already allocated ones are allocated - * and removed from the EntityRec. Thus a non-empty resource - * list in the EntityRec indicates resource conflicts the - * driver should either handle or fail. - */ - if (xf86Entities[entityIndex]->active) - ptr = xf86AddResToList(ptr,&range,entityIndex); - break; - } - list++; - } - xf86Entities[entityIndex]->resources = - xf86JoinResLists(xf86Entities[entityIndex]->resources,ptr); - xf86MsgVerb(X_INFO, 3, - "resource ranges after xf86ClaimFixedResources() call:\n"); - xf86PrintResList(3,Acc); -#ifdef DEBUG - if (ptr) { - xf86MsgVerb(X_INFO, 3, "to be registered later:\n"); - xf86PrintResList(3,ptr); - } -#endif -} - -static void -checkRoutingForScreens(xf86State state) -{ - resList list = resVgaUnusedExclusive; - resPtr pResVGA = NULL; - resPtr pResVGAHost; - pointer vga = NULL; - int i,j; - int entityIndex; - EntityPtr pEnt; - resPtr pAcc; - resRange range; - - /* - * find devices that need VGA routed: ie the ones that have - * registered VGA resources without ResUnused. ResUnused - * doesn't conflict with itself therefore use it here. - */ - while (list->type != ResEnd) { /* create resPtr from resList for VGA */ - range = *list; - range.type &= ~(ResBios | ResEstimated); /* if set remove them */ - pResVGA = xf86AddResToList(pResVGA, &range, -1); - list++; - } - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - entityIndex = xf86Screens[i]->entityList[j]; - pEnt = xf86Entities[entityIndex]; - pAcc = Acc; - vga = NULL; - pResVGAHost = xf86DupResList(pResVGA); - xf86ConvertListToHost(entityIndex,pResVGAHost); - while (pAcc) { - if (pAcc->entityIndex == entityIndex) - if (checkConflict(&pAcc->val, pResVGAHost, - entityIndex, state, FALSE)) { - if (vga && vga != pEnt->busAcc) { - xf86Msg(X_ERROR, "Screen %i needs vga routed to" - "different buses - deleting\n",i); - xf86DeleteScreen(i--,0); - } -#ifdef DEBUG - { - resPtr rlist = xf86AddResToList(NULL,&pAcc->val, - pAcc->entityIndex); - xf86MsgVerb(X_INFO,3,"====== %s\n", - state == OPERATING ? "OPERATING" - : "SETUP"); - xf86MsgVerb(X_INFO,3,"%s Resource:\n", - (pAcc->val.type) & ResMem ? "Mem" :"Io"); - xf86PrintResList(3,rlist); - xf86FreeResList(rlist); - xf86MsgVerb(X_INFO,3,"Conflicts with:\n"); - xf86PrintResList(3,pResVGAHost); - xf86MsgVerb(X_INFO,3,"=====\n"); - } -#endif - vga = pEnt->busAcc; - pEnt->entityProp |= (state == SETUP - ? NEED_VGA_ROUTED_SETUP : NEED_VGA_ROUTED); - if (state == OPERATING) { - if (pAcc->val.type & ResMem) - pEnt->entityProp |= NEED_VGA_MEM; - else - pEnt->entityProp |= NEED_VGA_IO; - } - } - pAcc = pAcc->next; - } - if (vga) - xf86MsgVerb(X_INFO, 3,"Setting vga for screen %i.\n",i); - xf86FreeResList(pResVGAHost); - } - } - xf86FreeResList(pResVGA); + return; } /* @@ -1823,10 +500,6 @@ checkRoutingForScreens(xf86State state) void xf86PostProbe(void) { - memType val; - int i,j; - resPtr resp, acc, tmp, resp_x; - if (fbSlotClaimed) { if (pciSlotClaimed #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) @@ -1838,531 +511,40 @@ xf86PostProbe(void) return; } else { xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n"); - xf86AccessRestoreState(); - notifyStateChange(NOTIFY_ENABLE); doFramebufferMode = TRUE; return; } } - acc = tmp = xf86DupResList(Acc); - - for (i=0; i<xf86NumEntities; i++) { - resp = xf86Entities[i]->resources; - xf86Entities[i]->resources = NULL; - resp_x = NULL; - while (resp) { - if (! (val = checkConflict(&resp->val,acc,i,SETUP,FALSE))) { - resp->res_type &= ~(ResBios); /* just used for chkConflict() */ - tmp = resp_x; - resp_x = resp; - resp = resp->next; - resp_x->next = tmp; - } else { - xf86MsgVerb(X_INFO, 3, "Found conflict at: 0x%lx\n", - (long)val); - resp->res_type &= ~ResEstimated; - tmp = xf86Entities[i]->resources; - xf86Entities[i]->resources = resp; - resp = resp->next; - xf86Entities[i]->resources->next = tmp; - } - } - xf86JoinResLists(Acc,resp_x); - } - xf86FreeResList(acc); - - xf86MsgVerb(X_INFO, 3, "resource ranges after probing:\n"); - xf86PrintResList(3, Acc); - checkRoutingForScreens(SETUP); - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; j<xf86Screens[i]->numEntities; j++) { - EntityPtr pEnt = xf86Entities[xf86Screens[i]->entityList[j]]; - if ((pEnt->entityProp & NEED_VGA_ROUTED_SETUP) && - ((xf86Screens[i]->busAccess = pEnt->busAcc))) - break; - } - } -} - -static void -checkRequiredResources(int entityIndex) -{ - resRange range; - resPtr pAcc = Acc; - const EntityPtr pEnt = xf86Entities[entityIndex]; - while (pAcc) { - if (pAcc->entityIndex == entityIndex) { - range = pAcc->val; - /* ResAny to find conflicts with anything. */ - range.type = (range.type & ~ResAccMask) | ResAny | ResBios; - if (checkConflict(&range,Acc,entityIndex,OPERATING,FALSE)) - switch (pAcc->res_type & ResPhysMask) { - case ResMem: - pEnt->entityProp |= NEED_MEM_SHARED; - break; - case ResIo: - pEnt->entityProp |= NEED_IO_SHARED; - break; - } - if (!(pAcc->res_type & ResOprMask)) { - switch (pAcc->res_type & ResPhysMask) { - case ResMem: - pEnt->entityProp |= NEED_MEM; - break; - case ResIo: - pEnt->entityProp |= NEED_IO; - break; - } - } - } - pAcc = pAcc->next; - } - - /* - * After we have checked all resources of an entity agains any - * other resource we know if the entity need this resource type - * (ie. mem/io) at all. if not we can disable this type completely, - * so no need to share it either. - */ - if ((pEnt->entityProp & NEED_MEM_SHARED) - && (!(pEnt->entityProp & NEED_MEM))) - pEnt->entityProp &= ~(unsigned long)NEED_MEM_SHARED; - - if ((pEnt->entityProp & NEED_IO_SHARED) - && (!(pEnt->entityProp & NEED_IO))) - pEnt->entityProp &= ~(unsigned long)NEED_IO_SHARED; -} - -void -xf86PostPreInit() -{ - if (doFramebufferMode) return; - - if (xf86NumScreens > 1) - needRAC = TRUE; - - xf86MsgVerb(X_INFO, 3, "do I need RAC?"); - - if (needRAC) { - xf86ErrorFVerb(3, " Yes, I do.\n"); - } else { - xf86ErrorFVerb(3, " No, I don't.\n"); - } - - xf86MsgVerb(X_INFO, 3, "resource ranges after preInit:\n"); - xf86PrintResList(3, Acc); } void xf86PostScreenInit(void) { - int i,j; - ScreenPtr pScreen; - unsigned int flags; - int nummem = 0, numio = 0; - +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT + int vga_count; +#endif if (doFramebufferMode) { SetSIGIOForState(OPERATING); return; } -#ifdef DEBUG - ErrorF("PostScreenInit generation: %i\n",serverGeneration); -#endif - if (serverGeneration == 1) { - checkRoutingForScreens(OPERATING); - for (i=0; i<xf86NumEntities; i++) { - checkRequiredResources(i); - } - - /* - * after removing NEED_XXX_SHARED from entities that - * don't need need XXX resources at all we might have - * a single entity left that has NEED_XXX_SHARED set. - * In this case we can delete that, too. - */ - for (i = 0; i < xf86NumEntities; i++) { - if (xf86Entities[i]->entityProp & NEED_MEM_SHARED) - nummem++; - if (xf86Entities[i]->entityProp & NEED_IO_SHARED) - numio++; - } - for (i = 0; i < xf86NumEntities; i++) { - if (nummem < 2) - xf86Entities[i]->entityProp &= ~NEED_MEM_SHARED; - if (numio < 2) - xf86Entities[i]->entityProp &= ~NEED_IO_SHARED; - } - } - - if (xf86Screens && needRAC) { - int needRACforVga = 0; - - for (i = 0; i < xf86NumScreens; i++) { - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_ROUTED) { - needRACforVga ++; - break; /* only count each screen once */ - } - } - } - - for (i = 0; i < xf86NumScreens; i++) { - Bool needRACforMem = FALSE, needRACforIo = FALSE; - - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_MEM_SHARED) - needRACforMem = TRUE; - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_IO_SHARED) - needRACforIo = TRUE; - /* - * We may need RAC although we don't share any resources - * as we need to route VGA to the correct bus. This can - * only be done simultaniously for MEM and IO. - */ - if (needRACforVga > 1) { - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_MEM) - needRACforMem = TRUE; - if (xf86Entities[xf86Screens[i]->entityList[j]]->entityProp - & NEED_VGA_IO) - needRACforIo = TRUE; - } - } - - pScreen = xf86Screens[i]->pScreen; - flags = 0; - if (needRACforMem) { - flags |= xf86Screens[i]->racMemFlags; - xf86ErrorFVerb(3, "Screen %d is using RAC for mem\n", i); - } - if (needRACforIo) { - flags |= xf86Screens[i]->racIoFlags; - xf86ErrorFVerb(3, "Screen %d is using RAC for io\n", i); - } - - xf86RACInit(pScreen,flags); - } - } - - xf86EnterServerState(OPERATING); - -} - -/* - * Sets - */ - - -static resPtr -decomposeSparse(resRange range) -{ - resRange new; - resPtr ret = NULL; - memType val = range.rBegin; - int i = 0; - - new.type = (range.type & ~ResExtMask) | ResSparse; - - while (1) { - if (val & 0x01) { - new.rBase = (val << i); - new.rMask = ~((1 << i) - 1); - ret = xf86AddResToList(ret,&new,-1); - val ++; - } - i++; - val >>= 1; - if ((((val + 1) << i) - 1) > range.rEnd) - break; - } - i--; - val <<= 1; - - while (1) { - if((((val + 1) << i) - 1)> range.rEnd) { - if (--i < 0) break; - val <<= 1; - } else { - new.rBase = (val << i); - new.rMask = ~((1 << i) - 1); - val++; - ret = xf86AddResToList(ret,&new,-1); - } - } - return ret; -} - -static Bool -x_isSubsetOf(resRange range, resPtr list1, resPtr list2) -{ - resRange range1, range2; - memType m1_A_m2; - Bool ret; - resPtr list; - - if (list1) { - list = list1; - if ((range.type & ResTypeMask) == (list->res_type & ResTypeMask)) { - switch (range.type & ResExtMask) { - case ResBlock: - if ((list->res_type & ResExtMask) == ResBlock) { - if (range.rBegin >= list->block_begin - && range.rEnd <= list->block_end) - return TRUE; - else if (range.rBegin < list->block_begin - && range.rEnd > list->block_end) { - RANGE(range1, range.rBegin, list->block_begin - 1, - range.type); - RANGE(range2, list->block_end + 1, range.rEnd, - range.type); - return (x_isSubsetOf(range1,list->next,list2) && - x_isSubsetOf(range2,list->next,list2)); - } - else if (range.rBegin >= list->block_begin - && range.rBegin <= list->block_end) { - RANGE(range1, list->block_end + 1, range.rEnd, - range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } else if (range.rEnd >= list->block_begin - && range.rEnd <= list->block_end) { - RANGE(range1,range.rBegin, list->block_begin - 1, - range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } - } - break; - case ResSparse: - if ((list->res_type & ResExtMask) == ResSparse) { - memType test; - int i; - - m1_A_m2 = range.rMask & list->sparse_mask; - if ((range.rBase ^ list->sparse_base) & m1_A_m2) - break; - /* - * We use the following system: - * let 0 ^= mask:1 base:0, 1 ^= mask:1 base:1, - * X mask:0 ; S: set TSS: test set for subset - * NTSS: new test set after test - * S: 1 0 1 0 X X 0 1 X - * TSS: 1 0 0 1 1 0 X X X - * T: 0 0 1 1 0 0 0 0 0 - * NTSS: 1 0 0/X 1/X 1 0 1 0 X - * R: 0 0 0 0 0 0 1 1 0 - * If R != 0 TSS and S are disjunct - * If R == 0 TSS is subset of S - * If R != 0 NTSS contains elements from TSS - * which are not also members of S. - * If a T is set one of the correspondig bits - * in NTSS must be set to the specified value - * all other are X - */ - test = list->sparse_mask & ~range.rMask; - if (test == 0) - return TRUE; - for (i = 0; i < sizeof(memType); i++) { - if ((test >> i) & 0x1) { - RANGE(range1, ((range.rBase & list->sparse_base) - | (range.rBase & ~list->sparse_mask) - | ((~list->sparse_base & list->sparse_mask) - & ~range.rMask)) & range1.rMask, - ((range.rMask | list->sparse_mask) & ~test) - | (1 << i), range.type); - return (x_isSubsetOf(range1,list->next,list2)); - } - } - } - break; - } - } - return (x_isSubsetOf(range,list->next,list2)); - } else if (list2) { - resPtr tmpList = NULL; - switch (range.type & ResExtMask) { - case ResBlock: - tmpList = decomposeSparse(range); - while (tmpList) { - if (!x_isSubsetOf(tmpList->val,list2,NULL)) { - xf86FreeResList(tmpList); - return FALSE; - } - tmpList = tmpList->next; - } - xf86FreeResList(tmpList); - return TRUE; - break; - case ResSparse: - while (list2) { - tmpList = xf86JoinResLists(tmpList,decomposeSparse(list2->val)); - list2 = list2->next; - } - ret = x_isSubsetOf(range,tmpList,NULL); - xf86FreeResList(tmpList); - return ret; - break; - } - } else - return FALSE; - - return FALSE; -} - -Bool -xf86IsSubsetOf(resRange range, resPtr list) -{ - resPtr dup = xf86DupResList(list); - resPtr r_sp = NULL, r = NULL, tmp = NULL; - Bool ret = FALSE; - - while (dup) { - tmp = dup; - dup = dup->next; - switch (tmp->res_type & ResExtMask) { - case ResBlock: - tmp->next = r; - r = tmp; - break; - case ResSparse: - tmp->next = r_sp; - r_sp = tmp; - break; - } - } - - switch (range.type & ResExtMask) { - case ResBlock: - ret = x_isSubsetOf(range,r,r_sp); - break; - case ResSparse: - ret = x_isSubsetOf(range,r_sp,r); - break; - } - xf86FreeResList(r); - xf86FreeResList(r_sp); - - return ret; -} - -static resPtr -findIntersect(resRange Range, resPtr list) -{ - resRange range; - resPtr new = NULL; - - while (list) { - if ((Range.type & ResTypeMask) == (list->res_type & ResTypeMask)) { - switch (Range.type & ResExtMask) { - case ResBlock: - switch (list->res_type & ResExtMask) { - case ResBlock: - if (Range.rBegin >= list->block_begin) - range.rBegin = Range.rBegin; - else - range.rBegin = list->block_begin; - if (Range.rEnd <= list->block_end) - range.rEnd = Range.rEnd; - else - range.rEnd = list->block_end; - if (range.rEnd > range.rBegin) { - range.type = Range.type; - new = xf86AddResToList(new,&range,-1); - } - break; - case ResSparse: - new = xf86JoinResLists(new,xf86FindIntersectOfLists(new,decomposeSparse(list->val))); - break; - } - break; - case ResSparse: - switch (list->res_type & ResExtMask) { - case ResSparse: - if (!((~(range.rBase ^ list->sparse_base) - & (range.rMask & list->sparse_mask)))) { - RANGE(range, (range.rBase & list->sparse_base) - | (~range.rMask & list->sparse_base) - | (~list->sparse_mask & range.rBase), - range.rMask | list->sparse_mask, - Range.type); - new = xf86AddResToList(new,&range,-1); - } - break; - case ResBlock: - new = xf86JoinResLists(new,xf86FindIntersectOfLists( - decomposeSparse(range),list)); - break; - } - } - } - list = list->next; - } - return new; -} - -resPtr -xf86FindIntersectOfLists(resPtr l1, resPtr l2) -{ - resPtr ret = NULL; - - while (l1) { - ret = xf86JoinResLists(ret,findIntersect(l1->val,l2)); - l1 = l1->next; - } - return ret; -} - -#if 0 /* Not used */ -static resPtr -xf86FindComplement(resRange Range) -{ - resRange range; - memType tmp; - resPtr new = NULL; - int i; - - switch (Range.type & ResExtMask) { - case ResBlock: - if (Range.rBegin > 0) { - RANGE(range, 0, Range.rBegin - 1, Range.type); - new = xf86AddResToList(new,&range,-1); - } - if (Range.rEnd < (memType)~0) { - RANGE(range,Range.rEnd + 1, (memType)~0, Range.type); - new = xf86AddResToList(new,&range,-1); - } - break; - case ResSparse: - tmp = Range.rMask; - for (i = 0; i < sizeof(memType); i++) { - if (tmp & 0x1) { - RANGE(range,(~Range.rMask & range.rMask),(1 << i), Range.type); - new = xf86AddResToList(new,&range,-1); - } - } - break; - default: - break; + /* + * we need to wrap the arbiter if we have more than + * one VGA card - hotplug cries. + */ +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT + pci_device_vgaarb_get_info(NULL, &vga_count, NULL); + if (vga_count > 1 && xf86Screens) { + int i; + xf86Msg(X_INFO,"Number of VGA devices: %d: arbiter wrapping enabled\n", vga_count); + for (i = 0; i < xf86NumScreens; i++) + xf86VGAarbiterWrapFunctions(xf86Screens[i]->pScreen); } - return new; -} #endif - -resPtr -xf86ExtractTypeFromList(resPtr list, unsigned long type) -{ - resPtr ret = NULL; + DebugF("PostScreenInit generation: %i\n",serverGeneration); + xf86EnterServerState(OPERATING); - while (list) { - if ((list->res_type & ResTypeMask) == type) - ret = xf86AddResToList(ret,&(list->val),list->entityIndex); - list = list->next; - } - return ret; } /* @@ -2370,7 +552,7 @@ xf86ExtractTypeFromList(resPtr list, unsigned long type) * was active when the server was started. */ void -xf86FindPrimaryDevice() +xf86FindPrimaryDevice(void) { if (primaryBus.type != BUS_NONE) { char *bus; @@ -2398,81 +580,7 @@ xf86FindPrimaryDevice() } } -Bool -xf86NoSharedResources(int screenIndex,resType res) -{ - int j; - - if (screenIndex > xf86NumScreens) - return TRUE; - - for (j = 0; j < xf86Screens[screenIndex]->numEntities; j++) { - switch (res) { - case IO: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_IO_SHARED) - return FALSE; - break; - case MEM: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_MEM_SHARED) - return FALSE; - break; - case MEM_IO: - if ( xf86Entities[xf86Screens[screenIndex]->entityList[j]]->entityProp - & NEED_SHARED) - return FALSE; - break; - case NONE: - break; - } - } - return TRUE; -} - -_X_EXPORT void -xf86RegisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func, pointer arg) -{ - StateChangeNotificationPtr ptr = - (StateChangeNotificationPtr)xnfalloc(sizeof(StateChangeNotificationRec)); - - ptr->func = func; - ptr->arg = arg; - ptr->next = StateChangeNotificationList; - StateChangeNotificationList = ptr; -} - -_X_EXPORT Bool -xf86DeregisterStateChangeNotificationCallback(xf86StateChangeNotificationCallbackFunc func) -{ - StateChangeNotificationPtr *ptr = &StateChangeNotificationList; - StateChangeNotificationPtr tmp; - - while (*ptr) { - if ((*ptr)->func == func) { - tmp = (*ptr); - (*ptr) = (*ptr)->next; - xfree(tmp); - return TRUE; - } - ptr = &((*ptr)->next); - } - return FALSE; -} - -static void -notifyStateChange(xf86NotifyState state) -{ - StateChangeNotificationPtr ptr = StateChangeNotificationList; - while (ptr) { - ptr->func(state,ptr->arg); - ptr = ptr->next; - } -} - -/* Multihead accel sharing accessor functions and entity Private handling */ - -_X_EXPORT int +int xf86GetLastScrnFlag(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2482,7 +590,7 @@ xf86GetLastScrnFlag(int entityIndex) } } -_X_EXPORT void +void xf86SetLastScrnFlag(int entityIndex, int scrnIndex) { if(entityIndex < xf86NumEntities) { @@ -2490,7 +598,7 @@ xf86SetLastScrnFlag(int entityIndex, int scrnIndex) } } -_X_EXPORT Bool +Bool xf86IsEntityShared(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2501,7 +609,7 @@ xf86IsEntityShared(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetEntityShared(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2509,7 +617,7 @@ xf86SetEntityShared(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2520,7 +628,7 @@ xf86IsEntitySharable(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetEntitySharable(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2528,7 +636,7 @@ xf86SetEntitySharable(int entityIndex) } } -_X_EXPORT Bool +Bool xf86IsPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2539,7 +647,7 @@ xf86IsPrimInitDone(int entityIndex) return FALSE; } -_X_EXPORT void +void xf86SetPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2547,7 +655,7 @@ xf86SetPrimInitDone(int entityIndex) } } -_X_EXPORT void +void xf86ClearPrimInitDone(int entityIndex) { if(entityIndex < xf86NumEntities) { @@ -2560,7 +668,7 @@ xf86ClearPrimInitDone(int entityIndex) * Allocate a private in the entities. */ -_X_EXPORT int +int xf86AllocateEntityPrivateIndex(void) { int idx, i; @@ -2579,7 +687,7 @@ xf86AllocateEntityPrivateIndex(void) return idx; } -_X_EXPORT DevUnion * +DevUnion * xf86GetEntityPrivate(int entityIndex, int privIndex) { if (entityIndex >= xf86NumEntities || privIndex >= xf86EntityPrivateCount) diff --git a/xorg-server/hw/xfree86/common/xf86Bus.h b/xorg-server/hw/xfree86/common/xf86Bus.h index c2d5bb7d4..b22e2e772 100644 --- a/xorg-server/hw/xfree86/common/xf86Bus.h +++ b/xorg-server/hw/xfree86/common/xf86Bus.h @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -44,14 +43,6 @@ #include "xf86sbusBus.h" #endif -typedef struct racInfo { - xf86AccessPtr mem_new; - xf86AccessPtr io_new; - xf86AccessPtr io_mem_new; - xf86SetAccessFuncPtr old; -} AccessFuncRec, *AccessFuncPtr; - - typedef struct { DriverPtr driver; int chipset; @@ -60,12 +51,9 @@ typedef struct { EntityProc entityEnter; EntityProc entityLeave; pointer private; - resPtr resources; Bool active; Bool inUse; BusRec bus; - EntityAccessPtr access; - AccessFuncPtr rac; pointer busAcc; int lastScrnFlag; DevUnion * entityPrivates; @@ -74,71 +62,15 @@ typedef struct { IOADDRESS domainIO; } EntityRec, *EntityPtr; -#define NO_SEPARATE_IO_FROM_MEM 0x0001 -#define NO_SEPARATE_MEM_FROM_IO 0x0002 -#define NEED_VGA_ROUTED 0x0004 -#define NEED_VGA_ROUTED_SETUP 0x0008 -#define NEED_MEM 0x0010 -#define NEED_IO 0x0020 -#define NEED_MEM_SHARED 0x0040 -#define NEED_IO_SHARED 0x0080 -#define ACCEL_IS_SHARABLE 0x0100 -#define IS_SHARED_ACCEL 0x0200 -#define SA_PRIM_INIT_DONE 0x0400 -#define NEED_VGA_MEM 0x1000 -#define NEED_VGA_IO 0x2000 - -#define NEED_SHARED (NEED_MEM_SHARED | NEED_IO_SHARED) - -#define busType bus.type -#define isaBusId bus.id.isa -#define sbusBusId bus.id.sbus - -struct x_BusAccRec; -typedef void (*BusAccProcPtr)(struct x_BusAccRec *ptr); - -typedef struct x_BusAccRec { - BusAccProcPtr set_f; - BusAccProcPtr enable_f; - BusAccProcPtr disable_f; - BusAccProcPtr save_f; - BusAccProcPtr restore_f; - struct x_BusAccRec *current; /* pointer to bridge open on this bus */ - struct x_BusAccRec *primary; /* pointer to the bus connecting to this */ - struct x_BusAccRec *next; /* this links the different buses together */ - BusType type; - BusType busdep_type; - /* Bus-specific fields */ - union { - struct { - int bus; - int primary_bus; - struct pci_device * dev; - pciBridgesSave save; - } pci; - } busdep; -} BusAccRec, *BusAccPtr; - -/* state change notification callback */ -typedef struct _stateChange { - xf86StateChangeNotificationCallbackFunc func; - pointer arg; - struct _stateChange *next; -} StateChangeNotificationRec, *StateChangeNotificationPtr; - +#define ACCEL_IS_SHARABLE 0x100 +#define IS_SHARED_ACCEL 0x200 +#define SA_PRIM_INIT_DONE 0x400 extern EntityPtr *xf86Entities; extern int xf86NumEntities; -extern xf86AccessRec AccessNULL; extern BusRec primaryBus; -extern resPtr Acc; -extern resPtr ResRange; -extern BusAccPtr xf86BusAccInfo; int xf86AllocateEntity(void); BusType StringToBusType(const char* busID, const char **retID); -Bool xf86IsSubsetOf(resRange range, resPtr list); -resPtr xf86ExtractTypeFromList(resPtr list, unsigned long type); -resPtr xf86FindIntersect(resRange Range, resPtr list); #endif /* _XF86_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c index 93761193e..e81eb0f63 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.c +++ b/xorg-server/hw/xfree86/common/xf86Config.c @@ -65,11 +65,7 @@ #include "xf86Xinput.h" extern DeviceAssocRec mouse_assoc; -#ifdef XKB -#undef XKB_IN_SERVER -#define XKB_IN_SERVER -#include <xkbsrv.h> -#endif +#include "xkbsrv.h" #ifdef RENDER #include "picture.h" @@ -112,12 +108,18 @@ extern DeviceAssocRec mouse_assoc; static ModuleDefault ModuleDefaults[] = { {.name = "extmod", .toLoad = TRUE, .load_opt=NULL}, +#ifdef DBE {.name = "dbe", .toLoad = TRUE, .load_opt=NULL}, +#endif +#ifdef GLXEXT {.name = "glx", .toLoad = TRUE, .load_opt=NULL}, +#endif #ifdef XRECORD {.name = "record", .toLoad = TRUE, .load_opt=NULL}, #endif +#ifdef XF86DRI {.name = "dri", .toLoad = TRUE, .load_opt=NULL}, +#endif #ifdef DRI2 {.name = "dri2", .toLoad = TRUE, .load_opt=NULL}, #endif @@ -362,7 +364,7 @@ xf86ModulelistFromConfig(pointer **optlist) char ** -xf86DriverlistFromConfig() +xf86DriverlistFromConfig(void) { int count = 0; int j; @@ -434,7 +436,7 @@ xf86DriverlistFromConfig() } char ** -xf86InputDriverlistFromConfig() +xf86InputDriverlistFromConfig(void) { int count = 0; char **modulearray; @@ -629,9 +631,9 @@ configFiles(XF86ConfFilesPtr fileconf) } } /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ - temp_path = must_copy ? XNFstrdup(defaultFontPath) : defaultFontPath; + temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); - free(temp_path); + xfree(temp_path); /* make fontpath more readable in the logfiles */ countDirs = 1; @@ -657,14 +659,6 @@ configFiles(XF86ConfFilesPtr fileconf) strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); xfree(log_buf); - - - if (fileconf && fileconf->file_inputdevs) { - xf86InputDeviceList = fileconf->file_inputdevs; - xf86Msg(X_CONFIG, "Input device list set to \"%s\"\n", - xf86InputDeviceList); - } - /* ModulePath */ @@ -709,11 +703,8 @@ typedef enum { FLAG_DONTZOOM, FLAG_DISABLEVIDMODE, FLAG_ALLOWNONLOCAL, - FLAG_DISABLEMODINDEV, - FLAG_MODINDEVALLOWNONLOCAL, FLAG_ALLOWMOUSEOPENFAIL, FLAG_VTSYSREQ, - FLAG_XKBDISABLE, FLAG_SAVER_BLANKTIME, FLAG_DPMS_STANDBYTIME, FLAG_DPMS_SUSPENDTIME, @@ -724,7 +715,6 @@ typedef enum { FLAG_XINERAMA, FLAG_LOG, FLAG_RENDER_COLORMAP_MODE, - FLAG_HANDLE_SPECIAL_KEYS, FLAG_RANDR, FLAG_AIGLX, FLAG_IGNORE_ABI, @@ -749,16 +739,10 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_ALLOWNONLOCAL, "AllowNonLocalXvidtune", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_DISABLEMODINDEV, "DisableModInDev", OPTV_BOOLEAN, - {0}, FALSE }, - { FLAG_MODINDEVALLOWNONLOCAL, "AllowNonLocalModInDev", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_VTSYSREQ, "VTSysReq", OPTV_BOOLEAN, {0}, FALSE }, - { FLAG_XKBDISABLE, "XkbDisable", OPTV_BOOLEAN, - {0}, FALSE }, { FLAG_SAVER_BLANKTIME, "BlankTime" , OPTV_INTEGER, {0}, FALSE }, { FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER, @@ -779,8 +763,6 @@ static OptionInfoRec FlagOptions[] = { {0}, FALSE }, { FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, {0}, FALSE }, - { FLAG_HANDLE_SPECIAL_KEYS, "HandleSpecialKeys", OPTV_STRING, - {0}, FALSE }, { FLAG_RANDR, "RandR", OPTV_BOOLEAN, {0}, FALSE }, { FLAG_AIGLX, "AIGLX", OPTV_BOOLEAN, @@ -831,9 +813,13 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) Bool value; MessageType from; const char *s; -#ifdef XKB - char *rules = "base"; -#endif + XkbRMLVOSet set; + /* Default options. */ + set.rules = "base"; + set.model = "pc105"; + set.layout = "us"; + set.variant = NULL; + set.options = NULL; /* * Merge the ServerLayout and ServerFlags options. The former have @@ -909,16 +895,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) #endif } - if (xf86GetOptValBool(FlagOptions, FLAG_XKBDISABLE, &value)) { -#ifdef XKB - noXkbExtension = value; - xf86Msg(X_CONFIG, "Xkb %s\n", value ? "disabled" : "enabled"); -#else - if (!value) - xf86Msg(X_WARNING, "Xserver doesn't support XKB\n"); -#endif - } - xf86Info.pmFlag = TRUE; if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value)) xf86Info.pmFlag = !value; @@ -953,22 +929,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } } #endif - { - if ((s = xf86GetOptValString(FlagOptions, FLAG_HANDLE_SPECIAL_KEYS))) { - if (!xf86NameCmp(s,"always")) { - xf86Msg(X_CONFIG, "Always handling special keys in DDX\n"); - xf86Info.ddxSpecialKeys = SKAlways; - } else if (!xf86NameCmp(s,"whenneeded")) { - xf86Msg(X_CONFIG, "Special keys handled in DDX only if needed\n"); - xf86Info.ddxSpecialKeys = SKWhenNeeded; - } else if (!xf86NameCmp(s,"never")) { - xf86Msg(X_CONFIG, "Never handling special keys in DDX\n"); - xf86Info.ddxSpecialKeys = SKNever; - } else { - xf86Msg(X_WARNING,"Unknown HandleSpecialKeys option\n"); - } - } - } + #ifdef RANDR xf86Info.disableRandR = FALSE; xf86Info.randRFrom = X_DEFAULT; @@ -1011,13 +972,11 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) xf86GetOptValBool(FlagOptions, FLAG_ALLOW_EMPTY_INPUT, &xf86Info.allowEmptyInput); /* AEI on? Then we're not using kbd, so use the evdev rules set. */ -#ifdef XKB #if defined(linux) if (xf86Info.allowEmptyInput) - rules = "evdev"; -#endif - XkbSetRulesDflts(rules, "pc105", "us", NULL, NULL); + set.rules = "evdev"; #endif + XkbSetRulesDflts(&set); xf86Info.useDefaultFontPath = TRUE; xf86Info.useDefaultFontPathFrom = X_DEFAULT; @@ -1041,21 +1000,21 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_STANDBYTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSStandbyTime = defaultDPMSStandbyTime = i * MILLI_PER_MIN; + DPMSStandbyTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("StandbyTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSSuspendTime = defaultDPMSSuspendTime = i * MILLI_PER_MIN; + DPMSSuspendTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("SuspendTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) - DPMSOffTime = defaultDPMSOffTime = i * MILLI_PER_MIN; + DPMSOffTime = i * MILLI_PER_MIN; else if (i != -1) xf86ConfigError("OffTime value %d outside legal range of 0 - %d minutes", i, MAX_TIME_IN_MIN); @@ -1137,8 +1096,8 @@ Bool xf86DRI2Enabled(void) * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by * the active ServerLayout. * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard". - * 4. The first InputDevices that use the 'mouse' and 'keyboard' or 'kbd' - * drivers. + * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse + * driver (mouse, synaptics, evdev, vmmouse, void) * 5. Default devices with an empty (default) configuration. These defaults * will reference the 'mouse' and 'keyboard' drivers. */ @@ -1157,6 +1116,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) int count = 0; MessageType from = X_DEFAULT; int found = 0; + const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse", + "void", NULL }; /* * First check if a core pointer or core keyboard have been specified @@ -1266,13 +1227,15 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } } - /* 4. First pointer with 'mouse' as the driver. */ + /* 4. First pointer with an allowed mouse driver. */ if (!foundPointer && !xf86Info.allowEmptyInput) { + const char **driver = mousedrivers; confInput = xf86findInput(CONF_IMPLICIT_POINTER, xf86configptr->conf_input_lst); - if (!confInput) { - confInput = xf86findInputByDriver("mouse", + while (*driver && !confInput) { + confInput = xf86findInputByDriver(*driver, xf86configptr->conf_input_lst); + driver++; } if (confInput) { foundPointer = TRUE; @@ -1327,9 +1290,13 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) * section ... deal. */ for (devs = servlayoutp->inputs; devs && *devs; devs++) { - if (!strcmp((*devs)->driver, "void") || !strcmp((*devs)->driver, "mouse") || - !strcmp((*devs)->driver, "vmmouse") || !strcmp((*devs)->driver, "evdev")) { - found = 1; break; + const char **driver = mousedrivers; + while(*driver) { + if (!strcmp((*devs)->driver, *driver)) { + found = 1; + break; + } + driver++; } } if (!found && !xf86Info.allowEmptyInput) { @@ -1564,10 +1531,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, adjp = (XF86ConfAdjacencyPtr)adjp->list.next; } -#ifdef DEBUG - ErrorF("Found %d screens in the layout section %s", + DebugF("Found %d screens in the layout section %s", count, conf_layout->lay_identifier); -#endif if (!count) /* alloc enough storage even if no screen is specified */ count = 1; @@ -1724,10 +1689,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count++; idp = (XF86ConfInactivePtr)idp->list.next; } -#ifdef DEBUG - ErrorF("Found %d inactive devices in the layout section %s", + DebugF("Found %d inactive devices in the layout section %s\n", count, conf_layout->lay_identifier); -#endif gdp = xnfalloc((count + 1) * sizeof(GDevRec)); gdp[count].identifier = NULL; idp = conf_layout->lay_inactive_lst; @@ -1749,10 +1712,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count++; irp = (XF86ConfInputrefPtr)irp->list.next; } -#ifdef DEBUG - ErrorF("Found %d input devices in the layout section %s", + DebugF("Found %d input devices in the layout section %s\n", count, conf_layout->lay_identifier); -#endif indp = xnfcalloc((count + 1), sizeof(IDevPtr)); indp[count] = NULL; irp = conf_layout->lay_input_lst; @@ -1902,16 +1863,6 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, bzero(&defMon, sizeof(defMon)); defMon.mon_identifier = "<default monitor>"; - /* - * TARGET_REFRESH_RATE may be defined to effectively limit the - * default resolution to the largest that has a "good" refresh - * rate. - */ -#ifdef TARGET_REFRESH_RATE - defMon.mon_option_lst = xf86ReplaceRealOption(defMon.mon_option_lst, - "TargetRefresh", - TARGET_REFRESH_RATE); -#endif if (!configMonitor(screenp->monitor, &defMon)) return FALSE; defaultMonitor = TRUE; diff --git a/xorg-server/hw/xfree86/common/xf86Config.h b/xorg-server/hw/xfree86/common/xf86Config.h index a174e463b..de287041a 100644 --- a/xorg-server/hw/xfree86/common/xf86Config.h +++ b/xorg-server/hw/xfree86/common/xf86Config.h @@ -41,7 +41,7 @@ /* * global structure that holds the result of parsing the config file */ -extern XF86ConfigPtr xf86configptr; +extern _X_EXPORT XF86ConfigPtr xf86configptr; #endif typedef enum _ConfigStatus { @@ -68,7 +68,5 @@ ConfigStatus xf86HandleConfigFile(Bool); Bool xf86AutoConfig(void); GDevPtr autoConfigDevice(GDevPtr preconf_device); -char* chooseVideoDriver(void); -int xchomp(char *line); #endif /* _xf86_config_h */ diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c index 77326b6d4..bce5aae58 100644 --- a/xorg-server/hw/xfree86/common/xf86Configure.c +++ b/xorg-server/hw/xfree86/common/xf86Configure.c @@ -27,33 +27,17 @@ #include <xorg-config.h> #endif -#include <ctype.h> -#include <stdlib.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <X11/X.h> -#include <X11/Xmd.h> -#include <pciaccess.h> -#include "Pci.h" -#include "os.h" -#include "loaderProcs.h" #include "xf86.h" #include "xf86Config.h" #include "xf86_OSlib.h" #include "xf86Priv.h" #define IN_XSERVER -#include "xf86Parser.h" -#include "xf86tokens.h" #include "Configint.h" -#include "vbe.h" #include "xf86DDC.h" #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) #include "xf86Bus.h" #include "xf86Sbus.h" #endif -#include "globals.h" typedef struct _DevToConfig { GDevRec GDev; @@ -67,7 +51,7 @@ typedef struct _DevToConfig { static DevToConfigPtr DevToConfig = NULL; static int nDevToConfig = 0, CurrentDriver; -_X_EXPORT xf86MonPtr ConfiguredMonitor; +xf86MonPtr ConfiguredMonitor; Bool xf86DoConfigurePass1 = TRUE; static Bool foundMouse = FALSE; @@ -87,24 +71,12 @@ static char *DFLT_MOUSE_DEV = "/dev/mouse"; static char *DFLT_MOUSE_PROTO = "auto"; #endif -/* - * This is called by the driver, either through xf86Match???Instances() or - * directly. We allocate a GDevRec and fill it in as much as we can, letting - * the caller fill in the rest and/or change it as it sees fit. - */ -GDevPtr -xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) +static Bool +bus_pci_configure(void *busData) { - int i, j; + int i; struct pci_device * pVideo = NULL; - Bool isPrimary = FALSE; - if (xf86DoProbe || !xf86DoConfigure || !xf86DoConfigurePass1) - return NULL; - - /* Check for duplicates */ - switch (bus) { - case BUS_PCI: pVideo = (struct pci_device *) busData; for (i = 0; i < nDevToConfig; i++) if (DevToConfig[i].pVideo && @@ -112,51 +84,37 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int (DevToConfig[i].pVideo->bus == pVideo->bus) && (DevToConfig[i].pVideo->dev == pVideo->dev) && (DevToConfig[i].pVideo->func == pVideo->func)) - return NULL; - isPrimary = xf86IsPrimaryPci(pVideo); - break; -#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) - case BUS_SBUS: - for (i = 0; i < nDevToConfig; i++) - if (DevToConfig[i].sVideo && - DevToConfig[i].sVideo->fbNum == ((sbusDevicePtr) busData)->fbNum) - return NULL; - break; -#endif - default: - return NULL; - } + return 0; - /* Allocate new structure occurrence */ - i = nDevToConfig++; - DevToConfig = - xnfrealloc(DevToConfig, nDevToConfig * sizeof(DevToConfigRec)); -#if 1 /* Doesn't work when a driver detects more than one adapter */ - if ((i > 0) && isPrimary) { - memmove(DevToConfig + 1,DevToConfig, - (nDevToConfig - 1) * sizeof(DevToConfigRec)); - i = 0; - } -#endif - memset(DevToConfig + i, 0, sizeof(DevToConfigRec)); - -# define NewDevice DevToConfig[i] + return 1; +} - NewDevice.GDev.chipID = NewDevice.GDev.chipRev = NewDevice.GDev.irq = -1; +static Bool +bus_sbus_configure(void *busData) +{ +#if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) + int i; - NewDevice.iDriver = CurrentDriver; + for (i = 0; i < nDevToConfig; i++) + if (DevToConfig[i].sVideo && + DevToConfig[i].sVideo->fbNum == ((sbusDevicePtr) busData)->fbNum) + return 0; - /* Fill in what we know, converting the driver name to lower case */ - NewDevice.GDev.driver = xnfalloc(strlen(driver) + 1); - for (j = 0; (NewDevice.GDev.driver[j] = tolower(driver[j])); j++); +#endif + return 1; +} - switch (bus) { - case BUS_PCI: { +static void +bus_pci_newdev_configure(void *busData, int i, int *chipset) +{ const char *VendorName; const char *CardName; char busnum[8]; + struct pci_device * pVideo = NULL; + + pVideo = (struct pci_device *) busData; - NewDevice.pVideo = pVideo; + DevToConfig[i].pVideo = pVideo; VendorName = pci_device_get_vendor_name( pVideo ); CardName = pci_device_get_device_name( pVideo ); @@ -171,58 +129,113 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int sprintf((char*)CardName, "Unknown Board"); } - NewDevice.GDev.identifier = + DevToConfig[i].GDev.identifier = xnfalloc(strlen(VendorName) + strlen(CardName) + 2); - sprintf(NewDevice.GDev.identifier, "%s %s", VendorName, CardName); + sprintf(DevToConfig[i].GDev.identifier, "%s %s", VendorName, CardName); - NewDevice.GDev.vendor = (char *)VendorName; - NewDevice.GDev.board = (char *)CardName; + DevToConfig[i].GDev.vendor = (char *)VendorName; + DevToConfig[i].GDev.board = (char *)CardName; - NewDevice.GDev.busID = xnfalloc(16); + DevToConfig[i].GDev.busID = xnfalloc(16); xf86FormatPciBusNumber(pVideo->bus, busnum); - sprintf(NewDevice.GDev.busID, "PCI:%s:%d:%d", + sprintf(DevToConfig[i].GDev.busID, "PCI:%s:%d:%d", busnum, pVideo->dev, pVideo->func); - NewDevice.GDev.chipID = pVideo->device_id; - NewDevice.GDev.chipRev = pVideo->revision; + DevToConfig[i].GDev.chipID = pVideo->device_id; + DevToConfig[i].GDev.chipRev = pVideo->revision; - if (chipset < 0) - chipset = (pVideo->vendor_id << 16) | pVideo->device_id; + if (*chipset < 0) { + *chipset = (pVideo->vendor_id << 16) | pVideo->device_id; } - break; +} + +static void +bus_sbus_newdev_configure(void *busData, int i) +{ #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) - case BUS_SBUS: { char *promPath = NULL; - NewDevice.sVideo = (sbusDevicePtr) busData; - NewDevice.GDev.identifier = NewDevice.sVideo->descr; + DevToConfig[i].sVideo = (sbusDevicePtr) busData; + DevToConfig[i].GDev.identifier = DevToConfig[i].sVideo->descr; if (sparcPromInit() >= 0) { - promPath = sparcPromNode2Pathname(&NewDevice.sVideo->node); + promPath = sparcPromNode2Pathname(&DevToConfig[i].sVideo->node); sparcPromClose(); } if (promPath) { - NewDevice.GDev.busID = xnfalloc(strlen(promPath) + 6); - sprintf(NewDevice.GDev.busID, "SBUS:%s", promPath); + DevToConfig[i].GDev.busID = xnfalloc(strlen(promPath) + 6); + sprintf(DevToConfig[i].GDev.busID, "SBUS:%s", promPath); xfree(promPath); } else { - NewDevice.GDev.busID = xnfalloc(12); - sprintf(NewDevice.GDev.busID, "SBUS:fb%d", NewDevice.sVideo->fbNum); + DevToConfig[i].GDev.busID = xnfalloc(12); + sprintf(DevToConfig[i].GDev.busID, "SBUS:fb%d", + DevToConfig[i].sVideo->fbNum); } - } - break; #endif - default: - break; +} + +/* + * This is called by the driver, either through xf86Match???Instances() or + * directly. We allocate a GDevRec and fill it in as much as we can, letting + * the caller fill in the rest and/or change it as it sees fit. + */ +GDevPtr +xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) +{ + int ret, i, j; + + if (!xf86DoConfigure || !xf86DoConfigurePass1) + return NULL; + + /* Check for duplicates */ + switch (bus) { + case BUS_PCI: + ret = bus_pci_configure(busData); + break; + case BUS_SBUS: + ret = bus_sbus_configure(busData); + break; + default: + return NULL; + } + + if (ret == 0) + goto out; + + /* Allocate new structure occurrence */ + i = nDevToConfig++; + DevToConfig = + xnfrealloc(DevToConfig, nDevToConfig * sizeof(DevToConfigRec)); + memset(DevToConfig + i, 0, sizeof(DevToConfigRec)); + + DevToConfig[i].GDev.chipID = + DevToConfig[i].GDev.chipRev = DevToConfig[i].GDev.irq = -1; + + DevToConfig[i].iDriver = CurrentDriver; + + /* Fill in what we know, converting the driver name to lower case */ + DevToConfig[i].GDev.driver = xnfalloc(strlen(driver) + 1); + for (j = 0; (DevToConfig[i].GDev.driver[j] = tolower(driver[j])); j++); + + switch (bus) { + case BUS_PCI: + bus_pci_newdev_configure(busData, i, &chipset); + break; + case BUS_SBUS: + bus_sbus_newdev_configure(busData, i); + break; + default: + break; } /* Get driver's available options */ if (xf86DriverList[CurrentDriver]->AvailableOptions) - NewDevice.GDev.options = (OptionInfoPtr) + DevToConfig[i].GDev.options = (OptionInfoPtr) (*xf86DriverList[CurrentDriver]->AvailableOptions)(chipset, bus); - return &NewDevice.GDev; + return &DevToConfig[i].GDev; -# undef NewDevice +out: + return NULL; } static XF86ConfInputPtr @@ -260,7 +273,7 @@ configureInputSection (void) #endif } - mouse = xf86confcalloc(1, sizeof(XF86ConfInputRec)); + mouse = calloc(1, sizeof(XF86ConfInputRec)); mouse->inp_identifier = "Mouse0"; mouse->inp_driver = "mouse"; mouse->inp_option_lst = @@ -285,18 +298,18 @@ configureScreenSection (int screennum) int depths[] = { 1, 4, 8, 15, 16, 24/*, 32*/ }; parsePrologue (XF86ConfScreenPtr, XF86ConfScreenRec) - ptr->scrn_identifier = xf86confmalloc(18); + ptr->scrn_identifier = malloc(18); sprintf(ptr->scrn_identifier, "Screen%d", screennum); - ptr->scrn_monitor_str = xf86confmalloc(19); + ptr->scrn_monitor_str = malloc(19); sprintf(ptr->scrn_monitor_str, "Monitor%d", screennum); - ptr->scrn_device_str = xf86confmalloc(16); + ptr->scrn_device_str = malloc(16); sprintf(ptr->scrn_device_str, "Card%d", screennum); for (i=0; i<sizeof(depths)/sizeof(depths[0]); i++) { XF86ConfDisplayPtr display; - display = xf86confcalloc(1, sizeof(XF86ConfDisplayRec)); + display = calloc(1, sizeof(XF86ConfDisplayRec)); display->disp_depth = depths[i]; display->disp_black.red = display->disp_white.red = -1; display->disp_black.green = display->disp_white.green = -1; @@ -419,7 +432,7 @@ configureLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confmalloc (sizeof (XF86ConfInputrefRec)); + iptr = malloc (sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Mouse0"; @@ -432,7 +445,7 @@ configureLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confmalloc (sizeof (XF86ConfInputrefRec)); + iptr = malloc (sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Keyboard0"; @@ -445,7 +458,7 @@ configureLayoutSection (void) for (scrnum = 0; scrnum < nDevToConfig; scrnum++) { XF86ConfAdjacencyPtr aptr; - aptr = xf86confmalloc (sizeof (XF86ConfAdjacencyRec)); + aptr = malloc (sizeof (XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_x = 0; aptr->adj_y = 0; @@ -481,12 +494,9 @@ static XF86ConfModulePtr configureModuleSection (void) { char **elist, **el; - /* Find the list of extension modules. */ + /* Find the list of extension & font modules. */ const char *esubdirs[] = { "extensions", - NULL - }; - const char *fsubdirs[] = { "fonts", NULL }; @@ -497,7 +507,7 @@ configureModuleSection (void) for (el = elist; *el; el++) { XF86LoadPtr module; - module = xf86confcalloc(1, sizeof(XF86LoadRec)); + module = calloc(1, sizeof(XF86LoadRec)); module->load_name = *el; ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( (glp)ptr->mod_load_lst, (glp)module); @@ -505,28 +515,6 @@ configureModuleSection (void) xfree(elist); } - /* Process list of font backends separately to include only required ones */ - elist = LoaderListDirs(fsubdirs, NULL); - if (elist) { - for (el = elist; *el; el++) { - XF86LoadPtr module; - - module = xf86confcalloc(1, sizeof(XF86LoadRec)); - module->load_name = *el; - - /* Add only those font backends which are referenced by fontpath */ - /* 'strstr(dFP,"/dir")' is meant as 'dFP =~ m(/dir\W)' */ - if (defaultFontPath && ( - (strcmp(*el, "freetype") == 0 && - strstr(defaultFontPath, "/TTF")) || - (strcmp(*el, "type1") == 0 && - strstr(defaultFontPath, "/Type1")))) - ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( - (glp)ptr->mod_load_lst, (glp)module); - } - xfree(elist); - } - return ptr; } @@ -548,7 +536,7 @@ configureMonitorSection (int screennum) { parsePrologue (XF86ConfMonitorPtr, XF86ConfMonitorRec) - ptr->mon_identifier = xf86confmalloc(19); + ptr->mon_identifier = malloc(19); sprintf(ptr->mon_identifier, "Monitor%d", screennum); ptr->mon_vendor = strdup("Monitor Vendor"); ptr->mon_modelname = strdup("Monitor Model"); @@ -567,10 +555,10 @@ configureDDCMonitorSection (int screennum) parsePrologue (XF86ConfMonitorPtr, XF86ConfMonitorRec) - ptr->mon_identifier = xf86confmalloc(19); + ptr->mon_identifier = malloc(19); sprintf(ptr->mon_identifier, "Monitor%d", screennum); ptr->mon_vendor = strdup(ConfiguredMonitor->vendor.name); - ptr->mon_modelname = xf86confmalloc(12); + ptr->mon_modelname = malloc(12); sprintf(ptr->mon_modelname, "%x", ConfiguredMonitor->vendor.prod_id); /* features in centimetres, we want millimetres */ @@ -595,8 +583,7 @@ configureDDCMonitorSection (int screennum) len = 0; } if ((ptr->mon_comment = - xf86confrealloc(ptr->mon_comment, - len+strlen(displaySize_string)))) { + realloc(ptr->mon_comment, len+strlen(displaySize_string)))) { strcpy(ptr->mon_comment + len, displaySize_string); } } @@ -606,7 +593,7 @@ configureDDCMonitorSection (int screennum) for (i=0;i<4;i++) { switch (ConfiguredMonitor->det_mon[i].type) { case DS_NAME: - ptr->mon_modelname = xf86confrealloc(ptr->mon_modelname, + ptr->mon_modelname = realloc(ptr->mon_modelname, strlen((char*)(ConfiguredMonitor->det_mon[i].section.name)) + 1); strcpy(ptr->mon_modelname, @@ -684,9 +671,6 @@ DoConfigure(void) xorgHWAccess = FALSE; } - /* Disable PCI devices */ - xf86ResourceBrokerInit(); - xf86AccessInit(); xf86FindPrimaryDevice(); /* Create XF86Config file structure */ diff --git a/xorg-server/hw/xfree86/common/xf86Cursor.c b/xorg-server/hw/xfree86/common/xf86Cursor.c index c6f603959..6740faf65 100644 --- a/xorg-server/hw/xfree86/common/xf86Cursor.c +++ b/xorg-server/hw/xfree86/common/xf86Cursor.c @@ -25,7 +25,6 @@ * authorization from the copyright holder(s) and author(s). */ -#define NEED_EVENTS #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif @@ -228,8 +227,6 @@ xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) break; } - if (!dev) - dev = inputInfo.pointer; pCursorScreen = miPointerGetScreen(dev); if (pScreen == pCursorScreen) @@ -480,7 +477,7 @@ xf86WarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) } -_X_EXPORT void * +void * xf86GetPointerScreenFuncs(void) { return (void *)&xf86PointerScreenFuncs; diff --git a/xorg-server/hw/xfree86/common/xf86DGA.c b/xorg-server/hw/xfree86/common/xf86DGA.c index a06f285f1..8328f5875 100644 --- a/xorg-server/hw/xfree86/common/xf86DGA.c +++ b/xorg-server/hw/xfree86/common/xf86DGA.c @@ -35,19 +35,19 @@ #include "xf86str.h" #include "xf86Priv.h" #include "dgaproc.h" -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include "colormapst.h" #include "pixmapstr.h" #include "inputstr.h" #include "globals.h" #include "servermd.h" #include "micmap.h" -#ifdef XKB -#include <xkbsrv.h> -#endif +#include "xkbsrv.h" #include "xf86Xinput.h" #include "exglobals.h" #include "exevents.h" +#include "eventstr.h" +#include "eventconvert.h" #include "mi.h" @@ -59,8 +59,8 @@ static Bool DGACloseScreen(int i, ScreenPtr pScreen); static void DGADestroyColormap(ColormapPtr pmap); static void DGAInstallColormap(ColormapPtr pmap); static void DGAUninstallColormap(ColormapPtr pmap); -static void DGAHandleEvent(int screen_num, xEvent *event, - DeviceIntPtr device, int nevents); +static void DGAHandleEvent(int screen_num, InternalEvent *event, + DeviceIntPtr device); static void DGACopyModeInfo( @@ -68,7 +68,7 @@ DGACopyModeInfo( XDGAModePtr xmode ); -_X_EXPORT int *XDGAEventBase = NULL; +int *XDGAEventBase = NULL; #define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey)) @@ -101,7 +101,7 @@ typedef struct { Bool grabKeyboard; } DGAScreenRec, *DGAScreenPtr; -_X_EXPORT Bool +Bool DGAInit( ScreenPtr pScreen, DGAFunctionPtr funcs, @@ -164,7 +164,7 @@ DGAInit( * the DGA mode list. */ -_X_EXPORT Bool +Bool DGAReInitModes( ScreenPtr pScreen, DGAModePtr modes, @@ -247,11 +247,7 @@ DGACloseScreen(int i, ScreenPtr pScreen) DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (XDGAEventBase) { - mieqSetHandler(*XDGAEventBase + MotionNotify, NULL); - mieqSetHandler(*XDGAEventBase + ButtonPress, NULL); - mieqSetHandler(*XDGAEventBase + ButtonRelease, NULL); - mieqSetHandler(*XDGAEventBase + KeyPress, NULL); - mieqSetHandler(*XDGAEventBase + KeyRelease, NULL); + mieqSetHandler(ET_DGAEvent, NULL); } FreeMarkedVisuals(pScreen); @@ -453,7 +449,7 @@ xf86SetDGAMode( /*********** exported ones ***************/ -_X_EXPORT void +void DGASetInputMode(int index, Bool keyboard, Bool mouse) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -465,17 +461,13 @@ DGASetInputMode(int index, Bool keyboard, Bool mouse) pScreenPriv->grabKeyboard = keyboard; if (!mieq_installed) { - mieqSetHandler(*XDGAEventBase + MotionNotify, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + ButtonPress, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + ButtonRelease, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + KeyPress, DGAHandleEvent); - mieqSetHandler(*XDGAEventBase + KeyRelease, DGAHandleEvent); + mieqSetHandler(ET_DGAEvent, DGAHandleEvent); mieq_installed = 1; } } } -_X_EXPORT Bool +Bool DGAChangePixmapMode(int index, int *x, int *y, int mode) { DGAScreenPtr pScreenPriv; @@ -530,24 +522,19 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) return TRUE; } -_X_EXPORT Bool +Bool DGAAvailable(int index) { if(DGAScreenKey == NULL) return FALSE; - if (!xf86NoSharedResources(((ScrnInfoPtr)dixLookupPrivate( - &screenInfo.screens[index]->devPrivates, - xf86ScreenKey))->scrnIndex, MEM)) - return FALSE; - if(DGA_GET_SCREEN_PRIV(screenInfo.screens[index])) return TRUE; return FALSE; } -_X_EXPORT Bool +Bool DGAActive(int index) { DGAScreenPtr pScreenPriv; @@ -567,8 +554,8 @@ DGAActive(int index) /* Called by the event code in case the server is abruptly terminated */ -void -DGAShutdown() +void +DGAShutdown(void) { ScrnInfoPtr pScrn; int i; @@ -585,7 +572,7 @@ DGAShutdown() /* Called by the extension to initialize a mode */ -_X_EXPORT int +int DGASetMode( int index, int num, @@ -609,7 +596,7 @@ DGASetMode( /* Called from the extension to let the DDX know which events are requested */ -_X_EXPORT void +void DGASelectInput( int index, ClientPtr client, @@ -622,7 +609,7 @@ DGASelectInput( pScreenPriv->input = mask; } -_X_EXPORT int +int DGAGetViewportStatus(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -635,7 +622,7 @@ DGAGetViewportStatus(int index) return (*pScreenPriv->funcs->GetViewport)(pScreenPriv->pScrn); } -_X_EXPORT int +int DGASetViewport( int index, int x, int y, @@ -663,7 +650,7 @@ BitsClear(CARD32 data) return bits; } -_X_EXPORT int +int DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) { ScreenPtr pScreen = screenInfo.screens[index]; @@ -732,7 +719,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) /* Called by the extension to install a colormap on DGA active screens */ -_X_EXPORT void +void DGAInstallCmap(ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; @@ -748,7 +735,7 @@ DGAInstallCmap(ColormapPtr cmap) (*pScreen->InstallColormap)(cmap); } -_X_EXPORT int +int DGASync(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -761,7 +748,7 @@ DGASync(int index) return Success; } -_X_EXPORT int +int DGAFillRect( int index, int x, int y, int w, int h, @@ -780,7 +767,7 @@ DGAFillRect( return BadMatch; } -_X_EXPORT int +int DGABlitRect( int index, int srcx, int srcy, @@ -801,7 +788,7 @@ DGABlitRect( return BadMatch; } -_X_EXPORT int +int DGABlitTransRect( int index, int srcx, int srcy, @@ -824,7 +811,7 @@ DGABlitTransRect( } -_X_EXPORT int +int DGAGetModes(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -834,7 +821,7 @@ DGAGetModes(int index) } -_X_EXPORT int +int DGAGetModeInfo( int index, XDGAModePtr mode, @@ -892,7 +879,7 @@ DGACopyModeInfo( } -Bool +Bool DGAVTSwitch(void) { ScreenPtr pScreen; @@ -918,8 +905,8 @@ Bool DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; - dgaEvent de; - + DGAEvent event; + if(DGAScreenKey == NULL) /* no DGA */ return FALSE; @@ -931,10 +918,16 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) if(!pScreenPriv || !pScreenPriv->grabKeyboard) /* no direct mode */ return FALSE; - de.u.u.type = *XDGAEventBase + (is_down ? KeyPress : KeyRelease); - de.u.u.detail = key_code; - de.u.event.time = GetTimeInMillis(); - mieqEnqueue (dev, (xEvent *) &de); + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = (is_down ? ET_KeyPress : ET_KeyRelease); + event.detail = key_code; + event.dx = 0; + event.dy = 0; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -945,7 +938,7 @@ Bool DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; - dgaEvent de; + DGAEvent event; if(DGAScreenKey == NULL) /* no DGA */ return FALSE; @@ -965,14 +958,17 @@ DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) DGAMouseY = 0; else if (DGAMouseY > screenInfo.screens[index]->height) DGAMouseY = screenInfo.screens[index]->height; - de.u.u.type = *XDGAEventBase + MotionNotify; - de.u.u.detail = 0; - de.u.event.time = GetTimeInMillis(); - de.u.event.dx = dx; - de.u.event.dy = dy; - de.u.event.pad1 = DGAMouseX; - de.u.event.pad2 = DGAMouseY; - mieqEnqueue (dev, (xEvent *) &de); + + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = ET_Motion; + event.detail = 0; + event.dx = dx; + event.dy = dy; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -980,7 +976,7 @@ Bool DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; - dgaEvent de; + DGAEvent event; if (DGAScreenKey == NULL) return FALSE; @@ -990,14 +986,16 @@ DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) if (!pScreenPriv || !pScreenPriv->grabMouse) return FALSE; - de.u.u.type = *XDGAEventBase + (is_down ? ButtonPress : ButtonRelease); - de.u.u.detail = button; - de.u.event.time = GetTimeInMillis(); - de.u.event.dx = 0; - de.u.event.dy = 0; - de.u.event.pad1 = DGAMouseX; - de.u.event.pad2 = DGAMouseY; - mieqEnqueue (dev, (xEvent *) &de); + memset(&event, 0, sizeof(event)); + event.header = ET_Internal; + event.type = ET_DGAEvent; + event.length = sizeof(event); + event.time = GetTimeInMillis(); + event.subtype = (is_down ? ET_ButtonPress : ET_ButtonRelease); + event.detail = button; + event.dx = 0; + event.dy = 0; + mieqEnqueue (dev, (InternalEvent*)&event); return TRUE; } @@ -1029,82 +1027,94 @@ static Mask filters[] = }; static void -DGAProcessKeyboardEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr keybd) +DGAProcessKeyboardEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr keybd) { - int coreEquiv; - xEvent xi; KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceIntPtr pointer = GetPairedDevice(keybd); + DeviceEvent ev; - coreEquiv = de->u.u.type - *XDGAEventBase; - - /* - * Fill in remaining event state - */ - de->u.event.dx = 0; - de->u.event.dy = 0; - de->u.event.screen = pScreen->myNum; - de->u.event.state = keyc->state | pointer->button->state; + memset(&ev, 0, sizeof(ev)); + ev.length = sizeof(ev); + ev.detail.key = event->detail; + ev.type = event->subtype; + ev.root_x = 0; + ev.root_y = 0; + ev.corestate = XkbStateFieldFromRec(&keyc->xkbInfo->state); + ev.corestate |= pointer->button->state; - de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(keybd, (xEvent*)de, 1); - de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + UpdateDeviceState(keybd, &ev); /* * Deliver the DGA event */ if (pScreenPriv->client) { + dgaEvent de; + de.u.u.type = *XDGAEventBase + GetCoreType((InternalEvent*)&ev); + de.u.u.detail = event->detail; + de.u.event.time = event->time; + de.u.event.dx = 0; + de.u.event.dy = 0; + de.u.event.screen = pScreen->myNum; + de.u.event.state = ev.corestate; + /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, keybd, (xEvent *) de, 1, - filters[coreEquiv], pScreenPriv->input, 0); + TryClientEvents (pScreenPriv->client, keybd, (xEvent *)&de, 1, + filters[ev.type], pScreenPriv->input, 0); } else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { - xi.u.u.type = (IEventBase - 1) + coreEquiv; - xi.u.u.detail = de->u.u.detail; - xi.u.keyButtonPointer.time = de->u.event.time; - xi.u.keyButtonPointer.eventX = de->u.event.dx; - xi.u.keyButtonPointer.eventY = de->u.event.dy; - xi.u.keyButtonPointer.rootX = de->u.event.dx; - xi.u.keyButtonPointer.rootY = de->u.event.dy; - xi.u.keyButtonPointer.state = de->u.event.state; - ((deviceKeyButtonPointer*)&xi)->deviceid = keybd->id; - DeliverGrabbedEvent (&xi, keybd, FALSE, 1); + ev.detail.key = event->detail; + ev.time = event->time; + ev.root_x = event->dx; + ev.root_y = event->dy; + ev.corestate = event->state; + ev.deviceid = keybd->id; + DeliverGrabbedEvent ((InternalEvent*)&ev, keybd, FALSE); } } } static void -DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) +DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse) { ButtonClassPtr butc = mouse->button; - int coreEquiv; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - xEvent xi; + DeviceEvent ev; - coreEquiv = de->u.u.type - *XDGAEventBase; - /* - * Fill in remaining event state - */ - de->u.event.screen = pScreen->myNum; - de->u.event.state = butc->state | GetPairedDevice(mouse)->key->state; + memset(&ev, 0, sizeof(ev)); + ev.header = ET_Internal; + ev.length = sizeof(ev); + ev.type = event->subtype; + ev.corestate = butc->state; + ev.corestate |= XkbStateFieldFromRec(&GetPairedDevice(mouse)->key->xkbInfo->state); - de->u.u.type = (IEventBase - 1) + coreEquiv; /* change to XI event */ - UpdateDeviceState(mouse, (xEvent*)de, 1); - de->u.u.type = *XDGAEventBase + coreEquiv; /* change back */ + UpdateDeviceState(mouse, &ev); /* * Deliver the DGA event */ if (pScreenPriv->client) { + dgaEvent de; + int coreEquiv; + + coreEquiv = GetCoreType((InternalEvent*)&ev); + + de.u.u.type = *XDGAEventBase + coreEquiv; + de.u.u.detail = event->detail; + de.u.event.time = event->time; + de.u.event.dx = 0; + de.u.event.dy = 0; + de.u.event.screen = pScreen->myNum; + de.u.event.state = ev.corestate; + /* If the DGA client has selected input, then deliver based on the usual filter */ - TryClientEvents (pScreenPriv->client, mouse, (xEvent *) de, 1, + TryClientEvents (pScreenPriv->client, mouse, (xEvent *)&de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else @@ -1112,20 +1122,17 @@ DGAProcessPointerEvent (ScreenPtr pScreen, dgaEvent *de, DeviceIntPtr mouse) /* If the pointer is actively grabbed, deliver a grabbed core event */ if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { - xi.u.u.type = (IEventBase - 1 ) + coreEquiv; - xi.u.u.detail = de->u.u.detail; - xi.u.keyButtonPointer.time = de->u.event.time; - xi.u.keyButtonPointer.eventX = de->u.event.dx; - xi.u.keyButtonPointer.eventY = de->u.event.dy; - xi.u.keyButtonPointer.rootX = de->u.event.dx; - xi.u.keyButtonPointer.rootY = de->u.event.dy; - xi.u.keyButtonPointer.state = de->u.event.state; - DeliverGrabbedEvent (&xi, mouse, FALSE, 1); + ev.detail.button = event->detail; + ev.time = event->time; + ev.root_x = event->dx; + ev.root_y = event->dy; + ev.corestate = event->state; + DeliverGrabbedEvent ((InternalEvent*)&ev, mouse, FALSE); } } } -_X_EXPORT Bool +Bool DGAOpenFramebuffer( int index, char **name, @@ -1142,7 +1149,7 @@ DGAOpenFramebuffer( name, mem, size, offset, flags); } -_X_EXPORT void +void DGACloseFramebuffer(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1154,7 +1161,7 @@ DGACloseFramebuffer(int index) /* For DGA 1.0 backwards compatibility only */ -_X_EXPORT int +int DGAGetOldDGAMode(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1166,7 +1173,7 @@ DGAGetOldDGAMode(int index) w = pScrn->currentMode->HDisplay; h = pScrn->currentMode->VDisplay; - p = ((pScrn->displayWidth * (pScrn->bitsPerPixel >> 3)) + 3) & ~3L; + p = pad_to_int32(pScrn->displayWidth * bits_to_bytes(pScrn->bitsPerPixel)); for(i = 0; i < pScreenPriv->numModes; i++) { mode = &(pScreenPriv->modes[i]); @@ -1184,34 +1191,32 @@ DGAGetOldDGAMode(int index) } static void -DGAHandleEvent(int screen_num, xEvent *event, DeviceIntPtr device, int nevents) +DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { - dgaEvent *de = (dgaEvent *) event; + DGAEvent *event= (DGAEvent*)ev; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; - int coreEquiv; /* no DGA */ if (DGAScreenKey == NULL || XDGAEventBase == 0) return; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); - + /* DGA not initialized on this screen */ if (!pScreenPriv) return; - - coreEquiv = de->u.u.type - *XDGAEventBase; - /* Not a DGA event; shouldn't happen, but you never know. */ - if (coreEquiv < KeyPress || coreEquiv > MotionNotify) - return; - - switch (coreEquiv) { + + switch (event->subtype) { case KeyPress: case KeyRelease: - DGAProcessKeyboardEvent (pScreen, de, device); + DGAProcessKeyboardEvent (pScreen, event, device); break; + case MotionNotify: + case ButtonPress: + case ButtonRelease: + DGAProcessPointerEvent (pScreen, event, device); + break; default: - DGAProcessPointerEvent (pScreen, de, device); break; } } diff --git a/xorg-server/hw/xfree86/common/xf86DPMS.c b/xorg-server/hw/xfree86/common/xf86DPMS.c index 5ee5e2451..22174c74e 100644 --- a/xorg-server/hw/xfree86/common/xf86DPMS.c +++ b/xorg-server/hw/xfree86/common/xf86DPMS.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * @@ -40,10 +39,10 @@ #include "xf86.h" #include "xf86Priv.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #include "dpmsproc.h" #endif +#include "xf86VGAarbiter.h" #ifdef DPMSExtension @@ -54,44 +53,41 @@ static int DPMSCount = 0; #endif -_X_EXPORT Bool +Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) { #ifdef DPMSExtension ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; DPMSPtr pDPMS; pointer DPMSOpt; - MessageType enabled_from = X_INFO; + MessageType enabled_from; DPMSKey = &DPMSKeyIndex; - if (DPMSDisabledSwitch) - DPMSEnabled = FALSE; if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey, xcalloc(sizeof(DPMSRec), 1))) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); pScrn->DPMSSet = set; pDPMS->Flags = flags; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); - if (DPMSOpt) { - if ((pDPMS->Enabled - = xf86SetBoolOption(pScrn->options, "dpms", FALSE)) - && !DPMSDisabledSwitch) - DPMSEnabled = TRUE; - enabled_from = X_CONFIG; + if (DPMSDisabledSwitch) { + enabled_from = X_CMDLINE; + DPMSEnabled = FALSE; + } + else if (DPMSOpt) { + enabled_from = X_CONFIG; + DPMSEnabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE); xf86MarkOptionUsed(DPMSOpt); - } else if (DPMSEnabledSwitch) { - if (!DPMSDisabledSwitch) - DPMSEnabled = TRUE; - pDPMS->Enabled = TRUE; - } + } else { - pDPMS->Enabled = defaultDPMSEnabled; + enabled_from = X_DEFAULT; + DPMSEnabled = TRUE; } - if (pDPMS->Enabled) + if (DPMSEnabled) xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); + pDPMS->Enabled = DPMSEnabled; pDPMS->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DPMSClose; DPMSCount++; @@ -113,7 +109,7 @@ DPMSClose(int i, ScreenPtr pScreen) if (DPMSKey == NULL) return FALSE; - pDPMS = (DPMSPtr)dixLookupPrivate(&pScreen->devPrivates, DPMSKey); + pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); /* This shouldn't happen */ if (!pDPMS) @@ -131,7 +127,7 @@ DPMSClose(int i, ScreenPtr pScreen) xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); } - xfree((pointer)pDPMS); + xfree(pDPMS); dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) DPMSKey = NULL; @@ -144,7 +140,7 @@ DPMSClose(int i, ScreenPtr pScreen) * Device dependent DPMS mode setting hook. This is called whenever * the DPMS mode is to be changed. */ -_X_EXPORT int +int DPMSSet(ClientPtr client, int level) { int rc, i; @@ -165,11 +161,11 @@ DPMSSet(ClientPtr client, int level) /* For each screen, set the DPMS level */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet && pDPMS->Enabled && pScrn->vtSema) { - xf86EnableAccess(pScrn); + xf86VGAarbiterLock(pScrn); pScrn->DPMSSet(pScrn, level, 0); + xf86VGAarbiterUnlock(pScrn); } } return Success; @@ -180,7 +176,7 @@ DPMSSet(ClientPtr client, int level) * DPMSSupported -- * Return TRUE if any screen supports DPMS. */ -_X_EXPORT Bool +Bool DPMSSupported(void) { int i; @@ -194,33 +190,11 @@ DPMSSupported(void) /* For each screen, check if DPMS is supported */ for (i = 0; i < xf86NumScreens; i++) { pScrn = xf86Screens[i]; - pDPMS = (DPMSPtr)dixLookupPrivate(&screenInfo.screens[i]->devPrivates, - DPMSKey); + pDPMS = dixLookupPrivate(&screenInfo.screens[i]->devPrivates, DPMSKey); if (pDPMS && pScrn->DPMSSet) return TRUE; } return FALSE; } - -/* - * DPMSGet -- - * Device dependent DPMS mode getting hook. This returns the current - * DPMS mode, or -1 if DPMS is not supported. - * - * This should hook in to the appropriate driver-level function, which - * will be added to the ScrnInfoRec. - * - * NOTES: - * 1. the calling interface should be changed to specify which - * screen to check. - * 2. It isn't clear that this function is ever used or what it should - * return. - */ -_X_EXPORT int -DPMSGet(int *level) -{ - return DPMSPowerLevel; -} - #endif /* DPMSExtension */ diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index d6ef93a1b..9487fe7b2 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -76,24 +76,15 @@ #include "mi.h" #include "mipointer.h" -#ifdef XF86BIGFONT -#define _XF86BIGFONT_SERVER_ -#include <X11/extensions/xf86bigfont.h> -#endif +#include "xkbsrv.h" +#include "xkbstr.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #include "dpmsproc.h" #endif /* - * The first of many hacks to get VT switching to work under - * Solaris 2.1 for x86. The basic problem is that Solaris is supposed - * to be SVR4. It is for the most part, except where the video interface - * is concerned. These hacks work around those problems. - * See the comments for Linux, and SCO. - * * This is a toggling variable: * FALSE = No VT switching keys have been pressed last time around * TRUE = Possible VT switch Pending @@ -102,7 +93,7 @@ * This has been generalised to work with Linux and *BSD+syscons (DHD) */ -_X_EXPORT Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for +Bool VTSwitchEnabled = TRUE; /* Allows run-time disabling for *BSD and for avoiding VT switches when using the DRI automatic full screen mode.*/ @@ -142,7 +133,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) * time in milliseconds since there last was any input. */ int -TimeSinceLastInputEvent() +TimeSinceLastInputEvent(void) { if (xf86Info.lastEventTime == 0) { xf86Info.lastEventTime = GetTimeInMillis(); @@ -154,8 +145,8 @@ TimeSinceLastInputEvent() * SetTimeSinceLastInputEvent -- * Set the lastEventTime to now. */ -_X_EXPORT void -SetTimeSinceLastInputEvent() +void +SetTimeSinceLastInputEvent(void) { xf86Info.lastEventTime = GetTimeInMillis(); } @@ -167,7 +158,7 @@ SetTimeSinceLastInputEvent() * and keyboard. */ void -ProcessInputEvents () +ProcessInputEvents (void) { int x, y; @@ -185,9 +176,7 @@ ProcessInputEvents () void xf86ProcessActionEvent(ActionEvent action, void *arg) { -#ifdef DEBUG - ErrorF("ProcessActionEvent(%d,%x)\n", (int) action, arg); -#endif + DebugF("ProcessActionEvent(%d,%x)\n", (int) action, arg); switch (action) { case ACTION_TERMINATE: if (!xf86Info.dontZap) { @@ -205,21 +194,27 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, -1); break; -#if !defined(__SOL8__) && \ - (!defined(sun) || defined(__i386__)) && defined(VT_ACTIVATE) +#if defined(VT_ACTIVATE) case ACTION_SWITCHSCREEN: if (VTSwitchEnabled && !xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); #if defined(__SCO__) || defined(__UNIXWARE__) vtno--; #endif +#if defined(sun) + if (vtno == xf86Info.vtno) + break; + + xf86Info.vtRequestsPending = TRUE; + xf86Info.vtPendingNum = vtno; +#else if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) ErrorF("Failed to switch consoles (%s)\n", strerror(errno)); +#endif } break; case ACTION_SWITCHSCREEN_NEXT: if (VTSwitchEnabled && !xf86Info.dontVTSwitch) { -/* Shouldn't this be true for (sun) && (i386) && (SVR4) ? */ #if defined(__SCO__) || defined(__UNIXWARE__) if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) < 0) #else @@ -301,16 +296,13 @@ xf86Wakeup(pointer blockData, int err, pointer pReadmask) * signal handler for the SIGIO signal. */ static void -xf86SigioReadInput(int fd, - void *closure) +xf86SigioReadInput(int fd, void *closure) { int errno_save = errno; - int sigstate = xf86BlockSIGIO(); - InputInfoPtr pInfo = (InputInfoPtr) closure; + InputInfoPtr pInfo = closure; pInfo->read_input(pInfo); - xf86UnblockSIGIO(sigstate); errno = errno_save; } @@ -318,7 +310,7 @@ xf86SigioReadInput(int fd, * xf86AddEnabledDevice -- * */ -_X_EXPORT void +void xf86AddEnabledDevice(InputInfoPtr pInfo) { if (!xf86InstallSIGIOHandler (pInfo->fd, xf86SigioReadInput, pInfo)) { @@ -330,7 +322,7 @@ xf86AddEnabledDevice(InputInfoPtr pInfo) * xf86RemoveEnabledDevice -- * */ -_X_EXPORT void +void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { if (!xf86RemoveSIGIOHandler (pInfo->fd)) { @@ -340,7 +332,7 @@ xf86RemoveEnabledDevice(InputInfoPtr pInfo) static int *xf86SignalIntercept = NULL; -_X_EXPORT void +void xf86InterceptSignals(int *signo) { if ((xf86SignalIntercept = signo)) @@ -349,70 +341,55 @@ xf86InterceptSignals(int *signo) static void (*xf86SigIllHandler)(void) = NULL; -_X_EXPORT void +void xf86InterceptSigIll(void (*sigillhandler)(void)) { xf86SigIllHandler = sigillhandler; } /* - * xf86SigHandler -- + * xf86SigWrapper -- * Catch unexpected signals and exit or continue cleanly. */ -void -xf86SigHandler(int signo) +int +xf86SigWrapper(int signo) { if ((signo == SIGILL) && xf86SigIllHandler) { (*xf86SigIllHandler)(); - /* Re-arm handler just in case we unexpectedly return here */ - (void) signal(signo, xf86SigHandler); - return; + return 0; /* continue */ } if (xf86SignalIntercept && (*xf86SignalIntercept < 0)) { *xf86SignalIntercept = signo; - /* Re-arm handler just in case */ - (void) signal(signo, xf86SigHandler); - return; + return 0; /* continue */ } - signal(signo,SIG_IGN); xf86Info.caughtSignal = TRUE; -#ifdef XF86BIGFONT - XF86BigfontCleanup(); -#endif - - xorg_backtrace(); - - FatalError("Caught signal %d. Server aborting\n", signo); + return 1; /* abort */ } /* * xf86PrintBacktrace -- * Print a stack backtrace for debugging purposes. */ -_X_EXPORT void +void xf86PrintBacktrace(void) { xorg_backtrace(); } #define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) -#define ModifierDown(k) ((keyc->state & (k)) == (k)) static void xf86ReleaseKeys(DeviceIntPtr pDev) { - KeyClassPtr keyc = NULL; - KeySym *map = NULL; - xEvent ke; - int i = 0, j = 0, nevents = 0; + KeyClassPtr keyc; + int i, j, nevents, sigstate; if (!pDev || !pDev->key) return; keyc = pDev->key; - map = keyc->curKeySyms.map; /* * Hmm... here is the biggest hack of every time ! @@ -425,36 +402,15 @@ xf86ReleaseKeys(DeviceIntPtr pDev) * are reenabled. */ - for (i = keyc->curKeySyms.minKeyCode, map = keyc->curKeySyms.map; - i < keyc->curKeySyms.maxKeyCode; - i++, map += keyc->curKeySyms.mapWidth) { + for (i = keyc->xkbInfo->desc->min_key_code; + i < keyc->xkbInfo->desc->max_key_code; + i++) { if (KeyPressed(i)) { - switch (*map) { - /* Don't release the lock keys */ - case XK_Caps_Lock: - case XK_Shift_Lock: - case XK_Num_Lock: - case XK_Scroll_Lock: - case XK_Kana_Lock: - break; - default: - if (pDev == inputInfo.keyboard) { - ke.u.keyButtonPointer.time = GetTimeInMillis(); - ke.u.keyButtonPointer.rootX = 0; - ke.u.keyButtonPointer.rootY = 0; - ke.u.u.type = KeyRelease; - ke.u.u.detail = i; - (*pDev->public.processInputProc) (&ke, pDev, 1); - } - else { - int sigstate = xf86BlockSIGIO (); - nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); - for (j = 0; j < nevents; j++) - mieqEnqueue(pDev, (xf86Events + j)->event); - xf86UnblockSIGIO(sigstate); - } - break; - } + sigstate = xf86BlockSIGIO (); + nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); + for (j = 0; j < nevents; j++) + mieqEnqueue(pDev, (InternalEvent*)(xf86Events + j)->event); + xf86UnblockSIGIO(sigstate); } } } @@ -464,15 +420,13 @@ xf86ReleaseKeys(DeviceIntPtr pDev) * Handle requests for switching the vt. */ static void -xf86VTSwitch() +xf86VTSwitch(void) { int i, prevSIGIO; InputInfoPtr pInfo; IHPtr ih; -#ifdef DEBUG - ErrorF("xf86VTSwitch()\n"); -#endif + DebugF("xf86VTSwitch()\n"); #ifdef XFreeXDGA if(!DGAVTSwitch()) @@ -485,10 +439,8 @@ xf86VTSwitch() */ if (xf86Screens[0]->vtSema) { -#ifdef DEBUG - ErrorF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", + DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE)); -#endif #ifdef DPMSExtension if (DPMSPowerLevel != DPMSModeOn) DPMSSet(serverClient, DPMSModeOn); @@ -503,29 +455,27 @@ xf86VTSwitch() * Keep the order: Disable Device > LeaveVT * EnterVT > EnableDevice */ - pInfo = xf86InputDevs; - while (pInfo) { - if (pInfo->dev) - DisableDevice(pInfo->dev); - pInfo = pInfo->next; + for (ih = InputHandlers; ih; ih = ih->next) + xf86DisableInputHandler(ih); + for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { + if (pInfo->dev) { + xf86ReleaseKeys(pInfo->dev); + ProcessInputEvents(); + DisableDevice(pInfo->dev, TRUE); + } } xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) xf86Screens[i]->LeaveVT(i, 0); - for (ih = InputHandlers; ih; ih = ih->next) - xf86DisableInputHandler(ih); xf86AccessLeave(); /* We need this here, otherwise */ - xf86AccessLeaveState(); /* console won't be restored */ if (!xf86VTSwitchAway()) { /* * switch failed */ -#ifdef DEBUG - ErrorF("xf86VTSwitch: Leave failed\n"); -#endif + DebugF("xf86VTSwitch: Leave failed\n"); prevSIGIO = xf86BlockSIGIO(); xf86AccessEnter(); xf86EnterServerState(SETUP); @@ -544,14 +494,10 @@ xf86VTSwitch() pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) { - xf86ReleaseKeys(pInfo->dev); - EnableDevice(pInfo->dev); - } + if (pInfo->dev) + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - /* XXX HACK */ - xf86ReleaseKeys(inputInfo.keyboard); for (ih = InputHandlers; ih; ih = ih->next) xf86EnableInputHandler(ih); @@ -570,17 +516,13 @@ xf86VTSwitch() * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; - xf86Screens[i]->access = NULL; - xf86Screens[i]->busAccess = NULL; } if (xorgHWAccess) xf86DisableIO(); } } else { -#ifdef DEBUG - ErrorF("xf86VTSwitch: Entering\n"); -#endif + DebugF("xf86VTSwitch: Entering\n"); if (!xf86VTSwitchTo()) return; prevSIGIO = xf86BlockSIGIO(); @@ -608,14 +550,10 @@ xf86VTSwitch() pInfo = xf86InputDevs; while (pInfo) { - if (pInfo->dev) { - xf86ReleaseKeys(pInfo->dev); - EnableDevice(pInfo->dev); - } + if (pInfo->dev) + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } - /* XXX HACK */ - xf86ReleaseKeys(inputInfo.keyboard); for (ih = InputHandlers; ih; ih = ih->next) xf86EnableInputHandler(ih); @@ -650,7 +588,7 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -660,7 +598,7 @@ xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -_X_EXPORT pointer +pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -687,7 +625,7 @@ removeInputHandler(IHPtr ih) xfree(ih); } -_X_EXPORT int +int xf86RemoveInputHandler(pointer handler) { IHPtr ih; @@ -706,7 +644,7 @@ xf86RemoveInputHandler(pointer handler) return fd; } -_X_EXPORT int +int xf86RemoveGeneralHandler(pointer handler) { IHPtr ih; @@ -725,7 +663,7 @@ xf86RemoveGeneralHandler(pointer handler) return fd; } -_X_EXPORT void +void xf86DisableInputHandler(pointer handler) { IHPtr ih; @@ -739,7 +677,7 @@ xf86DisableInputHandler(pointer handler) RemoveEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86DisableGeneralHandler(pointer handler) { IHPtr ih; @@ -753,7 +691,7 @@ xf86DisableGeneralHandler(pointer handler) RemoveGeneralSocket(ih->fd); } -_X_EXPORT void +void xf86EnableInputHandler(pointer handler) { IHPtr ih; @@ -767,7 +705,7 @@ xf86EnableInputHandler(pointer handler) AddEnabledDevice(ih->fd); } -_X_EXPORT void +void xf86EnableGeneralHandler(pointer handler) { IHPtr ih; @@ -784,7 +722,7 @@ xf86EnableGeneralHandler(pointer handler) /* * As used currently by the DRI, the return value is ignored. */ -_X_EXPORT Bool +Bool xf86EnableVTSwitch(Bool new) { static Bool def = TRUE; @@ -803,23 +741,6 @@ xf86EnableVTSwitch(Bool new) } void -xf86ReloadInputDevs(int sig) -{ - InputInfoPtr pInfo; - - signal(sig, (void(*)(int))xf86ReloadInputDevs); - - pInfo = xf86InputDevs; - while (pInfo) { - DisableDevice(pInfo->dev); - EnableDevice(pInfo->dev); - pInfo = pInfo->next; - } - - return; -} - -_X_EXPORT void DDXRingBell(int volume, int pitch, int duration) { xf86OSRingBell(volume, pitch, duration); } diff --git a/xorg-server/hw/xfree86/common/xf86Globals.c b/xorg-server/hw/xfree86/common/xf86Globals.c index 04a96cbdc..d8f7f7f27 100644 --- a/xorg-server/hw/xfree86/common/xf86Globals.c +++ b/xorg-server/hw/xfree86/common/xf86Globals.c @@ -43,6 +43,7 @@ #include "xf86Parser.h" #include "xf86Xinput.h" #include "xf86InPriv.h" +#include "xf86Config.h" /* Globals that video drivers may access */ @@ -51,11 +52,11 @@ static int xf86CreateRootWindowKeyIndex; DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; /* Index of ScrnInfo in pScreen.devPrivates */ static int xf86ScreenKeyIndex; -_X_EXPORT DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; +DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; static int xf86PixmapKeyIndex; -_X_EXPORT DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; -_X_EXPORT ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ -_X_EXPORT const unsigned char byte_reversed[256] = +DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; +ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ +const unsigned char byte_reversed[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, @@ -101,9 +102,11 @@ xf86InfoRec xf86Info = { .consoleFd = -1, .vtno = -1, .vtSysreq = FALSE, - .ddxSpecialKeys = SKWhenNeeded, .lastEventTime = -1, .vtRequestsPending = FALSE, +#ifdef sun + .vtPendingNum = -1, +#endif .dontVTSwitch = FALSE, .dontZap = FALSE, .dontZoom = FALSE, @@ -140,21 +143,18 @@ xf86InfoRec xf86Info = { #endif }; const char *xf86ConfigFile = NULL; -const char *xf86InputDeviceList = NULL; const char *xf86ModulePath = DEFAULT_MODULE_PATH; MessageType xf86ModPathFrom = X_DEFAULT; const char *xf86LogFile = DEFAULT_LOGPREFIX; MessageType xf86LogFileFrom = X_DEFAULT; Bool xf86LogFileWasOpened = FALSE; serverLayoutRec xf86ConfigLayout = {NULL, }; -_X_EXPORT confDRIRec xf86ConfigDRI = {0, }; +confDRIRec xf86ConfigDRI = {0, }; XF86ConfigPtr xf86configptr = NULL; Bool xf86Resetting = FALSE; Bool xf86Initialising = FALSE; -Bool xf86DoProbe = FALSE; Bool xf86DoConfigure = FALSE; Bool xf86DoShowOptions = FALSE; -Bool xf86DoModalias = FALSE; DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; @@ -185,7 +185,6 @@ char *xf86LayoutName = NULL; char *xf86ScreenName = NULL; char *xf86PointerName = NULL; char *xf86KeyboardName = NULL; -Bool xf86ProbeOnly = FALSE; int xf86Verbose = DEFAULT_VERBOSE; int xf86LogVerbose = DEFAULT_LOG_VERBOSE; int xf86FbBpp = -1; @@ -200,7 +199,7 @@ Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; -_X_EXPORT Bool xf86inSuspend = FALSE; +Bool xf86inSuspend = FALSE; Bool xorgHWAccess = FALSE; struct pci_slot_match xf86IsolateDevice = { diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c index 00df10574..9a2468dd3 100644 --- a/xorg-server/hw/xfree86/common/xf86Helper.c +++ b/xorg-server/hw/xfree86/common/xf86Helper.c @@ -53,13 +53,12 @@ #include "xf86Priv.h" #include "xf86_OSlib.h" #include "micmap.h" -#include "xf86PciInfo.h" #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" #include "mivalidate.h" -#include "xf86RAC.h" #include "xf86Bus.h" +#include "xf86Crtc.h" /* For xf86GetClocks */ #if defined(CSRG_BASED) || defined(__GNU__) @@ -72,7 +71,7 @@ static int xf86ScrnInfoPrivateCount = 0; /* Add a pointer to a new DriverRec to xf86DriverList */ -_X_EXPORT void +void xf86AddDriver(DriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -99,7 +98,7 @@ xf86AddDriver(DriverPtr driver, pointer module, int flags) xf86DriverList[xf86NumDrivers - 1]->refCount = 0; } -_X_EXPORT void +void xf86DeleteDriver(int drvIndex) { if (xf86DriverList[drvIndex] @@ -113,7 +112,7 @@ xf86DeleteDriver(int drvIndex) /* Add a pointer to a new InputDriverRec to xf86InputDriverList */ -_X_EXPORT void +void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags) { /* Don't add null entries */ @@ -168,20 +167,9 @@ xf86LookupInput(const char *name) return NULL; } -/* ABI stubs of despair */ -_X_EXPORT void -xf86AddModuleInfo(pointer info, pointer module) -{ -} - -_X_EXPORT void -xf86DeleteModuleInfo(int idx) -{ -} - /* Allocate a new ScrnInfoRec in xf86Screens */ -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags) { int i; @@ -204,22 +192,6 @@ xf86AllocateScreen(DriverPtr drv, int flags) xf86Screens[i]->drv = drv; drv->refCount++; xf86Screens[i]->module = DuplicateModule(drv->module, NULL); - /* - * set the initial access state. This will be modified after PreInit. - * XXX Or should we do it some other place? - */ - xf86Screens[i]->CurrentAccess = &xf86CurrentAccess; - xf86Screens[i]->resourceType = MEM_IO; - -#ifdef DEBUG - /* OOps -- What's this ? */ - ErrorF("xf86AllocateScreen - xf86Screens[%d]->pScreen = %p\n", - i, xf86Screens[i]->pScreen ); - if ( NULL != xf86Screens[i]->pScreen ) { - ErrorF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", - i, xf86Screens[i]->pScreen->CreateWindow ); - } -#endif xf86Screens[i]->DriverFunc = drv->driverFunc; @@ -232,7 +204,7 @@ xf86AllocateScreen(DriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteScreen(int scrnIndex, int flags) { ScrnInfoPtr pScrn; @@ -288,7 +260,7 @@ xf86DeleteScreen(int scrnIndex, int flags) * Allocate a private in ScrnInfoRec. */ -_X_EXPORT int +int xf86AllocateScrnInfoPrivateIndex(void) { int idx, i; @@ -308,7 +280,7 @@ xf86AllocateScrnInfoPrivateIndex(void) } /* Allocate a new InputInfoRec and append it to the tail of xf86InputDevs. */ -_X_EXPORT InputInfoPtr +InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags) { InputInfoPtr new, *prev = NULL; @@ -335,7 +307,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags) * data. To do this properly may require a driver hook. */ -_X_EXPORT void +void xf86DeleteInput(InputInfoPtr pInp, int flags) { InputInfoPtr p; @@ -376,7 +348,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) xfree(pInp); } -_X_EXPORT Bool +Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) { int i; @@ -447,7 +419,7 @@ xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) #define GLOBAL_DEFAULT_DEPTH 24 #endif -_X_EXPORT Bool +Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, int depth24flags) { @@ -764,7 +736,7 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, /* * Print out the selected depth and bpp. */ -_X_EXPORT void +void xf86PrintDepthBpp(ScrnInfoPtr scrp) { xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth); @@ -775,7 +747,7 @@ xf86PrintDepthBpp(ScrnInfoPtr scrp) * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits. */ -_X_EXPORT Bool +Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) { MessageType weightFrom = X_DEFAULT; @@ -867,7 +839,7 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) return TRUE; } -_X_EXPORT Bool +Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) { MessageType visualFrom = X_DEFAULT; @@ -914,7 +886,7 @@ xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) #define SET_GAMMA(g) \ (g) > GAMMA_ZERO ? (g) : 1.0 -_X_EXPORT Bool +Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) { MessageType from = X_DEFAULT; @@ -949,6 +921,11 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) scrp->gamma.green = 1.0; scrp->gamma.blue = 1.0; } + /* Pretend we succeeded if we support better a gamma system. + * This avoids a confusing message. + */ + if (xf86_crtc_supports_gamma(scrp)) + return TRUE; xf86DrvMsg(scrp->scrnIndex, from, "Using gamma correction (%.1f, %.1f, %.1f)\n", scrp->gamma.red, scrp->gamma.green, scrp->gamma.blue); @@ -968,7 +945,7 @@ xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) #undef MMPERINCH #define MMPERINCH 25.4 -_X_EXPORT void +void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) { MessageType from = X_DEFAULT; @@ -1065,7 +1042,7 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) #undef MMPERINCH -_X_EXPORT void +void xf86SetBlackWhitePixels(ScreenPtr pScreen) { if (xf86FlipPixels) { @@ -1196,7 +1173,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) * whether they are switched in or out by keeping track of the root pixmap's * private data, and therefore don't need to access pScrnInfo->vtSema. */ -_X_EXPORT void +void xf86EnableDisableFBAccess(int scrnIndex, Bool enable) { ScrnInfoPtr pScrnInfo = xf86Screens[scrnIndex]; @@ -1238,7 +1215,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable) #undef PREFIX_SIZE #define PREFIX_SIZE 14 -_X_EXPORT void +void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args) { @@ -1265,7 +1242,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, #undef PREFIX_SIZE /* Print driver messages, with verbose level specified directly */ -_X_EXPORT void +void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { @@ -1277,7 +1254,7 @@ xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, } /* Print driver messages, with verbose level of 1 (default) */ -_X_EXPORT void +void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; @@ -1288,7 +1265,7 @@ xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) } /* Print non-driver messages with verbose level specified directly */ -_X_EXPORT void +void xf86MsgVerb(MessageType type, int verb, const char *format, ...) { va_list ap; @@ -1299,7 +1276,7 @@ xf86MsgVerb(MessageType type, int verb, const char *format, ...) } /* Print non-driver messages with verbose level of 1 (default) */ -_X_EXPORT void +void xf86Msg(MessageType type, const char *format, ...) { va_list ap; @@ -1310,7 +1287,7 @@ xf86Msg(MessageType type, const char *format, ...) } /* Just like ErrorF, but with the verbose level checked */ -_X_EXPORT void +void xf86ErrorFVerb(int verb, const char *format, ...) { va_list ap; @@ -1322,7 +1299,7 @@ xf86ErrorFVerb(int verb, const char *format, ...) } /* Like xf86ErrorFVerb, but with an implied verbose level of 1 */ -_X_EXPORT void +void xf86ErrorF(const char *format, ...) { va_list ap; @@ -1335,7 +1312,7 @@ xf86ErrorF(const char *format, ...) void -xf86LogInit() +xf86LogInit(void) { char *lf = NULL; @@ -1366,7 +1343,7 @@ xf86LogInit() } void -xf86CloseLog() +xf86CloseLog(void) { LogClose(); } @@ -1376,7 +1353,7 @@ xf86CloseLog() * Drivers can use these for using their own SymTabRecs. */ -_X_EXPORT const char * +const char * xf86TokenToString(SymTabPtr table, int token) { int i; @@ -1390,7 +1367,7 @@ xf86TokenToString(SymTabPtr table, int token) return(table[i].name); } -_X_EXPORT int +int xf86StringToToken(SymTabPtr table, const char *string) { int i; @@ -1407,7 +1384,7 @@ xf86StringToToken(SymTabPtr table, const char *string) /* * helper to display the clocks found on a card */ -_X_EXPORT void +void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) { int j; @@ -1431,7 +1408,7 @@ xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) * XXX This makes assumptions about the line width, etc. Maybe we could * use a more general "pretty print" function for messages. */ -_X_EXPORT void +void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) { int len, i; @@ -1457,7 +1434,7 @@ xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) } -_X_EXPORT int +int xf86MatchDevice(const char *drivername, GDevPtr **sectlist) { GDevPtr gdp, *pgdp = NULL; @@ -1467,10 +1444,6 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) if (sectlist) *sectlist = NULL; - if (xf86DoModalias) return 0; - - if (xf86DoProbe) return 1; - if (xf86DoConfigure && xf86DoConfigurePass1) return 1; /* @@ -1590,7 +1563,7 @@ struct Inst { * \c DriverRec::driverName. In a future version of this function, remove * that parameter. */ -_X_EXPORT int +int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, @@ -1616,7 +1589,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, * Do this calculation and memory allocation once now to eliminate the * need for realloc calls inside the loop. */ - if ( !xf86DoProbe && !(xf86DoConfigure && xf86DoConfigurePass1) ) { + if (!(xf86DoConfigure && xf86DoConfigurePass1)) { unsigned max_entries = numDevs; iter = pci_slot_match_iterator_create(NULL); @@ -1729,9 +1702,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, allocatedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, allocatedInstances); /* * Check for devices that need duplicated instances. This is required @@ -1814,9 +1785,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, instances[i].dev = dev; } } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, numClaimedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Now check that a chipset or chipID override in the device section * is valid. Chipset has precedence over chipID. @@ -1920,11 +1889,9 @@ xf86MatchPciInstances(const char *driverName, int vendorID, if (instances[i].screen == 0 && !xf86CheckPciSlot( pPci )) continue; -#ifdef DEBUG - ErrorF("%s: card at %d:%d:%d is claimed by a Device section\n", + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", driverName, pPci->bus, pPci->dev, pPci->func); -#endif - + /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); @@ -1956,7 +1923,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ -_X_EXPORT void +void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), IOADDRESS vertsyncreg, @@ -1968,8 +1935,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), /* First save registers that get written on */ (*ClockFunc)(pScrn, CLK_REG_SAVE); - xf86SetPriority(TRUE); - if (num > MAXCLOCKS) num = MAXCLOCKS; @@ -2017,8 +1982,6 @@ finish: (*BlankScreen)(pScrn, TRUE); } - xf86SetPriority(FALSE); - for (i = 0; i < num; i++) { if (i != knownclkindex) @@ -2047,31 +2010,7 @@ finish: (*ClockFunc)(pScrn, CLK_REG_RESTORE); } -_X_EXPORT void -xf86SetPriority(Bool up) -{ - static int saved_nice; - - if (up) { -#ifdef HAS_SETPRIORITY - saved_nice = getpriority(PRIO_PROCESS, 0); - setpriority(PRIO_PROCESS, 0, -20); -#endif -#if defined(SYSV) || defined(SVR4) || defined(linux) - saved_nice = nice(0); - nice(-20 - saved_nice); -#endif - } else { -#ifdef HAS_SETPRIORITY - setpriority(PRIO_PROCESS, 0, saved_nice); -#endif -#if defined(SYSV) || defined(SVR4) || defined(linux) - nice(20 + saved_nice); -#endif - } -} - -_X_EXPORT const char * +const char * xf86GetVisualName(int visual) { if (visual < 0 || visual > DirectColor) @@ -2081,132 +2020,125 @@ xf86GetVisualName(int visual) } -_X_EXPORT int -xf86GetVerbosity() +int +xf86GetVerbosity(void) { return max(xf86Verbose, xf86LogVerbose); } -_X_EXPORT Pix24Flags -xf86GetPix24() +Pix24Flags +xf86GetPix24(void) { return xf86Info.pixmap24; } -_X_EXPORT int -xf86GetDepth() +int +xf86GetDepth(void) { return xf86Depth; } -_X_EXPORT rgb -xf86GetWeight() +rgb +xf86GetWeight(void) { return xf86Weight; } -_X_EXPORT Gamma -xf86GetGamma() +Gamma +xf86GetGamma(void) { return xf86Gamma; } -_X_EXPORT Bool -xf86GetFlipPixels() +Bool +xf86GetFlipPixels(void) { return xf86FlipPixels; } -_X_EXPORT const char * -xf86GetServerName() +const char * +xf86GetServerName(void) { return xf86ServerName; } -_X_EXPORT Bool -xf86ServerIsExiting() +Bool +xf86ServerIsExiting(void) { return (dispatchException & DE_TERMINATE) == DE_TERMINATE; } -_X_EXPORT Bool -xf86ServerIsResetting() +Bool +xf86ServerIsResetting(void) { return xf86Resetting; } Bool -xf86ServerIsInitialising() +xf86ServerIsInitialising(void) { return xf86Initialising; } -_X_EXPORT Bool +Bool xf86ServerIsOnlyDetecting(void) { - return xf86DoProbe || xf86DoConfigure; -} - - -_X_EXPORT Bool -xf86ServerIsOnlyProbing(void) -{ - return xf86ProbeOnly; + return xf86DoConfigure; } -_X_EXPORT Bool -xf86CaughtSignal() +Bool +xf86CaughtSignal(void) { return xf86Info.caughtSignal; } -_X_EXPORT Bool -xf86GetVidModeAllowNonLocal() +Bool +xf86GetVidModeAllowNonLocal(void) { return xf86Info.vidModeAllowNonLocal; } -_X_EXPORT Bool -xf86GetVidModeEnabled() +Bool +xf86GetVidModeEnabled(void) { return xf86Info.vidModeEnabled; } -_X_EXPORT Bool -xf86GetModInDevAllowNonLocal() +Bool +xf86GetModInDevAllowNonLocal(void) { return xf86Info.miscModInDevAllowNonLocal; } -_X_EXPORT Bool -xf86GetModInDevEnabled() +Bool +xf86GetModInDevEnabled(void) { return xf86Info.miscModInDevEnabled; } -_X_EXPORT Bool -xf86GetAllowMouseOpenFail() +Bool +xf86GetAllowMouseOpenFail(void) { return xf86Info.allowMouseOpenFail; } -_X_EXPORT Bool -xf86IsPc98() +Bool +xf86IsPc98(void) { #ifdef __i386__ return xf86Info.pc98; @@ -2215,20 +2147,20 @@ xf86IsPc98() #endif } -_X_EXPORT void -xf86DisableRandR() +void +xf86DisableRandR(void) { xf86Info.disableRandR = TRUE; xf86Info.randRFrom = X_PROBED; } -_X_EXPORT CARD32 +CARD32 xf86GetModuleVersion(pointer module) { return (CARD32)LoaderGetModuleVersion(module); } -_X_EXPORT pointer +pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name) { pointer ret; @@ -2241,7 +2173,7 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name) return ret; } -_X_EXPORT pointer +pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { pointer ret; @@ -2257,7 +2189,7 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) /* * xf86LoadOneModule loads a single module. */ -_X_EXPORT pointer +pointer xf86LoadOneModule(char *name, pointer opt) { int errmaj, errmin; @@ -2285,7 +2217,7 @@ xf86LoadOneModule(char *name, pointer opt) return mod; } -_X_EXPORT void +void xf86UnloadSubModule(pointer mod) { /* @@ -2297,34 +2229,12 @@ xf86UnloadSubModule(pointer mod) #endif } -_X_EXPORT Bool +Bool xf86LoaderCheckSymbol(const char *name) { return LoaderSymbol(name) != NULL; } -/* These two are just ABI stubs, they don't do anything in dlloader world */ -_X_EXPORT void -xf86LoaderReqSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -xf86LoaderReqSymbols(const char *sym0, ...) -{ -} - -_X_EXPORT void -xf86LoaderRefSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -xf86LoaderRefSymbols(const char *sym0, ...) -{ -} - - typedef enum { OPTION_BACKING_STORE } BSOpts; @@ -2334,7 +2244,7 @@ static const OptionInfoRec BSOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetBackingStore(ScreenPtr pScreen) { Bool useBS = FALSE; @@ -2374,7 +2284,7 @@ static const OptionInfoRec SMOptions[] = { { -1, NULL, OPTV_NONE, {0}, FALSE } }; -_X_EXPORT void +void xf86SetSilkenMouse (ScreenPtr pScreen) { Bool useSM = TRUE; @@ -2388,13 +2298,8 @@ xf86SetSilkenMouse (ScreenPtr pScreen) /* check for commandline option here */ /* disable if screen shares resources */ - if (((pScrn->racMemFlags & RAC_CURSOR) && - !xf86NoSharedResources(pScrn->scrnIndex,MEM)) || - ((pScrn->racIoFlags & RAC_CURSOR) && - !xf86NoSharedResources(pScrn->scrnIndex,IO))) { - useSM = FALSE; - from = X_PROBED; - } else if (xf86silkenMouseDisableFlag) { + /* TODO VGA arb disable silken mouse */ + if (xf86silkenMouseDisableFlag) { from = X_CMDLINE; useSM = FALSE; } else { @@ -2415,7 +2320,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) /* Wrote this function for the PM2 Xv driver, preliminary. */ -_X_EXPORT pointer +pointer xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, char **adaptor_name, pointer *adaptor_options) { @@ -2445,13 +2350,43 @@ xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, #include "loader/os.c" /* new RAC */ +/* + * xf86ConfigPciEntityInactive() -- This function can be used + * to configure an inactive entity as well as to reconfigure an + * previously active entity inactive. If the entity has been + * assigned to a screen before it will be removed. If p_chip is + * non-NULL all static resources listed there will be registered. + */ +static void +xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, + EntityProc init, EntityProc enter, + EntityProc leave, pointer private) +{ + ScrnInfoPtr pScrn; + + if ((pScrn = xf86FindScreenForEntity(pEnt->index))) + xf86RemoveEntityFromScreen(pScrn,pEnt->index); -_X_EXPORT ScrnInfoPtr + /* shared resources are only needed when entity is active: remove */ + xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); +} + +static void +xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, + EntityProc enter, EntityProc leave, pointer private) +{ + ScrnInfoPtr pScrn; + + if ((pScrn = xf86FindScreenForEntity(pEnt->index))) + xf86RemoveEntityFromScreen(pScrn,pEnt->index); + xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); +} + +ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, - PciChipsets *p_chip, resList res, EntityProc init, + PciChipsets *p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { - PciChipsets *p_id; EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (!pEnt) return pScrn; @@ -2461,7 +2396,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, return pScrn; } if (!pEnt->active) { - xf86ConfigPciEntityInactive(pEnt, p_chip, res, init, enter, + xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, leave, private); xfree(pEnt); return pScrn; @@ -2476,21 +2411,14 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (xf86IsEntityShared(entityIndex)) { return pScrn; } - if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,entityIndex); - } xfree(pEnt); - xf86ClaimFixedResources(res,entityIndex); xf86SetEntityFuncs(entityIndex,init,enter,leave,private); return pScrn; } -_X_EXPORT ScrnInfoPtr +ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2520,16 +2448,15 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, /* * - * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete functions. - * They the are likely to be removed. Don't use! + * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete function. + * It is likely to be removed. Don't use! */ -_X_EXPORT Bool +Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, - PciChipsets *p_chip, resList res, EntityProc init, + PciChipsets *p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, pointer private) { - PciChipsets *p_id; EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (!pEnt) return FALSE; @@ -2539,62 +2466,14 @@ xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, } xf86AddEntityToScreen(pScrn,entityIndex); - if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,entityIndex); - } xfree(pEnt); - - xf86ClaimFixedResources(res,entityIndex); if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) return FALSE; return TRUE; } -/* - * xf86ConfigPciEntityInactive() -- This functions can be used - * to configure an inactive entity as well as to reconfigure an - * previously active entity inactive. If the entity has been - * assigned to a screen before it will be removed. If p_pci is - * non-NULL all static resources listed there will be registered. - */ -_X_EXPORT void -xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, - resList res, EntityProc init, EntityProc enter, - EntityProc leave, pointer private) -{ - PciChipsets *p_id; - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - else if (p_chip) { - for (p_id = p_chip; p_id->numChipset != -1; p_id++) { - if (pEnt->chipset == p_id->numChipset) break; - } - xf86ClaimFixedResources(p_id->resList,pEnt->index); - } - xf86ClaimFixedResources(res,pEnt->index); - /* shared resources are only needed when entity is active: remove */ - xf86DeallocateResourcesForEntity(pEnt->index, ResShared); - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - -void -xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - -_X_EXPORT Bool +Bool xf86IsScreenPrimary(int scrnIndex) { ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; @@ -2607,7 +2486,7 @@ xf86IsScreenPrimary(int scrnIndex) return FALSE; } -_X_EXPORT int +int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, pointer value ) { @@ -2615,10 +2494,8 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int i; Bool existing = FALSE; -#ifdef DEBUG - ErrorF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n", + DebugF("xf86RegisterRootWindowProperty(%d, %ld, %ld, %d, %ld, %p)\n", ScrnIndex, property, type, format, len, value); -#endif if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) { return(BadMatch); @@ -2654,15 +2531,11 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pNewProp->size = len; pNewProp->data = value; -#ifdef DEBUG - ErrorF("new property filled\n"); -#endif + DebugF("new property filled\n"); if (NULL==xf86RegisteredPropertiesTable) { -#ifdef DEBUG - ErrorF("creating xf86RegisteredPropertiesTable[] size %d\n", + DebugF("creating xf86RegisteredPropertiesTable[] size %d\n", xf86NumScreens); -#endif if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) { return(BadAlloc); } @@ -2671,12 +2544,10 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } } -#ifdef DEBUG - ErrorF("xf86RegisteredPropertiesTable %p\n", + DebugF("xf86RegisteredPropertiesTable %p\n", (void *)xf86RegisteredPropertiesTable); - ErrorF("xf86RegisteredPropertiesTable[%d] %p\n", + DebugF("xf86RegisteredPropertiesTable[%d] %p\n", ScrnIndex, (void *)xf86RegisteredPropertiesTable[ScrnIndex]); -#endif if (!existing) { if ( xf86RegisteredPropertiesTable[ScrnIndex] == NULL) { @@ -2684,21 +2555,17 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } else { pRegProp = xf86RegisteredPropertiesTable[ScrnIndex]; while (pRegProp->next != NULL) { -#ifdef DEBUG - ErrorF("- next %p\n", (void *)pRegProp); -#endif + DebugF("- next %p\n", (void *)pRegProp); pRegProp = pRegProp->next; } pRegProp->next = pNewProp; } } -#ifdef DEBUG - ErrorF("xf86RegisterRootWindowProperty succeeded\n"); -#endif + DebugF("xf86RegisterRootWindowProperty succeeded\n"); return(Success); } -_X_EXPORT Bool +Bool xf86IsUnblank(int mode) { switch(mode) { @@ -2714,15 +2581,8 @@ xf86IsUnblank(int mode) } } -_X_EXPORT void +void xf86MotionHistoryAllocate(LocalDevicePtr local) { AllocateMotionHistory(local->dev); } - -_X_EXPORT int -xf86GetMotionEvents(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, - unsigned long stop, ScreenPtr pScreen, BOOL core) -{ - return GetMotionHistory(pDev, buff, start, stop, pScreen, core); -} diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c index f029915c6..f9224b1a6 100644 --- a/xorg-server/hw/xfree86/common/xf86Init.c +++ b/xorg-server/hw/xfree86/common/xf86Init.c @@ -43,7 +43,6 @@ #include <sys/utsname.h> #endif -#define NEED_EVENTS #include <X11/X.h> #include <X11/Xmd.h> #include <X11/Xproto.h> @@ -68,7 +67,6 @@ #include "xf86Config.h" #include "xf86_OSlib.h" #include "xorgVersion.h" -#include "xf86Date.h" #include "xf86Build.h" #include "mipointer.h" #include <X11/extensions/XI.h> @@ -80,11 +78,11 @@ #include "picturestr.h" #endif +#include "xf86VGAarbiter.h" #include "globals.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #include "dpmsproc.h" #endif @@ -95,7 +93,6 @@ /* forward declarations */ static Bool probe_devices_from_device_sections(DriverPtr drvp); static Bool add_matching_devices_to_configure_list(DriverPtr drvp); -static Bool check_for_matching_devices(DriverPtr drvp); #ifdef XF86PM void (*xf86OSPMClose)(void) = NULL; @@ -175,7 +172,7 @@ xf86PrintBanner(void) ErrorF(" (%s)", XORG_CUSTOM_VERSION); #endif #ifndef XORG_DATE -#define XORG_DATE XF86_DATE +# define XORG_DATE "Unknown" #endif ErrorF("\nRelease Date: %s\n", XORG_DATE); ErrorF("X Protocol Version %d, Revision %d\n", @@ -192,6 +189,21 @@ xf86PrintBanner(void) if (uname(&name) >= 0) { ErrorF("Current Operating System: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine); +#ifdef linux + do { + char buf[80]; + int fd = open("/proc/cmdline", O_RDONLY); + if (fd != -1) { + ErrorF("Kernel command line: "); + memset(buf, 0, 80); + while (read(fd, buf, 80) > 0) { + ErrorF("%.80s", buf); + memset(buf, 0, 80); + } + close(fd); + } + } while (0); +#endif } } #endif @@ -217,23 +229,10 @@ xf86PrintBanner(void) #endif } #endif -#if defined(CLOG_DATE) && (CLOG_DATE > 19000000) - { - struct tm t; - char buf[100]; - - bzero(&t, sizeof(t)); - bzero(buf, sizeof(buf)); - t.tm_mday = CLOG_DATE % 100; - t.tm_mon = (CLOG_DATE / 100) % 100 - 1; - t.tm_year = CLOG_DATE / 10000 - 1900; - if (strftime(buf, sizeof(buf), "%d %B %Y", &t)) - ErrorF("Changelog Date: %s\n", buf); - } -#endif #if defined(BUILDERSTRING) ErrorF("%s \n",BUILDERSTRING); #endif + ErrorF("Current version of pixman: %s\n", pixman_version_string()); ErrorF("\tBefore reporting problems, check "__VENDORDWEBSUPPORT__"\n" "\tto make sure that you have the latest version.\n"); } @@ -244,84 +243,6 @@ xf86PrintMarkers(void) LogPrintMarkers(); } -static void -DoModalias(void) -{ - int i = -1; - char **vlist; - - /* Get all the drivers */ - vlist = xf86DriverlistFromCompile(); - if (!vlist) { - ErrorF("Missing output drivers. PCI Access dump failed.\n"); - goto bail; - } - - /* Load all the drivers that were found. */ - xf86LoadModules(vlist, NULL); - - xfree(vlist); - - /* Iterate through each driver */ - for (i = 0; i < xf86NumDrivers; i++) { - struct pci_id_match *match; - - /* Iterate through each pci id match data, dumping it to the screen */ - for (match = (struct pci_id_match *) xf86DriverList[i]->supported_devices ; - match && !(!match->vendor_id && !match->device_id) ; match++) { - /* Prefix */ - ErrorF("alias pci:"); - - /* Vendor */ - if (match->vendor_id == ~0) - ErrorF("v*"); - else - ErrorF("v%08X", match->vendor_id); - - /* Device */ - if (match->device_id == ~0) - ErrorF("d*"); - else - ErrorF("d%08X", match->device_id); - - /* Subvendor */ - if (match->subvendor_id == ~0) - ErrorF("sv*"); - else - ErrorF("sv%08X", match->subvendor_id); - - /* Subdevice */ - if (match->subdevice_id == ~0) - ErrorF("sd*"); - else - ErrorF("sd%08X", match->subdevice_id); - - /* Class */ - if ((match->device_class_mask >> 16 & 0xFF) == 0xFF) - ErrorF("bc%02X", match->device_class >> 16 & 0xFF); - else - ErrorF("bc*"); - if ((match->device_class_mask >> 8 & 0xFF) == 0xFF) - ErrorF("sc%02X", match->device_class >> 8 & 0xFF); - else - ErrorF("sc*"); - if ((match->device_class_mask & 0xFF) == 0xFF) - ErrorF("i%02X*", match->device_class & 0xFF); - else - ErrorF("i*"); - - /* Suffix (driver) */ - ErrorF(" %s\n", xf86DriverList[i]->driverName); - } - } - -bail: - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); -} - static Bool xf86CreateRootWindow(WindowPtr pWin) { @@ -332,9 +253,7 @@ xf86CreateRootWindow(WindowPtr pWin) CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); -#ifdef DEBUG - ErrorF("xf86CreateRootWindow(%p)\n", pWin); -#endif + DebugF("xf86CreateRootWindow(%p)\n", pWin); if ( pScreen->CreateWindow != xf86CreateRootWindow ) { /* Can't find hook we are hung on */ @@ -381,9 +300,7 @@ xf86CreateRootWindow(WindowPtr pWin) } } -#ifdef DEBUG - ErrorF("xf86CreateRootWindow() returns %d\n", ret); -#endif + DebugF("xf86CreateRootWindow() returns %d\n", ret); return (ret); } @@ -396,23 +313,25 @@ InstallSignalHandlers(void) */ xf86Info.caughtSignal=FALSE; if (!xf86Info.notrapSignals) { - signal(SIGSEGV,xf86SigHandler); - signal(SIGILL,xf86SigHandler); + OsRegisterSigWrapper(xf86SigWrapper); + } else { + signal(SIGSEGV, SIG_DFL); + signal(SIGILL, SIG_DFL); #ifdef SIGEMT - signal(SIGEMT,xf86SigHandler); + signal(SIGEMT, SIG_DFL); #endif - signal(SIGFPE,xf86SigHandler); + signal(SIGFPE, SIG_DFL); #ifdef SIGBUS - signal(SIGBUS,xf86SigHandler); + signal(SIGBUS, SIG_DFL); #endif #ifdef SIGSYS - signal(SIGSYS,xf86SigHandler); + signal(SIGSYS, SIG_DFL); #endif #ifdef SIGXCPU - signal(SIGXCPU,xf86SigHandler); + signal(SIGXCPU, SIG_DFL); #endif #ifdef SIGXFSZ - signal(SIGXFSZ,xf86SigHandler); + signal(SIGXFSZ, SIG_DFL); #endif } } @@ -485,10 +404,8 @@ probe_devices_from_device_sections(DriverPtr drvp) if ( (devList[i]->screen == 0) && !xf86CheckPciSlot( pPci ) ) continue; -#ifdef DEBUG - ErrorF("%s: card at %d:%d:%d is claimed by a Device section\n", + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", drvp->driverName, pPci->bus, pPci->dev, pPci->func); -#endif /* Allocate an entry in the lists to be returned */ entry = xf86ClaimPciSlot(pPci, drvp, device_id, @@ -499,7 +416,7 @@ probe_devices_from_device_sections(DriverPtr drvp) for ( k = 0; k < xf86NumEntities; k++ ) { EntityPtr pEnt = xf86Entities[k]; - if (pEnt->busType != BUS_PCI) + if (pEnt->bus.type != BUS_PCI) continue; if (pEnt->bus.id.pci == pPci) { @@ -514,7 +431,8 @@ probe_devices_from_device_sections(DriverPtr drvp) if ((*drvp->PciProbe)(drvp, entry, pPci, devices[j].match_data)) { foundScreen = TRUE; - } + } else + xf86UnclaimPciSlot(pPci); } break; @@ -572,32 +490,6 @@ add_matching_devices_to_configure_list(DriverPtr drvp) return (numFound != 0); } - -Bool -check_for_matching_devices(DriverPtr drvp) -{ - const struct pci_id_match * const devices = drvp->supported_devices; - int j; - - - for (j = 0; ! END_OF_MATCHES(devices[j]); j++) { - struct pci_device_iterator *iter; - struct pci_device *dev; - - iter = pci_id_match_iterator_create(& devices[j]); - dev = pci_device_next(iter); - pci_iterator_destroy(iter); - - if (dev != NULL) { - return TRUE; - } - } - - - return FALSE; -} - - /** * Call the driver's correct probe function. * @@ -619,11 +511,7 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) Bool foundScreen = FALSE; if ( drv->PciProbe != NULL ) { - if ( xf86DoProbe ) { - assert( detect_only ); - foundScreen = check_for_matching_devices( drv ); - } - else if ( xf86DoConfigure && xf86DoConfigurePass1 ) { + if ( xf86DoConfigure && xf86DoConfigurePass1 ) { assert( detect_only ); foundScreen = add_matching_devices_to_configure_list( drv ); } @@ -643,76 +531,6 @@ xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) return foundScreen; } -static void -DoProbe(void) -{ - int i; - Bool probeResult; - Bool ioEnableFailed = FALSE; - - /* Find the list of video driver modules. */ - char **list = xf86DriverlistFromCompile(); - char **l; - - if (list) { - ErrorF("List of video driver modules:\n"); - for (l = list; *l; l++) - ErrorF("\t%s\n", *l); - } else { - ErrorF("No video driver modules found\n"); - } - - /* Load all the drivers that were found. */ - xf86LoadModules(list, NULL); - - /* Disable PCI devices */ - xf86AccessInit(); - - /* Call all of the probe functions, reporting the results. */ - for (i = 0; i < xf86NumDrivers; i++) { - DriverRec * const drv = xf86DriverList[i]; - - if (!xorgHWAccess) { - xorgHWFlags flags; - if (!drv->driverFunc - || !drv->driverFunc( NULL, GET_REQUIRED_HW_INTERFACES, &flags ) - || NEED_IO_ENABLED(flags)) { - if (ioEnableFailed) - continue; - if (!xf86EnableIO()) { - ioEnableFailed = TRUE; - continue; - } - xorgHWAccess = TRUE; - } - } - - - xf86MsgVerb(X_INFO, 3, "Probing in driver %s\n", drv->driverName); - - probeResult = xf86CallDriverProbe( drv, TRUE ); - if (!probeResult) { - xf86ErrorF("Probe in driver `%s' returns FALSE\n", - drv->driverName); - } else { - xf86ErrorF("Probe in driver `%s' returns TRUE\n", - drv->driverName); - - /* If we have a result, then call driver's Identify function */ - if (drv->Identify != NULL) { - const int verbose = xf86SetVerbosity(1); - (*drv->Identify)(0); - xf86SetVerbosity(verbose); - } - } - } - - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); -} - /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -743,7 +561,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) else xf86ServerName = argv[0]; - if (!xf86DoModalias) { xf86PrintBanner(); xf86PrintMarkers(); if (xf86LogFile) { @@ -754,10 +571,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s", xf86LogFile, ct); } - } /* Read and parse the config file */ - if (!xf86DoProbe && !xf86DoConfigure && !xf86DoModalias && !xf86DoShowOptions) { + if (!xf86DoConfigure && !xf86DoShowOptions) { switch (xf86HandleConfigFile(FALSE)) { case CONFIG_OK: break; @@ -790,16 +606,9 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* Do a general bus probe. This will be a PCI probe for x86 platforms */ xf86BusProbe(); - if (xf86DoProbe) - DoProbe(); - if (xf86DoConfigure) DoConfigure(); - /* Do the PCI Access dump */ - if (xf86DoModalias) - DoModalias(); - if (autoconfig) { if (!xf86AutoConfig()) { xf86Msg(X_ERROR, "Auto configuration failed\n"); @@ -811,9 +620,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86OSPMClose = xf86OSPMOpen(); #endif - /* Initialise the resource broker */ - xf86ResourceBrokerInit(); - /* Load all modules specified explicitly in the config file */ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { xf86LoadModules(modulelist, optionlist); @@ -924,6 +730,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) return; } + xf86VGAarbiterInit(); + /* * Match up the screens found by the probes against those specified * in the config file. Remove the ones that won't be used. Sort @@ -1004,10 +812,12 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) */ for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); + xf86VGAarbiterScrnInit(xf86Screens[i]); + xf86VGAarbiterLock(xf86Screens[i]); if (xf86Screens[i]->PreInit && xf86Screens[i]->PreInit(xf86Screens[i], 0)) xf86Screens[i]->configured = TRUE; + xf86VGAarbiterUnlock(xf86Screens[i]); } for (i = 0; i < xf86NumScreens; i++) if (!xf86Screens[i]->configured) @@ -1033,15 +843,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } } - /* XXX Should this be before or after loading dependent modules? */ - if (xf86ProbeOnly) - { - OsCleanup(TRUE); - AbortDDX(); - fflush(stderr); - exit(0); - } - /* Remove (unload) drivers that are not required */ for (i = 0; i < xf86NumDrivers; i++) if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0) @@ -1057,7 +858,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* * Collect all pixmap formats and check for conflicts at the display * level. Should we die here? Or just delete the offending screens? - * Also, should this be done for -probeonly? */ screenpix24 = Pix24DontCare; for (i = 0; i < xf86NumScreens; i++) { @@ -1162,10 +962,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) break; } } - - /* set up the proper access funcs */ - xf86PostPreInit(); - } else { /* * serverGeneration != 1; some OSs have to do things here, too. @@ -1230,19 +1026,22 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) #endif /* SCO325 */ for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); + xf86VGAarbiterLock(xf86Screens[i]); /* * Almost everything uses these defaults, and many of those that * don't, will wrap them. */ xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess; +#ifdef XFreeXDGA xf86Screens[i]->SetDGAMode = xf86SetDGAMode; +#endif xf86Screens[i]->DPMSSet = NULL; xf86Screens[i]->LoadPalette = NULL; xf86Screens[i]->SetOverscan = NULL; xf86Screens[i]->DriverFunc = NULL; xf86Screens[i]->pScreen = NULL; scr_index = AddScreen(xf86Screens[i]->ScreenInit, argc, argv); + xf86VGAarbiterUnlock(xf86Screens[i]); if (scr_index == i) { /* * Hook in our ScrnInfoRec, and initialise some other pScreen @@ -1258,12 +1057,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) FatalError("AddScreen/ScreenInit failed for driver %d\n", i); } -#ifdef DEBUG - ErrorF("InitOutput - xf86Screens[%d]->pScreen = %p\n", + DebugF("InitOutput - xf86Screens[%d]->pScreen = %p\n", i, xf86Screens[i]->pScreen ); - ErrorF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", + DebugF("xf86Screens[%d]->pScreen->CreateWindow = %p\n", i, xf86Screens[i]->pScreen->CreateWindow ); -#endif dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, xf86CreateRootWindowKey, @@ -1306,9 +1103,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) */ void -InitInput(argc, argv) - int argc; - char **argv; +InitInput(int argc, char **argv) { IDevPtr* pDev; DeviceIntPtr dev; @@ -1337,7 +1132,7 @@ InitInput(argc, argv) */ void -OsVendorInit() +OsVendorInit(void) { static Bool beenHere = FALSE; @@ -1382,7 +1177,7 @@ OsVendorInit() */ void -ddxGiveUp() +ddxGiveUp(void) { int i; @@ -1392,16 +1187,12 @@ ddxGiveUp() xf86OSPMClose = NULL; #endif - xf86AccessLeaveState(); - for (i = 0; i < xf86NumScreens; i++) { /* * zero all access functions to * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; - xf86Screens[i]->access = NULL; - xf86Screens[i]->busAccess = NULL; } #ifdef XFreeXDGA @@ -1427,7 +1218,7 @@ ddxGiveUp() */ void -AbortDDX() +AbortDDX(void) { int i; @@ -1448,7 +1239,6 @@ AbortDDX() * we might not have been wrapped yet. Therefore enable * screen explicitely. */ - xf86EnableAccess(xf86Screens[i]); (xf86Screens[i]->LeaveVT)(i, 0); } } @@ -1463,7 +1253,7 @@ AbortDDX() } void -OsVendorFatalError() +OsVendorFatalError(void) { #ifdef VENDORSUPPORT ErrorF("\nPlease refer to your Operating System Vendor support pages\n" @@ -1535,9 +1325,11 @@ ddxProcessArgument(int argc, char **argv, int i) } /* First the options that are only allowed for root */ - if (getuid() == 0 || geteuid() != 0) - { - if (!strcmp(argv[i], "-modulepath")) + if (!strcmp(argv[i], "-modulepath") || !strcmp(argv[i], "-logfile")) { + if ( (geteuid() == 0) && (getuid() != 0) ) { + FatalError("The '%s' option can only be used by root.\n", argv[i]); + } + else if (!strcmp(argv[i], "-modulepath")) { char *mp; CHECK_FOR_REQUIRED_ARGUMENT(); @@ -1561,8 +1353,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86LogFileFrom = X_CMDLINE; return 2; } - } else if (!strcmp(argv[i], "-modulepath") || !strcmp(argv[i], "-logfile")) { - FatalError("The '%s' option can only be used by root.\n", argv[i]); } if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config")) { @@ -1577,11 +1367,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86ConfigFile = argv[i + 1]; return 2; } - if (!strcmp(argv[i],"-probeonly")) - { - xf86ProbeOnly = TRUE; - return 1; - } if (!strcmp(argv[i],"-flipPixels")) { xf86FlipPixels = TRUE; @@ -1797,11 +1582,6 @@ ddxProcessArgument(int argc, char **argv, int i) return 1; } #endif - if (!strcmp(argv[i], "-probe")) - { - xf86DoProbe = TRUE; - return 1; - } if (!strcmp(argv[i], "-configure")) { if (getuid() != 0 && geteuid() == 0) { @@ -1812,12 +1592,6 @@ ddxProcessArgument(int argc, char **argv, int i) xf86AllowMouseOpenFail = TRUE; return 1; } - if (!strcmp(argv[i], "-modalias")) - { - xf86DoModalias = TRUE; - xf86AllowMouseOpenFail = TRUE; - return 1; - } if (!strcmp(argv[i], "-showopts")) { if (getuid() != 0 && geteuid() == 0) { @@ -1862,7 +1636,7 @@ ddxProcessArgument(int argc, char **argv, int i) */ void -ddxUseMsg() +ddxUseMsg(void) { ErrorF("\n"); ErrorF("\n"); @@ -1874,10 +1648,8 @@ ddxUseMsg() ErrorF("-configure probe for devices and write an "__XCONFIGFILE__"\n"); ErrorF("-showopts print available options for all installed drivers\n"); } - ErrorF("-modalias output a modalias-style filter for each driver installed\n"); ErrorF("-config file specify a configuration file, relative to the\n"); ErrorF(" "__XCONFIGFILE__" search path, only root can use absolute\n"); - ErrorF("-probeonly probe for devices, then exit\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); @@ -1957,7 +1729,7 @@ xf86LoadModules(char **list, pointer *optlist) /* Pixmap format stuff */ -_X_EXPORT PixmapFormatPtr +PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) { int i; @@ -2002,7 +1774,7 @@ xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) return NULL; } -_X_EXPORT int +int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) { PixmapFormatPtr format; diff --git a/xorg-server/hw/xfree86/common/xf86Mode.c b/xorg-server/hw/xfree86/common/xf86Mode.c index 24a431dc5..0e43946c5 100644 --- a/xorg-server/hw/xfree86/common/xf86Mode.c +++ b/xorg-server/hw/xfree86/common/xf86Mode.c @@ -71,7 +71,7 @@ printModeRejectMessage(int index, DisplayModePtr p, int status) * Find closest clock to given frequency (in kHz). This assumes the * number of clocks is greater than zero. */ -_X_EXPORT int +int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider) { @@ -110,7 +110,7 @@ xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, * Convert a ModeStatus value to a printable message */ -_X_EXPORT const char * +const char * xf86ModeStatusToString(ModeStatus status) { switch (status) { @@ -199,7 +199,7 @@ xf86ModeStatusToString(ModeStatus status) * xf86ShowClockRanges() -- Print the clock ranges allowed * and the clock values scaled by ClockMulFactor and ClockDivFactor */ -_X_EXPORT void +void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges) { ClockRangePtr cp; @@ -399,7 +399,7 @@ xf86HandleBuiltinMode(ScrnInfoPtr scrp, * reason. */ -_X_EXPORT ModeStatus +ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy) { @@ -643,7 +643,7 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, * This function takes a mode and monitor description, and determines * if the mode is valid for the monitor. */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) { int i; @@ -654,10 +654,8 @@ xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) return MODE_ERROR; } -#ifdef DEBUG - ErrorF("xf86CheckModeForMonitor(%p %s, %p %s)\n", + DebugF("xf86CheckModeForMonitor(%p %s, %p %s)\n", mode, mode->name, monitor, monitor->id); -#endif /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || @@ -790,7 +788,7 @@ xf86CheckModeSize(ScrnInfoPtr scrp, int w, int x, int y) * maxVValue maximum vertical timing value */ -_X_EXPORT ModeStatus +ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, @@ -808,10 +806,8 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, return MODE_ERROR; } -#ifdef DEBUG - ErrorF("xf86InitialCheckModeForDriver(%p, %p %s, %p, 0x%x, %d, %d, %d)\n", + DebugF("xf86InitialCheckModeForDriver(%p, %p %s, %p, 0x%x, %d, %d, %d)\n", scrp, mode, mode->name , clockRanges, strategy, maxPitch, virtualX, virtualY); -#endif /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || @@ -938,7 +934,7 @@ xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, * clockRanges allowable clock ranges */ -_X_EXPORT ModeStatus +ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) { ClockRangesPtr cp; @@ -1185,7 +1181,7 @@ found: * if an unrecoverable error was encountered. */ -_X_EXPORT int +int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, @@ -1204,20 +1200,17 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, PixmapFormatRec *BankFormat; ClockRangePtr cp; ClockRangesPtr storeClockRanges; - double targetRefresh = 0.0; int numTimings = 0; range hsync[MAX_HSYNC]; range vrefresh[MAX_VREFRESH]; Bool inferred_virtual = FALSE; -#ifdef DEBUG - ErrorF("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n", + DebugF("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n", scrp, availModes, modeNames, clockRanges, linePitches, minPitch, maxPitch, pitchInc, minHeight, maxHeight, virtualX, virtualY, apertureSize, strategy ); -#endif /* Some sanity checking */ if (scrp == NULL || scrp->name == NULL || !scrp->monitor || @@ -1466,26 +1459,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, } /* - * Go through the mode pool and see if any modes match the target - * refresh rate, (if specified). If no modes match, abandon the target. - */ - targetRefresh = xf86SetRealOption(scrp->options, - "TargetRefresh", 0.0); - if (targetRefresh > 0.0) { - for (p = scrp->modePool; p != NULL; p = p->next) { - if (xf86ModeVRefresh(p) > targetRefresh * (1.0 - SYNC_TOLERANCE)) - break; - } - if (!p) - targetRefresh = 0.0; - } - - if (targetRefresh > 0.0) { - xf86DrvMsg(scrp->scrnIndex, X_CONFIG, - "Target refresh rate is %.1f Hz\n", targetRefresh); - } - - /* * Allocate one entry in scrp->modes for each named mode. */ while (scrp->modes) @@ -1558,14 +1531,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, ((double)q->HTotal / (double)q->HDisplay) < 1.15) continue; - /* - * If there is a target refresh rate, skip modes that - * don't match up. - */ - if (xf86ModeVRefresh(q) < - (1.0 - SYNC_TOLERANCE) * targetRefresh) - continue; - if (modeSize < (q->HDisplay * q->VDisplay)) { r = q; modeSize = q->HDisplay * q->VDisplay; @@ -1771,7 +1736,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, * */ -_X_EXPORT void +void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) { /* Catch the easy/insane cases */ @@ -1803,7 +1768,7 @@ xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) * invalid. */ -_X_EXPORT void +void xf86PruneDriverModes(ScrnInfoPtr scrp) { DisplayModePtr first, p, n; @@ -1843,7 +1808,7 @@ xf86PruneDriverModes(ScrnInfoPtr scrp) * parameters for each mode. The initialisation includes adjustments * for interlaced and double scan modes. */ -_X_EXPORT void +void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) { DisplayModePtr p; @@ -1860,67 +1825,18 @@ xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) do { xf86SetModeCrtc(p, adjustFlags); -#ifdef DEBUG - ErrorF("%sMode %s: %d (%d) %d %d (%d) %d %d (%d) %d %d (%d) %d\n", + DebugF("%sMode %s: %d (%d) %d %d (%d) %d %d (%d) %d %d (%d) %d\n", (p->type & M_T_DEFAULT) ? "Default " : "", p->name, p->CrtcHDisplay, p->CrtcHBlankStart, p->CrtcHSyncStart, p->CrtcHSyncEnd, p->CrtcHBlankEnd, p->CrtcHTotal, p->CrtcVDisplay, p->CrtcVBlankStart, p->CrtcVSyncStart, p->CrtcVSyncEnd, p->CrtcVBlankEnd, p->CrtcVTotal); -#endif p = p->next; } while (p != NULL && p != scrp->modes); } - -#if 0 -static void -add(char **p, char *new) -{ - *p = xnfrealloc(*p, strlen(*p) + strlen(new) + 2); - strcat(*p, " "); - strcat(*p, new); -} - -_X_EXPORT void -xf86PrintModeline(int scrnIndex,DisplayModePtr mode) -{ - char tmp[256]; - char *flags = xnfcalloc(1, 1); - - if (mode->HSkew) { - snprintf(tmp, 256, "hskew %i", mode->HSkew); - add(&flags, tmp); - } - if (mode->VScan) { - snprintf(tmp, 256, "vscan %i", mode->VScan); - add(&flags, tmp); - } - if (mode->Flags & V_INTERLACE) add(&flags, "interlace"); - if (mode->Flags & V_CSYNC) add(&flags, "composite"); - if (mode->Flags & V_DBLSCAN) add(&flags, "doublescan"); - if (mode->Flags & V_BCAST) add(&flags, "bcast"); - if (mode->Flags & V_PHSYNC) add(&flags, "+hsync"); - if (mode->Flags & V_NHSYNC) add(&flags, "-hsync"); - if (mode->Flags & V_PVSYNC) add(&flags, "+vsync"); - if (mode->Flags & V_NVSYNC) add(&flags, "-vsync"); - if (mode->Flags & V_PCSYNC) add(&flags, "+csync"); - if (mode->Flags & V_NCSYNC) add(&flags, "-csync"); -#if 0 - if (mode->Flags & V_CLKDIV2) add(&flags, "vclk/2"); -#endif - xf86DrvMsgVerb(scrnIndex, X_INFO, 3, - "Modeline \"%s\" %6.2f %i %i %i %i %i %i %i %i%s\n", - mode->name, mode->Clock/1000., mode->HDisplay, - mode->HSyncStart, mode->HSyncEnd, mode->HTotal, - mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, - mode->VTotal, flags); - xfree(flags); -} -#endif - -_X_EXPORT void +void xf86PrintModes(ScrnInfoPtr scrp) { DisplayModePtr p; @@ -1988,29 +1904,3 @@ xf86PrintModes(ScrnInfoPtr scrp) p = p->next; } while (p != NULL && p != scrp->modes); } - -#if 0 -/** - * Adds the new mode into the mode list, and returns the new list - * - * \param modes doubly-linked mode list. - */ -_X_EXPORT DisplayModePtr -xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) -{ - if (modes == NULL) - return new; - - if (new) { - DisplayModePtr mode = modes; - - while (mode->next) - mode = mode->next; - - mode->next = new; - new->prev = mode; - } - - return modes; -} -#endif diff --git a/xorg-server/hw/xfree86/common/xf86Module.h b/xorg-server/hw/xfree86/common/xf86Module.h index 81011e163..28da22b40 100644 --- a/xorg-server/hw/xfree86/common/xf86Module.h +++ b/xorg-server/hw/xfree86/common/xf86Module.h @@ -82,8 +82,8 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(5, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(4, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(6, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(7, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(2, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) @@ -181,34 +181,22 @@ typedef struct { const char ** initDependencies; } ExtensionModule; -extern ExtensionModule *ExtensionModuleList; +extern _X_EXPORT ExtensionModule *ExtensionModuleList; /* Prototypes for Loader functions that are exported to modules */ -#ifndef IN_LOADER -/* Prototypes with opaque pointers for use by modules */ -pointer LoadSubModule(pointer, const char *, const char **, +extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); -pointer LoadSubModuleLocal(pointer, const char *, const char **, - const char **, pointer, const XF86ModReqInfo *, - int *, int *); -void UnloadSubModule(pointer); -void UnloadModule (pointer); -#endif -pointer LoaderSymbol(const char *); -pointer LoaderSymbolLocal(pointer module, const char *); -char **LoaderListDirs(const char **, const char **); -void LoaderFreeDirList(char **); -void LoaderErrorMsg(const char *, const char *, int, int); -void LoadExtension(ExtensionModule *, Bool); -void LoaderRefSymLists(const char **, ...); -void LoaderRefSymbols(const char *, ...); -void LoaderReqSymLists(const char **, ...); -void LoaderReqSymbols(const char *, ...); -int LoaderCheckUnresolved(int); -void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); -Bool LoaderShouldIgnoreABI(void); -int LoaderGetABIVersion(const char *abiclass); +extern _X_EXPORT void UnloadSubModule(pointer); +extern _X_EXPORT void UnloadModule (pointer); +extern _X_EXPORT pointer LoaderSymbol(const char *); +extern _X_EXPORT char **LoaderListDirs(const char **, const char **); +extern _X_EXPORT void LoaderFreeDirList(char **); +extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); +extern _X_EXPORT void LoadExtension(ExtensionModule *, Bool); +extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, int *teeny); +extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); +extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); typedef void (*ModuleTearDownProc)(pointer); diff --git a/xorg-server/hw/xfree86/common/xf86Opt.h b/xorg-server/hw/xfree86/common/xf86Opt.h index dbb98da03..ce3d76724 100644 --- a/xorg-server/hw/xfree86/common/xf86Opt.h +++ b/xorg-server/hw/xfree86/common/xf86Opt.h @@ -68,46 +68,46 @@ typedef struct { Bool found; } OptionInfoRec, *OptionInfoPtr; -int xf86SetIntOption(pointer optlist, const char *name, int deflt); -double xf86SetRealOption(pointer optlist, const char *name, double deflt); -char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); -int xf86SetBoolOption(pointer list, const char *name, int deflt ); -int xf86CheckIntOption(pointer optlist, const char *name, int deflt); -double xf86CheckRealOption(pointer optlist, const char *name, double deflt); -char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); -int xf86CheckBoolOption(pointer list, const char *name, int deflt ); -pointer xf86AddNewOption(pointer head, const char *name, const char *val ); -pointer xf86NewOption(char *name, char *value ); -pointer xf86NextOption(pointer list ); -pointer xf86OptionListCreate(const char **options, int count, int used); -pointer xf86OptionListMerge(pointer head, pointer tail); -void xf86OptionListFree(pointer opt); -char *xf86OptionName(pointer opt); -char *xf86OptionValue(pointer opt); -void xf86OptionListReport(pointer parm); -pointer xf86FindOption(pointer options, const char *name); -char *xf86FindOptionValue(pointer options, const char *name); -void xf86MarkOptionUsed(pointer option); -void xf86MarkOptionUsedByName(pointer options, const char *name); -Bool xf86CheckIfOptionUsed(pointer option); -Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); -void xf86ShowUnusedOptions(int scrnIndex, pointer options); -void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); -OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); -const char *xf86TokenToOptName(const OptionInfoRec *table, int token); -Bool xf86IsOptionSet(const OptionInfoRec *table, int token); -char *xf86GetOptValString(const OptionInfoRec *table, int token); -Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); -Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); -Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); -Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, +extern _X_EXPORT int xf86SetIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86SetRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86SetBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT int xf86CheckIntOption(pointer optlist, const char *name, int deflt); +extern _X_EXPORT double xf86CheckRealOption(pointer optlist, const char *name, double deflt); +extern _X_EXPORT char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); +extern _X_EXPORT int xf86CheckBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT pointer xf86AddNewOption(pointer head, const char *name, const char *val ); +extern _X_EXPORT pointer xf86NewOption(char *name, char *value ); +extern _X_EXPORT pointer xf86NextOption(pointer list ); +extern _X_EXPORT pointer xf86OptionListCreate(const char **options, int count, int used); +extern _X_EXPORT pointer xf86OptionListMerge(pointer head, pointer tail); +extern _X_EXPORT void xf86OptionListFree(pointer opt); +extern _X_EXPORT char *xf86OptionName(pointer opt); +extern _X_EXPORT char *xf86OptionValue(pointer opt); +extern _X_EXPORT void xf86OptionListReport(pointer parm); +extern _X_EXPORT pointer xf86FindOption(pointer options, const char *name); +extern _X_EXPORT char *xf86FindOptionValue(pointer options, const char *name); +extern _X_EXPORT void xf86MarkOptionUsed(pointer option); +extern _X_EXPORT void xf86MarkOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT Bool xf86CheckIfOptionUsed(pointer option); +extern _X_EXPORT Bool xf86CheckIfOptionUsedByName(pointer options, const char *name); +extern _X_EXPORT void xf86ShowUnusedOptions(int scrnIndex, pointer options); +extern _X_EXPORT void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo); +extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token); +extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec *table, int token); +extern _X_EXPORT char *xf86GetOptValString(const OptionInfoRec *table, int token); +extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value); +extern _X_EXPORT Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value); +extern _X_EXPORT Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value); +extern _X_EXPORT Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value); -Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); -Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); -int xf86NameCmp(const char *s1, const char *s2); -char *xf86NormalizeName(const char *s); -pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); -pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); -pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); -pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); +extern _X_EXPORT Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); +extern _X_EXPORT Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); +extern _X_EXPORT int xf86NameCmp(const char *s1, const char *s2); +extern _X_EXPORT char *xf86NormalizeName(const char *s); +extern _X_EXPORT pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); +extern _X_EXPORT pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); +extern _X_EXPORT pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); +extern _X_EXPORT pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); #endif diff --git a/xorg-server/hw/xfree86/common/xf86Option.c b/xorg-server/hw/xfree86/common/xf86Option.c index 50a7d9cb9..ad8d1c426 100644 --- a/xorg-server/hw/xfree86/common/xf86Option.c +++ b/xorg-server/hw/xfree86/common/xf86Option.c @@ -64,7 +64,7 @@ static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, * extraOpts, display, confScreen, monitor, device */ -_X_EXPORT void +void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) { XF86OptionPtr tmp; @@ -131,7 +131,7 @@ xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts) * pInfo->conf_idev->commonOptions, defaultOpts */ -_X_EXPORT void +void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts) { @@ -224,28 +224,28 @@ LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed) /* These xf86Set* functions are intended for use by non-screen specific code */ -_X_EXPORT int +int xf86SetIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, TRUE); } -_X_EXPORT double +double xf86SetRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, TRUE); } -_X_EXPORT char * +char * xf86SetStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, TRUE); } -_X_EXPORT int +int xf86SetBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, TRUE); @@ -255,28 +255,28 @@ xf86SetBoolOption(pointer optlist, const char *name, int deflt) * These are like the Set*Option functions, but they don't mark the options * as used. */ -_X_EXPORT int +int xf86CheckIntOption(pointer optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, FALSE); } -_X_EXPORT double +double xf86CheckRealOption(pointer optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, FALSE); } -_X_EXPORT char * +char * xf86CheckStrOption(pointer optlist, const char *name, char *deflt) { return LookupStrOption(optlist, name, deflt, FALSE); } -_X_EXPORT int +int xf86CheckBoolOption(pointer optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, FALSE); @@ -286,7 +286,7 @@ xf86CheckBoolOption(pointer optlist, const char *name, int deflt) * addNewOption() has the required property of replacing the option value * if the option is already present. */ -_X_EXPORT pointer +pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val) { char tmp[16]; @@ -294,7 +294,7 @@ xf86ReplaceIntOption(pointer optlist, const char *name, const int val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val) { char tmp[32]; @@ -302,19 +302,19 @@ xf86ReplaceRealOption(pointer optlist, const char *name, const double val) return xf86AddNewOption(optlist,name,tmp); } -_X_EXPORT pointer +pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val) { return xf86AddNewOption(optlist,name,val?"True":"False"); } -_X_EXPORT pointer +pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val) { return xf86AddNewOption(optlist,name,val); } -_X_EXPORT pointer +pointer xf86AddNewOption(pointer head, const char *name, const char *val) { /* XXX These should actually be allocated in the parser library. */ @@ -325,50 +325,50 @@ xf86AddNewOption(pointer head, const char *name, const char *val) } -_X_EXPORT pointer +pointer xf86NewOption(char *name, char *value) { return xf86newOption(name, value); } -_X_EXPORT pointer +pointer xf86NextOption(pointer list) { return xf86nextOption(list); } -_X_EXPORT pointer +pointer xf86OptionListCreate(const char **options, int count, int used) { return xf86optionListCreate(options, count, used); } -_X_EXPORT pointer +pointer xf86OptionListMerge(pointer head, pointer tail) { return xf86optionListMerge(head, tail); } -_X_EXPORT void +void xf86OptionListFree(pointer opt) { xf86optionListFree(opt); } -_X_EXPORT char * +char * xf86OptionName(pointer opt) { return xf86optionName(opt); } -_X_EXPORT char * +char * xf86OptionValue(pointer opt) { return xf86optionValue(opt); } -_X_EXPORT void +void xf86OptionListReport(pointer parm) { XF86OptionPtr opts = parm; @@ -385,21 +385,21 @@ xf86OptionListReport(pointer parm) /* End of XInput-caused section */ -_X_EXPORT pointer +pointer xf86FindOption(pointer options, const char *name) { return xf86findOption(options, name); } -_X_EXPORT char * +char * xf86FindOptionValue(pointer options, const char *name) { return xf86findOptionValue(options, name); } -_X_EXPORT void +void xf86MarkOptionUsed(pointer option) { if (option != NULL) @@ -407,7 +407,7 @@ xf86MarkOptionUsed(pointer option) } -_X_EXPORT void +void xf86MarkOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -417,7 +417,7 @@ xf86MarkOptionUsedByName(pointer options, const char *name) opt->opt_used = TRUE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsed(pointer option) { if (option != NULL) @@ -426,7 +426,7 @@ xf86CheckIfOptionUsed(pointer option) return FALSE; } -_X_EXPORT Bool +Bool xf86CheckIfOptionUsedByName(pointer options, const char *name) { XF86OptionPtr opt; @@ -438,7 +438,7 @@ xf86CheckIfOptionUsedByName(pointer options, const char *name) return FALSE; } -_X_EXPORT void +void xf86ShowUnusedOptions(int scrnIndex, pointer options) { XF86OptionPtr opt = options; @@ -661,7 +661,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, } -_X_EXPORT void +void xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) { OptionInfoPtr p; @@ -672,7 +672,7 @@ xf86ProcessOptions(int scrnIndex, pointer options, OptionInfoPtr optinfo) } -_X_EXPORT OptionInfoPtr +OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token) { const OptionInfoRec *p, *match = NULL, *set = NULL; @@ -699,7 +699,7 @@ xf86TokenToOptinfo(const OptionInfoRec *table, int token) } -_X_EXPORT const char * +const char * xf86TokenToOptName(const OptionInfoRec *table, int token) { const OptionInfoRec *p; @@ -709,7 +709,7 @@ xf86TokenToOptName(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86IsOptionSet(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -719,7 +719,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token) } -_X_EXPORT char * +char * xf86GetOptValString(const OptionInfoRec *table, int token) { OptionInfoPtr p; @@ -732,7 +732,7 @@ xf86GetOptValString(const OptionInfoRec *table, int token) } -_X_EXPORT Bool +Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) { OptionInfoPtr p; @@ -746,7 +746,7 @@ xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value) } -_X_EXPORT Bool +Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) { OptionInfoPtr p; @@ -760,7 +760,7 @@ xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value) } -_X_EXPORT Bool +Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) { OptionInfoPtr p; @@ -774,7 +774,7 @@ xf86GetOptValReal(const OptionInfoRec *table, int token, double *value) } -_X_EXPORT Bool +Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value) { @@ -822,7 +822,7 @@ xf86GetOptValFreq(const OptionInfoRec *table, int token, } -_X_EXPORT Bool +Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) { OptionInfoPtr p; @@ -836,7 +836,7 @@ xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value) } -_X_EXPORT Bool +Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) { OptionInfoPtr p; @@ -849,7 +849,7 @@ xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def) } -_X_EXPORT int +int xf86NameCmp(const char *s1, const char *s2) { return xf86nameCompare(s1, s2); diff --git a/xorg-server/hw/xfree86/common/xf86PM.c b/xorg-server/hw/xfree86/common/xf86PM.c index 7c8320dee..7af89b5b4 100644 --- a/xorg-server/hw/xfree86/common/xf86PM.c +++ b/xorg-server/hw/xfree86/common/xf86PM.c @@ -70,18 +70,16 @@ suspend (pmEvent event, Bool undo) xf86inSuspend = TRUE; for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, FALSE); } pInfo = xf86InputDevs; while (pInfo) { - DisableDevice(pInfo->dev); + DisableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); else { @@ -90,7 +88,7 @@ suspend (pmEvent event, Bool undo) } } xf86AccessLeave(); - xf86AccessLeaveState(); + } static void @@ -102,7 +100,6 @@ resume(pmEvent event, Bool undo) xf86AccessEnter(); xf86EnterServerState(SETUP); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(i,event,undo); else { @@ -112,14 +109,13 @@ resume(pmEvent event, Bool undo) } xf86EnterServerState(OPERATING); for (i = 0; i < xf86NumScreens; i++) { - xf86EnableAccess(xf86Screens[i]); if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (i, TRUE); } dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { - EnableDevice(pInfo->dev); + EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } xf86inSuspend = FALSE; @@ -167,7 +163,6 @@ DoApmEvent(pmEvent event, Bool undo) if (xf86Screens[i]->PMEvent) { if (!setup) xf86EnterServerState(SETUP); setup = 1; - xf86EnableAccess(xf86Screens[i]); xf86Screens[i]->PMEvent(i,event,undo); } } diff --git a/xorg-server/hw/xfree86/common/xf86Priv.h b/xorg-server/hw/xfree86/common/xf86Priv.h index 41ca8f531..3bb15718c 100644 --- a/xorg-server/hw/xfree86/common/xf86Priv.h +++ b/xorg-server/hw/xfree86/common/xf86Priv.h @@ -45,65 +45,55 @@ * Parameters set ONLY from the command line options * The global state of these things is held in xf86InfoRec (when appropriate). */ -extern const char *xf86ConfigFile; -extern Bool xf86AllowMouseOpenFail; +extern _X_EXPORT const char *xf86ConfigFile; +extern _X_EXPORT Bool xf86AllowMouseOpenFail; #ifdef XF86VIDMODE -extern Bool xf86VidModeDisabled; -extern Bool xf86VidModeAllowNonLocal; +extern _X_EXPORT Bool xf86VidModeDisabled; +extern _X_EXPORT Bool xf86VidModeAllowNonLocal; #endif -extern Bool xf86fpFlag; -extern Bool xf86sFlag; -extern Bool xf86bsEnableFlag; -extern Bool xf86bsDisableFlag; -extern Bool xf86silkenMouseDisableFlag; -extern Bool xf86xkbdirFlag; -extern Bool xf86acpiDisableFlag; -extern char *xf86LayoutName; -extern char *xf86ScreenName; -extern char *xf86PointerName; -extern char *xf86KeyboardName; -#ifdef KEEPBPP -extern int xf86Bpp; +extern _X_EXPORT Bool xf86fpFlag; +extern _X_EXPORT Bool xf86sFlag; +extern _X_EXPORT Bool xf86bsEnableFlag; +extern _X_EXPORT Bool xf86bsDisableFlag; +extern _X_EXPORT Bool xf86silkenMouseDisableFlag; +extern _X_EXPORT Bool xf86xkbdirFlag; +#ifdef HAVE_ACPI +extern _X_EXPORT Bool xf86acpiDisableFlag; #endif -extern int xf86FbBpp; -extern int xf86Depth; -extern Pix24Flags xf86Pix24; -extern rgb xf86Weight; -extern Bool xf86FlipPixels; -extern Gamma xf86Gamma; -extern char *xf86ServerName; -extern struct pci_slot_match xf86IsolateDevice; +extern _X_EXPORT char *xf86LayoutName; +extern _X_EXPORT char *xf86ScreenName; +extern _X_EXPORT char *xf86PointerName; +extern _X_EXPORT char *xf86KeyboardName; +extern _X_EXPORT int xf86FbBpp; +extern _X_EXPORT int xf86Depth; +extern _X_EXPORT Pix24Flags xf86Pix24; +extern _X_EXPORT rgb xf86Weight; +extern _X_EXPORT Bool xf86FlipPixels; +extern _X_EXPORT Gamma xf86Gamma; +extern _X_EXPORT char *xf86ServerName; +extern _X_EXPORT struct pci_slot_match xf86IsolateDevice; /* Other parameters */ -extern xf86InfoRec xf86Info; -extern const char *xf86InputDeviceList; -extern const char *xf86ModulePath; -extern MessageType xf86ModPathFrom; -extern const char *xf86LogFile; -extern MessageType xf86LogFileFrom; -extern Bool xf86LogFileWasOpened; -extern serverLayoutRec xf86ConfigLayout; -extern Pix24Flags xf86ConfigPix24; - -extern unsigned short xf86MouseCflags[]; -extern Bool xf86SupportedMouseTypes[]; -extern int xf86NumMouseTypes; - -extern DriverPtr *xf86DriverList; -extern int xf86NumDrivers; -extern Bool xf86Resetting; -extern Bool xf86Initialising; -extern int xf86NumScreens; -extern xf86CurrentAccessRec xf86CurrentAccess; -extern const char *xf86VisualNames[]; -extern int xf86Verbose; /* verbosity level */ -extern int xf86LogVerbose; /* log file verbosity level */ -extern Bool xf86ProbeOnly; -extern Bool xf86DoProbe; -extern Bool xorgHWAccess; - -extern RootWinPropPtr *xf86RegisteredPropertiesTable; +extern _X_EXPORT xf86InfoRec xf86Info; +extern _X_EXPORT const char *xf86ModulePath; +extern _X_EXPORT MessageType xf86ModPathFrom; +extern _X_EXPORT const char *xf86LogFile; +extern _X_EXPORT MessageType xf86LogFileFrom; +extern _X_EXPORT Bool xf86LogFileWasOpened; +extern _X_EXPORT serverLayoutRec xf86ConfigLayout; + +extern _X_EXPORT DriverPtr *xf86DriverList; +extern _X_EXPORT int xf86NumDrivers; +extern _X_EXPORT Bool xf86Resetting; +extern _X_EXPORT Bool xf86Initialising; +extern _X_EXPORT int xf86NumScreens; +extern _X_EXPORT const char *xf86VisualNames[]; +extern _X_EXPORT int xf86Verbose; /* verbosity level */ +extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ +extern _X_EXPORT Bool xorgHWAccess; + +extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable; #ifndef DEFAULT_VERBOSE #define DEFAULT_VERBOSE 0 @@ -115,68 +105,59 @@ extern RootWinPropPtr *xf86RegisteredPropertiesTable; #define DEFAULT_DPI 96 #endif -#define DEFAULT_UNRESOLVED TRUE -#define DEFAULT_BEST_REFRESH FALSE - /* Function Prototypes */ #ifndef _NO_XF86_PROTOTYPES /* xf86Bus.c */ -void xf86BusProbe(void); -void xf86ChangeBusIndex(int oldIndex, int newIndex); -void xf86AccessInit(void); -void xf86AccessEnter(void); -void xf86AccessLeave(void); -void xf86EntityInit(void); -void xf86EntityEnter(void); -void xf86EntityLeave(void); -void xf86AccessLeaveState(void); - -void xf86FindPrimaryDevice(void); +extern _X_EXPORT void xf86BusProbe(void); +extern _X_EXPORT void xf86AccessInit(void); +extern _X_EXPORT void xf86AccessEnter(void); +extern _X_EXPORT void xf86AccessLeave(void); +extern _X_EXPORT void xf86EntityInit(void); + +extern _X_EXPORT void xf86FindPrimaryDevice(void); /* new RAC */ -void xf86ResourceBrokerInit(void); -void xf86PostProbe(void); -void xf86ClearEntityListForScreen(int scrnIndex); -void xf86AddDevToEntity(int entityIndex, GDevPtr dev); -extern void xf86PostPreInit(void); -extern void xf86PostScreenInit(void); +extern _X_EXPORT void xf86PostProbe(void); +extern _X_EXPORT void xf86ClearEntityListForScreen(int scrnIndex); +extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); +extern _X_EXPORT void xf86PostScreenInit(void); /* xf86Config.c */ -Bool xf86PathIsSafe(const char *path); +extern _X_EXPORT Bool xf86PathIsSafe(const char *path); /* xf86DefaultModes */ -extern const DisplayModeRec xf86DefaultModes[]; -extern const int xf86NumDefaultModes; +extern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; +extern _X_EXPORT const int xf86NumDefaultModes; /* xf86Configure.c */ -void DoConfigure(void); +extern _X_EXPORT void DoConfigure(void); /* xf86ShowOpts.c */ -void DoShowOptions(void); +extern _X_EXPORT void DoShowOptions(void); /* xf86Events.c */ -void xf86Wakeup(pointer blockData, int err, pointer pReadmask); -void xf86SigHandler(int signo); -void xf86HandlePMEvents(int fd, pointer data); -extern int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); -extern pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); +extern _X_EXPORT void xf86Wakeup(pointer blockData, int err, pointer pReadmask); +extern _X_HIDDEN int xf86SigWrapper(int signo); +extern _X_EXPORT void xf86HandlePMEvents(int fd, pointer data); +extern _X_EXPORT int (*xf86PMGetEventFromOs)(int fd,pmEvent *events,int num); +extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs)(int fd,pmEvent event); /* xf86Helper.c */ -void xf86LogInit(void); -void xf86CloseLog(void); +extern _X_EXPORT void xf86LogInit(void); +extern _X_EXPORT void xf86CloseLog(void); /* xf86Init.c */ -Bool xf86LoadModules(char **list, pointer *optlist); -int xf86SetVerbosity(int verb); -int xf86SetLogVerbosity(int verb); -Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); +extern _X_EXPORT Bool xf86LoadModules(char **list, pointer *optlist); +extern _X_EXPORT int xf86SetVerbosity(int verb); +extern _X_EXPORT int xf86SetLogVerbosity(int verb); +extern _X_EXPORT Bool xf86CallDriverProbe( struct _DriverRec * drv, Bool detect_only ); /* xf86Xinput.c */ -extern EventList *xf86Events; +extern _X_EXPORT EventList *xf86Events; #endif /* _NO_XF86_PROTOTYPES */ diff --git a/xorg-server/hw/xfree86/common/xf86Privstr.h b/xorg-server/hw/xfree86/common/xf86Privstr.h index 6a7a6dc86..26f822dc4 100644 --- a/xorg-server/hw/xfree86/common/xf86Privstr.h +++ b/xorg-server/hw/xfree86/common/xf86Privstr.h @@ -34,7 +34,6 @@ #ifndef _XF86PRIVSTR_H #define _XF86PRIVSTR_H -#include "xf86Pci.h" #include "xf86str.h" typedef enum { @@ -44,12 +43,6 @@ typedef enum { } Log; typedef enum { - SKNever, - SKWhenNeeded, - SKAlways -} SpecialKeysInDDX; - -typedef enum { XF86_GlxVisualsMinimal, XF86_GlxVisualsTypical, XF86_GlxVisualsAll, @@ -65,11 +58,13 @@ typedef struct { int consoleFd; int vtno; Bool vtSysreq; - SpecialKeysInDDX ddxSpecialKeys; /* event handler part */ int lastEventTime; Bool vtRequestsPending; +#ifdef sun + int vtPendingNum; +#endif Bool dontVTSwitch; Bool dontZap; Bool dontZoom; diff --git a/xorg-server/hw/xfree86/common/xf86RandR.c b/xorg-server/hw/xfree86/common/xf86RandR.c index de2f78c5f..02dcc34b4 100644 --- a/xorg-server/hw/xfree86/common/xf86RandR.c +++ b/xorg-server/hw/xfree86/common/xf86RandR.c @@ -30,6 +30,7 @@ #include "mibank.h" #include "globals.h" #include "xf86.h" +#include "xf86str.h" #include "xf86Priv.h" #include "xf86DDC.h" #include "mipointer.h" @@ -364,7 +365,7 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) return (*pScreen->CloseScreen) (index, pScreen); } -_X_EXPORT Rotation +Rotation xf86GetRotation(ScreenPtr pScreen) { if (xf86RandRKey == NULL) @@ -374,7 +375,7 @@ xf86GetRotation(ScreenPtr pScreen) } /* Function to change RandR's idea of the virtual screen size */ -_X_EXPORT Bool +Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode) diff --git a/xorg-server/hw/xfree86/common/xf86ShowOpts.c b/xorg-server/hw/xfree86/common/xf86ShowOpts.c index b8efa73c2..04a9a8b1c 100644 --- a/xorg-server/hw/xfree86/common/xf86ShowOpts.c +++ b/xorg-server/hw/xfree86/common/xf86ShowOpts.c @@ -45,7 +45,6 @@ #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" -#include "vbe.h" #include "xf86DDC.h" #if defined(__sparc__) && !defined(__OpenBSD__) #include "xf86Bus.h" @@ -104,10 +103,10 @@ void DoShowOptions (void) { initData = LoaderSymbol (pSymbol); if (initData) { XF86ModuleVersionInfo *vers = initData->vers; + OptionInfoPtr p; ErrorF ("Driver[%d]:%s[%s] {\n", i,xf86DriverList[i]->driverName,vers->vendor ); - OptionInfoPtr p; for (p = pOption; p->name != NULL; p++) { const char *opttype = optionTypeToSting(p->type); char *optname = xalloc(strlen(p->name) + 2 + 1); diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.c b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c new file mode 100644 index 000000000..c38973933 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.c @@ -0,0 +1,1157 @@ +/* + * This code was stolen from RAC and adapted to control the legacy vga + * interface. + * + * + * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#include "xorg-config.h" + +#include "xf86VGAarbiter.h" + +#ifdef HAVE_PCI_DEVICE_VGAARB_INIT +#include "xf86VGAarbiterPriv.h" +#include "xf86Bus.h" +#include "pciaccess.h" + +#ifdef DEBUG +#error "no, really, you dont want to do this" +#define DPRINT_S(x,y) ErrorF(x ": %i\n",y); +#define DPRINT(x) ErrorF(x "\n"); +#else +#define DPRINT_S(x,y) +#define DPRINT(x) +#endif + +static GCFuncs VGAarbiterGCFuncs = { + VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC, + VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip, + VGAarbiterCopyClip +}; + +static GCOps VGAarbiterGCOps = { + VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage, + VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint, + VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle, + VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect, + VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16, + VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt, + VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels, + {NULL} /* devPrivate */ +}; + +static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = { + VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor, + VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor, + VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup +}; + +static int VGAarbiterKeyIndex; +static DevPrivateKey VGAarbiterScreenKey = &VGAarbiterKeyIndex; +static int VGAarbiterGCIndex; +static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex; + +static int vga_no_arb = 0; +void +xf86VGAarbiterInit(void) +{ + if (pci_device_vgaarb_init() != 0) { + vga_no_arb = 1; + xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); + } +} + +void +xf86VGAarbiterFini(void) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_fini(); +} + +void +xf86VGAarbiterLock(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_set_target(pScrn->vgaDev); + pci_device_vgaarb_lock(); +} + +void +xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_unlock(); +} + +Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) +{ + int vga_count; + int rsrc_decodes; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + + if (vga_no_arb) + return TRUE; + + pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes); + if (vga_count > 1) { + if (rsrc_decodes) { + return FALSE; + } + } + return TRUE; +} + +void +xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) +{ + struct pci_device *dev; + EntityPtr pEnt; + + if (vga_no_arb) + return; + + pEnt = xf86Entities[pScrn->entityList[0]]; + if (pEnt->bus.type != BUS_PCI) + return; + + dev = pEnt->bus.id.pci; + pScrn->vgaDev = dev; +} + +void +xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) +{ + if (vga_no_arb) + return; + pci_device_vgaarb_decodes(VGA_ARB_RSRC_LEGACY_MEM | VGA_ARB_RSRC_LEGACY_IO); +} + +Bool +xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn; + VGAarbiterScreenPtr pScreenPriv; + miPointerScreenPtr PointPriv; +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + if (vga_no_arb) + return FALSE; + + pScrn = xf86Screens[pScreen->myNum]; + PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); + + DPRINT_S("VGAarbiterWrapFunctions",pScreen->myNum); + + if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) + return FALSE; + + if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); + + WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); + WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); + WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); + WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); + WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); + WRAP_SCREEN(GetImage, VGAarbiterGetImage); + WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); + WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); + WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); + WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); + WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); + WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); + WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); + WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); + WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); + WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); + WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); +#ifdef RENDER + WRAP_PICT(Composite,VGAarbiterComposite); + WRAP_PICT(Glyphs,VGAarbiterGlyphs); + WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); +#endif + WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); + WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); + WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); + WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); + WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); + WRAP_SPRITE; + return TRUE; +} + +/* Screen funcs */ +static Bool +VGAarbiterCloseScreen (int i, ScreenPtr pScreen) +{ + Bool val; + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, miPointerScreenKey); +#ifdef RENDER + PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); +#endif + + DPRINT_S("VGAarbiterCloseScreen",pScreen->myNum); + UNWRAP_SCREEN(CreateGC); + UNWRAP_SCREEN(CloseScreen); + UNWRAP_SCREEN(GetImage); + UNWRAP_SCREEN(GetSpans); + UNWRAP_SCREEN(SourceValidate); + UNWRAP_SCREEN(CopyWindow); + UNWRAP_SCREEN(ClearToBackground); + UNWRAP_SCREEN(SaveScreen); + UNWRAP_SCREEN(StoreColors); + UNWRAP_SCREEN(DisplayCursor); + UNWRAP_SCREEN(RealizeCursor); + UNWRAP_SCREEN(UnrealizeCursor); + UNWRAP_SCREEN(RecolorCursor); + UNWRAP_SCREEN(SetCursorPosition); +#ifdef RENDER + UNWRAP_PICT(Composite); + UNWRAP_PICT(Glyphs); + UNWRAP_PICT(CompositeRects); +#endif + UNWRAP_SCREEN_INFO(AdjustFrame); + UNWRAP_SCREEN_INFO(SwitchMode); + UNWRAP_SCREEN_INFO(EnterVT); + UNWRAP_SCREEN_INFO(LeaveVT); + UNWRAP_SCREEN_INFO(FreeScreen); + UNWRAP_SPRITE; + + xfree ((pointer) pScreenPriv); + xf86VGAarbiterLock(xf86Screens[i]); + val = (*pScreen->CloseScreen) (i, pScreen); + xf86VGAarbiterUnlock(xf86Screens[i]); + return val; +} + +static void +VGAarbiterBlockHandler(int i, + pointer blockData, pointer pTimeout, pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[i]; + SCREEN_PROLOG(BlockHandler); + VGAGet(); + pScreen->BlockHandler(i, blockData, pTimeout, pReadmask); + VGAPut(); + SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler); +} + +static void +VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[i]; + SCREEN_PROLOG(WakeupHandler); + VGAGet(); + pScreen->WakeupHandler(i, blockData, result, pReadmask); + VGAPut(); + SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler); +} + +static void +VGAarbiterGetImage ( + DrawablePtr pDrawable, + int sx, int sy, int w, int h, + unsigned int format, + unsigned long planemask, + char *pdstLine + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("VGAarbiterGetImage",pScreen->myNum); + SCREEN_PROLOG(GetImage); +// if (xf86Screens[pScreen->myNum]->vtSema) { + VGAGet(); +// } + (*pScreen->GetImage) (pDrawable, sx, sy, w, h, + format, planemask, pdstLine); + VGAPut(); + SCREEN_EPILOG (GetImage, VGAarbiterGetImage); +} + +static void +VGAarbiterGetSpans ( + DrawablePtr pDrawable, + int wMax, + DDXPointPtr ppt, + int *pwidth, + int nspans, + char *pdstStart + ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + + DPRINT_S("VGAarbiterGetSpans",pScreen->myNum); + SCREEN_PROLOG (GetSpans); + VGAGet(); + (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); + VGAPut(); + SCREEN_EPILOG (GetSpans, VGAarbiterGetSpans); +} + +static void +VGAarbiterSourceValidate ( + DrawablePtr pDrawable, + int x, int y, int width, int height ) +{ + ScreenPtr pScreen = pDrawable->pScreen; + DPRINT_S("VGAarbiterSourceValidate",pScreen->myNum); + SCREEN_PROLOG (SourceValidate); + VGAGet(); + if (pScreen->SourceValidate) + (*pScreen->SourceValidate) (pDrawable, x, y, width, height); + VGAPut(); + SCREEN_EPILOG (SourceValidate, VGAarbiterSourceValidate); +} + +static void +VGAarbiterCopyWindow( + WindowPtr pWin, + DDXPointRec ptOldOrg, + RegionPtr prgnSrc ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("VGAarbiterCopyWindow",pScreen->myNum); + SCREEN_PROLOG (CopyWindow); + VGAGet(); + (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); + VGAPut(); + SCREEN_EPILOG (CopyWindow, VGAarbiterCopyWindow); +} + +static void +VGAarbiterClearToBackground ( + WindowPtr pWin, + int x, int y, + int w, int h, + Bool generateExposures ) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + + DPRINT_S("VGAarbiterClearToBackground",pScreen->myNum); + SCREEN_PROLOG ( ClearToBackground); + VGAGet(); + (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); + VGAPut(); + SCREEN_EPILOG (ClearToBackground, VGAarbiterClearToBackground); +} + +static PixmapPtr +VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) +{ + PixmapPtr pPix; + + DPRINT_S("VGAarbiterCreatePixmap",pScreen->myNum); + SCREEN_PROLOG ( CreatePixmap); + VGAGet(); + pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); + VGAPut(); + SCREEN_EPILOG (CreatePixmap, VGAarbiterCreatePixmap); + + return pPix; +} + +static Bool +VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank) +{ + Bool val; + + DPRINT_S("VGAarbiterSaveScreen",pScreen->myNum); + SCREEN_PROLOG (SaveScreen); + VGAGet(); + val = (*pScreen->SaveScreen) (pScreen, unblank); + VGAPut(); + SCREEN_EPILOG (SaveScreen, VGAarbiterSaveScreen); + + return val; +} + +static void +VGAarbiterStoreColors ( + ColormapPtr pmap, + int ndef, + xColorItem *pdefs) +{ + ScreenPtr pScreen = pmap->pScreen; + + DPRINT_S("VGAarbiterStoreColors",pScreen->myNum); + SCREEN_PROLOG (StoreColors); + VGAGet(); + (*pScreen->StoreColors) (pmap,ndef,pdefs); + VGAPut(); + SCREEN_EPILOG ( StoreColors, VGAarbiterStoreColors); +} + +static void +VGAarbiterRecolorCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCurs, + Bool displayed + ) +{ + DPRINT_S("VGAarbiterRecolorCursor",pScreen->myNum); + SCREEN_PROLOG (RecolorCursor); + VGAGet(); + (*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed); + VGAPut(); + SCREEN_EPILOG ( RecolorCursor, VGAarbiterRecolorCursor); +} + +static Bool +VGAarbiterRealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterRealizeCursor",pScreen->myNum); + SCREEN_PROLOG (RealizeCursor); + VGAGet(); + val = (*pScreen->RealizeCursor) (pDev, pScreen,pCursor); + VGAPut(); + SCREEN_EPILOG ( RealizeCursor, VGAarbiterRealizeCursor); + return val; +} + +static Bool +VGAarbiterUnrealizeCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterUnrealizeCursor",pScreen->myNum); + SCREEN_PROLOG (UnrealizeCursor); + VGAGet(); + val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor); + VGAPut(); + SCREEN_EPILOG ( UnrealizeCursor, VGAarbiterUnrealizeCursor); + return val; +} + +static Bool +VGAarbiterDisplayCursor ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + CursorPtr pCursor + ) +{ + Bool val; + + DPRINT_S("VGAarbiterDisplayCursor",pScreen->myNum); + SCREEN_PROLOG (DisplayCursor); + VGAGet(); + val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); + VGAPut(); + SCREEN_EPILOG ( DisplayCursor, VGAarbiterDisplayCursor); + return val; +} + +static Bool +VGAarbiterSetCursorPosition ( + DeviceIntPtr pDev, + ScreenPtr pScreen, + int x, int y, + Bool generateEvent) +{ + Bool val; + + DPRINT_S("VGAarbiterSetCursorPosition",pScreen->myNum); + SCREEN_PROLOG (SetCursorPosition); + VGAGet(); + val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); + VGAPut(); + SCREEN_EPILOG ( SetCursorPosition, VGAarbiterSetCursorPosition); + return val; +} + +static void +VGAarbiterAdjustFrame(int index, int x, int y, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterAdjustFrame",index); + VGAGet(); + (*pScreenPriv->AdjustFrame)(index, x, y, flags); + VGAPut(); +} + +static Bool +VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags) +{ + Bool val; + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterSwitchMode",index); + VGAGet(); + val = (*pScreenPriv->SwitchMode)(index, mode, flags); + VGAPut(); + return val; +} + +static Bool +VGAarbiterEnterVT(int index, int flags) +{ + Bool val; + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterEnterVT",index); + VGAGet(); + val = (*pScreenPriv->EnterVT)(index, flags); + VGAPut(); + return val; +} + +static void +VGAarbiterLeaveVT(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterLeaveVT",index); + + VGAGet(); + (*pScreenPriv->LeaveVT)(index, flags); + VGAPut(); +} + +static void +VGAarbiterFreeScreen(int index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[index]; + VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( + &pScreen->devPrivates, VGAarbiterScreenKey); + + DPRINT_S("VGAarbiterFreeScreen",index); + + VGAGet(); + (*pScreenPriv->FreeScreen)(index, flags); + VGAPut(); +} + +static Bool +VGAarbiterCreateGC(GCPtr pGC) +{ + ScreenPtr pScreen = pGC->pScreen; + VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr)dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey); + Bool ret; + + DPRINT_S("VGAarbiterCreateGC",pScreen->myNum); + SCREEN_PROLOG(CreateGC); + VGAGet(); + ret = (*pScreen->CreateGC)(pGC); + VGAPut(); + GC_WRAP(pGC); + SCREEN_EPILOG(CreateGC,VGAarbiterCreateGC); + + return ret; +} + +/* GC funcs */ +static void +VGAarbiterValidateGC( + GCPtr pGC, + unsigned long changes, + DrawablePtr pDraw ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterValidateGC"); + (*pGC->funcs->ValidateGC)(pGC, changes, pDraw); + GC_WRAP(pGC); +} + + +static void +VGAarbiterDestroyGC(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterDestroyGC"); + (*pGC->funcs->DestroyGC)(pGC); + GC_WRAP (pGC); +} + +static void +VGAarbiterChangeGC ( + GCPtr pGC, + unsigned long mask) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterChangeGC"); + (*pGC->funcs->ChangeGC) (pGC, mask); + GC_WRAP (pGC); +} + +static void +VGAarbiterCopyGC ( + GCPtr pGCSrc, + unsigned long mask, + GCPtr pGCDst) +{ + GC_UNWRAP (pGCDst); + DPRINT("VGAarbiterCopyGC"); + (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); + GC_WRAP (pGCDst); +} + +static void +VGAarbiterChangeClip ( + GCPtr pGC, + int type, + pointer pvalue, + int nrects ) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterChangeClip"); + (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); + GC_WRAP (pGC); +} + +static void +VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc) +{ + GC_UNWRAP (pgcDst); + DPRINT("VGAarbiterCopyClip"); + (* pgcDst->funcs->CopyClip)(pgcDst, pgcSrc); + GC_WRAP (pgcDst); +} + +static void +VGAarbiterDestroyClip(GCPtr pGC) +{ + GC_UNWRAP (pGC); + DPRINT("VGAarbiterDestroyClip"); + (* pGC->funcs->DestroyClip)(pGC); + GC_WRAP (pGC); +} + +/* GC Ops */ +static void +VGAarbiterFillSpans( + DrawablePtr pDraw, + GC *pGC, + int nInit, + DDXPointPtr pptInit, + int *pwidthInit, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterFillSpans"); + VGAGet_GC(); + (*pGC->ops->FillSpans)(pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterSetSpans( + DrawablePtr pDraw, + GCPtr pGC, + char *pcharsrc, + register DDXPointPtr ppt, + int *pwidth, + int nspans, + int fSorted ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterSetSpans"); + VGAGet_GC(); + (*pGC->ops->SetSpans)(pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPutImage( + DrawablePtr pDraw, + GCPtr pGC, + int depth, + int x, int y, int w, int h, + int leftPad, + int format, + char *pImage ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPutImage"); + VGAGet_GC(); + (*pGC->ops->PutImage)(pDraw, pGC, depth, x, y, w, h, + leftPad, format, pImage); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static RegionPtr +VGAarbiterCopyArea( + DrawablePtr pSrc, + DrawablePtr pDst, + GC *pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterCopyArea"); + VGAGet_GC(); + ret = (*pGC->ops->CopyArea)(pSrc, pDst, + pGC, srcx, srcy, width, height, dstx, dsty); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static RegionPtr +VGAarbiterCopyPlane( + DrawablePtr pSrc, + DrawablePtr pDst, + GCPtr pGC, + int srcx, int srcy, + int width, int height, + int dstx, int dsty, + unsigned long bitPlane ) +{ + RegionPtr ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterCopyPlane"); + VGAGet_GC(); + ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, srcx, srcy, + width, height, dstx, dsty, bitPlane); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static void +VGAarbiterPolyPoint( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + xPoint *pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyPoint"); + VGAGet_GC(); + (*pGC->ops->PolyPoint)(pDraw, pGC, mode, npt, pptInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +static void +VGAarbiterPolylines( + DrawablePtr pDraw, + GCPtr pGC, + int mode, + int npt, + DDXPointPtr pptInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolylines"); + VGAGet_GC(); + (*pGC->ops->Polylines)(pDraw, pGC, mode, npt, pptInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolySegment( + DrawablePtr pDraw, + GCPtr pGC, + int nseg, + xSegment *pSeg ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolySegment"); + VGAGet_GC(); + (*pGC->ops->PolySegment)(pDraw, pGC, nseg, pSeg); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyRectangle( + DrawablePtr pDraw, + GCPtr pGC, + int nRectsInit, + xRectangle *pRectsInit ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyRectangle"); + VGAGet_GC(); + (*pGC->ops->PolyRectangle)(pDraw, pGC, nRectsInit, pRectsInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyArc"); + VGAGet_GC(); + (*pGC->ops->PolyArc)(pDraw, pGC, narcs, parcs); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterFillPolygon( + DrawablePtr pDraw, + GCPtr pGC, + int shape, + int mode, + int count, + DDXPointPtr ptsIn ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterFillPolygon"); + VGAGet_GC(); + (*pGC->ops->FillPolygon)(pDraw, pGC, shape, mode, count, ptsIn); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyFillRect( + DrawablePtr pDraw, + GCPtr pGC, + int nrectFill, + xRectangle *prectInit) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyFillRect"); + VGAGet_GC(); + (*pGC->ops->PolyFillRect)(pDraw, pGC, nrectFill, prectInit); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyFillArc( + DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc *parcs ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyFillArc"); + VGAGet_GC(); + (*pGC->ops->PolyFillArc)(pDraw, pGC, narcs, parcs); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static int +VGAarbiterPolyText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyText8"); + VGAGet_GC(); + ret = (*pGC->ops->PolyText8)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static int +VGAarbiterPolyText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + int ret; + + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyText16"); + VGAGet_GC(); + ret = (*pGC->ops->PolyText16)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); + return ret; +} + +static void +VGAarbiterImageText8( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + char *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageText8"); + VGAGet_GC(); + (*pGC->ops->ImageText8)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterImageText16( + DrawablePtr pDraw, + GCPtr pGC, + int x, + int y, + int count, + unsigned short *chars ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageText16"); + VGAGet_GC(); + (*pGC->ops->ImageText16)(pDraw, pGC, x, y, count, chars); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +static void +VGAarbiterImageGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterImageGlyphBlt"); + VGAGet_GC(); + (*pGC->ops->ImageGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPolyGlyphBlt( + DrawablePtr pDraw, + GCPtr pGC, + int xInit, int yInit, + unsigned int nglyph, + CharInfoPtr *ppci, + pointer pglyphBase ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPolyGlyphBlt"); + VGAGet_GC(); + (*pGC->ops->PolyGlyphBlt)(pDraw, pGC, xInit, yInit, + nglyph, ppci, pglyphBase); + VGAPut_GC(); + GC_WRAP(pGC); +} + +static void +VGAarbiterPushPixels( + GCPtr pGC, + PixmapPtr pBitMap, + DrawablePtr pDraw, + int dx, int dy, int xOrg, int yOrg ) +{ + GC_UNWRAP(pGC); + DPRINT("VGAarbiterPushPixels"); + VGAGet_GC(); + (*pGC->ops->PushPixels)(pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + VGAPut_GC(); + GC_WRAP(pGC); +} + + +/* miSpriteFuncs */ +static Bool +VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteRealizeCursor",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static Bool +VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteUnrealizeCursor",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static void +VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteSetCursor",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y); + VGAPut(); + SPRITE_EPILOG; +} + +static void +VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterSpriteMoveCursor",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y); + VGAPut(); + SPRITE_EPILOG; +} + +static Bool +VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + Bool val; + SPRITE_PROLOG; + DPRINT_S("VGAarbiterDeviceCursorInitialize",pScreen->myNum); + VGAGet(); + val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen); + VGAPut(); + SPRITE_EPILOG; + return val; +} + +static void +VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) +{ + SPRITE_PROLOG; + DPRINT_S("VGAarbiterDeviceCursorCleanup",pScreen->myNum); + VGAGet(); + PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen); + VGAPut(); + SPRITE_EPILOG; +} + +#ifdef RENDER +static void +VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, + INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, + CARD16 height) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Composite); + + VGAGet(); + (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, + yDst, width, height); + VGAPut(); + PICTURE_EPILOGUE(Composite, VGAarbiterComposite); +} + +static void +VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, + GlyphListPtr list, GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(Glyphs); + + VGAGet(); + (*ps->Glyphs)(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + VGAPut(); + PICTURE_EPILOGUE (Glyphs, VGAarbiterGlyphs); +} + +static void +VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, + xRectangle *rects) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + PictureScreenPtr ps = GetPictureScreen(pScreen); + + PICTURE_PROLOGUE(CompositeRects); + + VGAGet(); + (*ps->CompositeRects)(op, pDst, color, nRect, rects); + VGAPut(); + PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects); +} +#endif +#else +/* dummy functions */ +void xf86VGAarbiterInit(void) {} +void xf86VGAarbiterFini(void) {} + +void xf86VGAarbiterLock(ScrnInfoPtr pScrn) {} +void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) {} +Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { return TRUE; } +void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) {} +void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn) {} +Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen) { return FALSE; } + +#endif diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiter.h b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h new file mode 100644 index 000000000..145d31c78 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiter.h @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2009 Tiago Vignatti + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + */ + +#ifndef __XF86VGAARBITER_H +#define __XF86VGAARBITER_H + +#include "screenint.h" +#include "misc.h" +#include "xf86.h" + +/* Functions */ +extern void xf86VGAarbiterInit(void); +extern void xf86VGAarbiterFini(void); +void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); +extern Bool xf86VGAarbiterWrapFunctions(ScreenPtr pScreen); +extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); +extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); + +/* allow a driver to remove itself from arbiter - really should be + * done in the kernel though */ +extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn); +/* DRI and arbiter are really not possible together, + * you really want to remove the card from arbitration if you can */ +extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen); + +#endif /* __XF86VGAARBITER_H */ diff --git a/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h new file mode 100644 index 000000000..40d436856 --- /dev/null +++ b/xorg-server/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -0,0 +1,266 @@ +/* + * Copyright (c) 2009 Tiago Vignatti + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" +#include <X11/X.h> +#include "colormapst.h" +#include "scrnintstr.h" +#include "screenint.h" +#include "gcstruct.h" +#include "pixmapstr.h" +#include "pixmap.h" +#include "windowstr.h" +#include "window.h" +#include "xf86str.h" +#include "mipointer.h" +#include "mipointrst.h" +#ifdef RENDER +# include "picturestr.h" +#endif + + +#define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;} + +#define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x + +#define SCREEN_PROLOG(x) pScreen->x = ((VGAarbiterScreenPtr) \ + dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))->x + +#define SCREEN_EPILOG(x,y) pScreen->x = y; + +#define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\ + ps->x = y;} + +#define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} + +#define PICTURE_PROLOGUE(field) ps->field = \ + ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ + VGAarbiterScreenKey))->field + +#define PICTURE_EPILOGUE(field, wrap) ps->field = wrap + +#define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0) + +#define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x + +#define SPRITE_PROLOG miPointerScreenPtr PointPriv = \ + (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \ + miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \ + ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ + VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite; + +#define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; + +#define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\ + PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \ + } while (0) + +#define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite + +#define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ + pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\ + (x)->funcs = &VGAarbiterGCFuncs; + +#define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \ + (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\ + (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs; + +#define GC_SCREEN register ScrnInfoPtr pScrn = \ + xf86Screens[pGC->pScreen->myNum] + +#define VGAGet(x)\ + pci_device_vgaarb_set_target(xf86Screens[pScreen->myNum]->vgaDev); \ + pci_device_vgaarb_lock(); + +#define VGAGet_GC(x)\ + pci_device_vgaarb_set_target(xf86Screens[pGC->pScreen->myNum]->vgaDev); \ + pci_device_vgaarb_lock(); + +#define VGAPut(x)\ + pci_device_vgaarb_unlock(); + +#define VGAPut_GC(x)\ + pci_device_vgaarb_unlock(); + + +typedef struct _VGAarbiterScreen { + CreateGCProcPtr CreateGC; + CloseScreenProcPtr CloseScreen; + ScreenBlockHandlerProcPtr BlockHandler; + ScreenWakeupHandlerProcPtr WakeupHandler; + GetImageProcPtr GetImage; + GetSpansProcPtr GetSpans; + SourceValidateProcPtr SourceValidate; + CopyWindowProcPtr CopyWindow; + ClearToBackgroundProcPtr ClearToBackground; + CreatePixmapProcPtr CreatePixmap; + SaveScreenProcPtr SaveScreen; + /* Colormap */ + StoreColorsProcPtr StoreColors; + /* Cursor */ + DisplayCursorProcPtr DisplayCursor; + RealizeCursorProcPtr RealizeCursor; + UnrealizeCursorProcPtr UnrealizeCursor; + RecolorCursorProcPtr RecolorCursor; + SetCursorPositionProcPtr SetCursorPosition; + void (*AdjustFrame)(int,int,int,int); + Bool (*SwitchMode)(int, DisplayModePtr,int); + Bool (*EnterVT)(int, int); + void (*LeaveVT)(int, int); + void (*FreeScreen)(int, int); + miPointerSpriteFuncPtr miSprite; +#ifdef RENDER + CompositeProcPtr Composite; + GlyphsProcPtr Glyphs; + CompositeRectsProcPtr CompositeRects; +#endif +} VGAarbiterScreenRec, *VGAarbiterScreenPtr; + +typedef struct _VGAarbiterGC { + GCOps *wrapOps; + GCFuncs *wrapFuncs; +} VGAarbiterGCRec, *VGAarbiterGCPtr; + +/* Screen funcs */ +static void VGAarbiterBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask); +static void VGAarbiterWakeupHandler(int i, pointer blockData, unsigned long result, pointer pReadmask); +static Bool VGAarbiterCloseScreen (int i, ScreenPtr pScreen); +static void VGAarbiterGetImage (DrawablePtr pDrawable, int sx, int sy, int w, + int h, unsigned int format, unsigned long planemask, char *pdstLine); +static void VGAarbiterGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr + ppt, int *pwidth, int nspans, char *pdstStart); +static void VGAarbiterSourceValidate (DrawablePtr pDrawable, int x, int y, + int width, int height); +static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, + RegionPtr prgnSrc); +static void VGAarbiterClearToBackground (WindowPtr pWin, int x, int y, int w, + int h, Bool generateExposures); +static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, + int depth, unsigned int usage_hint); +static Bool VGAarbiterCreateGC(GCPtr pGC); +static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank); +static void VGAarbiterStoreColors (ColormapPtr pmap, int ndef, xColorItem + *pdefs); +static void VGAarbiterRecolorCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCurs, Bool displayed); +static Bool VGAarbiterRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterUnrealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterDisplayCursor (DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor); +static Bool VGAarbiterSetCursorPosition (DeviceIntPtr pDev, ScreenPtr + pScreen, int x, int y, Bool generateEvent); +static void VGAarbiterAdjustFrame(int index, int x, int y, int flags); +static Bool VGAarbiterSwitchMode(int index, DisplayModePtr mode, int flags); +static Bool VGAarbiterEnterVT(int index, int flags); +static void VGAarbiterLeaveVT(int index, int flags); +static void VGAarbiterFreeScreen(int index, int flags); + +/* GC funcs */ +static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, + DrawablePtr pDraw); +static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask); +static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); +static void VGAarbiterDestroyGC(GCPtr pGC); +static void VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue, + int nrects); +static void VGAarbiterDestroyClip(GCPtr pGC); +static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc); + +/* GC ops */ +static void VGAarbiterFillSpans( DrawablePtr pDraw, GC *pGC, int nInit, + DDXPointPtr pptInit, int *pwidthInit, int fSorted); +static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, + register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); +static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, + int x, int y, int w, int h, int leftPad, int format, char *pImage); +static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst, + GC *pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); +static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, + GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, + unsigned long bitPlane); +static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, xPoint *pptInit); +static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, + int npt, DDXPointPtr pptInit); +static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, + xSegment *pSeg); +static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC, + int nRectsInit, xRectangle *pRectsInit); +static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs); +static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, + int mode, int count, DDXPointPtr ptsIn); +static void VGAarbiterPolyFillRect( DrawablePtr pDraw, GCPtr pGC, + int nrectFill, xRectangle *prectInit); +static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, + xArc *parcs); +static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars); +static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, char *chars); +static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, + int count, unsigned short *chars); +static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase); +static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, + int yInit, unsigned int nglyph, CharInfoPtr *ppci, pointer pglyphBase); +static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr + pDraw, int dx, int dy, int xOrg, int yOrg); + +/* miSpriteFuncs */ +static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr + pScreen, CursorPtr pCur); +static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr + pScreen, CursorPtr pCur); +static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCur, int x, int y); +static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y); +static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); +static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); + + +#ifdef RENDER +static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, + PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, + INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); +static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, + PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr + list, GlyphPtr *glyphs); +static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor + *color, int nRect, xRectangle *rects); +#endif diff --git a/xorg-server/hw/xfree86/common/xf86VidMode.c b/xorg-server/hw/xfree86/common/xf86VidMode.c index 24fccd31b..49b86e73a 100644 --- a/xorg-server/hw/xfree86/common/xf86VidMode.c +++ b/xorg-server/hw/xfree86/common/xf86VidMode.c @@ -56,20 +56,14 @@ static Bool VidModeClose(int i, ScreenPtr pScreen); #endif -#ifdef DEBUG -# define DEBUG_P(x) ErrorF(x"\n"); -#else -# define DEBUG_P(x) /**/ -#endif - -_X_EXPORT Bool +Bool VidModeExtensionInit(ScreenPtr pScreen) { #ifdef XF86VIDMODE VidModePtr pVidMode; if (!xf86GetVidModeEnabled()) { - DEBUG_P("!xf86GetVidModeEnabled()"); + DebugF("!xf86GetVidModeEnabled()\n"); return FALSE; } @@ -77,7 +71,7 @@ VidModeExtensionInit(ScreenPtr pScreen) if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, xcalloc(sizeof(VidModeRec), 1))) { - DEBUG_P("xcalloc failed"); + DebugF("xcalloc failed\n"); return FALSE; } @@ -89,7 +83,7 @@ VidModeExtensionInit(ScreenPtr pScreen) VidModeCount++; return TRUE; #else - DEBUG_P("no vidmode extension"); + DebugF("no vidmode extension\n"); return FALSE; #endif } @@ -123,13 +117,13 @@ VidModeAvailable(int scrnIndex) VidModePtr pVidMode; if (VidModeKey == NULL) { - DEBUG_P("VidModeKey == NULL"); + DebugF("VidModeKey == NULL\n"); return FALSE; } pScrn = xf86Screens[scrnIndex]; if (pScrn == NULL) { - DEBUG_P("pScrn == NULL"); + DebugF("pScrn == NULL\n"); return FALSE; } @@ -137,12 +131,12 @@ VidModeAvailable(int scrnIndex) if (pVidMode) return TRUE; else { - DEBUG_P("pVidMode == NULL"); + DebugF("pVidMode == NULL\n"); return FALSE; } } -_X_EXPORT Bool +Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -161,7 +155,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT int +int VidModeGetDotClock(int scrnIndex, int Clock) { ScrnInfoPtr pScrn; @@ -176,7 +170,7 @@ VidModeGetDotClock(int scrnIndex, int Clock) return pScrn->clock[Clock]; } -_X_EXPORT int +int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) { ScrnInfoPtr pScrn; @@ -194,7 +188,7 @@ VidModeGetNumOfClocks(int scrnIndex, Bool *progClock) } } -_X_EXPORT Bool +Bool VidModeGetClocks(int scrnIndex, int *Clocks) { ScrnInfoPtr pScrn; @@ -215,7 +209,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks) } -_X_EXPORT Bool +Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -238,7 +232,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) return VidModeGetNextModeline(scrnIndex, mode, dotClock); } -_X_EXPORT Bool +Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -263,7 +257,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) return FALSE; } -_X_EXPORT Bool +Bool VidModeDeleteModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -276,7 +270,7 @@ VidModeDeleteModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT Bool +Bool VidModeZoomViewport(int scrnIndex, int zoom) { ScrnInfoPtr pScrn; @@ -289,7 +283,7 @@ VidModeZoomViewport(int scrnIndex, int zoom) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetViewPort(int scrnIndex, int x, int y) { ScrnInfoPtr pScrn; @@ -310,7 +304,7 @@ VidModeSetViewPort(int scrnIndex, int x, int y) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetViewPort(int scrnIndex, int *x, int *y) { ScrnInfoPtr pScrn; @@ -324,7 +318,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y) return TRUE; } -_X_EXPORT Bool +Bool VidModeSwitchMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -346,7 +340,7 @@ VidModeSwitchMode(int scrnIndex, pointer mode) return retval; } -_X_EXPORT Bool +Bool VidModeLockZoom(int scrnIndex, Bool lock) { ScrnInfoPtr pScrn; @@ -363,7 +357,7 @@ VidModeLockZoom(int scrnIndex, Bool lock) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetMonitor(int scrnIndex, pointer *monitor) { ScrnInfoPtr pScrn; @@ -377,7 +371,7 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor) return TRUE; } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForMonitor(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -390,7 +384,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode) return xf86CheckModeForMonitor((DisplayModePtr)mode, pScrn->monitor); } -_X_EXPORT ModeStatus +ModeStatus VidModeCheckModeForDriver(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -403,7 +397,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode) return xf86CheckModeForDriver(pScrn, (DisplayModePtr)mode, 0); } -_X_EXPORT void +void VidModeSetCrtcForMode(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -422,7 +416,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode) return; } -_X_EXPORT Bool +Bool VidModeAddModeline(int scrnIndex, pointer mode) { ScrnInfoPtr pScrn; @@ -443,7 +437,7 @@ VidModeAddModeline(int scrnIndex, pointer mode) return TRUE; } -_X_EXPORT int +int VidModeGetNumOfModes(int scrnIndex) { pointer mode = NULL; @@ -459,7 +453,7 @@ VidModeGetNumOfModes(int scrnIndex) } while (TRUE); } -_X_EXPORT Bool +Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue) { ScrnInfoPtr pScrn; @@ -478,7 +472,7 @@ VidModeSetGamma(int scrnIndex, float red, float green, float blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) { ScrnInfoPtr pScrn; @@ -493,7 +487,7 @@ VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue) return TRUE; } -_X_EXPORT Bool +Bool VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -506,7 +500,7 @@ VidModeSetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT Bool +Bool VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) { ScrnInfoPtr pScrn; @@ -519,7 +513,7 @@ VidModeGetGammaRamp(int scrnIndex, int size, CARD16 *r, CARD16 *g, CARD16 *b) return TRUE; } -_X_EXPORT int +int VidModeGetGammaRampSize(int scrnIndex) { if (!VidModeAvailable(scrnIndex)) @@ -528,7 +522,7 @@ VidModeGetGammaRampSize(int scrnIndex) return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen); } -_X_EXPORT pointer +pointer VidModeCreateMode(void) { DisplayModePtr mode; @@ -544,14 +538,14 @@ VidModeCreateMode(void) return mode; } -_X_EXPORT void +void VidModeCopyMode(pointer modefrom, pointer modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } -_X_EXPORT int +int VidModeGetModeValue(pointer mode, int valtyp) { int ret = 0; @@ -594,7 +588,7 @@ VidModeGetModeValue(pointer mode, int valtyp) return ret; } -_X_EXPORT void +void VidModeSetModeValue(pointer mode, int valtyp, int val) { switch (valtyp) { @@ -635,7 +629,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val) return; } -_X_EXPORT vidMonitorValue +vidMonitorValue VidModeGetMonitorValue(pointer monitor, int valtyp, int indx) { vidMonitorValue ret; diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.c b/xorg-server/hw/xfree86/common/xf86Xinput.c index 1f412349c..3543811db 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.c +++ b/xorg-server/hw/xfree86/common/xf86Xinput.c @@ -54,6 +54,7 @@ #include <X11/Xmd.h> #include <X11/extensions/XI.h> #include <X11/extensions/XIproto.h> +#include <X11/Xatom.h> #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" @@ -65,15 +66,14 @@ #include "extinit.h" #ifdef DPMSExtension -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #include "dpmsproc.h" #endif #include "exevents.h" /* AddInputDevice */ #include "exglobals.h" +#include "eventstr.h" -#define EXTENSION_PROC_ARGS void * #include "extnsionst.h" #include "windowstr.h" /* screenIsSaved */ @@ -85,14 +85,13 @@ #include "mi.h" #include <ptrveloc.h> /* dix pointer acceleration */ +#include <xserver-properties.h> #ifdef XFreeXDGA #include "dgaproc.h" #endif -#ifdef XKB #include "xkbsrv.h" -#endif #include "os.h" @@ -102,54 +101,79 @@ EventListPtr xf86Events = NULL; * Eval config and modify DeviceVelocityRec accordingly */ static void -ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){ - int tempi, i; - float tempf, tempf2; +ProcessVelocityConfiguration(DeviceIntPtr pDev, char* devname, pointer list, + DeviceVelocityPtr s) +{ + int tempi; + float tempf; + Atom float_prop = XIGetKnownProperty(XATOM_FLOAT); + Atom prop; if(!s) return; - tempf = xf86SetRealOption(list, "FilterHalflife", -1); - if(tempf > 0) - tempf = 1.0 / tempf; /* set reciprocal if possible */ - - tempf2 = xf86SetRealOption(list, "FilterChainProgression", 2.0); - xf86Msg(X_CONFIG, "%s: (accel) filter chain progression: %.2f\n", - devname, tempf2); - if(tempf2 < 1) - tempf2 = 2; - - tempi = xf86SetIntOption(list, "FilterChainLength", 1); - if(tempi < 1 || tempi > MAX_VELOCITY_FILTERS) - tempi = 1; - - if(tempf > 0.0f && tempi >= 1 && tempf2 >= 1.0f) - InitFilterChain(s, tempf, tempf2, tempi, 40); - - for(i = 0; i < tempi; i++) - xf86Msg(X_CONFIG, "%s: (accel) filter stage %i: %.2f ms\n", - devname, i, 1.0f / (s->filters[i].rdecay)); - - tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0); + /* common settings (available via device properties) */ + tempf = xf86SetIntOption(list, "ConstantDeceleration", 1); if(tempf > 1.0){ xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n", devname, tempf); - s->const_acceleration = 1.0 / tempf; /* set reciprocal deceleration - alias acceleration */ + prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); } - tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0); + tempf = xf86SetIntOption(list, "AdaptiveDeceleration", 1); if(tempf > 1.0){ xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n", devname, tempf); - s->min_acceleration = 1.0 / tempf; /* set minimum acceleration */ + prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + } + + /* select profile by number */ + tempi = xf86SetIntOption(list, "AccelerationProfile", + s->statistics.profile_number); + + prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); + if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32, + PropModeReplace, 1, &tempi, FALSE) == Success) + { + xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname, + tempi); + } else { + xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", + devname, tempi); + } + + /* set scaling */ + tempf = xf86SetRealOption(list, "ExpectedRate", 0); + prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); + if(tempf > 0){ + tempf = 1000.0 / tempf; + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + }else{ + tempf = xf86SetRealOption(list, "VelocityScale", s->corr_mul); + XIChangeDeviceProperty(pDev, prop, float_prop, 32, + PropModeReplace, 1, &tempf, FALSE); + } + + tempi = xf86SetIntOption(list, "VelocityTrackerCount", -1); + if(tempi > 1){ + InitTrackers(s, tempi); } - tempf = xf86SetRealOption(list, "VelocityCoupling", -1); + s->initial_range = xf86SetIntOption(list, "VelocityInitialRange", + s->initial_range); + + s->max_diff = xf86SetRealOption(list, "VelocityAbsDiff", s->max_diff); + + tempf = xf86SetRealOption(list, "VelocityRelDiff", -1); if(tempf >= 0){ - xf86Msg(X_CONFIG, "%s: (accel) velocity coupling is %.1f%%\n", devname, - tempf*100.0); - s->coupling = tempf; + xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n", + devname, tempf*100.0); + s->max_rel_diff = tempf; } /* Configure softening. If const deceleration is used, this is expected @@ -163,24 +187,6 @@ ProcessVelocityConfiguration(char* devname, pointer list, DeviceVelocityPtr s){ s->average_accel); s->reset_time = xf86SetIntOption(list, "VelocityReset", s->reset_time); - - tempf = xf86SetRealOption(list, "ExpectedRate", 0); - if(tempf > 0){ - s->corr_mul = 1000.0 / tempf; - }else{ - s->corr_mul = xf86SetRealOption(list, "VelocityScale", s->corr_mul); - } - - /* select profile by number */ - tempi= xf86SetIntOption(list, "AccelerationProfile", - s->statistics.profile_number); - - if(SetAccelerationProfile(s, tempi)){ - xf86Msg(X_CONFIG, "%s: (accel) set acceleration profile %i\n", devname, tempi); - }else{ - xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", - devname, tempi); - } } static void @@ -229,7 +235,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){ switch(scheme){ case PtrAccelPredictable: pVel = GetDevicePredictableAccelData(dev); - ProcessVelocityConfiguration (local->name, local->options, + ProcessVelocityConfiguration (dev, local->name, local->options, pVel); break; } @@ -255,7 +261,7 @@ xf86SendDragEvents(DeviceIntPtr device) * *********************************************************************** */ -_X_EXPORT void +void xf86ProcessCommonOptions(LocalDevicePtr local, pointer list) { @@ -293,7 +299,7 @@ xf86ProcessCommonOptions(LocalDevicePtr local, * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ -_X_EXPORT int +int xf86ActivateDevice(LocalDevicePtr local) { DeviceIntPtr dev; @@ -317,24 +323,14 @@ xf86ActivateDevice(LocalDevicePtr local) local->dev = dev; dev->coreEvents = local->flags & XI86_ALWAYS_CORE; - dev->isMaster = FALSE; + dev->type = SLAVE; dev->spriteInfo->spriteOwner = FALSE; - if (DeviceIsPointerType(dev)) - { - dev->deviceGrab.ActivateGrab = ActivatePointerGrab; - dev->deviceGrab.DeactivateGrab = DeactivatePointerGrab; - } else - { - dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; - dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; - } + dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; + dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; RegisterOtherDevice(dev); -#ifdef XKB - if (!noXkbExtension) - XkbSetExtension(dev, ProcessKeyboardEvent); -#endif + XkbSetExtension(dev, ProcessKeyboardEvent); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s)\n", @@ -374,7 +370,7 @@ OpenInputDevice(DeviceIntPtr dev, int *status) { if (!dev->inited) - ActivateDevice(dev); + ActivateDevice(dev, TRUE); *status = Success; } @@ -471,7 +467,7 @@ ChangeDeviceControl (ClientPtr client, DeviceIntPtr dev, xDeviceCtl *control) } void -AddOtherInputDevices() +AddOtherInputDevices(void) { } @@ -541,18 +537,24 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable) } dev = pInfo->dev; - rval = ActivateDevice(dev); + rval = ActivateDevice(dev, TRUE); if (rval != Success) { xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); - RemoveDevice(dev); + RemoveDevice(dev, TRUE); goto unwind; } /* Enable it if it's properly initialised and we're currently in the VT */ if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema) { - EnableDevice(dev); + EnableDevice(dev, TRUE); + if (!dev->enabled) + { + xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", idev->identifier); + rval = BadMatch; + goto unwind; + } /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); } @@ -570,7 +572,7 @@ unwind: return rval; } -_X_EXPORT int +int NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) { IDevRec *idev = NULL; @@ -611,12 +613,11 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) /* Right now, the only automatic config we know of is HAL. */ if (strcmp(option->key, "_source") == 0 && strcmp(option->value, "server/hal") == 0) { + is_auto = 1; if (!xf86Info.autoAddDevices) { rval = BadMatch; goto unwind; } - - is_auto = 1; } } if (!idev->driver || !idev->identifier) { @@ -645,6 +646,8 @@ NewInputDeviceRequest (InputOption *options, DeviceIntPtr *pdev) return Success; unwind: + if (is_auto && !xf86Info.autoAddDevices) + xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n"); if(idev->driver) xfree(idev->driver); if(idev->identifier) @@ -654,14 +657,14 @@ unwind: return rval; } -_X_EXPORT void +void DeleteInputDeviceRequest(DeviceIntPtr pDev) { LocalDevicePtr pInfo = (LocalDevicePtr) pDev->public.devicePrivate; InputDriverPtr drv = NULL; IDevRec *idev = NULL; IDevPtr *it; - Bool isMaster = pDev->isMaster; + Bool isMaster = IsMaster(pDev); if (pInfo) /* need to get these before RemoveDevice */ { @@ -670,9 +673,9 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) } OsBlockSignals(); - RemoveDevice(pDev); + RemoveDevice(pDev, TRUE); - if (!isMaster) + if (!isMaster && pInfo != NULL) { if(drv->UnInit) drv->UnInit(drv, pInfo, 0); @@ -699,7 +702,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) * convenient functions to post events */ -_X_EXPORT void +void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -710,11 +713,7 @@ xf86PostMotionEvent(DeviceIntPtr device, int i = 0; static int valuators[MAX_VALUATORS]; - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) @@ -724,7 +723,7 @@ xf86PostMotionEvent(DeviceIntPtr device, xf86PostMotionEventP(device, is_absolute, first_valuator, num_valuators, valuators); } -_X_EXPORT void +void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, @@ -734,15 +733,11 @@ xf86PostMotionEventP(DeviceIntPtr device, int i = 0, nevents = 0; int dx = 0, dy = 0; Bool drag = xf86SendDragEvents(device); - xEvent *xE = NULL; + DeviceEvent *event; int index; int flags = 0; - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); if (is_absolute) flags = POINTER_ABSOLUTE; @@ -780,16 +775,17 @@ xf86PostMotionEventP(DeviceIntPtr device, valuators); for (i = 0; i < nevents; i++) { - xE = (xf86Events + i)->event; + event = (DeviceEvent*)((xf86Events + i)->event); /* Don't post core motion events for devices not registered to send * drag events. */ - if (xE->u.u.type != MotionNotify || drag) { - mieqEnqueue(device, (xf86Events + i)->event); + if (event->header == ET_Internal && + (event->type != ET_Motion || drag)) { + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } } } -_X_EXPORT void +void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, @@ -797,31 +793,42 @@ xf86PostProximityEvent(DeviceIntPtr device, ...) { va_list var; - int i, nevents; + int i; int valuators[MAX_VALUATORS]; - - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuators[i] = va_arg(var, int); va_end(var); + xf86PostProximityEventP(device, is_in, first_valuator, num_valuators, + valuators); + +} + +void +xf86PostProximityEventP(DeviceIntPtr device, + int is_in, + int first_valuator, + int num_valuators, + int *valuators) +{ + int i, nevents; + + XI_VERIFY_VALUATORS(num_valuators); + GetEventList(&xf86Events); nevents = GetProximityEvents(xf86Events, device, is_in ? ProximityIn : ProximityOut, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, @@ -832,8 +839,39 @@ xf86PostButtonEvent(DeviceIntPtr device, { va_list var; int valuators[MAX_VALUATORS]; + int i = 0; + + XI_VERIFY_VALUATORS(num_valuators); + + va_start(var, num_valuators); + for (i = 0; i < num_valuators; i++) + valuators[i] = va_arg(var, int); + va_end(var); + + xf86PostButtonEventP(device, is_absolute, button, is_down, first_valuator, + num_valuators, valuators); + +} + +void +xf86PostButtonEventP(DeviceIntPtr device, + int is_absolute, + int button, + int is_down, + int first_valuator, + int num_valuators, + int *valuators) +{ int i = 0, nevents = 0; int index; + int flags = 0; + + XI_VERIFY_VALUATORS(num_valuators); + + if (is_absolute) + flags = POINTER_ABSOLUTE; + else + flags = POINTER_RELATIVE | POINTER_ACCELERATE; #if XFreeXDGA if (miPointerGetScreen(device)) { @@ -842,29 +880,18 @@ xf86PostButtonEvent(DeviceIntPtr device, return; } #endif - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } - - va_start(var, num_valuators); - for (i = 0; i < num_valuators; i++) - valuators[i] = va_arg(var, int); - va_end(var); GetEventList(&xf86Events); nevents = GetPointerEvents(xf86Events, device, is_down ? ButtonPress : ButtonRelease, button, - (is_absolute) ? POINTER_ABSOLUTE : POINTER_RELATIVE, - first_valuator, num_valuators, valuators); + flags, first_valuator, num_valuators, valuators); for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, @@ -874,7 +901,7 @@ xf86PostKeyEvent(DeviceIntPtr device, ...) { va_list var; - int i = 0, nevents = 0; + int i = 0; static int valuators[MAX_VALUATORS]; /* instil confidence in the user */ @@ -882,18 +909,37 @@ xf86PostKeyEvent(DeviceIntPtr device, "badly south after this message, then xf86PostKeyEvent is " "broken.\n"); - if (num_valuators > MAX_VALUATORS) { - xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" - " MAX_VALUATORS\n", __FUNCTION__, num_valuators); - return; - } + XI_VERIFY_VALUATORS(num_valuators); - if (is_absolute) { - va_start(var, num_valuators); - for (i = 0; i < num_valuators; i++) - valuators[i] = va_arg(var, int); - va_end(var); + va_start(var, num_valuators); + for (i = 0; i < num_valuators; i++) + valuators[i] = va_arg(var, int); + va_end(var); + xf86PostKeyEventP(device, key_code, is_down, is_absolute, first_valuator, + num_valuators, valuators); + +} + +void +xf86PostKeyEventP(DeviceIntPtr device, + unsigned int key_code, + int is_down, + int is_absolute, + int first_valuator, + int num_valuators, + int *valuators) +{ + int i = 0, nevents = 0; + + /* instil confidence in the user */ + DebugF("this function has never been tested properly. if things go quite " + "badly south after this message, then xf86PostKeyEvent is " + "broken.\n"); + + XI_VERIFY_VALUATORS(num_valuators); + + if (is_absolute) { GetEventList(&xf86Events); nevents = GetKeyboardValuatorEvents(xf86Events, device, is_down ? KeyPress : KeyRelease, @@ -907,40 +953,19 @@ xf86PostKeyEvent(DeviceIntPtr device, } for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + mieqEnqueue(device, (InternalEvent*)((xf86Events + i)->event)); } -_X_EXPORT void +void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) { - int nevents = 0, i = 0; - int index; - -#if XFreeXDGA - DeviceIntPtr pointer; - - /* Some pointers send key events, paired device is wrong then. */ - pointer = IsPointerDevice(device) ? device : GetPairedDevice(device); - - if (miPointerGetScreen(pointer)) { - index = miPointerGetScreen(pointer)->myNum; - if (DGAStealKeyEvent(device, index, key_code, is_down)) - return; - } -#endif - - GetEventList(&xf86Events); - nevents = GetKeyboardEvents(xf86Events, device, - is_down ? KeyPress : KeyRelease, key_code); - - for (i = 0; i < nevents; i++) - mieqEnqueue(device, (xf86Events + i)->event); + xf86PostKeyEventP(device, key_code, is_down, 0, 0, 0, NULL); } -_X_EXPORT LocalDevicePtr -xf86FirstLocalDevice() +LocalDevicePtr +xf86FirstLocalDevice(void) { return xf86InputDevs; } @@ -958,7 +983,7 @@ xf86FirstLocalDevice() * different orgins on the touch screen vs X. */ -_X_EXPORT int +int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, @@ -992,7 +1017,7 @@ xf86ScaleAxis(int Cx, * ReadInput function before any events are posted, if the device is screen * specific like a touch screen. */ -_X_EXPORT void +void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, @@ -1005,14 +1030,14 @@ xf86XInputSetScreen(LocalDevicePtr local, } -_X_EXPORT void -xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, +void +xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res) { if (!dev || !dev->valuator) return; - InitValuatorAxisStruct(dev, axnum, minval, maxval, resolution, min_res, + InitValuatorAxisStruct(dev, axnum, label, minval, maxval, resolution, min_res, max_res); } @@ -1020,7 +1045,7 @@ xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, * Set the valuator values to be in synch with dix/event.c * DefineInitialRootWindow(). */ -_X_EXPORT void +void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { @@ -1046,7 +1071,7 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) * * @param panic True if device is unrecoverable and needs to be removed. */ -_X_EXPORT void +void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { devicePresenceNotify ev; @@ -1054,7 +1079,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) if(!panic) { - DisableDevice(dev); + DisableDevice(dev, TRUE); } else { ev.type = DevicePresenceNotify; @@ -1074,10 +1099,10 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) * out that the read error wasn't quite that bad after all. * Device will be re-activated, and an event sent to the client. */ -_X_EXPORT void +void xf86EnableDevice(DeviceIntPtr dev) { - EnableDevice(dev); + EnableDevice(dev, TRUE); } /* end of xf86Xinput.c */ diff --git a/xorg-server/hw/xfree86/common/xf86Xinput.h b/xorg-server/hw/xfree86/common/xf86Xinput.h index 2ca2073f9..aa9e9d507 100644 --- a/xorg-server/hw/xfree86/common/xf86Xinput.h +++ b/xorg-server/hw/xfree86/common/xf86Xinput.h @@ -52,9 +52,6 @@ #ifndef _xf86Xinput_h #define _xf86Xinput_h -#ifndef NEED_EVENTS -#define NEED_EVENTS -#endif #include "xf86str.h" #include "inputstr.h" #include <X11/extensions/XI.h> @@ -83,6 +80,14 @@ #define XI_PRIVATE(dev) \ (((LocalDevicePtr)((dev)->public.devicePrivate))->private) +/* Valuator verification macro */ +#define XI_VERIFY_VALUATORS(num_valuators) \ + if (num_valuators > MAX_VALUATORS) { \ + xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \ + " MAX_VALUATORS\n", __FUNCTION__, num_valuators); \ + return; \ + } + /* Stupid API backwards-compatibility. */ #define TS_Raw 60 #define TS_Scaled 61 @@ -152,53 +157,58 @@ typedef struct _DeviceAssocRec } DeviceAssocRec, *DeviceAssocPtr; /* xf86Globals.c */ -extern InputInfoPtr xf86InputDevs; +extern _X_EXPORT InputInfoPtr xf86InputDevs; /* xf86Xinput.c */ -void InitExtInput(void); -void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, +extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, int *valuators); -void xf86PostProximityEvent(DeviceIntPtr device, int is_in, +extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, ...); -void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, +extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, + int num_valuators, int *valuators); +extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, ...); -void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, +extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, + int is_down, int first_valuator, int num_valuators, + int *valuators); +extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down, int is_absolute, int first_valuator, int num_valuators, ...); -void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, +extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down, + int is_absolute, int first_valuator, int num_valuators, + int *valuators); +extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); -int xf86ActivateDevice(LocalDevicePtr local); -LocalDevicePtr xf86FirstLocalDevice(void); -int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); -void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); -void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); -void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, +extern _X_EXPORT int xf86ActivateDevice(LocalDevicePtr local); +extern _X_EXPORT LocalDevicePtr xf86FirstLocalDevice(void); +extern _X_EXPORT int xf86ScaleAxis(int Cx, int Sxhigh, int Sxlow, int Rxhigh, int Rxlow); +extern _X_EXPORT void xf86XInputSetScreen(LocalDevicePtr local, int screen_number, int x, int y); +extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer options); +extern _X_EXPORT void xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res); -void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); -void xf86AddEnabledDevice(InputInfoPtr pInfo); -void xf86RemoveEnabledDevice(InputInfoPtr pInfo); -void xf86DisableDevice(DeviceIntPtr dev, Bool panic); -void xf86EnableDevice(DeviceIntPtr dev); +extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); +extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo); +extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); +extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev); +/* not exported */ int xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL is_auto); /* xf86Helper.c */ -void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); -void xf86DeleteInputDriver(int drvIndex); -InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); -InputDriverPtr xf86LookupInputDriver(const char *name); -InputInfoPtr xf86LookupInput(const char *name); -void xf86DeleteInput(InputInfoPtr pInp, int flags); -void xf86MotionHistoryAllocate(LocalDevicePtr local); -int xf86GetMotionEvents(DeviceIntPtr dev, xTimecoord *buff, - unsigned long start, unsigned long stop, - ScreenPtr pScreen, BOOL core); +extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags); +extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex); +extern _X_EXPORT InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags); +extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name); +extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name); +extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags); +extern _X_EXPORT void xf86MotionHistoryAllocate(LocalDevicePtr local); /* xf86Option.c */ -void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, +extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, pointer extraOpts); diff --git a/xorg-server/hw/xfree86/common/xf86cmap.c b/xorg-server/hw/xfree86/common/xf86cmap.c index e57844764..36e6f96de 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.c +++ b/xorg-server/hw/xfree86/common/xf86cmap.c @@ -49,10 +49,10 @@ #include "xf86_OSproc.h" #include "xf86str.h" #include "micmap.h" +#include "xf86Crtc.h" #ifdef XFreeXDGA -#define _XF86DGA_SERVER_ -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include "dgaproc.h" #endif @@ -84,6 +84,7 @@ typedef struct { Bool (*EnterVT)(int, int); Bool (*SwitchMode)(int, DisplayModePtr, int); int (*SetDGAMode)(int, int, DGADevicePtr); + xf86ChangeGammaProc *ChangeGamma; int maxColors; int sigRGBbits; int gammaElements; @@ -126,7 +127,7 @@ static void CMapUnwrapScreen(ScreenPtr pScreen); -_X_EXPORT Bool xf86HandleColormaps( +Bool xf86HandleColormaps( ScreenPtr pScreen, int maxColors, int sigRGBbits, @@ -141,6 +142,10 @@ _X_EXPORT Bool xf86HandleColormaps( int *indices; int elements; + /* If we support a better colormap system, then pretend we succeeded. */ + if (xf86_crtc_supports_gamma(pScrn)) + return TRUE; + if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; @@ -190,6 +195,7 @@ _X_EXPORT Bool xf86HandleColormaps( pScreenPriv->EnterVT = pScrn->EnterVT; pScreenPriv->SwitchMode = pScrn->SwitchMode; pScreenPriv->SetDGAMode = pScrn->SetDGAMode; + pScreenPriv->ChangeGamma = pScrn->ChangeGamma; if (!(flags & CMAP_LOAD_EVEN_IF_OFFSCREEN)) { pScrn->EnterVT = CMapEnterVT; @@ -204,8 +210,8 @@ _X_EXPORT Bool xf86HandleColormaps( ComputeGamma(pScreenPriv); /* get the default map */ - - pDefMap = (ColormapPtr) LookupIDByType(pScreen->defColormap, RT_COLORMAP); + dixLookupResourceByType((pointer *)&pDefMap, pScreen->defColormap, + RT_COLORMAP, serverClient, DixInstallAccess); if(!CMapAllocateColormapPrivate(pDefMap)) { CMapUnwrapScreen(pScreen); @@ -557,8 +563,8 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices) switch(pVisual->class) { case StaticGray: - for(i = 0; i <= numColors - 1; i++) { - index = i * maxValue / numColors; + for(i = 0; i < numColors; i++) { + index = (i+1) * maxValue / numColors; colors[i].red = gamma[index].red; colors[i].green = gamma[index].green; colors[i].blue = gamma[index].blue; @@ -819,6 +825,7 @@ CMapUnwrapScreen(ScreenPtr pScreen) pScrn->EnterVT = pScreenPriv->EnterVT; pScrn->SwitchMode = pScreenPriv->SwitchMode; pScrn->SetDGAMode = pScreenPriv->SetDGAMode; + pScrn->ChangeGamma = pScreenPriv->ChangeGamma; xfree(pScreenPriv->gamma); xfree(pScreenPriv->PreAllocIndices); @@ -884,6 +891,7 @@ CMapChangeGamma( int index, Gamma gamma ){ + int ret = Success; ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = pScrn->pScreen; CMapColormapPtr pColPriv; @@ -949,7 +957,12 @@ CMapChangeGamma( CMapReinstallMap(pMap); } - return Success; + pScrn->ChangeGamma = pScreenPriv->ChangeGamma; + if (pScrn->ChangeGamma) + ret = pScrn->ChangeGamma(index, gamma); + pScrn->ChangeGamma = CMapChangeGamma; + + return ret; } @@ -972,7 +985,7 @@ ComputeGammaRamp ( } } -_X_EXPORT int +int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -985,6 +998,18 @@ xf86ChangeGammaRamp( CMapScreenPtr pScreenPriv; CMapLinkPtr pLink; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + if (crtc->gammaSize != size) + return BadValue; + + RRCrtcGammaSet(crtc, red, green, blue); + + return Success; + } + if(CMapScreenKey == NULL) return BadImplementation; @@ -1040,11 +1065,19 @@ xf86ChangeGammaRamp( return Success; } -_X_EXPORT int +int xf86GetGammaRampSize(ScreenPtr pScreen) { + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; CMapScreenPtr pScreenPriv; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + return crtc->gammaSize; + } + if(CMapScreenKey == NULL) return 0; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -1054,7 +1087,7 @@ xf86GetGammaRampSize(ScreenPtr pScreen) return pScreenPriv->gammaElements; } -_X_EXPORT int +int xf86GetGammaRamp( ScreenPtr pScreen, int size, @@ -1062,10 +1095,28 @@ xf86GetGammaRamp( unsigned short *green, unsigned short *blue ){ + ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; CMapScreenPtr pScreenPriv; LOCO *entry; int shift, sigbits; + if (xf86_crtc_supports_gamma(pScrn)) { + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + + if (crtc->gammaSize < size) + return BadValue; + + if (!RRCrtcGammaGet(crtc)) + return BadImplementation; + + memcpy(red, crtc->gammaRed, size * sizeof(*red)); + memcpy(green, crtc->gammaGreen, size * sizeof(*green)); + memcpy(blue, crtc->gammaBlue, size * sizeof(*blue)); + + return Success; + } + if(CMapScreenKey == NULL) return BadImplementation; @@ -1108,5 +1159,5 @@ xf86ChangeGamma( if(pScrn->ChangeGamma) return (*pScrn->ChangeGamma)(pScreen->myNum, gamma); - return Success; /* Success? */ + return BadImplementation; } diff --git a/xorg-server/hw/xfree86/common/xf86cmap.h b/xorg-server/hw/xfree86/common/xf86cmap.h index b98bd3bfd..f15844e59 100644 --- a/xorg-server/hw/xfree86/common/xf86cmap.h +++ b/xorg-server/hw/xfree86/common/xf86cmap.h @@ -36,7 +36,7 @@ #define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002 #define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004 -Bool xf86HandleColormaps( +extern _X_EXPORT Bool xf86HandleColormaps( ScreenPtr pScreen, int maxCol, int sigRGBbits, @@ -45,13 +45,13 @@ Bool xf86HandleColormaps( unsigned int flags ); -int +extern _X_EXPORT int xf86ChangeGamma( ScreenPtr pScreen, Gamma newGamma ); -int +extern _X_EXPORT int xf86ChangeGammaRamp( ScreenPtr pScreen, int size, @@ -60,9 +60,9 @@ xf86ChangeGammaRamp( unsigned short *blue ); -int xf86GetGammaRampSize(ScreenPtr pScreen); +extern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen); -int +extern _X_EXPORT int xf86GetGammaRamp( ScreenPtr pScreen, int size, diff --git a/xorg-server/hw/xfree86/common/xf86fbBus.c b/xorg-server/hw/xfree86/common/xf86fbBus.c index 102f6b1b2..059e378e3 100644 --- a/xorg-server/hw/xfree86/common/xf86fbBus.c +++ b/xorg-server/hw/xfree86/common/xf86fbBus.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 2000-2001 by The XFree86 Project, Inc. * @@ -41,36 +40,35 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" - Bool fbSlotClaimed = FALSE; -_X_EXPORT int +int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; int num; + + if (pciSlotClaimed) + return -1; +#if defined(__sparc__) || defined (__sparc64__) + if (sbusSlotClaimed) + return -1; +#endif num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; - p->busType = BUS_NONE; + p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - p->busAcc = NULL; fbSlotClaimed = TRUE; return num; @@ -88,7 +86,7 @@ xf86GetFbInfoForScreen(int scrnIndex) for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) { p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]]; - if (p->busType == BUS_NONE) { + if (p->bus.type == BUS_NONE) { num++; } } diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c index 5471c58f0..5b8871723 100644 --- a/xorg-server/hw/xfree86/common/xf86fbman.c +++ b/xorg-server/hw/xfree86/common/xf86fbman.c @@ -45,7 +45,7 @@ static int xf86FBManagerKeyIndex; static DevPrivateKey xf86FBManagerKey; -_X_EXPORT Bool xf86RegisterOffscreenManager( +Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ){ @@ -57,7 +57,7 @@ _X_EXPORT Bool xf86RegisterOffscreenManager( } -_X_EXPORT Bool +Bool xf86FBManagerRunning(ScreenPtr pScreen) { if(xf86FBManagerKey == NULL) @@ -68,7 +68,7 @@ xf86FBManagerRunning(ScreenPtr pScreen) return TRUE; } -_X_EXPORT Bool +Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, @@ -86,7 +86,7 @@ xf86RegisterFreeBoxCallback( } -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateOffscreenArea( ScreenPtr pScreen, int w, int h, @@ -108,7 +108,7 @@ xf86AllocateOffscreenArea( } -_X_EXPORT FBLinearPtr +FBLinearPtr xf86AllocateOffscreenLinear( ScreenPtr pScreen, int length, @@ -130,7 +130,7 @@ xf86AllocateOffscreenLinear( } -_X_EXPORT void +void xf86FreeOffscreenArea(FBAreaPtr area) { FBManagerFuncsPtr funcs; @@ -149,7 +149,7 @@ xf86FreeOffscreenArea(FBAreaPtr area) } -_X_EXPORT void +void xf86FreeOffscreenLinear(FBLinearPtr linear) { FBManagerFuncsPtr funcs; @@ -168,7 +168,7 @@ xf86FreeOffscreenLinear(FBLinearPtr linear) } -_X_EXPORT Bool +Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h @@ -186,7 +186,7 @@ xf86ResizeOffscreenArea( return (*funcs->ResizeOffscreenArea)(resize, w, h); } -_X_EXPORT Bool +Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size @@ -205,7 +205,7 @@ xf86ResizeOffscreenLinear( } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *w, int *h, @@ -228,7 +228,7 @@ xf86QueryLargestOffscreenArea( pScreen, w, h, gran, preferences, severity); } -_X_EXPORT Bool +Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, @@ -250,7 +250,7 @@ xf86QueryLargestOffscreenLinear( } -_X_EXPORT Bool +Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerFuncsPtr funcs; @@ -802,10 +802,10 @@ LinearRemoveCBWrapper(FBAreaPtr area) xfree(pLink); } -#ifdef DEBUG static void -Dump(FBLinearLinkPtr pLink) +DumpDebug(FBLinearLinkPtr pLink) { +#ifdef DEBUG if (!pLink) ErrorF("MMmm, PLINK IS NULL!\n"); while (pLink) { @@ -817,8 +817,8 @@ Dump(FBLinearLinkPtr pLink) pLink = pLink->next; } -} #endif +} static FBLinearPtr AllocateLinear( @@ -889,9 +889,7 @@ AllocateLinear( linear->linear.RemoveLinearCallback = NULL; linear->linear.devPrivate.ptr = NULL; -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return &(linear->linear); } @@ -916,15 +914,11 @@ localAllocateOffscreenLinear( xf86FBScreenKey); /* Try to allocate from linear memory first...... */ -#ifdef DEBUG - ErrorF("ALLOCATING LINEAR\n"); -#endif + DebugF("ALLOCATING LINEAR\n"); if ((linear = AllocateLinear(offman, length, gran, privData))) return linear; -#ifdef DEBUG - ErrorF("NOPE, ALLOCATING AREA\n"); -#endif + DebugF("NOPE, ALLOCATING AREA\n"); if(!(link = xalloc(sizeof(FBLinearLink)))) return NULL; @@ -978,9 +972,7 @@ localAllocateOffscreenLinear( } else xfree(link); -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return linear; } @@ -1005,17 +997,13 @@ localFreeOffscreenLinear(FBLinearPtr linear) } if(pLink->area) { /* really an XY area */ -#ifdef DEBUG - ErrorF("FREEING AREA\n"); -#endif + DebugF("FREEING AREA\n"); localFreeOffscreenArea(pLink->area); if(pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; xfree(pLink); -#ifdef DEBUG - Dump(offman->LinearAreas); -#endif + DumpDebug(offman->LinearAreas); return; } @@ -1037,10 +1025,8 @@ localFreeOffscreenLinear(FBLinearPtr linear) } } -#ifdef DEBUG - ErrorF("FREEING LINEAR\n"); - Dump(offman->LinearAreas); -#endif + DebugF("FREEING LINEAR\n"); + DumpDebug(offman->LinearAreas); } @@ -1196,7 +1182,7 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox @@ -1233,7 +1219,7 @@ xf86InitFBManager( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixelArea, @@ -1325,7 +1311,7 @@ xf86InitFBManagerArea( return ret; } -_X_EXPORT Bool +Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr FullRegion @@ -1363,7 +1349,7 @@ xf86InitFBManagerRegion( return TRUE; } -_X_EXPORT Bool +Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, @@ -1407,7 +1393,7 @@ xf86InitFBManagerLinear( disappear after the next release. People should use the real linear functions instead */ -_X_EXPORT FBAreaPtr +FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, diff --git a/xorg-server/hw/xfree86/common/xf86fbman.h b/xorg-server/hw/xfree86/common/xf86fbman.h index 4f2eac5e6..1b3c31635 100644 --- a/xorg-server/hw/xfree86/common/xf86fbman.h +++ b/xorg-server/hw/xfree86/common/xf86fbman.h @@ -110,43 +110,43 @@ typedef struct { } FBManagerFuncs, *FBManagerFuncsPtr; -Bool xf86RegisterOffscreenManager( +extern _X_EXPORT Bool xf86RegisterOffscreenManager( ScreenPtr pScreen, FBManagerFuncsPtr funcs ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerRegion( ScreenPtr pScreen, RegionPtr ScreenRegion ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerArea( ScreenPtr pScreen, int PixalArea, int Verbosity ); -Bool +extern _X_EXPORT Bool xf86InitFBManager( ScreenPtr pScreen, BoxPtr FullBox ); -Bool +extern _X_EXPORT Bool xf86InitFBManagerLinear( ScreenPtr pScreen, int offset, int size ); -Bool +extern _X_EXPORT Bool xf86FBManagerRunning( ScreenPtr pScreen ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateOffscreenArea ( ScreenPtr pScreen, int w, int h, @@ -156,7 +156,7 @@ xf86AllocateOffscreenArea ( pointer privData ); -FBAreaPtr +extern _X_EXPORT FBAreaPtr xf86AllocateLinearOffscreenArea ( ScreenPtr pScreen, int length, @@ -166,7 +166,7 @@ xf86AllocateLinearOffscreenArea ( pointer privData ); -FBLinearPtr +extern _X_EXPORT FBLinearPtr xf86AllocateOffscreenLinear ( ScreenPtr pScreen, int length, @@ -176,36 +176,36 @@ xf86AllocateOffscreenLinear ( pointer privData ); -void xf86FreeOffscreenArea(FBAreaPtr area); -void xf86FreeOffscreenLinear(FBLinearPtr area); +extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area); +extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenArea( FBAreaPtr resize, int w, int h ); -Bool +extern _X_EXPORT Bool xf86ResizeOffscreenLinear( FBLinearPtr resize, int size ); -Bool +extern _X_EXPORT Bool xf86RegisterFreeBoxCallback( ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, pointer devPriv ); -Bool +extern _X_EXPORT Bool xf86PurgeUnlockedOffscreenAreas( ScreenPtr pScreen ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *width, int *height, @@ -214,7 +214,7 @@ xf86QueryLargestOffscreenArea( int priority ); -Bool +extern _X_EXPORT Bool xf86QueryLargestOffscreenLinear( ScreenPtr pScreen, int *size, diff --git a/xorg-server/hw/xfree86/common/xf86noBus.c b/xorg-server/hw/xfree86/common/xf86noBus.c index 0e3e3cc6b..0b9634918 100644 --- a/xorg-server/hw/xfree86/common/xf86noBus.c +++ b/xorg-server/hw/xfree86/common/xf86noBus.c @@ -1,4 +1,3 @@ - /* * Copyright (c) 2000-2002 by The XFree86 Project, Inc. * @@ -41,17 +40,13 @@ #include "os.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" - -_X_EXPORT int +int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; @@ -61,14 +56,10 @@ xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; - p->busType = BUS_NONE; + p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - p->busAcc = NULL; return num; } diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index 5b29a1511..df62e0766 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -41,23 +41,17 @@ #include "Pci.h" #include "xf86.h" #include "xf86Priv.h" -#include "xf86Resources.h" /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS -#define NEED_OS_RAC_PROTOS #include "xf86_OSproc.h" -#include "xf86RAC.h" /* Bus-specific globals */ Bool pciSlotClaimed = FALSE; -static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw */ - -/* PCI classes that get included in xf86PciVideoInfo */ #define PCIINFOCLASSES(c) \ ( (((c) & 0x00ff0000) == (PCI_CLASS_PREHISTORIC << 16)) \ || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \ @@ -81,23 +75,7 @@ static struct pci_device ** xf86PciVideoInfo = NULL; /* PCI probe for video hw * (((c) & 0x00ffff00) \ == ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8))) -/* - * PCI classes for which potentially destructive checking of the map sizes - * may be done. Any classes where this may be unsafe should be omitted - * from this list. - */ -#define PCINONSYSTEMCLASSES(c) PCIALWAYSPRINTCLASSES(c) - -/* - * PCI classes that use RAC - */ -#define PCISHAREDIOCLASSES(c) \ - ( (((c) & 0x00ffff00) \ - == ((PCI_CLASS_PREHISTORIC << 16) | (PCI_SUBCLASS_PREHISTORIC_VGA << 8))) \ - || IS_VGA(c) ) - - -_X_EXPORT void +void xf86FormatPciBusNumber(int busnum, char *buffer) { /* 'buffer' should be at least 8 characters long */ @@ -108,241 +86,6 @@ xf86FormatPciBusNumber(int busnum, char *buffer) } /* - * IO enable/disable related routines for PCI - */ -#define pArg ((pciArg*)arg) -#define SETBITS PCI_CMD_IO_ENABLE -static void -pciIoAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIoAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciIoAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIoAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -#undef SETBITS -#define SETBITS (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE) -static void -pciIo_MemAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIo_MemAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciIo_MemAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciIo_MemAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -#undef SETBITS -#define SETBITS (PCI_CMD_MEM_ENABLE) -static void -pciMemAccessEnable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciMemAccessEnable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl |= SETBITS | PCI_CMD_MASTER_ENABLE; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} - -static void -pciMemAccessDisable(void* arg) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciMemAccessDisable: 0x%05lx\n", *(PCITAG *)arg); -#endif - pArg->ctrl &= ~SETBITS; - pci_device_cfg_write_u32(pArg->dev, pArg->ctrl, PCI_CMD_STAT_REG); -#endif -} -#undef SETBITS -#undef pArg - - -/* move to OS layer */ -#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN) -static void -pciBusAccessEnable(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - -#ifdef DEBUG - ErrorF("pciBusAccessEnable: bus=%d\n", ptr->busdep.pci.bus); -#endif - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - if ((ctrl & MASKBITS) != PCI_PCI_BRIDGE_VGA_EN) { - ctrl = (ctrl | PCI_PCI_BRIDGE_VGA_EN) & - ~(PCI_PCI_BRIDGE_MASTER_ABORT_EN | PCI_PCI_BRIDGE_SECONDARY_RESET); - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} - -/* move to OS layer */ -static void -pciBusAccessDisable(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - -#ifdef DEBUG - ErrorF("pciBusAccessDisable: bus=%d\n", ptr->busdep.pci.bus); -#endif - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - if (ctrl & MASKBITS) { - ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET); - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} -#undef MASKBITS - -static void -pciSetBusAccess(BusAccPtr ptr) -{ -#if 0 -#ifdef DEBUG - ErrorF("pciSetBusAccess: route VGA to bus %d\n", ptr->busdep.pci.bus); -#endif - - if (!ptr->primary && !ptr->current) - return; - - if (ptr->current && ptr->current->disable_f) - (*ptr->current->disable_f)(ptr->current); - ptr->current = NULL; - - /* walk down */ - while (ptr->primary) { /* No enable for root bus */ - if (ptr != ptr->primary->current) { - if (ptr->primary->current && ptr->primary->current->disable_f) - (*ptr->primary->current->disable_f)(ptr->primary->current); - if (ptr->enable_f) - (*ptr->enable_f)(ptr); - ptr->primary->current = ptr; - } - ptr = ptr->primary; - } -#endif -} - -/* move to OS layer */ -static void -savePciState( struct pci_device * dev, pciSavePtr ptr ) -{ -#if 0 - int i; - - pci_device_cfg_read_u32( dev, & ptr->command, PCI_CMD_STAT_REG ); - - for ( i = 0; i < 6; i++ ) { - pci_device_cfg_read_u32( dev, & ptr->base[i], - PCI_CMD_BASE_REG + (i * 4) ); - } - - pci_device_cfg_read_u32( dev, & ptr->biosBase, PCI_CMD_BIOS_REG ); -#endif -} - -/* move to OS layer */ -#if 0 -static void -restorePciState( struct pci_device * dev, pciSavePtr ptr) -{ - int i; - - /* disable card before setting anything */ - pci_device_cfg_write_bits(dev, PCI_CMD_MEM_ENABLE | PCI_CMD_IO_ENABLE, 0, - PCI_CMD_STAT_REG); - - pci_device_cfg_write_u32(dev, ptr->biosBase, PCI_CMD_BIOS_REG); - - for ( i = 0; i < 6; i++ ) { - pci_device_cfg_write_u32(dev, ptr->base[i], - PCI_CMD_BASE_REG + (i * 4)); - } - - pci_device_cfg_write_u32(dev, ptr->command, PCI_CMD_STAT_REG); -} -#endif - -/* move to OS layer */ -static void -savePciBusState(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t temp; - - pci_device_cfg_read_u16( dev, & temp, PCI_PCI_BRIDGE_CONTROL_REG ); - ptr->busdep.pci.save.control = temp & ~PCI_PCI_BRIDGE_SECONDARY_RESET; - - /* Allow master aborts to complete normally on non-root buses */ - if ( ptr->busdep.pci.save.control & PCI_PCI_BRIDGE_MASTER_ABORT_EN ) { - temp = ptr->busdep.pci.save.control & ~PCI_PCI_BRIDGE_MASTER_ABORT_EN; - pci_device_cfg_read_u16( dev, & temp, PCI_PCI_BRIDGE_CONTROL_REG ); - } -#endif -} - -/* move to OS layer */ -#define MASKBITS (PCI_PCI_BRIDGE_VGA_EN | PCI_PCI_BRIDGE_MASTER_ABORT_EN) -static void -restorePciBusState(BusAccPtr ptr) -{ -#if 0 - struct pci_device * const dev = ptr->busdep.pci.dev; - uint16_t ctrl; - - /* Only restore the bits we've changed (and don't cause resets) */ - pci_device_cfg_read_u16( dev, & ctrl, PCI_PCI_BRIDGE_CONTROL_REG ); - - if ((ctrl ^ ptr->busdep.pci.save.control) & MASKBITS) { - ctrl &= ~(MASKBITS | PCI_PCI_BRIDGE_SECONDARY_RESET); - ctrl |= ptr->busdep.pci.save.control & MASKBITS; - pci_device_cfg_write_u16(dev, ctrl, PCI_PCI_BRIDGE_CONTROL_REG); - } -#endif -} -#undef MASKBITS - - -/* * xf86Bus.c interface */ @@ -353,6 +96,7 @@ xf86PciProbe(void) int num = 0; struct pci_device *info; struct pci_device_iterator *iter; + struct pci_device ** xf86PciVideoInfo = NULL; if (!xf86scanpci()) { @@ -371,6 +115,12 @@ xf86PciProbe(void) xf86PciVideoInfo[num - 1] = info; pci_device_probe(info); +#ifdef HAVE_PCI_DEVICE_IS_BOOT_VGA + if (pci_device_is_boot_vga(info)) { + primaryBus.type = BUS_PCI; + primaryBus.id.pci = info; + } +#endif info->user_data = 0; } } @@ -464,250 +214,16 @@ xf86PciProbe(void) } } -void -initPciState(void) -{ - unsigned i; - pciAccPtr pcaccp; - - if (xf86PciVideoInfo == NULL) { - return; - } - - for (i = 0 ; xf86PciVideoInfo[i] != NULL ; i++) { - struct pci_device * const pvp = xf86PciVideoInfo[i]; - - if (pvp->user_data == 0) { - pcaccp = xnfalloc( sizeof( pciAccRec ) ); - pvp->user_data = (intptr_t) pcaccp; - - pcaccp->arg.dev = pvp; - pcaccp->ioAccess.AccessDisable = pciIoAccessDisable; - pcaccp->ioAccess.AccessEnable = pciIoAccessEnable; - pcaccp->ioAccess.arg = &pcaccp->arg; - pcaccp->io_memAccess.AccessDisable = pciIo_MemAccessDisable; - pcaccp->io_memAccess.AccessEnable = pciIo_MemAccessEnable; - pcaccp->io_memAccess.arg = &pcaccp->arg; - pcaccp->memAccess.AccessDisable = pciMemAccessDisable; - pcaccp->memAccess.AccessEnable = pciMemAccessEnable; - pcaccp->memAccess.arg = &pcaccp->arg; - - pcaccp->ctrl = PCISHAREDIOCLASSES(pvp->device_class); - - savePciState(pvp, &pcaccp->save); - pcaccp->arg.ctrl = pcaccp->save.command; - } - } -} - -/* - * initPciBusState() - fill out the BusAccRec for a PCI bus. - * Theory: each bus is associated with one bridge connecting it - * to its parent bus. The address of a bridge is therefore stored - * in the BusAccRec of the bus it connects to. Each bus can - * have several bridges connecting secondary buses to it. Only one - * of these bridges can be open. Therefore the status of a bridge - * associated with a bus is stored in the BusAccRec of the parent - * the bridge connects to. The first member of the structure is - * a pointer to a function that open access to this bus. This function - * receives a pointer to the structure itself as argument. This - * design should be common to BusAccRecs of any type of buses we - * support. The remeinder of the structure is bus type specific. - * In this case it contains a pointer to the structure of the - * parent bus. Thus enabling access to a specific bus is simple: - * 1. Close any bridge going to secondary buses. - * 2. Climb down the ladder and enable any bridge on buses - * on the path from the CPU to this bus. - */ - -void -initPciBusState(void) -{ - static const struct pci_id_match bridge_match = { - PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, - (PCI_CLASS_BRIDGE << 16), 0x0000ff0000, 0 - }; - struct pci_device *dev; - struct pci_device_iterator *iter; - BusAccPtr pbap, pbap_tmp; - - iter = pci_id_match_iterator_create(& bridge_match); - while((dev = pci_device_next(iter)) != NULL) { - const uint8_t subclass = (dev->device_class >> 8) & 0x0ff; - int primary; - int secondary; - int subordinate; - - - pci_device_get_bridge_buses(dev, &primary, &secondary, &subordinate); - - pbap = xnfcalloc(1,sizeof(BusAccRec)); - pbap->busdep.pci.bus = secondary; - pbap->busdep.pci.primary_bus = primary; - pbap->busdep_type = BUS_PCI; - pbap->busdep.pci.dev = dev; - - pbap->set_f = pciSetBusAccess; - - switch (subclass) { - case PCI_SUBCLASS_BRIDGE_HOST: - pbap->type = BUS_PCI; - break; - case PCI_SUBCLASS_BRIDGE_PCI: - case PCI_SUBCLASS_BRIDGE_CARDBUS: - pbap->type = BUS_PCI; - pbap->save_f = savePciBusState; - pbap->restore_f = restorePciBusState; - pbap->enable_f = pciBusAccessEnable; - pbap->disable_f = pciBusAccessDisable; - savePciBusState(pbap); - break; - } - pbap->next = xf86BusAccInfo; - xf86BusAccInfo = pbap; - } - - pci_iterator_destroy(iter); - - for (pbap = xf86BusAccInfo; pbap; pbap = pbap->next) { - pbap->primary = NULL; - - if (pbap->busdep_type == BUS_PCI - && pbap->busdep.pci.primary_bus > -1) { - pbap_tmp = xf86BusAccInfo; - while (pbap_tmp) { - if (pbap_tmp->busdep_type == BUS_PCI && - pbap_tmp->busdep.pci.bus == pbap->busdep.pci.primary_bus) { - /* Don't create loops */ - if (pbap == pbap_tmp) - break; - pbap->primary = pbap_tmp; - break; - } - pbap_tmp = pbap_tmp->next; - } - } - } -} - -void -PciStateEnter(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - savePciState(paccp->arg.dev, &paccp->save); - restorePciState(paccp->arg.dev, &paccp->restore); - paccp->arg.ctrl = paccp->restore.command; - } - } -#endif -} - -void -PciBusStateEnter(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->save_f) - pbap->save_f(pbap); - pbap = pbap->next; - } -#endif -} - -void -PciStateLeave(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - savePciState(paccp->arg.dev, &paccp->restore); - restorePciState(paccp->arg.dev, &paccp->save); - } - } -#endif -} - -void -PciBusStateLeave(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->restore_f) - pbap->restore_f(pbap); - pbap = pbap->next; - } -#endif -} - -void -DisablePciAccess(void) -{ -#if 0 - unsigned i; - - if (xf86PciVideoInfo == NULL) - return; - - for ( i = 0 ; xf86PciVideoInfo[i] != NULL ; i++ ) { - pciAccPtr paccp = (pciAccPtr) xf86PciVideoInfo[i]->user_data; - - if ( (paccp != NULL) && paccp->ctrl ) { - pciIo_MemAccessDisable(paccp->io_memAccess.arg); - } - } -#endif -} - -void -DisablePciBusAccess(void) -{ -#if 0 - BusAccPtr pbap = xf86BusAccInfo; - - while (pbap) { - if (pbap->disable_f) - pbap->disable_f(pbap); - if (pbap->primary) - pbap->primary->current = NULL; - pbap = pbap->next; - } -#endif -} - /* * If the slot requested is already in use, return -1. * Otherwise, claim the slot for the screen requesting it. */ -_X_EXPORT int +int xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p = NULL; - pciAccPtr paccp = (pciAccPtr) d->user_data; - BusAccPtr pbap = xf86BusAccInfo; - const unsigned bus = PCI_MAKE_BUS(d->domain, d->bus); - int num; if (xf86CheckPciSlot(d)) { @@ -721,25 +237,6 @@ xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, p->inUse = FALSE; if (dev) xf86AddDevToEntity(num, dev); - /* Here we initialize the access structure */ - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - if (paccp != NULL) { - p->access->fallback = & paccp->io_memAccess; - p->access->pAccess = & paccp->io_memAccess; - paccp->ctrl = TRUE; /* mark control if not already */ - } - else { - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; - } - - p->busAcc = NULL; - while (pbap) { - if (pbap->type == BUS_PCI && pbap->busdep.pci.bus == bus) - p->busAcc = pbap; - pbap = pbap->next; - } - pciSlotClaimed = TRUE; if (active) { @@ -753,11 +250,30 @@ xf86ClaimPciSlot(struct pci_device * d, DriverPtr drvp, } /* + * Unclaim PCI slot, e.g. if probing failed, so that a different driver can claim. + */ +void +xf86UnclaimPciSlot(struct pci_device *d) +{ + int i; + + for (i = 0; i < xf86NumEntities; i++) { + const EntityPtr p = xf86Entities[i]; + + if ((p->bus.type == BUS_PCI) && (p->bus.id.pci == d)) { + /* Probably the slot should be deallocated? */ + p->bus.type = BUS_NONE; + return; + } + } +} + +/* * Parse a BUS ID string, and return the PCI bus parameters if it was * in the correct format for a PCI bus id. */ -_X_EXPORT Bool +Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) { /* @@ -831,7 +347,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) * Compare a BUS ID string with a PCI bus id. Return TRUE if they match. */ -_X_EXPORT Bool +Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func) { int ibus, idevice, ifunc; @@ -848,7 +364,7 @@ xf86ComparePciBusString(const char *busID, int bus, int device, int func) * is PCI and bus, dev and func numbers match. */ -_X_EXPORT Bool +Bool xf86IsPrimaryPci(struct pci_device *pPci) { return ((primaryBus.type == BUS_PCI) && (pPci == primaryBus.id.pci)); @@ -857,7 +373,7 @@ xf86IsPrimaryPci(struct pci_device *pPci) /* * xf86GetPciInfoForEntity() -- Get the pciVideoRec of entity. */ -_X_EXPORT struct pci_device * +struct pci_device * xf86GetPciInfoForEntity(int entityIndex) { EntityPtr p; @@ -873,7 +389,7 @@ xf86GetPciInfoForEntity(int entityIndex) * xf86CheckPciMemBase() checks that the memory base value matches one of the * PCI base address register values for the given PCI device. */ -_X_EXPORT Bool +Bool xf86CheckPciMemBase( struct pci_device * pPci, memType base ) { int i; @@ -888,7 +404,7 @@ xf86CheckPciMemBase( struct pci_device * pPci, memType base ) * Check if the slot requested is free. If it is already in use, return FALSE. */ -_X_EXPORT Bool +Bool xf86CheckPciSlot(const struct pci_device *d) { int i; @@ -904,52 +420,3 @@ xf86CheckPciSlot(const struct pci_device *d) } -void -pciConvertRange2Host(int entityIndex, resRange *pRange) -{ - struct pci_device *const pvp = xf86GetPciInfoForEntity(entityIndex); - const PCITAG tag = PCI_MAKE_TAG(PCI_MAKE_BUS(pvp->domain, pvp->bus), - pvp->dev, pvp->func); - - if (pvp == NULL) { - return; - } - - if (!(pRange->type & ResBus)) - return; - - switch(pRange->type & ResPhysMask) { - case ResMem: - switch(pRange->type & ResExtMask) { - case ResBlock: - pRange->rBegin = pciBusAddrToHostAddr(tag,PCI_MEM, pRange->rBegin); - pRange->rEnd = pciBusAddrToHostAddr(tag,PCI_MEM, pRange->rEnd); - break; - case ResSparse: - pRange->rBase = pciBusAddrToHostAddr(tag,PCI_MEM_SPARSE_BASE, - pRange->rBegin); - pRange->rMask = pciBusAddrToHostAddr(tag,PCI_MEM_SPARSE_MASK, - pRange->rEnd); - break; - } - break; - case ResIo: - switch(pRange->type & ResExtMask) { - case ResBlock: - pRange->rBegin = pciBusAddrToHostAddr(tag,PCI_IO, pRange->rBegin); - pRange->rEnd = pciBusAddrToHostAddr(tag,PCI_IO, pRange->rEnd); - break; - case ResSparse: - pRange->rBase = pciBusAddrToHostAddr(tag,PCI_IO_SPARSE_BASE - , pRange->rBegin); - pRange->rMask = pciBusAddrToHostAddr(tag,PCI_IO_SPARSE_MASK - , pRange->rEnd); - break; - } - break; - } - - /* Set domain number */ - pRange->type &= ~(ResDomain | ResBus); - pRange->type |= pvp->domain << 24; -} diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.h b/xorg-server/hw/xfree86/common/xf86pciBus.h index 1cbfa38ea..3125e0db8 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.h +++ b/xorg-server/hw/xfree86/common/xf86pciBus.h @@ -33,42 +33,6 @@ #ifndef _XF86_PCI_BUS_H #define _XF86_PCI_BUS_H -#define PCITAG_SPECIAL pciTag(0xFF,0xFF,0xFF) - -typedef struct { - CARD32 command; - CARD32 base[6]; - CARD32 biosBase; -} pciSave, *pciSavePtr; - -typedef struct { - struct pci_device * dev; - CARD32 ctrl; -} pciArg; - -typedef struct { - pciArg arg; - xf86AccessRec ioAccess; - xf86AccessRec io_memAccess; - xf86AccessRec memAccess; - pciSave save; - pciSave restore; - Bool ctrl; -} pciAccRec, *pciAccPtr; - -typedef union { - CARD16 control; -} pciBridgesSave, *pciBridgesSavePtr; - void xf86PciProbe(void); -void initPciState(void); -void initPciBusState(void); -void DisablePciAccess(void); -void DisablePciBusAccess(void); -void PciStateEnter(void); -void PciBusStateEnter(void); -void PciStateLeave(void); -void PciBusStateLeave(void); -void pciConvertRange2Host(int entityIndex, resRange *pRange); #endif /* _XF86_PCI_BUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.c b/xorg-server/hw/xfree86/common/xf86sbusBus.c index af2b14539..7b23233aa 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.c +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.c @@ -33,7 +33,6 @@ #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" -#include "xf86Resources.h" #include "xf86cmap.h" #include "xf86Bus.h" @@ -320,7 +319,7 @@ xf86CheckSbusSlot(int fbNum) for (i = 0; i < xf86NumEntities; i++) { p = xf86Entities[i]; /* Check if this SBUS slot is taken */ - if (p->busType == BUS_SBUS && p->sbusBusId.fbNum == fbNum) + if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum) return FALSE; } @@ -345,22 +344,18 @@ xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp, p = xf86Entities[num]; p->driver = drvp; p->chipset = -1; - p->busType = BUS_SBUS; + p->bus.type = BUS_SBUS; xf86AddDevToEntity(num, dev); - p->sbusBusId.fbNum = psdp->fbNum; + p->bus.id.sbus.fbNum = psdp->fbNum; p->active = active; p->inUse = FALSE; - /* Here we initialize the access structure */ - p->access = xnfcalloc(1,sizeof(EntityAccessRec)); - p->access->fallback = &AccessNULL; - p->access->pAccess = &AccessNULL; sbusSlotClaimed = TRUE; return num; } else return -1; } -_X_EXPORT int +int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities) @@ -406,11 +401,6 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, return 0; } - if (xf86DoProbe) { - xfree(instances); - return numFound; - } - if (sparcPromInit() >= 0) useProm = 1; @@ -435,9 +425,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, return actualcards; } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, allocatedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, allocatedInstances); for (i = 0; i < allocatedInstances; i++) { char *promPath = NULL; @@ -494,9 +482,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, xfree(promPath); } -#ifdef DEBUG - ErrorF("%s instances found: %d\n", driverName, numClaimedInstances); -#endif + DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Of the claimed instances, check that another driver hasn't already @@ -510,11 +496,9 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, if (!xf86CheckSbusSlot(psdp->fbNum)) continue; -#ifdef DEBUG - ErrorF("%s: card at fb%d %08x is claimed by a Device section\n", + DebugF("%s: card at fb%d %08x is claimed by a Device section\n", driverName, psdp->fbNum, psdp->node.node); -#endif - + /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); @@ -536,38 +520,38 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, /* * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity. */ -_X_EXPORT sbusDevicePtr +sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex) { sbusDevicePtr *psdpp; EntityPtr p = xf86Entities[entityIndex]; if (entityIndex >= xf86NumEntities - || p->busType != BUS_SBUS) return NULL; + || p->bus.type != BUS_SBUS) return NULL; for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) { - if (p->sbusBusId.fbNum == (*psdpp)->fbNum) + if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum) return (*psdpp); } return NULL; } -_X_EXPORT int +int xf86GetEntityForSbusInfo(sbusDevicePtr psdp) { int i; for (i = 0; i < xf86NumEntities; i++) { EntityPtr p = xf86Entities[i]; - if (p->busType != BUS_SBUS) continue; + if (p->bus.type != BUS_SBUS) continue; - if (p->sbusBusId.fbNum == psdp->fbNum) + if (p->bus.id.sbus.fbNum == psdp->fbNum) return i; } return -1; } -_X_EXPORT void +void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) { DisplayModePtr mode; @@ -667,7 +651,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen) return (*pScreen->CloseScreen) (i, pScreen); } -_X_EXPORT Bool +Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) { sbusCmapPtr cmap; diff --git a/xorg-server/hw/xfree86/common/xf86sbusBus.h b/xorg-server/hw/xfree86/common/xf86sbusBus.h index 6161a08e2..5cdb0951a 100644 --- a/xorg-server/hw/xfree86/common/xf86sbusBus.h +++ b/xorg-server/hw/xfree86/common/xf86sbusBus.h @@ -56,44 +56,45 @@ typedef struct sbus_device { char *device; } sbusDevice, *sbusDevicePtr; -extern struct sbus_devtable { +struct sbus_devtable { int devId; int fbType; char *promName; char *driverName; char *descr; -} sbusDeviceTable[]; +}; -void xf86SbusProbe(void); -extern sbusDevicePtr *xf86SbusInfo; +extern _X_EXPORT void xf86SbusProbe(void); +extern _X_EXPORT sbusDevicePtr *xf86SbusInfo; +extern _X_EXPORT struct sbus_devtable sbusDeviceTable[]; -int xf86MatchSbusInstances(const char *driverName, int sbusDevId, +extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); -sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); -int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); -void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); -pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, +extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); +extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); +extern _X_EXPORT pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size); -void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); -void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); -void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); -Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); +extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size); +extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); +extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); +extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); -extern int promRootNode; +extern _X_EXPORT int promRootNode; -int promGetSibling(int node); -int promGetChild(int node); -char * promGetProperty(const char *prop, int *lenp); -int promGetBool(const char *prop); +extern _X_EXPORT int promGetSibling(int node); +extern _X_EXPORT int promGetChild(int node); +extern _X_EXPORT char * promGetProperty(const char *prop, int *lenp); +extern _X_EXPORT int promGetBool(const char *prop); -int sparcPromInit(void); -void sparcPromClose(void); -char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); -int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); -void sparcPromAssignNodes(void); -char * sparcPromNode2Pathname(sbusPromNodePtr pnode); -int sparcPromPathname2Node(const char *pathName); -char *sparcDriverName(void); +extern _X_EXPORT int sparcPromInit(void); +extern _X_EXPORT void sparcPromClose(void); +extern _X_EXPORT char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); +extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); +extern _X_EXPORT void sparcPromAssignNodes(void); +extern _X_EXPORT char * sparcPromNode2Pathname(sbusPromNodePtr pnode); +extern _X_EXPORT int sparcPromPathname2Node(const char *pathName); +extern _X_EXPORT char *sparcDriverName(void); #endif /* _XF86_SBUSBUS_H */ diff --git a/xorg-server/hw/xfree86/common/xf86str.h b/xorg-server/hw/xfree86/common/xf86str.h index 904c369a6..b9a2e06de 100644 --- a/xorg-server/hw/xfree86/common/xf86str.h +++ b/xorg-server/hw/xfree86/common/xf86str.h @@ -342,21 +342,6 @@ typedef struct _DriverRec { */ #define HaveDriverFuncs 1 - -/* - * The optional module list struct. This allows modules exporting helping - * functions to configuration tools, the Xserver, or any other - * application/module interested in such information. - */ -_X_DEPRECATED typedef struct _ModuleInfoRec { - int moduleVersion; - char * moduleName; - pointer module; - int refCount; - const OptionInfoRec * (*AvailableOptions)(void *unused); - pointer unused[8]; /* leave some space for more fields */ -} ModuleInfoRec, *ModuleInfoPtr; - /* * These are the private bus types. New types can be added here. Types * required for the public interface should be added to xf86str.h, with @@ -532,7 +517,7 @@ typedef struct _confdrirec { /* These values should be adjusted when new fields are added to ScrnInfoRec */ #define NUM_RESERVED_INTS 16 -#define NUM_RESERVED_POINTERS 15 +#define NUM_RESERVED_POINTERS 14 #define NUM_RESERVED_FUNCS 11 typedef pointer (*funcPointer)(void); @@ -571,145 +556,6 @@ typedef enum { PM_NONE } pmWait; -/* - * The IO access enabler struct. This contains the address for - * the IOEnable/IODisable funcs for their specific bus along - * with a pointer to data needed by them - */ -typedef struct _AccessRec { - void (*AccessDisable)(void *arg); - void (*AccessEnable)(void *arg); - void *arg; -} xf86AccessRec, *xf86AccessPtr; - -typedef struct { - xf86AccessPtr mem; - xf86AccessPtr io; - xf86AccessPtr io_mem; -} xf86SetAccessFuncRec, *xf86SetAccessFuncPtr; - -/* bus-access-related types */ -typedef enum { - NONE, - IO, - MEM_IO, - MEM -} resType; - -typedef struct _EntityAccessRec { - xf86AccessPtr fallback; - xf86AccessPtr pAccess; - resType rt; - pointer busAcc; - struct _EntityAccessRec *next; -} EntityAccessRec, *EntityAccessPtr; - -typedef struct _CurrAccRec { - EntityAccessPtr pMemAccess; - EntityAccessPtr pIoAccess; -} xf86CurrentAccessRec, *xf86CurrentAccessPtr; - -/* new RAC */ - -/* Resource Type values */ -#define ResNone ((unsigned long)(-1)) - -#define ResMem 0x0001 -#define ResIo 0x0002 -#define ResPhysMask 0x000F - -#define ResExclusive 0x0010 -#define ResShared 0x0020 -#define ResAny 0x0040 -#define ResAccMask 0x0070 -#define ResUnused 0x0080 - -#define ResUnusedOpr 0x0100 -#define ResDisableOpr 0x0200 -#define ResOprMask 0x0300 - -#define ResBlock 0x0400 -#define ResSparse 0x0800 -#define ResExtMask 0x0C00 - -#define ResEstimated 0x001000 -#define ResInit 0x002000 -#define ResBios 0x004000 -#define ResMiscMask 0x00F000 - -#define ResBus 0x010000 - -#if defined(__alpha__) && defined(linux) -# define ResDomain 0x1ff000000ul -#else -# define ResDomain 0xff000000ul -#endif -#define ResTypeMask (ResPhysMask | ResDomain) /* For conflict check */ - -#define ResEnd ResNone - -#define ResExcMemBlock (ResMem | ResExclusive | ResBlock) -#define ResExcIoBlock (ResIo | ResExclusive | ResBlock) -#define ResShrMemBlock (ResMem | ResShared | ResBlock) -#define ResShrIoBlock (ResIo | ResShared | ResBlock) -#define ResExcUusdMemBlock (ResMem | ResExclusive | ResUnused | ResBlock) -#define ResExcUusdIoBlock (ResIo | ResExclusive | ResUnused | ResBlock) -#define ResShrUusdMemBlock (ResMem | ResShared | ResUnused | ResBlock) -#define ResShrUusdIoBlock (ResIo | ResShared | ResUnused | ResBlock) -#define ResExcUusdMemSparse (ResMem | ResExclusive | ResUnused | ResSparse) -#define ResExcUusdIoSparse (ResIo | ResExclusive | ResUnused | ResSparse) -#define ResShrUusdMemSparse (ResMem | ResShared | ResUnused | ResSparse) -#define ResShrUusdIoSparse (ResIo | ResShared | ResUnused | ResSparse) - -#define ResExcMemSparse (ResMem | ResExclusive | ResSparse) -#define ResExcIoSparse (ResIo | ResExclusive | ResSparse) -#define ResShrMemSparse (ResMem | ResShared | ResSparse) -#define ResShrIoSparse (ResIo | ResShared | ResSparse) -#define ResUusdMemSparse (ResMem | ResUnused | ResSparse) -#define ResUusdIoSparse (ResIo | ResUnused | ResSparse) - -#define ResIsMem(r) (((r)->type & ResPhysMask) == ResMem) -#define ResIsIo(r) (((r)->type & ResPhysMask) == ResIo) -#define ResIsExclusive(r) (((r)->type & ResAccMask) == ResExclusive) -#define ResIsShared(r) (((r)->type & ResAccMask) == ResShared) -#define ResIsUnused(r) (((r)->type & ResAccMask) == ResUnused) -#define ResIsBlock(r) (((r)->type & ResExtMask) == ResBlock) -#define ResIsSparse(r) (((r)->type & ResExtMask) == ResSparse) -#define ResIsEstimated(r) (((r)->type & ResMiscMask) == ResEstimated) - -typedef struct { - unsigned long type; /* shared, exclusive, unused etc. */ - memType a; - memType b; -} resRange, *resList; - -#define RANGE_TYPE(type, domain) \ - (((unsigned long)(domain) << 24) | ((type) & ~ResBus)) -#define RANGE(r,u,v,t) {\ - (r).a = (u);\ - (r).b = (v);\ - (r).type = (t);\ - } - -#define rBase a -#define rMask b -#define rBegin a -#define rEnd b - -/* resource record */ -typedef struct _resRec *resPtr; -typedef struct _resRec { - resRange val; - int entityIndex; /* who owns the resource */ - resPtr next; -} resRec; - -#define sparse_base val.rBase -#define sparse_mask val.rMask -#define block_begin val.rBegin -#define block_end val.rEnd -#define res_type val.type - typedef struct _PciChipsets { /** * Key used to match this device with its name in an array of @@ -735,12 +581,14 @@ typedef struct _PciChipsets { */ int PCIid; - /** - * Resources associated with this type of device. - */ - resRange *resList; +/* dummy place holders for drivers to build against old/new servers */ +#define RES_UNDEFINED NULL +#define RES_EXCLUSIVE_VGA NULL +#define RES_SHARED_VGA NULL + void *dummy; } PciChipsets; + /* Entity properties */ typedef void (*EntityProc)(int entityIndex,pointer private); @@ -749,7 +597,6 @@ typedef struct _entityInfo { BusRec location; int chipset; Bool active; - resPtr resources; GDevPtr device; DriverPtr driver; } EntityInfoRec, *EntityInfoPtr; @@ -761,18 +608,6 @@ typedef enum { OPERATING } xf86State; -typedef enum { - NOTIFY_SETUP_TRANSITION, - NOTIFY_SETUP, - NOTIFY_OPERATING, - NOTIFY_OPERATING_TRANSITION, - NOTIFY_ENABLE, - NOTIFY_ENTER, - NOTIFY_LEAVE -} xf86NotifyState; - -typedef void (*xf86StateChangeNotificationCallbackFunc)(xf86NotifyState state,pointer); - /* DGA */ typedef struct { @@ -941,12 +776,6 @@ typedef struct _ScrnInfoRec { int chipID; int chipRev; - int racMemFlags; - int racIoFlags; - pointer access; - xf86CurrentAccessPtr CurrentAccess; - resType resourceType; - pointer busAccess; /* Allow screens to be enabled/disabled individually */ Bool vtSema; @@ -967,6 +796,8 @@ typedef struct _ScrnInfoRec { int reservedInt[NUM_RESERVED_INTS]; int * entityInstanceList; + struct pci_device *vgaDev; + pointer reservedPtr[NUM_RESERVED_POINTERS]; /* diff --git a/xorg-server/hw/xfree86/common/xf86xv.c b/xorg-server/hw/xfree86/common/xf86xv.c index 02d6e37a4..abbe03397 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.c +++ b/xorg-server/hw/xfree86/common/xf86xv.c @@ -132,7 +132,7 @@ int (*XvScreenInitProc)(ScreenPtr) = NULL; static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; -_X_EXPORT int +int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ){ @@ -149,7 +149,7 @@ xf86XVRegisterGenericAdaptorDriver( return 1; } -_X_EXPORT int +int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **adaptors @@ -188,7 +188,7 @@ typedef struct { static OffscreenImageRec OffscreenImages[MAXSCREENS]; -_X_EXPORT Bool +Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, @@ -200,7 +200,7 @@ xf86XVRegisterOffscreenImages( return TRUE; } -_X_EXPORT XF86OffscreenImagePtr +XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num @@ -210,20 +210,20 @@ xf86XVQueryOffscreenImages( } -_X_EXPORT XF86VideoAdaptorPtr +XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { return xcalloc(1, sizeof(XF86VideoAdaptorRec)); } -_X_EXPORT void +void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { xfree(ptr); } -_X_EXPORT Bool +Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *adaptors, @@ -1123,6 +1123,10 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPriv->pCompositeClip = NULL; + if (pPriv->AdaptorRec->ClipNotify) + (*pPriv->AdaptorRec->ClipNotify)(pPriv->pScrn, pPriv->DevPriv.ptr, + pWin, dx, dy); + /* Stop everything except images, but stop them too if the window isn't visible. But we only remove the images. */ @@ -1814,7 +1818,7 @@ xf86XVQueryImageAttributes( } -_X_EXPORT void +void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) { ScreenPtr pScreen = pDraw->pScreen; @@ -1864,7 +1868,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) xfree(rects); } -_X_EXPORT void +void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) { DrawablePtr root = &WindowTable[pScreen->myNum]->drawable; @@ -1909,7 +1913,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) #define DummyScreen screenInfo.screens[0] -_X_EXPORT Bool +Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -1991,7 +1995,7 @@ xf86XVClipVideoHelper( return TRUE; } -_X_EXPORT void +void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -2049,7 +2053,7 @@ xf86XVCopyYUV12ToPacked( } } -_X_EXPORT void +void xf86XVCopyPacked( const void *src, void *dst, diff --git a/xorg-server/hw/xfree86/common/xf86xv.h b/xorg-server/hw/xfree86/common/xf86xv.h index 817e2b994..c3db6cc73 100644 --- a/xorg-server/hw/xfree86/common/xf86xv.h +++ b/xorg-server/hw/xfree86/common/xf86xv.h @@ -112,6 +112,8 @@ typedef int (* ReputImageFuncPtr)( ScrnInfoPtr pScrn, short drw_x, short drw_y, typedef int (*QueryImageAttributesFuncPtr)(ScrnInfoPtr pScrn, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); +typedef void (*ClipNotifyFuncPtr)(ScrnInfoPtr pScrn, pointer data, + WindowPtr window, int dx, int dy); typedef enum { XV_OFF, @@ -165,6 +167,7 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; typedef struct { @@ -191,7 +194,7 @@ typedef struct { XF86AttributePtr attributes; } XF86OffscreenImageRec, *XF86OffscreenImagePtr; -Bool +extern _X_EXPORT Bool xf86XVScreenInit( ScreenPtr pScreen, XF86VideoAdaptorPtr *Adaptors, @@ -201,41 +204,41 @@ xf86XVScreenInit( typedef int (* xf86XVInitGenericAdaptorPtr)(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors); -int +extern _X_EXPORT int xf86XVRegisterGenericAdaptorDriver( xf86XVInitGenericAdaptorPtr InitFunc ); -int +extern _X_EXPORT int xf86XVListGenericAdaptors( ScrnInfoPtr pScrn, XF86VideoAdaptorPtr **Adaptors ); -Bool +extern _X_EXPORT Bool xf86XVRegisterOffscreenImages( ScreenPtr pScreen, XF86OffscreenImagePtr images, int num ); -XF86OffscreenImagePtr +extern _X_EXPORT XF86OffscreenImagePtr xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num ); -XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); +extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); -void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); +extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); -void +extern _X_EXPORT void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); -void +extern _X_EXPORT void xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); -Bool +extern _X_EXPORT Bool xf86XVClipVideoHelper( BoxPtr dst, INT32 *xa, @@ -247,7 +250,7 @@ xf86XVClipVideoHelper( INT32 height ); -void +extern _X_EXPORT void xf86XVCopyYUV12ToPacked( const void *srcy, const void *srcv, @@ -260,7 +263,7 @@ xf86XVCopyYUV12ToPacked( int w ); -void +extern _X_EXPORT void xf86XVCopyPacked( const void *src, void *dst, @@ -270,4 +273,8 @@ xf86XVCopyPacked( int w ); +extern _X_EXPORT DevPrivateKey (*XvGetScreenKeyProc)(void); +extern _X_EXPORT unsigned long (*XvGetRTPortProc)(void); +extern _X_EXPORT int (*XvScreenInitProc)(ScreenPtr); + #endif /* _XF86XV_H_ */ diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.c b/xorg-server/hw/xfree86/common/xf86xvmc.c index 41ef0a0ca..39d33da08 100644 --- a/xorg-server/hw/xfree86/common/xf86xvmc.c +++ b/xorg-server/hw/xfree86/common/xf86xvmc.c @@ -45,8 +45,7 @@ #include "xf86xvpriv.h" #include "xf86xvmc.h" -typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); -_X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; +XvMCScreenInitProcPtr XvMCScreenInitProc = NULL; typedef struct { @@ -156,7 +155,7 @@ xf86XvMCCloseScreen (int i, ScreenPtr pScreen) return (*pScreen->CloseScreen)(i, pScreen); } -_X_EXPORT Bool xf86XvMCScreenInit( +Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors @@ -219,12 +218,12 @@ _X_EXPORT Bool xf86XvMCScreenInit( return TRUE; } -_X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) +XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) { return xcalloc(1, sizeof(XF86MCAdaptorRec)); } -_X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) +void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { xfree(adaptor); } diff --git a/xorg-server/hw/xfree86/common/xf86xvmc.h b/xorg-server/hw/xfree86/common/xf86xvmc.h index bc7a98c6a..902b4f8fc 100644 --- a/xorg-server/hw/xfree86/common/xf86xvmc.h +++ b/xorg-server/hw/xfree86/common/xf86xvmc.h @@ -151,13 +151,16 @@ typedef struct { an array of structures. */ -Bool xf86XvMCScreenInit( +extern _X_EXPORT Bool xf86XvMCScreenInit( ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr *adaptors ); -XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); -void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); +extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void); +extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); + +typedef int (*XvMCScreenInitProcPtr)(ScreenPtr, int, XvMCAdaptorPtr); +extern _X_EXPORT XvMCScreenInitProcPtr XvMCScreenInitProc; #endif /* _XF86XVMC_H */ diff --git a/xorg-server/hw/xfree86/common/xf86xvpriv.h b/xorg-server/hw/xfree86/common/xf86xvpriv.h index 4200dac80..7623d297d 100644 --- a/xorg-server/hw/xfree86/common/xf86xvpriv.h +++ b/xorg-server/hw/xfree86/common/xf86xvpriv.h @@ -34,7 +34,7 @@ /*** These are DDX layer privates ***/ -extern DevPrivateKey XF86XvScreenKey; +extern _X_EXPORT DevPrivateKey XF86XvScreenKey; typedef struct { DestroyWindowProcPtr DestroyWindow; @@ -59,6 +59,7 @@ typedef struct { PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; + ClipNotifyFuncPtr ClipNotify; } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; typedef struct { diff --git a/xorg-server/hw/xfree86/common/xisb.c b/xorg-server/hw/xfree86/common/xisb.c index 6314094a0..1cb9e4854 100644 --- a/xorg-server/hw/xfree86/common/xisb.c +++ b/xorg-server/hw/xfree86/common/xisb.c @@ -62,7 +62,7 @@ * Function Definitions ****************************************************************************/ -_X_EXPORT XISBuffer * +XISBuffer * XisbNew (int fd, ssize_t size) { XISBuffer *b; @@ -86,14 +86,14 @@ XisbNew (int fd, ssize_t size) return (b); } -_X_EXPORT void +void XisbFree (XISBuffer *b) { xfree (b->buf); xfree (b); } -_X_EXPORT int +int XisbRead (XISBuffer *b) { int ret; @@ -136,7 +136,7 @@ XisbRead (XISBuffer *b) } /* the only purpose of this function is to provide output tracing */ -_X_EXPORT ssize_t +ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) { if (b->trace) @@ -149,7 +149,7 @@ XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len) } /* turn tracing of this buffer on (1) or off (0) */ -_X_EXPORT void +void XisbTrace (XISBuffer *b, int trace) { b->trace = trace; @@ -167,7 +167,7 @@ XisbTrace (XISBuffer *b, int trace) * give duration in usecs. */ -_X_EXPORT void +void XisbBlockDuration (XISBuffer *b, int block_duration) { b->block_duration = block_duration; diff --git a/xorg-server/hw/xfree86/common/xisb.h b/xorg-server/hw/xfree86/common/xisb.h index b7bdd5682..bacfde166 100644 --- a/xorg-server/hw/xfree86/common/xisb.h +++ b/xorg-server/hw/xfree86/common/xisb.h @@ -52,12 +52,12 @@ typedef struct _XISBuffer * of globals. * put locals in the .c file. *****************************************************************************/ -XISBuffer * XisbNew (int fd, ssize_t size); -void XisbFree (XISBuffer *b); -int XisbRead (XISBuffer *b); -ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); -void XisbTrace (XISBuffer *b, int trace); -void XisbBlockDuration (XISBuffer *b, int block_duration); +extern _X_EXPORT XISBuffer * XisbNew (int fd, ssize_t size); +extern _X_EXPORT void XisbFree (XISBuffer *b); +extern _X_EXPORT int XisbRead (XISBuffer *b); +extern _X_EXPORT ssize_t XisbWrite (XISBuffer *b, unsigned char *msg, ssize_t len); +extern _X_EXPORT void XisbTrace (XISBuffer *b, int trace); +extern _X_EXPORT void XisbBlockDuration (XISBuffer *b, int block_duration); /* * DO NOT PUT ANYTHING AFTER THIS ENDIF diff --git a/xorg-server/hw/xfree86/common/xorgHelper.c b/xorg-server/hw/xfree86/common/xorgHelper.c index 7f9dd507a..7a8e5167d 100644 --- a/xorg-server/hw/xfree86/common/xorgHelper.c +++ b/xorg-server/hw/xfree86/common/xorgHelper.c @@ -17,7 +17,7 @@ CARD32 -xorgGetVersion() +xorgGetVersion(void) { return XORG_VERSION_CURRENT; } diff --git a/xorg-server/hw/xfree86/ddc/Makefile.am b/xorg-server/hw/xfree86/ddc/Makefile.am index cd146c5a3..93ea4a2a5 100644 --- a/xorg-server/hw/xfree86/ddc/Makefile.am +++ b/xorg-server/hw/xfree86/ddc/Makefile.am @@ -1,12 +1,11 @@ sdk_HEADERS = edid.h xf86DDC.h -noinst_LIBRARIES = libddc.a +noinst_LTLIBRARIES = libddc.la -libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \ - ddcProperty.c +libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -EXTRA_DIST = ddcPriv.h DDC.HOWTO +EXTRA_DIST = DDC.HOWTO diff --git a/xorg-server/hw/xfree86/ddc/Makefile.in b/xorg-server/hw/xfree86/ddc/Makefile.in index 0e32157ba..750c9791c 100644 --- a/xorg-server/hw/xfree86/ddc/Makefile.in +++ b/xorg-server/hw/xfree86/ddc/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/ddc DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,17 +53,15 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libddc_a_AR = $(AR) $(ARFLAGS) -libddc_a_LIBADD = -am_libddc_a_OBJECTS = xf86DDC.$(OBJEXT) edid.$(OBJEXT) \ - interpret_edid.$(OBJEXT) print_edid.$(OBJEXT) \ - ddcProperty.$(OBJEXT) -libddc_a_OBJECTS = $(am_libddc_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libddc_la_LIBADD = +am_libddc_la_OBJECTS = ddc.lo interpret_edid.lo print_edid.lo \ + ddcProperty.lo +libddc_la_OBJECTS = $(am_libddc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -71,8 +72,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libddc_a_SOURCES) -DIST_SOURCES = $(libddc_a_SOURCES) +SOURCES = $(libddc_la_SOURCES) +DIST_SOURCES = $(libddc_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -104,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@ @@ -124,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@ @@ -155,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@ @@ -164,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@ @@ -205,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@ @@ -230,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@ @@ -240,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,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@ @@ -293,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@ @@ -317,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@ @@ -340,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,20 +383,20 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sdk_HEADERS = edid.h xf86DDC.h -noinst_LIBRARIES = libddc.a -libddc_a_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \ - ddcProperty.c - +noinst_LTLIBRARIES = libddc.la +libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -EXTRA_DIST = ddcPriv.h DDC.HOWTO +EXTRA_DIST = DDC.HOWTO all: all-am .SUFFIXES: @@ -420,12 +432,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libddc.a: $(libddc_a_OBJECTS) $(libddc_a_DEPENDENCIES) - -rm -f libddc.a - $(libddc_a_AR) libddc.a $(libddc_a_OBJECTS) $(libddc_a_LIBADD) - $(RANLIB) libddc.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libddc.la: $(libddc_la_OBJECTS) $(libddc_la_DEPENDENCIES) + $(LINK) $(libddc_la_OBJECTS) $(libddc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -433,11 +449,10 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddcProperty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret_edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_edid.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DDC.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddcProperty.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret_edid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_edid.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -570,7 +585,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -602,7 +617,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -674,7 +689,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/ddc/ddc.c b/xorg-server/hw/xfree86/ddc/ddc.c new file mode 100644 index 000000000..6fad9fbbc --- /dev/null +++ b/xorg-server/hw/xfree86/ddc/ddc.c @@ -0,0 +1,507 @@ +/* xf86DDC.c + * + * Copyright 1998,1999 by Egbert Eich <Egbert.Eich@Physik.TU-Darmstadt.DE> + */ + +/* + * A note on terminology. DDC1 is the original dumb serial protocol, and + * can only do up to 128 bytes of EDID. DDC2 is I2C-encapsulated and + * introduces extension blocks. EDID is the old display identification + * block, DisplayID is the new one. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include "misc.h" +#include "xf86.h" +#include "xf86_OSproc.h" +#include "xf86DDC.h" +#include <string.h> + +#define RETRIES 4 + +typedef enum { + DDCOPT_NODDC1, + DDCOPT_NODDC2, + DDCOPT_NODDC +} DDCOpts; + +static const OptionInfoRec DDCOptions[] = { + { DDCOPT_NODDC1, "NoDDC1", OPTV_BOOLEAN, {0}, FALSE }, + { DDCOPT_NODDC2, "NoDDC2", OPTV_BOOLEAN, {0}, FALSE }, + { DDCOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE }, + { -1, NULL, OPTV_NONE, {0}, FALSE }, +}; + +/* DDC1 */ + +static int +find_start(unsigned int *ptr) +{ + unsigned int comp[9], test[9]; + int i,j; + + for (i=0;i<9;i++){ + comp[i] = *(ptr++); + test[i] = 1; + } + for (i=0;i<127;i++){ + for (j=0;j<9;j++){ + test[j] = test[j] & !(comp[j] ^ *(ptr++)); + } + } + for (i=0;i<9;i++) + if (test[i]) return (i+1); + return (-1); +} + +static unsigned char * +find_header(unsigned char *block) +{ + unsigned char *ptr, *head_ptr, *end; + unsigned char header[]={0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00}; + + ptr = block; + end = block + EDID1_LEN; + while (ptr<end) { + int i; + head_ptr = ptr; + for (i=0;i<8;i++){ + if (header[i] != *(head_ptr++)) break; + if (head_ptr == end) head_ptr = block; + } + if (i==8) break; + ptr++; + } + if (ptr == end) return (NULL); + return (ptr); +} + +static unsigned char * +resort(unsigned char *s_block) +{ + unsigned char *d_new, *d_ptr, *d_end, *s_ptr, *s_end; + unsigned char tmp; + + s_end = s_block + EDID1_LEN; + d_new = xalloc(EDID1_LEN); + if (!d_new) return NULL; + d_end = d_new + EDID1_LEN; + + s_ptr = find_header(s_block); + if (!s_ptr) return NULL; + for (d_ptr=d_new;d_ptr<d_end;d_ptr++){ + tmp = *(s_ptr++); + *d_ptr = tmp; + if (s_ptr == s_end) s_ptr = s_block; + } + xfree(s_block); + return (d_new); +} + +static int +DDC_checksum(unsigned char *block, int len) +{ + int i, result = 0; + int not_null = 0; + + for (i=0;i<len;i++) { + not_null |= block[i]; + result += block[i]; + } + +#ifdef DEBUG + if (result & 0xFF) ErrorF("DDC checksum not correct\n"); + if (!not_null) ErrorF("DDC read all Null\n"); +#endif + + /* catch the trivial case where all bytes are 0 */ + if (!not_null) return 1; + + return (result&0xFF); +} + +static unsigned char * +GetEDID_DDC1(unsigned int *s_ptr) +{ + unsigned char *d_block, *d_pos; + unsigned int *s_pos, *s_end; + int s_start; + int i,j; + s_start = find_start(s_ptr); + if (s_start==-1) return NULL; + s_end = s_ptr + NUM; + s_pos = s_ptr + s_start; + d_block=xalloc(EDID1_LEN); + if (!d_block) return NULL; + d_pos = d_block; + for (i=0;i<EDID1_LEN;i++) { + for (j=0;j<8;j++) { + *d_pos <<= 1; + if (*s_pos) { + *d_pos |= 0x01; + } + s_pos++; if (s_pos == s_end) s_pos=s_ptr; + }; + s_pos++; if (s_pos == s_end) s_pos=s_ptr; + d_pos++; + } + xfree(s_ptr); + if (d_block && DDC_checksum(d_block,EDID1_LEN)) return NULL; + return (resort(d_block)); +} + +/* fetch entire EDID record; DDC bit needs to be masked */ +static unsigned int * +FetchEDID_DDC1(register ScrnInfoPtr pScrn, + register unsigned int (*read_DDC)(ScrnInfoPtr)) +{ + int count = NUM; + unsigned int *ptr, *xp; + + ptr=xp=xalloc(sizeof(int)*NUM); + + if (!ptr) return NULL; + do { + /* wait for next retrace */ + *xp = read_DDC(pScrn); + xp++; + } while(--count); + return (ptr); +} + +/* test if DDC1 return 0 if not */ +static Bool +TestDDC1(ScrnInfoPtr pScrn, unsigned int (*read_DDC)(ScrnInfoPtr)) +{ + int old, count; + + old = read_DDC(pScrn); + count = HEADER * BITS_PER_BYTE; + do { + /* wait for next retrace */ + if (old != read_DDC(pScrn)) break; + } while(count--); + return (count); +} + +/* + * read EDID record , pass it to callback function to interpret. + * callback function will store it for further use by calling + * function; it will also decide if we need to reread it + */ +static unsigned char * +EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed, + unsigned int (*read_DDC)(ScrnInfoPtr)) +{ + unsigned char *EDID_block = NULL; + int count = RETRIES; + + if (!read_DDC) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, + "chipset doesn't support DDC1\n"); + return NULL; + }; + + if (TestDDC1(pScrn,read_DDC)==-1) { + xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "No DDC signal\n"); + return NULL; + }; + + if (DDCSpeed) DDCSpeed(pScrn,DDC_FAST); + do { + EDID_block = GetEDID_DDC1(FetchEDID_DDC1(pScrn,read_DDC)); + count --; + } while (!EDID_block && count); + if (DDCSpeed) DDCSpeed(pScrn,DDC_SLOW); + + return EDID_block; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEDID_DDC1( + int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed, + unsigned int (*DDC1Read)(ScrnInfoPtr) +) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *EDID_block = NULL; + xf86MonPtr tmp = NULL; + int sigio; + /* Default DDC and DDC1 to enabled. */ + Bool noddc = FALSE, noddc1 = FALSE; + OptionInfoPtr options; + + options = xnfalloc(sizeof(DDCOptions)); + (void)memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC1, &noddc1); + xfree(options); + + if (noddc || noddc1) + return NULL; + + sigio = xf86BlockSIGIO(); + EDID_block = EDIDRead_DDC1(pScrn,DDC1SetSpeed,DDC1Read); + xf86UnblockSIGIO(sigio); + + if (EDID_block){ + tmp = xf86InterpretEDID(scrnIndex,EDID_block); + } +#ifdef DEBUG + else ErrorF("No EDID block returned\n"); + if (!tmp) + ErrorF("Cannot interpret EDID block\n"); +#endif + return tmp; +} + +/* DDC2 */ + +static I2CDevPtr +DDC2MakeDevice(I2CBusPtr pBus, int address, char *name) +{ + I2CDevPtr dev = NULL; + + if (!(dev = xf86I2CFindDev(pBus, address))) { + dev = xf86CreateI2CDevRec(); + dev->DevName = name; + dev->SlaveAddr = address; + dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ + dev->StartTimeout = 550; + dev->BitTimeout = 40; + dev->AcknTimeout = 40; + + dev->pI2CBus = pBus; + if (!xf86I2CDevInit(dev)) { + xf86DrvMsg(pBus->scrnIndex, X_PROBED, "No DDC2 device\n"); + return NULL; + } + } + + return dev; +} + +static I2CDevPtr +DDC2Init(int scrnIndex, I2CBusPtr pBus) +{ + I2CDevPtr dev = NULL; + + /* + * Slow down the bus so that older monitors don't + * miss things. + */ + pBus->RiseFallTime = 20; + + dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2"); + if (xf86I2CProbeAddress(pBus, 0x0060)) + DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register"); + if (xf86I2CProbeAddress(pBus, 0x0062)) + DDC2MakeDevice(pBus, 0x0062, "EDID EEPROM interface"); + if (xf86I2CProbeAddress(pBus, 0x006E)) + DDC2MakeDevice(pBus, 0x006E, "DDC control interface"); + + return dev; +} + +/* Mmmm, smell the hacks */ +static void +EEDIDStop(I2CDevPtr d) +{ +} + +/* block is the EDID block number. a segment is two blocks. */ +static Bool +DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer) +{ + unsigned char W_Buffer[1]; + int i, segment; + I2CDevPtr seg; + void (*stop)(I2CDevPtr); + + for (i = 0; i < RETRIES; i++) { + /* Stop bits reset the segment pointer to 0, so be careful here. */ + segment = block >> 1; + if (segment) { + Bool b; + + if (!(seg = xf86I2CFindDev(dev->pI2CBus, 0x0060))) + return FALSE; + + W_Buffer[0] = segment; + + stop = dev->pI2CBus->I2CStop; + dev->pI2CBus->I2CStop = EEDIDStop; + + b = xf86I2CWriteRead(seg, W_Buffer, 1, NULL, 0); + + dev->pI2CBus->I2CStop = stop; + if (!b) { + dev->pI2CBus->I2CStop(dev); + continue; + } + } + + W_Buffer[0] = (block & 0x01) * EDID1_LEN; + + if (xf86I2CWriteRead(dev, W_Buffer, 1, R_Buffer, EDID1_LEN)) { + if (!DDC_checksum(R_Buffer, EDID1_LEN)) + return TRUE; + } + } + + return FALSE; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. Unlike xf86DoEDID_DDC[12](), this function will return + * the complete EDID data, including all extension blocks, if the 'complete' + * parameter is TRUE; + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool complete) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *EDID_block = NULL; + xf86MonPtr tmp = NULL; + I2CDevPtr dev = NULL; + /* Default DDC and DDC2 to enabled. */ + Bool noddc = FALSE, noddc2 = FALSE; + OptionInfoPtr options; + + options = xalloc(sizeof(DDCOptions)); + if (!options) + return NULL; + memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); + xfree(options); + + if (noddc || noddc2) + return NULL; + + if (!(dev = DDC2Init(scrnIndex, pBus))) + return NULL; + + EDID_block = xcalloc(1, EDID1_LEN); + if (!EDID_block) + return NULL; + + if (DDC2Read(dev, 0, EDID_block)) { + int i, n = EDID_block[0x7e]; + + if (complete && n) { + EDID_block = xrealloc(EDID_block, EDID1_LEN * (1+n)); + + for (i = 0; i < n; i++) + DDC2Read(dev, i+1, EDID_block + (EDID1_LEN * (1+i))); + } + + tmp = xf86InterpretEEDID(scrnIndex, EDID_block); + } + + if (tmp && complete) + tmp->flags |= MONITOR_EDID_COMPLETE_RAWDATA; + + return tmp; +} + +/** + * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are + * unset. EDID information blocks are interpreted and the results returned in + * an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with EDID information. + * + * @return pointer to a new xf86MonPtr containing the EDID information. + * @return NULL if no monitor attached or failure to interpret the EDID. + */ +xf86MonPtr +xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus) +{ + return xf86DoEEDID(scrnIndex, pBus, FALSE); +} + +/* XXX write me */ +static void * +DDC2ReadDisplayID(void) +{ + return FALSE; +} + +/** + * Attempts to probe the monitor for DisplayID information, if NoDDC and + * NoDDC2 are unset. DisplayID blocks are interpreted and the results + * returned in an xf86MonPtr. + * + * This function does not affect the list of modes used by drivers -- it is up + * to the driver to decide policy on what to do with DisplayID information. + * + * @return pointer to a new xf86MonPtr containing the DisplayID information. + * @return NULL if no monitor attached or failure to interpret the DisplayID. + */ +xf86MonPtr +xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + unsigned char *did = NULL; + xf86MonPtr tmp = NULL; + I2CDevPtr dev = NULL; + /* Default DDC and DDC2 to enabled. */ + Bool noddc = FALSE, noddc2 = FALSE; + OptionInfoPtr options; + + options = xalloc(sizeof(DDCOptions)); + if (!options) + return NULL; + memcpy(options, DDCOptions, sizeof(DDCOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); + + xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); + xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); + xfree(options); + + if (noddc || noddc2) + return NULL; + + if (!(dev = DDC2Init(scrnIndex, pBus))) + return NULL; + + if ((did = DDC2ReadDisplayID())) { + tmp = xcalloc(1, sizeof(*tmp)); + if (!tmp) + return NULL; + + tmp->scrnIndex = scrnIndex; + tmp->flags |= MONITOR_DISPLAYID; + tmp->rawData = did; + } + + return tmp; +} diff --git a/xorg-server/hw/xfree86/ddc/ddcProperty.c b/xorg-server/hw/xfree86/ddc/ddcProperty.c index a4384f1d3..329a63964 100644 --- a/xorg-server/hw/xfree86/ddc/ddcProperty.c +++ b/xorg-server/hw/xfree86/ddc/ddcProperty.c @@ -31,21 +31,36 @@ #include "property.h" #include "propertyst.h" #include "xf86DDC.h" +#include <string.h> #define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA" #define EDID2_ATOM_NAME "XFree86_DDC_EDID2_RAWDATA" static void +edidMakeAtom(int i, const char *name, CARD8 *data, int size) +{ + Atom atom; + unsigned char *atom_data; + + if (!(atom_data = xalloc(size*sizeof(CARD8)))) + return; + + atom = MakeAtom(name, strlen(name), TRUE); + memcpy(atom_data, data, size); + xf86RegisterRootWindowProperty(i, atom, XA_INTEGER, 8, size, atom_data); +} + +static void addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) { - Atom EDID1Atom=-1, EDID2Atom=-1; - CARD8 *EDID1rawdata = NULL; - CARD8 *EDID2rawdata = NULL; int i, scrnIndex = pScrn->scrnIndex; Bool makeEDID1prop = FALSE; Bool makeEDID2prop = FALSE; - if (DDC->ver.version == 1) { + if (DDC->flags & MONITOR_DISPLAYID) { + /* Don't bother, use RANDR already */ + return; + } else if (DDC->ver.version == 1) { makeEDID1prop = TRUE; } else if (DDC->ver.version == 2) { int checksum1; @@ -83,29 +98,14 @@ addRootWindowProperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) } if (makeEDID1prop) { - int size = 128; - - if (DDC->flags & EDID_COMPLETE_RAWDATA) - size += DDC->no_sections * 128; + int size = 128 + + (DDC->flags & EDID_COMPLETE_RAWDATA ? DDC->no_sections * 128 : 0); - if ((EDID1rawdata = xalloc(size*sizeof(CARD8)))==NULL) - return; - - EDID1Atom = MakeAtom(EDID1_ATOM_NAME, sizeof(EDID1_ATOM_NAME) - 1, TRUE); - memcpy(EDID1rawdata, DDC->rawData, size); - xf86RegisterRootWindowProperty(scrnIndex, EDID1Atom, XA_INTEGER, 8, - size, (unsigned char *)EDID1rawdata); + edidMakeAtom(scrnIndex, EDID1_ATOM_NAME, DDC->rawData, size); } - if (makeEDID2prop) { - if ((EDID2rawdata = xalloc(256*sizeof(CARD8)))==NULL) - return; - - memcpy(EDID2rawdata, DDC->rawData, 256); - EDID2Atom = MakeAtom(EDID2_ATOM_NAME, sizeof(EDID2_ATOM_NAME) - 1, TRUE); - xf86RegisterRootWindowProperty(scrnIndex, EDID2Atom, XA_INTEGER, 8, - 256, (unsigned char *)EDID2rawdata); - } + if (makeEDID2prop) + edidMakeAtom(scrnIndex, EDID2_ATOM_NAME, DDC->rawData, 256); } Bool @@ -114,7 +114,10 @@ xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) if (!pScrn || !pScrn->monitor || !DDC) return FALSE; - xf86DDCMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); + if (DDC->flags & MONITOR_DISPLAYID) + ; + else + xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); addRootWindowProperties(pScrn, DDC); diff --git a/xorg-server/hw/xfree86/ddc/edid.h b/xorg-server/hw/xfree86/ddc/edid.h index 3ca402f57..3feb9796f 100644 --- a/xorg-server/hw/xfree86/ddc/edid.h +++ b/xorg-server/hw/xfree86/ddc/edid.h @@ -12,6 +12,12 @@ #ifndef _EDID_H_ #define _EDID_H_ +#include <X11/Xmd.h> + +#ifndef _X_EXPORT +# include <X11/Xfuncproto.h> +#endif + /* read complete EDID record */ #define EDID1_LEN 128 #define BITS_PER_BYTE 9 @@ -532,8 +538,15 @@ struct detailed_monitor_section { }; /* flags */ -#define EDID_COMPLETE_RAWDATA 0x1 +#define MONITOR_EDID_COMPLETE_RAWDATA 0x01 +/* old, don't use */ +#define EDID_COMPLETE_RAWDATA 0x01 +#define MONITOR_DISPLAYID 0x02 +/* + * For DisplayID devices, only the scrnIndex, flags, and rawData fields + * are meaningful. For EDID, they all are. + */ typedef struct { int scrnIndex; struct vendor vendor; @@ -547,6 +560,6 @@ typedef struct { Uchar *rawData; } xf86Monitor, *xf86MonPtr; -extern xf86MonPtr ConfiguredMonitor; +extern _X_EXPORT xf86MonPtr ConfiguredMonitor; #endif /* _EDID_H_ */ diff --git a/xorg-server/hw/xfree86/ddc/interpret_edid.c b/xorg-server/hw/xfree86/ddc/interpret_edid.c index 310606c7c..12a52545e 100644 --- a/xorg-server/hw/xfree86/ddc/interpret_edid.c +++ b/xorg-server/hw/xfree86/ddc/interpret_edid.c @@ -3,22 +3,23 @@ * Copyright 2007 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software") - * to deal in the software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * interpret_edid.c: interpret a primary EDID block */ @@ -466,7 +467,7 @@ validate_version(int scrnIndex, struct edid_version *r) /* * Returns true if HDMI, false if definitely not or unknown. */ -_X_EXPORT Bool +Bool xf86MonitorIsHDMI(xf86MonPtr mon) { int i = 0, version, offset; diff --git a/xorg-server/hw/xfree86/ddc/print_edid.c b/xorg-server/hw/xfree86/ddc/print_edid.c index e9c8cbdf7..ff0b39cc1 100644 --- a/xorg-server/hw/xfree86/ddc/print_edid.c +++ b/xorg-server/hw/xfree86/ddc/print_edid.c @@ -3,22 +3,23 @@ * Copyright 2007 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software") - * to deal in the software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * them Software is furnished to do so, subject to the following conditions: + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. * * print_edid.c: print out all information retrieved from display device */ @@ -250,7 +251,7 @@ print_established_timings(int scrnIndex, struct established_timings *t) if (c&0x02) xf86DrvMsg(scrnIndex,X_INFO,"1024x768@75Hz\n"); if (c&0x01) xf86DrvMsg(scrnIndex,X_INFO,"1280x1024@75Hz\n"); c=t->t_manu; - if (c&0x80) xf86DrvMsg(scrnIndex,X_INFO,"1152x870@75Hz\n"); + if (c&0x80) xf86DrvMsg(scrnIndex,X_INFO,"1152x864@75Hz\n"); xf86DrvMsg(scrnIndex,X_INFO,"Manufacturer's mask: %X\n",c&0x7F); } @@ -397,8 +398,12 @@ print_detailed_monitor_section(int scrnIndex, if (r->supported_scaling & SCALING_VSTRETCH) xf86ErrorF(" vstretch"); xf86ErrorF("\n"); - xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n", - r->preferred_refresh); + if (r->preferred_refresh) + xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n", + r->preferred_refresh); + else + xf86DrvMsg(scrnIndex, X_INFO, "Buggy monitor, no preferred " + "refresh rate given\n"); } else if (r->max_clock != 0) { xf86ErrorF(" PixClock max %i MHz\n", r->max_clock); } else { @@ -445,7 +450,7 @@ print_detailed_monitor_section(int scrnIndex, break; } if (m[i].type >= DS_VENDOR && m[i].type <= DS_VENDOR_MAX) { - xf86DrvMsg(scrnIndex, X_WARNING, + xf86DrvMsg(scrnIndex, X_INFO, "Unknown vendor-specific block %hx\n", m[i].type - DS_VENDOR); } diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.h b/xorg-server/hw/xfree86/ddc/xf86DDC.h index 3172b555d..64869da10 100644 --- a/xorg-server/hw/xfree86/ddc/xf86DDC.h +++ b/xorg-server/hw/xfree86/ddc/xf86DDC.h @@ -24,42 +24,53 @@ typedef enum { typedef void (* DDC1SetSpeedProc)(ScrnInfoPtr, xf86ddcSpeed); -extern xf86MonPtr xf86DoEDID_DDC1( +extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1( int scrnIndex, DDC1SetSpeedProc DDC1SetSpeed, unsigned int (*DDC1Read)(ScrnInfoPtr) ); -extern xf86MonPtr xf86DoEDID_DDC2( +extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2( int scrnIndex, I2CBusPtr pBus ); -extern xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool); +extern _X_EXPORT xf86MonPtr xf86DoEEDID(int scrnIndex, I2CBusPtr pBus, Bool); -extern xf86MonPtr xf86PrintEDID( +extern _X_EXPORT xf86MonPtr xf86PrintEDID( xf86MonPtr monPtr ); -extern xf86MonPtr xf86InterpretEDID( +extern _X_EXPORT xf86MonPtr xf86InterpretEDID( int screenIndex, Uchar *block ); -extern xf86MonPtr xf86InterpretEEDID( +extern _X_EXPORT xf86MonPtr xf86InterpretEEDID( int screenIndex, Uchar *block ); -extern void -xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC); +extern _X_EXPORT void +xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC); -extern Bool xf86SetDDCproperties( +extern _X_EXPORT Bool xf86SetDDCproperties( ScrnInfoPtr pScreen, xf86MonPtr DDC ); -DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); +extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); -extern Bool +extern _X_EXPORT Bool xf86MonitorIsHDMI(xf86MonPtr mon); +extern _X_EXPORT xf86MonPtr +xf86DoDisplayID(int scrnIndex, I2CBusPtr pBus); + +extern _X_EXPORT void +xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC); + +extern _X_EXPORT DisplayModePtr +FindDMTMode(int hsize, int vsize, int refresh, Bool rb); + +extern _X_EXPORT const DisplayModeRec DMTModes[]; + #endif diff --git a/xorg-server/hw/xfree86/dixmods/Makefile.in b/xorg-server/hw/xfree86/dixmods/Makefile.in index f4fb88edb..e7eecf268 100644 --- a/xorg-server/hw/xfree86/dixmods/Makefile.in +++ b/xorg-server/hw/xfree86/dixmods/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/dixmods 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 @@ -48,7 +51,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -189,6 +193,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@ @@ -209,9 +214,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@ @@ -240,7 +248,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@ @@ -249,9 +259,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@ @@ -290,12 +304,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@ @@ -315,7 +330,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@ @@ -325,6 +339,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -338,11 +353,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@ @@ -378,6 +392,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@ @@ -402,7 +417,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@ @@ -425,6 +439,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -456,7 +471,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@ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am index dd4ccd633..d93e63afa 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.am @@ -12,7 +12,7 @@ XV_SRCS = xvmod.c xvmodproc.h endif if XF86VIDMODE -XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h +XF86VMODE_SRCS = xf86vmode.c endif AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in index b50686064..477d57bc0 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in +++ b/xorg-server/hw/xfree86/dixmods/extmod/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dixmods/extmod DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -78,8 +82,7 @@ am__installdirs = "$(DESTDIR)$(extsmoduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(extsmodule_LTLIBRARIES) libextmod_la_DEPENDENCIES = $(top_builddir)/Xext/libXextmodule.la am__libextmod_la_SOURCES_DIST = modinit.c modinit.h xf86dga2.c \ - dgaproc.h xf86dgaext.h xf86vmode.c vidmodeproc.h xvmod.c \ - xvmodproc.h + dgaproc.h xf86dgaext.h xf86vmode.c xvmod.c xvmodproc.h @DGA_TRUE@am__objects_1 = xf86dga2.lo @XF86VIDMODE_TRUE@am__objects_2 = xf86vmode.lo @XV_TRUE@am__objects_3 = xvmod.lo @@ -110,6 +113,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@ @@ -130,9 +134,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@ @@ -161,7 +168,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@ @@ -170,9 +179,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@ @@ -211,12 +224,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@ @@ -236,7 +250,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@ @@ -246,6 +259,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -259,11 +273,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@ @@ -299,6 +312,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@ @@ -323,7 +337,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@ @@ -346,6 +359,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -377,7 +391,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@ @@ -388,7 +404,7 @@ extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = libextmod.la @DGA_TRUE@DGA_SRCS = xf86dga2.c dgaproc.h xf86dgaext.h @XV_TRUE@XV_SRCS = xvmod.c xvmodproc.h -@XF86VIDMODE_TRUE@XF86VMODE_SRCS = xf86vmode.c vidmodeproc.h +@XF86VIDMODE_TRUE@XF86VMODE_SRCS = xf86vmode.c AM_CFLAGS = @DIX_CFLAGS@ @XORG_CFLAGS@ INCLUDES = @XORG_INCS@ \ -I$(top_srcdir)/dbe \ diff --git a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h index f4d3fe45b..6745a6e7a 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/dgaproc.h @@ -54,7 +54,7 @@ typedef struct { /* DDX interface */ -int +extern _X_EXPORT int DGASetMode( int Index, int num, @@ -62,35 +62,35 @@ DGASetMode( PixmapPtr *pPix ); -void +extern _X_EXPORT void DGASetInputMode( int Index, Bool keyboard, Bool mouse ); -void +extern _X_EXPORT void DGASelectInput( int Index, ClientPtr client, long mask ); -Bool DGAAvailable(int Index); -Bool DGAActive(int Index); -void DGAShutdown(void); -void DGAInstallCmap(ColormapPtr cmap); -int DGAGetViewportStatus(int Index); -int DGASync(int Index); +extern _X_EXPORT Bool DGAAvailable(int Index); +extern _X_EXPORT Bool DGAActive(int Index); +extern _X_EXPORT void DGAShutdown(void); +extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap); +extern _X_EXPORT int DGAGetViewportStatus(int Index); +extern _X_EXPORT int DGASync(int Index); -int +extern _X_EXPORT int DGAFillRect( int Index, int x, int y, int w, int h, unsigned long color ); -int +extern _X_EXPORT int DGABlitRect( int Index, int srcx, int srcy, @@ -98,7 +98,7 @@ DGABlitRect( int dstx, int dsty ); -int +extern _X_EXPORT int DGABlitTransRect( int Index, int srcx, int srcy, @@ -107,38 +107,36 @@ DGABlitTransRect( unsigned long color ); -int +extern _X_EXPORT int DGASetViewport( int Index, int x, int y, int mode ); -int DGAGetModes(int Index); -int DGAGetOldDGAMode(int Index); +extern _X_EXPORT int DGAGetModes(int Index); +extern _X_EXPORT int DGAGetOldDGAMode(int Index); -int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); +extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num); -Bool DGAVTSwitch(void); -Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, +extern _X_EXPORT Bool DGAVTSwitch(void); +extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, int is_down); -Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); -Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); -Bool DGAIsDgaEvent (xEvent *e); - -Bool DGADeliverEvent (ScreenPtr pScreen, xEvent *e); +extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); +extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); +extern _X_EXPORT Bool DGAIsDgaEvent (xEvent *e); -Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, +extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name, unsigned char **mem, int *size, int *offset, int *flags); -void DGACloseFramebuffer(int Index); -Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); -int DGACreateColormap(int Index, ClientPtr client, int id, int mode, +extern _X_EXPORT void DGACloseFramebuffer(int Index); +extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode); +extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id, int mode, int alloc); -extern unsigned char DGAReqCode; -extern int DGAErrorBase; -extern int DGAEventBase; -extern int *XDGAEventBase; +extern _X_EXPORT unsigned char DGAReqCode; +extern _X_EXPORT int DGAErrorBase; +extern _X_EXPORT int DGAEventBase; +extern _X_EXPORT int *XDGAEventBase; diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c index 9bcf51f00..299562592 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.c @@ -56,15 +56,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef notyet - { - XTestExtensionInit, - XTestExtensionName, - &noTestExtensions, - NULL, - NULL - }, -#endif #ifdef SCREENSAVER { ScreenSaverExtensionInit, diff --git a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h index 1de14858c..6210526aa 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/modinit.h +++ b/xorg-server/hw/xfree86/dixmods/extmod/modinit.h @@ -7,20 +7,16 @@ #define INITARGS void #endif -#define _SHAPE_SERVER_ /* don't want Xlib structures */ -#include <X11/extensions/shapestr.h> +#include <X11/extensions/shapeproto.h> #ifdef MULTIBUFFER extern void MultibufferExtensionInit(INITARGS); -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#include <X11/extensions/multibufst.h> +#include <X11/extensions/multibufproto.h> #endif #ifdef XTEST extern void XTestExtensionInit(INITARGS); -#define _XTEST_SERVER_ -#include <X11/extensions/XTest.h> -#include <X11/extensions/xteststr.h> +#include <X11/extensions/xtestproto.h> #endif #if 1 @@ -34,20 +30,18 @@ extern void ScreenSaverExtensionInit (INITARGS); #ifdef XF86VIDMODE extern void XFree86VidModeExtensionInit(INITARGS); -#define _XF86VIDMODE_SERVER_ -#include <X11/extensions/xf86vmstr.h> +#include <X11/extensions/xf86vmproto.h> #endif #ifdef XFreeXDGA extern void XFree86DGAExtensionInit(INITARGS); extern void XFree86DGARegister(INITARGS); -#define _XF86DGA_SERVER_ -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #endif #ifdef DPMSExtension extern void DPMSExtensionInit(INITARGS); -#include <X11/extensions/dpmsstr.h> +#include <X11/extensions/dpmsconst.h> #endif #ifdef XV @@ -65,7 +59,7 @@ extern void ResExtensionInit(INITARGS); #ifdef SHM extern void ShmExtensionInit(INITARGS); -#include <X11/extensions/shmstr.h> +#include <X11/extensions/shmproto.h> extern void ShmRegisterFuncs( ScreenPtr pScreen, ShmFuncsPtr funcs); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c index df0030e80..7579f7d51 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -11,8 +11,6 @@ #include <xorg-config.h> #endif -#define NEED_REPLIES -#define NEED_EVENTS #include <X11/X.h> #include <X11/Xproto.h> #include "misc.h" @@ -24,9 +22,7 @@ #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" -#define _XF86DGA_SERVER_ -#include <X11/extensions/xf86dga.h> -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include "swaprep.h" #include "dgaproc.h" #include "xf86dgaext.h" @@ -161,7 +157,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client) } nameSize = deviceName ? (strlen(deviceName) + 1) : 0; - rep.length = (nameSize + 3) >> 2; + rep.length = bytes_to_int32(nameSize); WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *)&rep); if(rep.length) @@ -227,10 +223,10 @@ ProcXDGAQueryModes(ClientPtr client) size = num * sz_xXDGAModeInfo; for(i = 0; i < num; i++) - size += (strlen(mode[i].name) + 4) & ~3L; /* plus NULL */ + size += pad_to_int32(strlen(mode[i].name) + 1); /* plus NULL */ rep.number = num; - rep.length = size >> 2; + rep.length = bytes_to_int32(size); WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); @@ -391,7 +387,7 @@ ProcXDGASetMode(ClientPtr client) info.reserved1 = mode.reserved1; info.reserved2 = mode.reserved2; - rep.length = (sz_xXDGAModeInfo + info.name_size) >> 2; + rep.length = bytes_to_int32(sz_xXDGAModeInfo + info.name_size); WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); @@ -422,6 +418,7 @@ static int ProcXDGAInstallColormap(ClientPtr client) { ColormapPtr cmap; + int rc; REQUEST(xXDGAInstallColormapReq); if (stuff->screen > screenInfo.numScreens) @@ -432,13 +429,13 @@ ProcXDGAInstallColormap(ClientPtr client) REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - cmap = (ColormapPtr)LookupIDByType(stuff->cmap, RT_COLORMAP); - if (cmap) { + rc = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, RT_COLORMAP, + client, DixInstallAccess); + if (rc == Success) { DGAInstallCmap(cmap); return (client->noClientException); } else { - client->errorValue = stuff->cmap; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } return (client->noClientException); @@ -860,6 +857,7 @@ static int ProcXF86DGAInstallColormap(ClientPtr client) { ColormapPtr pcmp; + int rc; REQUEST(xXF86DGAInstallColormapReq); if (stuff->screen > screenInfo.numScreens) @@ -873,13 +871,13 @@ ProcXF86DGAInstallColormap(ClientPtr client) if (!DGAActive(stuff->screen)) return (DGAErrorBase + XF86DGADirectNotActivated); - pcmp = (ColormapPtr )LookupIDByType(stuff->id, RT_COLORMAP); - if (pcmp) { + rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, + client, DixInstallAccess); + if (rc == Success) { DGAInstallCmap(pcmp); return (client->noClientException); } else { - client->errorValue = stuff->id; - return (BadColor); + return (rc == BadValue) ? BadColor : rc; } } diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c index aecaf94ff..4a288d79f 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -34,8 +34,6 @@ from Kaleb S. KEITHLEY #include <xorg-config.h> #endif -#define NEED_REPLIES -#define NEED_EVENTS #include <X11/X.h> #include <X11/Xproto.h> #include "misc.h" @@ -43,8 +41,7 @@ from Kaleb S. KEITHLEY #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" -#define _XF86VIDMODE_SERVER_ -#include <X11/extensions/xf86vmstr.h> +#include <X11/extensions/xf86vmproto.h> #include "swaprep.h" #include "xf86.h" #include "vidmodeproc.h" @@ -416,11 +413,11 @@ ProcXF86VidModeGetModeLine(ClientPtr client) REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); rep.type = X_Reply; if (ver < 2) { - rep.length = (SIZEOF(xXF86OldVidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86OldVidModeGetModeLineReply) - + SIZEOF(xGenericReply)); } else { - rep.length = (SIZEOF(xXF86VidModeGetModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetModeLineReply) - + SIZEOF(xGenericReply)); } rep.sequenceNumber = client->sequence; @@ -672,10 +669,10 @@ ProcXF86VidModeAddModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeAddModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeAddModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -811,10 +808,10 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeDeleteModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeDeleteModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq)); } if (len != stuff->privsize) { if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) { @@ -925,10 +922,10 @@ ProcXF86VidModeModModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86OldVidModeModModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeModModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -1054,10 +1051,10 @@ ProcXF86VidModeValidateModeLine(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); len = client->req_len - - (sizeof(xXF86OldVidModeValidateModeLineReq) >> 2); + bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); - len = client->req_len - (sizeof(xXF86VidModeValidateModeLineReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq)); } if (len != stuff->privsize) return BadLength; @@ -1109,8 +1106,8 @@ status_reply: xfree(modetmp); rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeValidateModeLineReply) - - SIZEOF(xGenericReply)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeValidateModeLineReply) + - SIZEOF(xGenericReply)); rep.sequenceNumber = client->sequence; rep.status = status; if (client->swapped) { @@ -1187,10 +1184,10 @@ ProcXF86VidModeSwitchToMode(ClientPtr client) if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86OldVidModeSwitchToModeReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); - len = client->req_len - (sizeof(xXF86VidModeSwitchToModeReq) >> 2); + len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq)); } if (len != stuff->privsize) return BadLength; @@ -1291,10 +1288,10 @@ ProcXF86VidModeGetMonitor(ClientPtr client) VIDMODE_MON_MODEL, 0)).ptr); else rep.modelLength = 0; - rep.length = (SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + (nHsync + nVrefresh) * sizeof(CARD32) + - ((rep.vendorLength + 3) & ~3) + - ((rep.modelLength + 3) & ~3)) >> 2; + pad_to_int32(rep.vendorLength) + + pad_to_int32(rep.modelLength)); rep.sequenceNumber = client->sequence; rep.nhsync = nHsync; rep.nvsync = nVrefresh; @@ -1415,8 +1412,8 @@ ProcXF86VidModeGetDotClocks(ClientPtr client) numClocks = VidModeGetNumOfClocks(stuff->screen, &ClockProg); rep.type = X_Reply; - rep.length = (SIZEOF(xXF86VidModeGetDotClocksReply) - - SIZEOF(xGenericReply) + numClocks) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply) + - SIZEOF(xGenericReply) + numClocks); rep.sequenceNumber = client->sequence; rep.clocks = numClocks; rep.maxclocks = MAXCLOCKS; @@ -1542,7 +1539,7 @@ static int ProcXF86VidModeGetGammaRamp(ClientPtr client) { CARD16 *ramp = NULL; - int n, length, i; + int n, length; size_t ramplen; xXF86VidModeGetGammaRampReply rep; REQUEST(xXF86VidModeGetGammaRampReq); @@ -1577,7 +1574,7 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) swaps(&rep.sequenceNumber, n); swapl(&rep.length, n); swaps(&rep.size, n); - SwapShorts(ramp, length * 3); + SwapShorts((short*)ramp, length * 3); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), (char *)&rep); diff --git a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c index 6b3f1149a..955104679 100644 --- a/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c +++ b/xorg-server/hw/xfree86/dixmods/extmod/xvmod.c @@ -13,7 +13,7 @@ #include "xvmodproc.h" void -XvRegister() +XvRegister(void) { XvScreenInitProc = XvScreenInit; XvGetScreenKeyProc = XvGetScreenKey; diff --git a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c index 9074fd390..0f4e25c0c 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c +++ b/xorg-server/hw/xfree86/dixmods/xkbKillSrv.c @@ -33,7 +33,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include <stdio.h> -#define NEED_EVENTS 1 #include <X11/X.h> #include <X11/Xproto.h> #include <X11/keysym.h> diff --git a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c index db21a4e17..9742eaf31 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbPrivate.c +++ b/xorg-server/hw/xfree86/dixmods/xkbPrivate.c @@ -8,7 +8,6 @@ #endif #include <stdio.h> -#define NEED_EVENTS 1 #include <X11/X.h> #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS diff --git a/xorg-server/hw/xfree86/dixmods/xkbVT.c b/xorg-server/hw/xfree86/dixmods/xkbVT.c index e6d69e2eb..13bd6f41e 100644 --- a/xorg-server/hw/xfree86/dixmods/xkbVT.c +++ b/xorg-server/hw/xfree86/dixmods/xkbVT.c @@ -33,7 +33,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #endif #include <stdio.h> -#define NEED_EVENTS 1 #include <X11/X.h> #include <X11/Xproto.h> #include <X11/keysym.h> diff --git a/xorg-server/hw/xfree86/doc/Makefile.in b/xorg-server/hw/xfree86/doc/Makefile.in index b6c671248..5f4680acf 100644 --- a/xorg-server/hw/xfree86/doc/Makefile.in +++ b/xorg-server/hw/xfree86/doc/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc 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 @@ -47,7 +50,8 @@ 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 = SOURCES = @@ -98,6 +102,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@ @@ -118,9 +123,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@ @@ -149,7 +157,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@ @@ -158,9 +168,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@ @@ -199,12 +213,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@ @@ -224,7 +239,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@ @@ -234,6 +248,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -247,11 +262,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@ @@ -287,6 +301,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@ @@ -311,7 +326,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@ @@ -334,6 +348,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -365,7 +380,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@ diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.am b/xorg-server/hw/xfree86/doc/devel/Makefile.am index eb8b1cb29..c9eca5eb3 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.am +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.am @@ -2,8 +2,6 @@ # not installed on the system for end-users EXTRA_DIST = \ - Domain.note \ - RAC.Notes \ Registry \ exa-driver.txt \ README.DRIcomp diff --git a/xorg-server/hw/xfree86/doc/devel/Makefile.in b/xorg-server/hw/xfree86/doc/devel/Makefile.in index 160ecf4e4..390803a89 100644 --- a/xorg-server/hw/xfree86/doc/devel/Makefile.in +++ b/xorg-server/hw/xfree86/doc/devel/Makefile.in @@ -39,8 +39,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc/devel 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 @@ -50,7 +53,8 @@ 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 = SOURCES = @@ -61,6 +65,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@ @@ -81,9 +86,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@ @@ -112,7 +120,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@ @@ -121,9 +131,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@ @@ -162,12 +176,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@ @@ -187,7 +202,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@ @@ -197,6 +211,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -210,11 +225,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@ @@ -250,6 +264,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@ @@ -274,7 +289,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@ @@ -297,6 +311,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -328,15 +343,15 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ - Domain.note \ - RAC.Notes \ Registry \ exa-driver.txt \ README.DRIcomp diff --git a/xorg-server/hw/xfree86/doc/man/Makefile.in b/xorg-server/hw/xfree86/doc/man/Makefile.in index 56c10fcd4..26ab17b12 100644 --- a/xorg-server/hw/xfree86/doc/man/Makefile.in +++ b/xorg-server/hw/xfree86/doc/man/Makefile.in @@ -42,8 +42,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/doc/man 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 @@ -53,7 +56,8 @@ 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 = SOURCES = @@ -87,6 +91,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@ @@ -107,9 +112,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@ @@ -138,7 +146,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@ @@ -147,9 +157,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@ @@ -188,12 +202,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@ @@ -213,7 +228,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@ @@ -223,6 +237,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -236,11 +251,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@ @@ -276,6 +290,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@ @@ -300,7 +315,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@ @@ -323,6 +337,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -354,7 +369,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@ diff --git a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre index 4992dc715..2f9ff98c7 100644 --- a/xorg-server/hw/xfree86/doc/man/Xorg.man.pre +++ b/xorg-server/hw/xfree86/doc/man/Xorg.man.pre @@ -134,7 +134,7 @@ will use. Without this option, .B __xservername__ will pick the first available Virtual Terminal that it can locate. This option applies only to platforms that have virtual terminal support, such -as Linux, BSD, SVR3, and SVR4. +as Linux, BSD, OpenSolaris, SVR3, and SVR4. .TP .B \-allowMouseOpenFail Allow the server to start up even if the mouse device can't be opened @@ -313,10 +313,6 @@ file verbosity level. When the value is supplied, the log file verbosity level is set to that value. The default log file verbosity level is 3. .TP 8 -.B \-modalias -Print a list of device ids each installed driver module claims to support, -in a format similar to Linux modalias. -.TP 8 .BI \-modulepath " searchpath" Set the module search path to .IR searchpath . @@ -356,11 +352,6 @@ section and this option, the first relevant .B InputDevice section is used for the core pointer. .TP 8 -.B \-probeonly -Causes the server to exit after the device probing stage. The -__xconfigfile__(__filemansuffix__) file is still used when this option is -given, so information that can be auto-detected should be commented out. -.TP 8 .B \-quiet Suppress most informational messages at startup. The verbosity level is set to zero. @@ -432,17 +423,12 @@ server is normally configured to recognize various special combinations of key presses that instruct the server to perform some action, rather than just sending the key press event to a client application. The default XKEYBOARD keymap defines the key combinations listed below. -The server also has these key combinations builtin to its event handler +The kbd (__drivermansuffix__) driver also has these key combinations +builtin to its event handler for cases where the XKEYBOARD extension is not being used. When using the XKEYBOARD extension, which key combinations perform which actions is completely configurable. .PP -For more information about when the builtin event handler -is used to recognize the special key combinations, see -the documentation on the -.B HandleSpecialKeys -option in the __xconfigfile__(__filemansuffix__) man page. -.PP The special combinations of key presses recognized directly by .B __xservername__ diff --git a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre index 96ad0160f..634805a69 100644 --- a/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xorg-server/hw/xfree86/doc/man/xorg.conf.man.pre @@ -615,26 +615,6 @@ Default: PM enabled on platforms that support it. enable or disable XINERAMA extension. Default is disabled. .TP 7 -.BI "Option \*qHandleSpecialKeys\*q \*q" when \*q -This option controls when the server uses the builtin handler to process -special key combinations (such as -.BR Ctrl+Alt+Backspace ). -Normally the XKEYBOARD extension keymaps will provide mappings for each of -the special key combinations, so the builtin handler is not needed unless -the XKEYBOARD extension is disabled. -The value of -.I when -can be -.BR Always , -.BR Never , -or -.BR WhenNeeded . -Default: Use the builtin handler only if needed. -The server will scan the keymap for a mapping to the -.B Terminate -action and, if found, use XKEYBOARD for processing actions, otherwise -the builtin handler will be used. -.TP 7 .BI "Option \*qAIGLX\*q \*q" boolean \*q enable or disable AIGLX. AIGLX is enabled by default. .TP 7 @@ -859,7 +839,7 @@ The most commonly used input drivers are on Linux systems, and .BR kbd (__drivermansuffix__) and -.BR mouse (__drivermansuffix__) +.BR mousedrv (__drivermansuffix__) on other platforms. .PP In the absence of an explicitly specified core input device, the first @@ -1409,11 +1389,10 @@ This option controls whether the video card should drive the sync signal on the green color pin. Not all cards support this option, and most monitors do not require it. The default is off. .TP 7 -.BI "Option " "\*qTargetRefresh\*q " \*qrate\*q -This optional entry specifies the vertical refresh rate that the server -should aim for when selecting video modes. Without this option, the -default is to prefer modes with higher refresh rates. -.TP 7 +.BI "Option " "\*qPrimary\*q " \*qbool\*q +This optional entry specifies that the monitor should be treated as the primary +monitor. (RandR 1.2-supporting drivers only) +.TP7 .BI "Option " "\*qPreferredMode\*q " \*qstring\*q This optional entry specifies a mode to be marked as the preferred initial mode of the monitor. diff --git a/xorg-server/hw/xfree86/doc/sgml/Makefile.in b/xorg-server/hw/xfree86/doc/sgml/Makefile.in index a88958981..a699e4371 100644 --- a/xorg-server/hw/xfree86/doc/sgml/Makefile.in +++ b/xorg-server/hw/xfree86/doc/sgml/Makefile.in @@ -58,8 +58,11 @@ host_triplet = @host@ subdir = hw/xfree86/doc/sgml 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 @@ -69,7 +72,8 @@ 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 = SOURCES = @@ -81,6 +85,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@ @@ -101,9 +106,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@ @@ -132,7 +140,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@ @@ -141,9 +151,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@ @@ -182,12 +196,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@ @@ -207,7 +222,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@ @@ -217,6 +231,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -230,11 +245,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@ @@ -270,6 +284,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@ @@ -294,7 +309,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@ @@ -317,6 +331,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -348,7 +363,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@ diff --git a/xorg-server/hw/xfree86/dri/Makefile.am b/xorg-server/hw/xfree86/dri/Makefile.am index 3ec30beec..a7b491c6e 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.am +++ b/xorg-server/hw/xfree86/dri/Makefile.am @@ -8,12 +8,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \ @LIBDRM_CFLAGS@ \ - @GL_CFLAGS@ + @DRI_CFLAGS@ libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ libdri_ladir = $(moduledir)/extensions libdri_la_SOURCES = \ diff --git a/xorg-server/hw/xfree86/dri/Makefile.in b/xorg-server/hw/xfree86/dri/Makefile.in index cf445fecd..278a514ef 100644 --- a/xorg-server/hw/xfree86/dri/Makefile.in +++ b/xorg-server/hw/xfree86/dri/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dri DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -104,6 +108,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@ @@ -124,9 +129,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@ @@ -155,7 +163,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@ @@ -164,9 +174,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@ @@ -205,12 +219,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@ @@ -230,7 +245,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@ @@ -240,6 +254,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,11 +268,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@ @@ -293,6 +307,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@ @@ -317,7 +332,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@ @@ -340,6 +354,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,7 +386,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,12 +404,10 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ - -I$(top_srcdir)/GL/include \ - -I$(top_builddir)/GL/include \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRIPROTO_CFLAGS@ \ @LIBDRM_CFLAGS@ \ - @GL_CFLAGS@ + @DRI_CFLAGS@ libdri_la_LDFLAGS = -module -avoid-version @LIBDRM_LIBS@ libdri_ladir = $(moduledir)/extensions diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c index bddb6510e..d32b284ed 100644 --- a/xorg-server/hw/xfree86/dri/dri.c +++ b/xorg-server/hw/xfree86/dri/dri.c @@ -45,8 +45,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <sys/ioctl.h> #include <errno.h> -#define NEED_REPLIES -#define NEED_EVENTS #include <X11/X.h> #include <X11/Xproto.h> #include "xf86drm.h" @@ -71,6 +69,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "mipointer.h" #include "xf86_OSproc.h" #include "inputstr.h" +#include "xf86VGAarbiter.h" #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) @@ -335,6 +334,12 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } + if (!xf86VGAarbiterAllowDRI(pScreen)) { + DRIDrvMsg(pScreen->myNum, X_WARNING, + "Direct rendering is not supported when VGA arb is necessary for the device\n"); + return FALSE; + } + /* * If Xinerama is on, don't allow DRI to initialise. It won't be usable * anyway. @@ -1365,11 +1370,12 @@ Bool DRIDrawablePrivDelete(pointer pResource, XID id) { WindowPtr pWin; + int rc; id = (XID)pResource; - pWin = LookupIDByType(id, RT_WINDOW); + rc = dixLookupWindow(&pWin, id, serverClient, DixGetAttrAccess); - if (pWin) { + if (rc == Success) { DRIDrawablePrivPtr pDRIDrwPriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (!pDRIDrwPriv) @@ -1835,7 +1841,7 @@ DRISwapContext(int drmFD, void *oldctx, void *newctx) newContextStore); } -void* +void* DRIGetContextStore(DRIContextPrivPtr context) { return((void *)context->pContextStore); diff --git a/xorg-server/hw/xfree86/dri/dri.h b/xorg-server/hw/xfree86/dri/dri.h index 516da97a5..f690e234b 100644 --- a/xorg-server/hw/xfree86/dri/dri.h +++ b/xorg-server/hw/xfree86/dri/dri.h @@ -198,59 +198,59 @@ typedef struct { } DRIInfoRec, *DRIInfoPtr; -extern Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, +extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, const char *busID, const char *drmDriverName); -extern Bool DRIScreenInit(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD); -extern void DRICloseScreen(ScreenPtr pScreen); +extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen); -extern Bool DRIExtensionInit(void); +extern _X_EXPORT Bool DRIExtensionInit(void); -extern void DRIReset(void); +extern _X_EXPORT void DRIReset(void); -extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable); -extern Bool DRIOpenConnection(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString); -extern Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); +extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); -extern Bool DRICloseConnection(ScreenPtr pScreen); +extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen); -extern Bool DRIGetClientDriverName(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen, int* ddxDriverMajorVersion, int* ddxDriverMinorVersion, int* ddxDriverPatchVersion, char** clientDriverName); -extern Bool DRICreateContext(ScreenPtr pScreen, +extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, XID context, drm_context_t * pHWContext); -extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context); +extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context); -extern Bool DRIContextPrivDelete(pointer pResource, XID id); +extern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id); -extern Bool DRICreateDrawable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drm_drawable_t * hHWDrawable); -extern Bool DRIDestroyDrawable(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable); -extern Bool DRIDrawablePrivDelete(pointer pResource, +extern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource, XID id); -extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen, DrawablePtr pDrawable, unsigned int* indx, unsigned int* stamp, @@ -265,7 +265,7 @@ extern Bool DRIGetDrawableInfo(ScreenPtr pScreen, int* numBackClipRects, drm_clip_rect_t ** pBackClipRects); -extern Bool DRIGetDeviceInfo(ScreenPtr pScreen, +extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen, drm_handle_t * hFrameBuffer, int* fbOrigin, int* fbSize, @@ -273,109 +273,109 @@ extern Bool DRIGetDeviceInfo(ScreenPtr pScreen, int* devPrivateSize, void** pDevPrivate); -extern DRIInfoPtr DRICreateInfoRec(void); +extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void); -extern void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); +extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); -extern Bool DRIFinishScreenInit(ScreenPtr pScreen); +extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen); -extern void DRIWakeupHandler(pointer wakeupData, +extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask); -extern void DRIBlockHandler(pointer blockData, +extern _X_EXPORT void DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask); -extern void DRIDoWakeupHandler(int screenNum, +extern _X_EXPORT void DRIDoWakeupHandler(int screenNum, pointer wakeupData, unsigned long result, pointer pReadmask); -extern void DRIDoBlockHandler(int screenNum, +extern _X_EXPORT void DRIDoBlockHandler(int screenNum, pointer blockData, pointer pTimeout, pointer pReadmask); -extern void DRISwapContext(int drmFD, +extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); -extern void *DRIGetContextStore(DRIContextPrivPtr context); +extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); -extern void DRIWindowExposures(WindowPtr pWin, +extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg); -extern Bool DRIDestroyWindow(WindowPtr pWin); +extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); -extern void DRICopyWindow(WindowPtr pWin, +extern _X_EXPORT void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); -extern int DRIValidateTree(WindowPtr pParent, +extern _X_EXPORT int DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); -extern void DRIPostValidateTree(WindowPtr pParent, +extern _X_EXPORT void DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); -extern void DRIClipNotify(WindowPtr pWin, +extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, int dx, int dy); -extern CARD32 DRIGetDrawableIndex(WindowPtr pWin); +extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin); -extern void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); +extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); -extern void DRILock(ScreenPtr pScreen, int flags); +extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags); -extern void DRIUnlock(ScreenPtr pScreen); +extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen); -extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); +extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); -extern void *DRIGetSAREAPrivate(ScreenPtr pScreen); +extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen); -extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, +extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index); -extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, +extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, drm_context_t * pHWContext, DRIContextFlags flags); -extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, +extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, drm_context_t hHWContext, DRIContextFlags flags); -extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); +extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); -extern drm_context_t DRIGetContext(ScreenPtr pScreen); +extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen); -extern void DRIQueryVersion(int *majorVersion, +extern _X_EXPORT void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion); -extern void DRIAdjustFrame(int scrnIndex, int x, int y, int flags); +extern _X_EXPORT void DRIAdjustFrame(int scrnIndex, int x, int y, int flags); -extern void DRIMoveBuffersHelper(ScreenPtr pScreen, +extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen, int dx, int dy, int *xdir, int *ydir, RegionPtr reg); -extern char *DRICreatePCIBusID(const struct pci_device *PciInfo); +extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *PciInfo); -extern int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *)); -extern int drmRemoveSIGIOHandler(int fd); -extern int DRIMasterFD(ScrnInfoPtr pScrn); +extern _X_EXPORT int drmInstallSIGIOHandler(int fd, void (*f)(int, void *, void *)); +extern _X_EXPORT int drmRemoveSIGIOHandler(int fd); +extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn); -extern void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); +extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); -extern drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); +extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); -extern void DRIGetTexOffsetFuncs(ScreenPtr pScreen, +extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen, DRITexOffsetStartProcPtr *texOffsetStartFunc, DRITexOffsetFinishProcPtr *texOffsetFinishFunc); diff --git a/xorg-server/hw/xfree86/dri/xf86dri.c b/xorg-server/hw/xfree86/dri/xf86dri.c index ea11b38ee..d3e5e688a 100644 --- a/xorg-server/hw/xfree86/dri/xf86dri.c +++ b/xorg-server/hw/xfree86/dri/xf86dri.c @@ -42,8 +42,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "xf86.h" -#define NEED_REPLIES -#define NEED_EVENTS #include <X11/X.h> #include <X11/Xproto.h> #include "misc.h" @@ -216,8 +214,8 @@ ProcXF86DRIOpenConnection( rep.busIdStringLength = 0; if (busIdString) rep.busIdStringLength = strlen(busIdString); - rep.length = (SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + - ((rep.busIdStringLength + 3) & ~3)) >> 2; + rep.length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + + pad_to_int32(rep.busIdStringLength)); rep.hSAREALow = (CARD32)(hSAREA & 0xffffffff); #if defined(LONG64) && !defined(__linux__) @@ -302,9 +300,9 @@ ProcXF86DRIGetClientDriverName( rep.clientDriverNameLength = 0; if (clientDriverName) rep.clientDriverNameLength = strlen(clientDriverName); - rep.length = (SIZEOF(xXF86DRIGetClientDriverNameReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) - SIZEOF(xGenericReply) + - ((rep.clientDriverNameLength + 3) & ~3)) >> 2; + pad_to_int32(rep.clientDriverNameLength)); WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), (char *)&rep); @@ -408,8 +406,8 @@ ProcXF86DRIDestroyDrawable( { REQUEST(xXF86DRIDestroyDrawableReq); DrawablePtr pDrawable; - REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); int rc; + REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; @@ -517,7 +515,7 @@ ProcXF86DRIGetDrawableInfo( rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects; } - rep.length = ((rep.length + 3) & ~3) >> 2; + rep.length = bytes_to_int32(rep.length); WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), (char *)&rep); @@ -576,9 +574,9 @@ ProcXF86DRIGetDeviceInfo( rep.length = 0; if (rep.devPrivateSize) { - rep.length = (SIZEOF(xXF86DRIGetDeviceInfoReply) - + rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) - SIZEOF(xGenericReply) + - ((rep.devPrivateSize + 3) & ~3)) >> 2; + pad_to_int32(rep.devPrivateSize)); } WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), (char *)&rep); diff --git a/xorg-server/hw/xfree86/dri2/Makefile.am b/xorg-server/hw/xfree86/dri2/Makefile.am index e5bd16bd2..c9fdde2f8 100644 --- a/xorg-server/hw/xfree86/dri2/Makefile.am +++ b/xorg-server/hw/xfree86/dri2/Makefile.am @@ -1,7 +1,7 @@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ - @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus diff --git a/xorg-server/hw/xfree86/dri2/Makefile.in b/xorg-server/hw/xfree86/dri2/Makefile.in index 25e0ff702..569c4b04a 100644 --- a/xorg-server/hw/xfree86/dri2/Makefile.in +++ b/xorg-server/hw/xfree86/dri2/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/dri2 DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,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@ @@ -123,9 +128,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@ @@ -154,7 +162,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@ @@ -163,9 +173,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@ @@ -204,12 +218,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@ @@ -229,7 +244,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@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,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@ @@ -292,6 +306,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@ @@ -316,7 +331,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@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,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@ @@ -379,7 +396,7 @@ top_srcdir = @top_srcdir@ libdri2_la_LTLIBRARIES = libdri2.la libdri2_la_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ - @GL_CFLAGS@ \ + @DRI_CFLAGS@ \ @DIX_CFLAGS@ @XORG_CFLAGS@ @DRI2PROTO_CFLAGS@ @LIBDRM_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus diff --git a/xorg-server/hw/xfree86/dri2/dri2.c b/xorg-server/hw/xfree86/dri2/dri2.c index 580383dbc..d15ced112 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.c +++ b/xorg-server/hw/xfree86/dri2/dri2.c @@ -39,6 +39,7 @@ #include "scrnintstr.h" #include "windowstr.h" #include "dri2.h" +#include "xf86VGAarbiter.h" #include "xf86.h" @@ -53,7 +54,7 @@ typedef struct _DRI2Drawable { unsigned int refCount; int width; int height; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int bufferCount; unsigned int pendingSequence; } DRI2DrawableRec, *DRI2DrawablePtr; @@ -64,9 +65,6 @@ typedef struct _DRI2Screen { int fd; unsigned int lastSequence; - DRI2CreateBuffersProcPtr CreateBuffers; - DRI2DestroyBuffersProcPtr DestroyBuffers; - DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; @@ -155,13 +153,13 @@ find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) return -1; } -static DRI2Buffer2Ptr +static DRI2BufferPtr allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, DRI2DrawablePtr pPriv, unsigned int attachment, unsigned int format, int dimensions_match) { - DRI2Buffer2Ptr buffer; + DRI2BufferPtr buffer; int old_buf; old_buf = find_attachment(pPriv, attachment); @@ -178,173 +176,91 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, return buffer; } -static DRI2Buffer2Ptr * +static DRI2BufferPtr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, int has_format) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int need_real_front = 0; int need_fake_front = 0; int have_fake_front = 0; int front_format = 0; - const int dimensions_match = (pDraw->width == pPriv->width) - && (pDraw->height == pPriv->height); + int dimensions_match; int i; + if (!pPriv) { + *width = pDraw->width; + *height = pDraw->height; + *out_count = 0; + return NULL; + } - buffers = xalloc((count + 1) * sizeof(buffers[0])); - - if (ds->CreateBuffer) { - /* Version 2 API with CreateBuffer */ - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - const unsigned format = (has_format) ? *(attachments++) : 0; - - buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, - format, dimensions_match); - - /* If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the case - * where the client requests both the fake and real front-buffer. - */ - if (attachment == DRI2BufferBackLeft) { - need_real_front++; - front_format = format; - } - - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - front_format = format; - - if (pDraw->type == DRAWABLE_WINDOW) { - need_fake_front++; - } - } - - if (pDraw->type == DRAWABLE_WINDOW) { - if (attachment == DRI2BufferFakeFrontLeft) { - need_fake_front--; - have_fake_front = 1; - } - } - } + dimensions_match = (pDraw->width == pPriv->width) + && (pDraw->height == pPriv->height); - if (need_real_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFrontLeft, - front_format, dimensions_match); - } + buffers = xalloc((count + 1) * sizeof(buffers[0])); - if (need_fake_front > 0) { - buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, - DRI2BufferFakeFrontLeft, - front_format, dimensions_match); - have_fake_front = 1; + for (i = 0; i < count; i++) { + const unsigned attachment = *(attachments++); + const unsigned format = (has_format) ? *(attachments++) : 0; + + buffers[i] = allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, + format, dimensions_match); + + /* If the drawable is a window and the front-buffer is requested, + * silently add the fake front-buffer to the list of requested + * attachments. The counting logic in the loop accounts for the case + * where the client requests both the fake and real front-buffer. + */ + if (attachment == DRI2BufferBackLeft) { + need_real_front++; + front_format = format; } - *out_count = i; - + if (attachment == DRI2BufferFrontLeft) { + need_real_front--; + front_format = format; - if (pPriv->buffers != NULL) { - for (i = 0; i < pPriv->bufferCount; i++) { - if (pPriv->buffers[i] != NULL) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } + if (pDraw->type == DRAWABLE_WINDOW) { + need_fake_front++; } - - xfree(pPriv->buffers); } - } else { - DRI2BufferPtr buffers1; - unsigned int temp_buf[32]; - unsigned int *temp = temp_buf; - int i; - int buffers_match = 1; - /* Version 1 API with CreateBuffers */ - - if ((count + 1) > 32) { - temp = xalloc((count + 1) * sizeof(temp[0])); - } - - for (i = 0; i < count; i++) { - const unsigned attachment = *(attachments++); - - /* Version 1 doesn't deal with the format at all */ - if (has_format) - attachments++; - - /* - * Make sure the client also gets the front buffer when - * it asks for a back buffer - */ - if (attachment == DRI2BufferBackLeft) - need_real_front++; - - /* - * If the drawable is a window and the front-buffer is requested, - * silently add the fake front-buffer to the list of requested - * attachments. The counting logic in the loop accounts for the - * case where the client requests both the fake and real - * front-buffer. - */ - if (attachment == DRI2BufferFrontLeft) { - need_real_front--; - if (pDraw->type == DRAWABLE_WINDOW) - need_fake_front++; - } - if (pDraw->type == DRAWABLE_WINDOW && - attachment == DRI2BufferFakeFrontLeft) - { + if (pDraw->type == DRAWABLE_WINDOW) { + if (attachment == DRI2BufferFakeFrontLeft) { need_fake_front--; have_fake_front = 1; } - - temp[i] = attachment; - } - - if (need_real_front > 0) - temp[count++] = DRI2BufferFrontLeft; - - if (need_fake_front > 0) { - temp[count++] = DRI2BufferFakeFrontLeft; - have_fake_front = 1; } + } - if (count != pPriv->bufferCount) - buffers_match = 0; - else { - for (i = 0; i < count; i++) - if (pPriv->buffers[i]->attachment != temp[i]) { - buffers_match = 0; - break; - } - } - if (pPriv->buffers == NULL || !dimensions_match || !buffers_match) - { - buffers1 = (*ds->CreateBuffers)(pDraw, temp, count); - if (pPriv->buffers != NULL) - (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], - pPriv->bufferCount); - } - else - buffers1 = (DRI2BufferPtr) pPriv->buffers[0]; + if (need_real_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFrontLeft, + front_format, dimensions_match); + } - for (i = 0; i < count; i++) - buffers[i] = (DRI2Buffer2Ptr) &buffers1[i]; + if (need_fake_front > 0) { + buffers[i++] = allocate_or_reuse_buffer(pDraw, ds, pPriv, + DRI2BufferFakeFrontLeft, + front_format, dimensions_match); + have_fake_front = 1; + } - *out_count = count; + *out_count = i; - if (pPriv->buffers) - xfree (pPriv->buffers); - if (temp != temp_buf) { - xfree(temp); + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } } + + xfree(pPriv->buffers); } pPriv->buffers = buffers; @@ -376,7 +292,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, return pPriv->buffers; } -DRI2Buffer2Ptr * +DRI2BufferPtr * DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -384,7 +300,7 @@ DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, out_count, FALSE); } -DRI2Buffer2Ptr * +DRI2BufferPtr * DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { @@ -441,14 +357,8 @@ DRI2DestroyDrawable(DrawablePtr pDraw) if (pPriv->buffers != NULL) { int i; - if (ds->DestroyBuffer) { - for (i = 0; i < pPriv->bufferCount; i++) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } - } else { - (*ds->DestroyBuffers)(pDraw, (DRI2BufferPtr) pPriv->buffers[0], - pPriv->bufferCount); - } + for (i = 0; i < pPriv->bufferCount; i++) + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); xfree(pPriv->buffers); } @@ -502,6 +412,15 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) { DRI2ScreenPtr ds; + if (info->version < 3) + return FALSE; + + if (!xf86VGAarbiterAllowDRI(pScreen)) { + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Direct rendering is not supported when VGA arb is necessary for the device\n"); + return FALSE; + } + ds = xalloc(sizeof *ds); if (!ds) return FALSE; @@ -510,32 +429,8 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) ds->driverName = info->driverName; ds->deviceName = info->deviceName; - /* Prefer the new one-at-a-time buffer API */ - if (info->version >= 2 && info->CreateBuffer && info->DestroyBuffer) { - ds->CreateBuffer = info->CreateBuffer; - ds->DestroyBuffer = info->DestroyBuffer; - ds->CreateBuffers = NULL; - ds->DestroyBuffers = NULL; - } else if (info->CreateBuffers && info->DestroyBuffers) { - xf86DrvMsg(pScreen->myNum, X_WARNING, - "[DRI2] Version 1 API (broken front buffer rendering)\n"); - ds->CreateBuffer = NULL; - ds->DestroyBuffer = NULL; - ds->CreateBuffers = info->CreateBuffers; - ds->DestroyBuffers = info->DestroyBuffers; - } else { - xf86DrvMsg(pScreen->myNum, X_ERROR, - "[DRI2] Missing buffer management functions\n"); - xfree(ds); - return FALSE; - } - - if (!info->CopyRegion) { - xf86DrvMsg(pScreen->myNum, X_ERROR, - "[DRI2] Missing copy region function\n"); - xfree(ds); - return FALSE; - } + ds->CreateBuffer = info->CreateBuffer; + ds->DestroyBuffer = info->DestroyBuffer; ds->CopyRegion = info->CopyRegion; dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); diff --git a/xorg-server/hw/xfree86/dri2/dri2.h b/xorg-server/hw/xfree86/dri2/dri2.h index f3692673a..175471aae 100644 --- a/xorg-server/hw/xfree86/dri2/dri2.h +++ b/xorg-server/hw/xfree86/dri2/dri2.h @@ -35,26 +35,18 @@ #include <X11/extensions/dri2tokens.h> -/* Version 1 structure (for ABI compatibility) */ +/* Version 2 structure (with format at the end) */ typedef struct { unsigned int attachment; unsigned int name; unsigned int pitch; unsigned int cpp; unsigned int flags; + unsigned int format; void *driverPrivate; } DRI2BufferRec, *DRI2BufferPtr; -/* Version 2 structure (with format at the end) */ -typedef struct { - unsigned int attachment; - unsigned int name; - unsigned int pitch; - unsigned int cpp; - unsigned int flags; - void *driverPrivate; - unsigned int format; -} DRI2Buffer2Rec, *DRI2Buffer2Ptr; +typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr; typedef DRI2BufferPtr (*DRI2CreateBuffersProcPtr)(DrawablePtr pDraw, unsigned int *attachments, @@ -70,16 +62,16 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw, typedef void (*DRI2WaitProcPtr)(WindowPtr pWin, unsigned int sequence); -typedef DRI2Buffer2Ptr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, +typedef DRI2BufferPtr (*DRI2CreateBufferProcPtr)(DrawablePtr pDraw, unsigned int attachment, unsigned int format); typedef void (*DRI2DestroyBufferProcPtr)(DrawablePtr pDraw, - DRI2Buffer2Ptr buffer); + DRI2BufferPtr buffer); /** * Version of the DRI2InfoRec structure defined in this header */ -#define DRI2INFOREC_VERSION 2 +#define DRI2INFOREC_VERSION 3 typedef struct { unsigned int version; /**< Version of this struct */ @@ -87,46 +79,38 @@ typedef struct { const char *driverName; const char *deviceName; - DRI2CreateBuffersProcPtr CreateBuffers; - DRI2DestroyBuffersProcPtr DestroyBuffers; - DRI2CopyRegionProcPtr CopyRegion; - DRI2WaitProcPtr Wait; - - /** - * \name Fields added in version 2 of the structure. - */ - /*@{*/ DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; - /*@}*/ + DRI2CopyRegionProcPtr CopyRegion; + DRI2WaitProcPtr Wait; } DRI2InfoRec, *DRI2InfoPtr; -Bool DRI2ScreenInit(ScreenPtr pScreen, +extern _X_EXPORT Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info); -void DRI2CloseScreen(ScreenPtr pScreen); +extern _X_EXPORT void DRI2CloseScreen(ScreenPtr pScreen); -Bool DRI2Connect(ScreenPtr pScreen, +extern _X_EXPORT Bool DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName); -Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); +extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); -int DRI2CreateDrawable(DrawablePtr pDraw); +extern _X_EXPORT int DRI2CreateDrawable(DrawablePtr pDraw); -void DRI2DestroyDrawable(DrawablePtr pDraw); +extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw); -DRI2Buffer2Ptr *DRI2GetBuffers(DrawablePtr pDraw, +extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); -int DRI2CopyRegion(DrawablePtr pDraw, +extern _X_EXPORT int DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, unsigned int dest, unsigned int src); @@ -149,7 +133,7 @@ int DRI2CopyRegion(DrawablePtr pDraw, */ extern _X_EXPORT void DRI2Version(int *major, int *minor); -extern _X_EXPORT DRI2Buffer2Ptr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, +extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); diff --git a/xorg-server/hw/xfree86/dri2/dri2ext.c b/xorg-server/hw/xfree86/dri2/dri2ext.c index 3c06174cb..72f9a448b 100644 --- a/xorg-server/hw/xfree86/dri2/dri2ext.c +++ b/xorg-server/hw/xfree86/dri2/dri2ext.c @@ -34,7 +34,6 @@ #include <xorg-config.h> #endif -#define NEED_REPLIES #include <X11/X.h> #include <X11/Xproto.h> #include <X11/extensions/dri2proto.h> @@ -54,10 +53,10 @@ static ExtensionEntry *dri2Extension; static RESTYPE dri2DrawableRes; static Bool -validDrawable(ClientPtr client, XID drawable, +validDrawable(ClientPtr client, XID drawable, Mask access_mode, DrawablePtr *pDrawable, int *status) { - *status = dixLookupDrawable(pDrawable, drawable, client, 0, DixReadAccess); + *status = dixLookupDrawable(pDrawable, drawable, client, 0, access_mode); if (*status != Success) { client->errorValue = drawable; return FALSE; @@ -106,7 +105,8 @@ ProcDRI2Connect(ClientPtr client) const char *deviceName; REQUEST_SIZE_MATCH(xDRI2ConnectReq); - if (!validDrawable(client, stuff->window, &pDraw, &status)) + if (!validDrawable(client, stuff->window, DixGetAttrAccess, + &pDraw, &status)) return status; rep.type = X_Reply; @@ -141,7 +141,8 @@ ProcDRI2Authenticate(ClientPtr client) int status; REQUEST_SIZE_MATCH(xDRI2AuthenticateReq); - if (!validDrawable(client, stuff->window, &pDraw, &status)) + if (!validDrawable(client, stuff->window, DixGetAttrAccess, + &pDraw, &status)) return status; rep.type = X_Reply; @@ -162,7 +163,8 @@ ProcDRI2CreateDrawable(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2CreateDrawableReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixAddAccess, + &pDrawable, &status)) return status; status = DRI2CreateDrawable(pDrawable); @@ -185,7 +187,8 @@ ProcDRI2DestroyDrawable(ClientPtr client) int status; REQUEST_SIZE_MATCH(xDRI2DestroyDrawableReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixRemoveAccess, + &pDrawable, &status)) return status; FreeResourceByType(stuff->drawable, dri2DrawableRes, FALSE); @@ -196,7 +199,7 @@ ProcDRI2DestroyDrawable(ClientPtr client) static void send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, - DRI2Buffer2Ptr *buffers, int count, int width, int height) + DRI2BufferPtr *buffers, int count, int width, int height) { xDRI2GetBuffersReply rep; int skip = 0; @@ -246,12 +249,13 @@ ProcDRI2GetBuffers(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * 4); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, + &pDrawable, &status)) return status; attachments = (unsigned int *) &stuff[1]; @@ -269,12 +273,13 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; - DRI2Buffer2Ptr *buffers; + DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * 4)); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, + &pDrawable, &status)) return status; attachments = (unsigned int *) &stuff[1]; @@ -297,7 +302,8 @@ ProcDRI2CopyRegion(ClientPtr client) REQUEST_SIZE_MATCH(xDRI2CopyRegionReq); - if (!validDrawable(client, stuff->drawable, &pDrawable, &status)) + if (!validDrawable(client, stuff->drawable, DixWriteAccess, + &pDrawable, &status)) return status; VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); diff --git a/xorg-server/hw/xfree86/exa/Makefile.in b/xorg-server/hw/xfree86/exa/Makefile.in index 8861fed08..482afe5a7 100644 --- a/xorg-server/hw/xfree86/exa/Makefile.in +++ b/xorg-server/hw/xfree86/exa/Makefile.in @@ -43,8 +43,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/exa 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 @@ -54,7 +57,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -107,6 +111,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@ @@ -127,9 +132,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@ @@ -158,7 +166,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@ @@ -167,9 +177,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@ @@ -208,12 +222,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@ @@ -233,7 +248,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@ @@ -243,6 +257,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -256,11 +271,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@ @@ -296,6 +310,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@ @@ -320,7 +335,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@ @@ -343,6 +357,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -374,7 +389,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@ diff --git a/xorg-server/hw/xfree86/exa/examodule.c b/xorg-server/hw/xfree86/exa/examodule.c index 27607a1ac..601288c73 100644 --- a/xorg-server/hw/xfree86/exa/examodule.c +++ b/xorg-server/hw/xfree86/exa/examodule.c @@ -146,7 +146,7 @@ exaDDXDriverInit(ScreenPtr pScreen) pExaScr->optimize_migration = xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_OPTIMIZE_MIGRATION, - FALSE); + TRUE); } if (xf86ReturnOptValBool(pScreenPriv->options, diff --git a/xorg-server/hw/xfree86/fbdevhw/Makefile.in b/xorg-server/hw/xfree86/fbdevhw/Makefile.in index e4676b679..0c615d0a5 100644 --- a/xorg-server/hw/xfree86/fbdevhw/Makefile.in +++ b/xorg-server/hw/xfree86/fbdevhw/Makefile.in @@ -44,8 +44,11 @@ DIST_COMMON = README $(sdk_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/cpprules.in subdir = hw/xfree86/fbdevhw 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 @@ -55,7 +58,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -112,6 +116,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@ @@ -132,9 +137,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@ @@ -163,7 +171,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@ @@ -172,9 +182,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@ @@ -213,12 +227,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@ @@ -238,7 +253,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@ @@ -248,6 +262,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -261,11 +276,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@ @@ -301,6 +315,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@ @@ -325,7 +340,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@ @@ -348,6 +362,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -379,7 +394,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@ diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c index 5269277ef..00ebd6b39 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c +++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.c @@ -17,16 +17,10 @@ #include "fbdevhw.h" #include "fbpriv.h" -#if 0 -/* kernel header doesn't work with -ansi */ -# include "asm/page.h" /* #define for PAGE_* */ -#else -# define PAGE_MASK (~(getpagesize() - 1)) -#endif +#define PAGE_MASK (~(getpagesize() - 1)) #include "globals.h" -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #define DEBUG 0 @@ -65,20 +59,7 @@ _X_EXPORT XF86ModuleData fbdevhwModuleData = { static pointer fbdevhwSetup(pointer module, pointer opts, int *errmaj, int *errmin) { - const char *osname; - - /* Check that we're being loaded on a Linux system */ - LoaderGetOS(&osname, NULL, NULL, NULL); - if (!osname || strcmp(osname, "linux") != 0) { - if (errmaj) - *errmaj = LDR_BADOS; - if (errmin) - *errmin = 0; - return NULL; - } else { - /* OK */ - return (pointer)1; - } + return (pointer)1; } #include <fcntl.h> @@ -152,6 +133,17 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn) FBDEVHWPTRLVAL(pScrn) = NULL; } +int +fbdevHWGetFD(ScrnInfoPtr pScrn) +{ + fbdevHWPtr fPtr; + + fbdevHWGetRec(pScrn); + fPtr = FBDEVHWPTR(pScrn); + + return fPtr->fd; +} + /* -------------------------------------------------------------------- */ /* some helpers for printing debug informations */ @@ -223,10 +215,8 @@ xfree2fbdev_timing(DisplayModePtr mode, struct fb_var_screeninfo *var) var->sync |= FB_SYNC_VERT_HIGH_ACT; if (mode->Flags & V_PCSYNC) var->sync |= FB_SYNC_COMP_HIGH_ACT; -#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */ if (mode->Flags & V_BCAST) var->sync |= FB_SYNC_BROADCAST; -#endif if (mode->Flags & V_INTERLACE) var->vmode = FB_VMODE_INTERLACED; else if (mode->Flags & V_DBLSCAN) @@ -270,10 +260,8 @@ fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode) mode->Flags |= var->sync & FB_SYNC_HOR_HIGH_ACT ? V_PHSYNC : V_NHSYNC; mode->Flags |= var->sync & FB_SYNC_VERT_HIGH_ACT ? V_PVSYNC : V_NVSYNC; mode->Flags |= var->sync & FB_SYNC_COMP_HIGH_ACT ? V_PCSYNC : V_NCSYNC; -#if 1 /* Badly needed for PAL/NTSC on Amiga (amifb)!! [geert] */ if (var->sync & FB_SYNC_BROADCAST) mode->Flags |= V_BCAST; -#endif if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) mode->Flags |= V_INTERLACE; else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) @@ -332,10 +320,9 @@ fbdev_open_pci(struct pci_device * pPci, char **namep) return fd; } + close(fd); } } - - close(fd); } diff --git a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h index 614dc6fed..bc46b9c4f 100644 --- a/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h +++ b/xorg-server/hw/xfree86/fbdevhw/fbdevhw.h @@ -13,50 +13,52 @@ #define FBDEVHW_TEXT 3 /* Text/attributes */ #define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */ -Bool fbdevHWGetRec(ScrnInfoPtr pScrn); -void fbdevHWFreeRec(ScrnInfoPtr pScrn); - -Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep); -Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device); - -char* fbdevHWGetName(ScrnInfoPtr pScrn); -int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp); -int fbdevHWGetLineLength(ScrnInfoPtr pScrn); -int fbdevHWGetType(ScrnInfoPtr pScrn); -int fbdevHWGetVidmem(ScrnInfoPtr pScrn); - -void* fbdevHWMapVidmem(ScrnInfoPtr pScrn); -int fbdevHWLinearOffset(ScrnInfoPtr pScrn); -Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn); -void* fbdevHWMapMMIO(ScrnInfoPtr pScrn); -Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn); - -void fbdevHWSetVideoModes(ScrnInfoPtr pScrn); -DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn); -void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn); -Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); -void fbdevHWSave(ScrnInfoPtr pScrn); -void fbdevHWRestore(ScrnInfoPtr pScrn); - -void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, +extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn); + +extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn); + +extern _X_EXPORT Bool fbdevHWProbe(struct pci_device * pPci, char *device, char **namep); +extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device * pPci, char *device); + +extern _X_EXPORT char* fbdevHWGetName(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp); +extern _X_EXPORT int fbdevHWGetLineLength(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetType(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWGetVidmem(ScrnInfoPtr pScrn); + +extern _X_EXPORT void* fbdevHWMapVidmem(ScrnInfoPtr pScrn); +extern _X_EXPORT int fbdevHWLinearOffset(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn); +extern _X_EXPORT void* fbdevHWMapMMIO(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn); + +extern _X_EXPORT void fbdevHWSetVideoModes(ScrnInfoPtr pScrn); +extern _X_EXPORT DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn); +extern _X_EXPORT Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); +extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn); +extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn); + +extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual); -ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); -Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); -void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags); -Bool fbdevHWEnterVT(int scrnIndex, int flags); -void fbdevHWLeaveVT(int scrnIndex, int flags); -void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); - -Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode); - -xf86SwitchModeProc *fbdevHWSwitchModeWeak(void); -xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void); -xf86EnterVTProc *fbdevHWEnterVTWeak(void); -xf86LeaveVTProc *fbdevHWLeaveVTWeak(void); -xf86ValidModeProc *fbdevHWValidModeWeak(void); -xf86DPMSSetProc *fbdevHWDPMSSetWeak(void); -xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void); -SaveScreenProcPtr fbdevHWSaveScreenWeak(void); +extern _X_EXPORT ModeStatus fbdevHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags); +extern _X_EXPORT Bool fbdevHWSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); +extern _X_EXPORT void fbdevHWAdjustFrame(int scrnIndex, int x, int y, int flags); +extern _X_EXPORT Bool fbdevHWEnterVT(int scrnIndex, int flags); +extern _X_EXPORT void fbdevHWLeaveVT(int scrnIndex, int flags); +extern _X_EXPORT void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); + +extern _X_EXPORT Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode); + +extern _X_EXPORT xf86SwitchModeProc *fbdevHWSwitchModeWeak(void); +extern _X_EXPORT xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void); +extern _X_EXPORT xf86EnterVTProc *fbdevHWEnterVTWeak(void); +extern _X_EXPORT xf86LeaveVTProc *fbdevHWLeaveVTWeak(void); +extern _X_EXPORT xf86ValidModeProc *fbdevHWValidModeWeak(void); +extern _X_EXPORT xf86DPMSSetProc *fbdevHWDPMSSetWeak(void); +extern _X_EXPORT xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void); +extern _X_EXPORT SaveScreenProcPtr fbdevHWSaveScreenWeak(void); #endif diff --git a/xorg-server/hw/xfree86/i2c/Makefile.am b/xorg-server/hw/xfree86/i2c/Makefile.am index a16d88071..0b80cc8a6 100644 --- a/xorg-server/hw/xfree86/i2c/Makefile.am +++ b/xorg-server/hw/xfree86/i2c/Makefile.am @@ -1,4 +1,4 @@ -noinst_LIBRARIES = libi2c.a +noinst_LTLIBRARIES = libi2c.la multimediadir = $(moduledir)/multimedia multimedia_LTLIBRARIES = \ @@ -10,7 +10,7 @@ multimedia_LTLIBRARIES = \ tda9885_drv.la \ uda1380_drv.la -libi2c_a_SOURCES = xf86i2c.c +libi2c_la_SOURCES = xf86i2c.c INCLUDES = $(XORG_INCS) diff --git a/xorg-server/hw/xfree86/i2c/Makefile.in b/xorg-server/hw/xfree86/i2c/Makefile.in index 5cb63d658..4439c7565 100644 --- a/xorg-server/hw/xfree86/i2c/Makefile.in +++ b/xorg-server/hw/xfree86/i2c/Makefile.in @@ -16,7 +16,6 @@ @SET_MAKE@ - VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -40,8 +39,11 @@ subdir = hw/xfree86/i2c DIST_COMMON = $(sdk_HEADERS) $(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,15 +53,10 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libi2c_a_AR = $(AR) $(ARFLAGS) -libi2c_a_LIBADD = -am_libi2c_a_OBJECTS = xf86i2c.$(OBJEXT) -libi2c_a_OBJECTS = $(am_libi2c_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -82,7 +79,7 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(multimediadir)" "$(DESTDIR)$(sdkdir)" -LTLIBRARIES = $(multimedia_LTLIBRARIES) +LTLIBRARIES = $(multimedia_LTLIBRARIES) $(noinst_LTLIBRARIES) bt829_drv_la_LIBADD = am_bt829_drv_la_OBJECTS = bt829.lo bt829_module.lo bt829_drv_la_OBJECTS = $(am_bt829_drv_la_OBJECTS) @@ -95,6 +92,9 @@ fi1236_drv_la_OBJECTS = $(am_fi1236_drv_la_OBJECTS) fi1236_drv_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(fi1236_drv_la_LDFLAGS) $(LDFLAGS) -o $@ +libi2c_la_LIBADD = +am_libi2c_la_OBJECTS = xf86i2c.lo +libi2c_la_OBJECTS = $(am_libi2c_la_OBJECTS) msp3430_drv_la_LIBADD = am_msp3430_drv_la_OBJECTS = msp3430.lo msp3430_module.lo msp3430_drv_la_OBJECTS = $(am_msp3430_drv_la_OBJECTS) @@ -135,12 +135,12 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libi2c_a_SOURCES) $(bt829_drv_la_SOURCES) \ - $(fi1236_drv_la_SOURCES) $(msp3430_drv_la_SOURCES) \ +SOURCES = $(bt829_drv_la_SOURCES) $(fi1236_drv_la_SOURCES) \ + $(libi2c_la_SOURCES) $(msp3430_drv_la_SOURCES) \ $(tda8425_drv_la_SOURCES) $(tda9850_drv_la_SOURCES) \ $(tda9885_drv_la_SOURCES) $(uda1380_drv_la_SOURCES) -DIST_SOURCES = $(libi2c_a_SOURCES) $(bt829_drv_la_SOURCES) \ - $(fi1236_drv_la_SOURCES) $(msp3430_drv_la_SOURCES) \ +DIST_SOURCES = $(bt829_drv_la_SOURCES) $(fi1236_drv_la_SOURCES) \ + $(libi2c_la_SOURCES) $(msp3430_drv_la_SOURCES) \ $(tda8425_drv_la_SOURCES) $(tda9850_drv_la_SOURCES) \ $(tda9885_drv_la_SOURCES) $(uda1380_drv_la_SOURCES) HEADERS = $(sdk_HEADERS) @@ -152,6 +152,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@ @@ -172,9 +173,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@ @@ -203,7 +207,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@ @@ -212,9 +218,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@ @@ -253,12 +263,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@ @@ -278,7 +289,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@ @@ -288,6 +298,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -301,11 +312,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@ @@ -341,6 +351,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@ @@ -365,7 +376,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@ @@ -388,6 +398,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -419,13 +430,15 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libi2c.a +noinst_LTLIBRARIES = libi2c.la multimediadir = $(moduledir)/multimedia multimedia_LTLIBRARIES = \ bt829_drv.la \ @@ -436,7 +449,7 @@ multimedia_LTLIBRARIES = \ tda9885_drv.la \ uda1380_drv.la -libi2c_a_SOURCES = xf86i2c.c +libi2c_la_SOURCES = xf86i2c.c INCLUDES = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = xf86i2c.h bt829.h fi1236.h msp3430.h tda8425.h tda9850.h tda9885.h uda1380.h i2c_def.h @@ -492,13 +505,6 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libi2c.a: $(libi2c_a_OBJECTS) $(libi2c_a_DEPENDENCIES) - -rm -f libi2c.a - $(libi2c_a_AR) libi2c.a $(libi2c_a_OBJECTS) $(libi2c_a_LIBADD) - $(RANLIB) libi2c.a install-multimediaLTLIBRARIES: $(multimedia_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(multimediadir)" || $(MKDIR_P) "$(DESTDIR)$(multimediadir)" @@ -530,10 +536,21 @@ clean-multimediaLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done bt829_drv.la: $(bt829_drv_la_OBJECTS) $(bt829_drv_la_DEPENDENCIES) $(bt829_drv_la_LINK) -rpath $(multimediadir) $(bt829_drv_la_OBJECTS) $(bt829_drv_la_LIBADD) $(LIBS) fi1236_drv.la: $(fi1236_drv_la_OBJECTS) $(fi1236_drv_la_DEPENDENCIES) $(fi1236_drv_la_LINK) -rpath $(multimediadir) $(fi1236_drv_la_OBJECTS) $(fi1236_drv_la_LIBADD) $(LIBS) +libi2c.la: $(libi2c_la_OBJECTS) $(libi2c_la_DEPENDENCIES) + $(LINK) $(libi2c_la_OBJECTS) $(libi2c_la_LIBADD) $(LIBS) msp3430_drv.la: $(msp3430_drv_la_OBJECTS) $(msp3430_drv_la_DEPENDENCIES) $(msp3430_drv_la_LINK) -rpath $(multimediadir) $(msp3430_drv_la_OBJECTS) $(msp3430_drv_la_LIBADD) $(LIBS) tda8425_drv.la: $(tda8425_drv_la_OBJECTS) $(tda8425_drv_la_DEPENDENCIES) @@ -565,7 +582,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tda9885_module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uda1380.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uda1380_module.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86i2c.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86i2c.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -698,7 +715,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(multimediadir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -731,7 +748,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libtool clean-multimediaLTLIBRARIES \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -803,7 +820,7 @@ uninstall-am: uninstall-multimediaLTLIBRARIES uninstall-sdkHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-multimediaLTLIBRARIES \ - clean-noinstLIBRARIES ctags distclean distclean-compile \ + clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ diff --git a/xorg-server/hw/xfree86/i2c/bt829.h b/xorg-server/hw/xfree86/i2c/bt829.h index bca9d37de..06e488f04 100644 --- a/xorg-server/hw/xfree86/i2c/bt829.h +++ b/xorg-server/hw/xfree86/i2c/bt829.h @@ -36,12 +36,15 @@ typedef struct { CARD8 svideo_mux; } BT829Rec, *BT829Ptr; -BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_bt829_Detect bt829_Detect +extern _X_EXPORT BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr); /* ATI card specific initialization */ #define BT829_ATI_ADDR_1 0x8A #define BT829_ATI_ADDR_2 0x88 -int bt829_ATIInit(BT829Ptr bt); + +#define xf86_bt829_ATIInit bt829_ATIInit +extern _X_EXPORT int bt829_ATIInit(BT829Ptr bt); #define BT829_NTSC 1 /* NTSC-M */ #define BT829_NTSC_JAPAN 2 /* NTSC-Japan */ @@ -50,24 +53,35 @@ int bt829_ATIInit(BT829Ptr bt); #define BT829_PAL_N 5 /* PAL-N */ #define BT829_SECAM 6 /* SECAM */ #define BT829_PAL_N_COMB 7 /* PAL-N combination */ -int bt829_SetFormat(BT829Ptr bt, CARD8 format); + +#define xf86_bt829_SetFormat bt829_SetFormat +extern _X_EXPORT int bt829_SetFormat(BT829Ptr bt, CARD8 format); #define BT829_MUX2 1 /* ATI -> composite video */ #define BT829_MUX0 2 /* ATI -> tv tuner */ #define BT829_MUX1 3 /* ATI -> s-video */ -int bt829_SetMux(BT829Ptr bt, CARD8 mux); -int bt829_SetCaptSize(BT829Ptr bt, int width, int height); +#define xf86_bt829_SetMux bt829_SetMux +extern _X_EXPORT int bt829_SetMux(BT829Ptr bt, CARD8 mux); -void bt829_SetBrightness(BT829Ptr bt, int brightness); -void bt829_SetContrast(BT829Ptr bt, int contrast); -void bt829_SetSaturation(BT829Ptr bt, int saturation); -void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ +#define xf86_bt829_SetCaptSize bt829_SetCaptSize +extern _X_EXPORT int bt829_SetCaptSize(BT829Ptr bt, int width, int height); -void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en); /* VPOLE register */ -void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ +#define xf86_bt829_SetBrightness bt829_SetBrightness +extern _X_EXPORT void bt829_SetBrightness(BT829Ptr bt, int brightness); +#define xf86_bt829_SetContrast bt829_SetContrast +extern _X_EXPORT void bt829_SetContrast(BT829Ptr bt, int contrast); +#define xf86_bt829_SetSaturation bt829_SetSaturation +extern _X_EXPORT void bt829_SetSaturation(BT829Ptr bt, int saturation); +#define xf86_bt829_SetTint bt829_SetTint +extern _X_EXPORT void bt829_SetTint(BT829Ptr bt, int hue); /* Hue */ -int bt829_SetCC(BT829Ptr bt); +#define xf86_bt829_SetOUT_EN bt829_SetOUT_EN +extern _X_EXPORT void bt829_SetOUT_EN(BT829Ptr bt, BOOL out_en);/* VPOLE register */ +#define xf86_bt829_SetP_IO bt829_SetP_IO +extern _X_EXPORT void bt829_SetP_IO(BT829Ptr bt, CARD8 p_io); /* P_IO register */ + +extern _X_EXPORT int bt829_SetCC(BT829Ptr bt); #define BT829SymbolsList \ "bt829_Detect", \ @@ -82,16 +96,4 @@ int bt829_SetCC(BT829Ptr bt); "bt829_SetOUT_EN", \ "bt829_SetP_IO" -#define xf86_bt829_Detect ((BT829Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("bt829_Detect")) -#define xf86_bt829_ATIInit ((int (*)(BT829Ptr))LoaderSymbol("bt829_ATIInit")) -#define xf86_bt829_SetFormat ((int (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetFormat")) -#define xf86_bt829_SetMux ((int (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetMux")) -#define xf86_bt829_SetCaptSize ((int (*)(BT829Ptr, int, int))LoaderSymbol("bt829_SetCaptSize")) -#define xf86_bt829_SetBrightness ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetBrightness")) -#define xf86_bt829_SetContrast ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetContrast")) -#define xf86_bt829_SetSaturation ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetSaturation")) -#define xf86_bt829_SetTint ((void (*)(BT829Ptr, int))LoaderSymbol("bt829_SetTint")) -#define xf86_bt829_SetOUT_EN ((void (*)(BT829Ptr, Bool))LoaderSymbol("bt829_SetOUT_EN")) -#define xf86_bt829_SetP_IO ((void (*)(BT829Ptr, CARD8))LoaderSymbol("bt829_SetP_IO")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/fi1236.h b/xorg-server/hw/xfree86/i2c/fi1236.h index eda1c781c..8dd7e4fdb 100644 --- a/xorg-server/hw/xfree86/i2c/fi1236.h +++ b/xorg-server/hw/xfree86/i2c/fi1236.h @@ -87,24 +87,25 @@ typedef struct { #define TUNER_STILL_TUNING 5 -FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr); -void FI1236_set_tuner_type(FI1236Ptr f, int type); -void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency); void FI1236_tune(FI1236Ptr f, CARD32 frequency); -int FI1236_AFC(FI1236Ptr f); -int TUNER_get_afc_hint(FI1236Ptr f); -void fi1236_dump_status(FI1236Ptr f); #define FI1236SymbolsList \ "Detect_FI1236", \ "FI1236_set_tuner_type", \ "TUNER_set_frequency" -#define xf86_Detect_FI1236 ((FI1236Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_FI1236")) -#define xf86_FI1236_set_tuner_type ((void (*)(FI1236Ptr, int))LoaderSymbol("FI1236_set_tuner_type")) -#define xf86_TUNER_set_frequency ((void (*)(FI1236Ptr, CARD32))LoaderSymbol("TUNER_set_frequency")) -#define xf86_FI1236_AFC ((int (*)(FI1236Ptr))LoaderSymbol("FI1236_AFC")) -#define xf86_TUNER_get_afc_hint ((int (*)(FI1236Ptr))LoaderSymbol("TUNER_get_afc_hint")) -#define xf86_fi1236_dump_status ((void (*)(FI1236Ptr))LoaderSymbol("fi1236_dump_status")) +#define xf86_Detect_FI1236 Detect_FI1236 +extern _X_EXPORT FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_FI1236_set_tuner_type FI1236_set_tuner_type +extern _X_EXPORT void FI1236_set_tuner_type(FI1236Ptr f, int type); +#define xf86_TUNER_set_frequency TUNER_set_frequency +extern _X_EXPORT void TUNER_set_frequency(FI1236Ptr f, CARD32 frequency); + +#define xf86_FI1236_AFC FI1236_AFC +extern _X_EXPORT int FI1236_AFC(FI1236Ptr f); +#define xf86_TUNER_get_afc_hint TUNER_get_afc_hint +extern _X_EXPORT int TUNER_get_afc_hint(FI1236Ptr f); +#define xf86_fi1236_dump_status fi1236_dump_status +extern _X_EXPORT void fi1236_dump_status(FI1236Ptr f); #endif diff --git a/xorg-server/hw/xfree86/i2c/i2c_def.h b/xorg-server/hw/xfree86/i2c/i2c_def.h index 6e119e478..140a071d6 100644 --- a/xorg-server/hw/xfree86/i2c/i2c_def.h +++ b/xorg-server/hw/xfree86/i2c/i2c_def.h @@ -1,14 +1,6 @@ #ifndef __I2C_DEF_H__ #define __I2C_DEF_H__ -/* the following are a workaround for possible loader bug.. - WATCH function types ! */ -#define CreateI2CBusRec ((pointer (*)(void))LoaderSymbol("xf86CreateI2CBusRec")) -#define DestroyI2CBusRec ((pointer (*)(I2CBusPtr, Bool, Bool))LoaderSymbol("xf86DestroyI2CBusRec")) -#define I2CBusInit ((Bool (*)(pointer))LoaderSymbol("xf86I2CBusInit")) -#define I2C_WriteRead ((Bool (*)(I2CDevPtr, I2CByte *, int, I2CByte *, int))LoaderSymbol("xf86I2CWriteRead")) -#define CreateI2CDevRec ((pointer (*)(void))LoaderSymbol("xf86CreateI2CDevRec")) -#define I2CDevInit ((Bool (*)(I2CDevPtr))LoaderSymbol("xf86I2CDevInit")) -#define I2CProbeAddress ((Bool (*)(I2CBusPtr,I2CSlaveAddr))LoaderSymbol("xf86I2CProbeAddress")) +#include "xf86i2c.h" #endif diff --git a/xorg-server/hw/xfree86/i2c/msp3430.h b/xorg-server/hw/xfree86/i2c/msp3430.h index 1cb9b869d..8423d1411 100644 --- a/xorg-server/hw/xfree86/i2c/msp3430.h +++ b/xorg-server/hw/xfree86/i2c/msp3430.h @@ -92,11 +92,16 @@ typedef struct { #define MSPMODE_B 8 /*----------------------------------------------------------*/ -void InitMSP3430(MSP3430Ptr m); -MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr); -void ResetMSP3430(MSP3430Ptr m); -void MSP3430SetVolume (MSP3430Ptr m, CARD8 value); -void MSP3430SetSAP (MSP3430Ptr m, int mode); +#define xf86_InitMSP3430 InitMSP3430 +extern _X_EXPORT void InitMSP3430(MSP3430Ptr m); +#define xf86_DetectMSP3430 DetectMSP3430 +extern _X_EXPORT MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_ResetMSP3430 ResetMSP3430 +extern _X_EXPORT void ResetMSP3430(MSP3430Ptr m); +#define xf86_MSP3430SetVolume MSP3430SetVolume +extern _X_EXPORT void MSP3430SetVolume (MSP3430Ptr m, CARD8 value); +#define xf86_MSP3430SetSAP MSP3430SetSAP +extern _X_EXPORT void MSP3430SetSAP (MSP3430Ptr m, int mode); #define MSP3430SymbolsList \ "InitMSP3430", \ @@ -105,10 +110,4 @@ void MSP3430SetSAP (MSP3430Ptr m, int mode); "MSP3430SetVolume", \ "MSP3430SetSAP" -#define xf86_DetectMSP3430 ((MSP3430Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("DetectMSP3430")) -#define xf86_ResetMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("ResetMSP3430")) -#define xf86_MSP3430SetVolume ((void (*)(MSP3430Ptr, CARD8))LoaderSymbol("MSP3430SetVolume")) -#define xf86_MSP3430SetSAP ((void (*)(MSP3430Ptr, int))LoaderSymbol("MSP3430SetSAP")) -#define xf86_InitMSP3430 ((void (*)(MSP3430Ptr))LoaderSymbol("InitMSP3430")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda8425.h b/xorg-server/hw/xfree86/i2c/tda8425.h index 4abb4175f..9c33e7f60 100644 --- a/xorg-server/hw/xfree86/i2c/tda8425.h +++ b/xorg-server/hw/xfree86/i2c/tda8425.h @@ -23,10 +23,14 @@ typedef struct { of I2C protocol is not always available. Besides address there is no good way to autodetect it so we have to _know_ it is there anyway */ -TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force); -Bool tda8425_init(TDA8425Ptr t); -void tda8425_setaudio(TDA8425Ptr t); -void tda8425_mute(TDA8425Ptr t, Bool mute); +#define xf86_Detect_tda8425 Detect_tda8425 +extern _X_EXPORT TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr,Bool force); +#define xf86_tda8425_init tda8425_init +extern _X_EXPORT Bool tda8425_init(TDA8425Ptr t); +#define xf86_tda8425_setaudio tda8425_setaudio +extern _X_EXPORT void tda8425_setaudio(TDA8425Ptr t); +#define xf86_tda8425_mute tda8425_mute +extern _X_EXPORT void tda8425_mute(TDA8425Ptr t, Bool mute); #define TDA8425SymbolsList \ "Detect_tda8425", \ @@ -34,9 +38,4 @@ void tda8425_mute(TDA8425Ptr t, Bool mute); "tda8425_setaudio", \ "tda8425_mute" -#define xf86_Detect_tda8425 ((TDA8425Ptr (*)(I2CBusPtr, I2CSlaveAddr,Bool))LoaderSymbol("Detect_tda8425")) -#define xf86_tda8425_init ((Bool (*)(TDA8425Ptr))LoaderSymbol("tda8425_init")) -#define xf86_tda8425_setaudio ((void (*)(TDA8425Ptr))LoaderSymbol("tda8425_setaudio")) -#define xf86_tda8425_mute ((void (*)(TDA8425Ptr, Bool))LoaderSymbol("tda8425_mute")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda9850.h b/xorg-server/hw/xfree86/i2c/tda9850.h index d5dec36fe..d81679510 100644 --- a/xorg-server/hw/xfree86/i2c/tda9850.h +++ b/xorg-server/hw/xfree86/i2c/tda9850.h @@ -15,12 +15,18 @@ typedef struct { #define TDA9850_ADDR_1 0xB4 -TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr); -Bool tda9850_init(TDA9850Ptr t); -void tda9850_setaudio(TDA9850Ptr t); -void tda9850_mute(TDA9850Ptr t, Bool mute); -void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute); -CARD16 tda9850_getstatus(TDA9850Ptr t); +#define xf86_Detect_tda9850 Detect_tda9850 +extern _X_EXPORT TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_tda9850_init tda9850_init +extern _X_EXPORT Bool tda9850_init(TDA9850Ptr t); +#define xf86_tda9850_setaudio tda9850_setaudio +extern _X_EXPORT void tda9850_setaudio(TDA9850Ptr t); +#define xf86_tda9850_mute tda9850_mute +extern _X_EXPORT void tda9850_mute(TDA9850Ptr t, Bool mute); +#define xf86_tda9850_sap_mute tda9850_sap_mute +extern _X_EXPORT void tda9850_sap_mute(TDA9850Ptr t, Bool sap_mute); +#define xf86_tda9850_getstatus tda9850_getstatus +extern _X_EXPORT CARD16 tda9850_getstatus(TDA9850Ptr t); #define TDA9850SymbolsList \ "Detect_tda9850", \ @@ -29,11 +35,4 @@ CARD16 tda9850_getstatus(TDA9850Ptr t); "tda9850_mute", \ "tda9850_sap_mute" -#define xf86_Detect_tda9850 ((TDA9850Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9850")) -#define xf86_tda9850_init ((Bool (*)(TDA9850Ptr))LoaderSymbol("tda9850_init")) -#define xf86_tda9850_setaudio ((void (*)(TDA9850Ptr))LoaderSymbol("tda9850_setaudio")) -#define xf86_tda9850_mute ((void (*)(TDA9850Ptr, Bool))LoaderSymbol("tda9850_mute")) -#define xf86_tda9850_sap_mute ((void (*)(TDA9850Ptr, Bool))LoaderSymbol("tda9850_sap_mute")) -#define xf86_tda9850_getstatus ((CARD16 (*)(TDA9850Ptr))LoaderSymbol("tda9850_getstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/tda9885.h b/xorg-server/hw/xfree86/i2c/tda9885.h index 46ae9fc0d..004f43d5c 100644 --- a/xorg-server/hw/xfree86/i2c/tda9885.h +++ b/xorg-server/hw/xfree86/i2c/tda9885.h @@ -39,11 +39,16 @@ typedef struct { #define TDA9885_ADDR_3 0x96 #define TDA9885_ADDR_4 0x94 -TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr); -Bool tda9885_init(TDA9885Ptr t); -void tda9885_setparameters(TDA9885Ptr t); -void tda9885_getstatus(TDA9885Ptr t); -void tda9885_dumpstatus(TDA9885Ptr t); +#define xf86_Detect_tda9885 Detect_tda9885 +extern _X_EXPORT TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_tda9885_init tda9885_init +extern _X_EXPORT Bool tda9885_init(TDA9885Ptr t); +#define xf86_tda9885_setparameters tda9885_setparameters +extern _X_EXPORT void tda9885_setparameters(TDA9885Ptr t); +#define xf86_tda9885_getstatus tda9885_getstatus +extern _X_EXPORT void tda9885_getstatus(TDA9885Ptr t); +#define xf86_tda9885_dumpstatus tda9885_dumpstatus +extern _X_EXPORT void tda9885_dumpstatus(TDA9885Ptr t); #define TDA9885SymbolsList \ "Detect_tda9885", \ @@ -51,10 +56,4 @@ void tda9885_dumpstatus(TDA9885Ptr t); "tda9885_setaudio", \ "tda9885_mute" -#define xf86_Detect_tda9885 ((TDA9885Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_tda9885")) -#define xf86_tda9885_init ((Bool (*)(TDA9885Ptr))LoaderSymbol("tda9885_init")) -#define xf86_tda9885_setparameters ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_setparameters")) -#define xf86_tda9885_getstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_getstatus")) -#define xf86_tda9885_dumpstatus ((void (*)(TDA9885Ptr))LoaderSymbol("tda9885_dumpstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/uda1380.h b/xorg-server/hw/xfree86/i2c/uda1380.h index e671d66f8..da232f90d 100644 --- a/xorg-server/hw/xfree86/i2c/uda1380.h +++ b/xorg-server/hw/xfree86/i2c/uda1380.h @@ -44,14 +44,22 @@ typedef struct { #define UDA1380_ADDR_1 0x30 #define UDA1380_ADDR_2 0x34 -UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr); -Bool uda1380_init(UDA1380Ptr t); -void uda1380_shutdown(UDA1380Ptr t); -void uda1380_setvolume(UDA1380Ptr t, INT32); -void uda1380_mute(UDA1380Ptr t, Bool); -void uda1380_setparameters(UDA1380Ptr t); -void uda1380_getstatus(UDA1380Ptr t); -void uda1380_dumpstatus(UDA1380Ptr t); +#define xf86_Detect_uda1380 Detect_uda1380 +extern _X_EXPORT UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr); +#define xf86_uda1380_init uda1380_init +extern _X_EXPORT Bool uda1380_init(UDA1380Ptr t); +#define xf86_uda1380_shutdown uda1380_shutdown +extern _X_EXPORT void uda1380_shutdown(UDA1380Ptr t); +#define xf86_uda1380_setvolume uda1380_setvolume +extern _X_EXPORT void uda1380_setvolume(UDA1380Ptr t, INT32); +#define xf86_uda1380_mute uda1380_mute +extern _X_EXPORT void uda1380_mute(UDA1380Ptr t, Bool); +#define xf86_uda1380_setparameters uda1380_setparameters +extern _X_EXPORT void uda1380_setparameters(UDA1380Ptr t); +#define xf86_uda1380_getstatus uda1380_getstatus +extern _X_EXPORT void uda1380_getstatus(UDA1380Ptr t); +#define xf86_uda1380_dumpstatus uda1380_dumpstatus +extern _X_EXPORT void uda1380_dumpstatus(UDA1380Ptr t); #define UDA1380SymbolsList \ "Detect_uda1380", \ @@ -63,13 +71,4 @@ void uda1380_dumpstatus(UDA1380Ptr t); "uda1380_getstatus", \ "uda1380_dumpstatus" -#define xf86_Detect_uda1380 ((UDA1380Ptr (*)(I2CBusPtr, I2CSlaveAddr))LoaderSymbol("Detect_uda1380")) -#define xf86_uda1380_init ((Bool (*)(UDA1380Ptr))LoaderSymbol("uda1380_init")) -#define xf86_uda1380_shutdown ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_shutdown")) -#define xf86_uda1380_setvolume ((void (*)(UDA1380Ptr, CARD16))LoaderSymbol("uda1380_setvolume")) -#define xf86_uda1380_mute ((void (*)(UDA1380Ptr, Bool))LoaderSymbol("uda1380_mute")) -#define xf86_uda1380_setparameters ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_setparameters")) -#define xf86_uda1380_getstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_getstatus")) -#define xf86_uda1380_dumpstatus ((void (*)(UDA1380Ptr))LoaderSymbol("uda1380_dumpstatus")) - #endif diff --git a/xorg-server/hw/xfree86/i2c/xf86i2c.h b/xorg-server/hw/xfree86/i2c/xf86i2c.h index 76d2ebf92..f2ded09db 100644 --- a/xorg-server/hw/xfree86/i2c/xf86i2c.h +++ b/xorg-server/hw/xfree86/i2c/xf86i2c.h @@ -49,11 +49,15 @@ typedef struct _I2CBusRec { I2CByte *ReadBuffer, int nRead); } I2CBusRec; -I2CBusPtr xf86CreateI2CBusRec(void); -void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too); -Bool xf86I2CBusInit(I2CBusPtr pI2CBus); -I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name); -int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus); +#define CreateI2CBusRec xf86CreateI2CBusRec +extern _X_EXPORT I2CBusPtr xf86CreateI2CBusRec(void); +#define DestroyI2CBusRec xf86DestroyI2CBusRec +extern _X_EXPORT void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too); +#define I2CBusInit xf86I2CBusInit +extern _X_EXPORT Bool xf86I2CBusInit(I2CBusPtr pI2CBus); + +extern _X_EXPORT I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name); +extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr **pppI2CBus); /* I2C slave devices */ @@ -72,25 +76,31 @@ typedef struct _I2CDevRec { DevUnion DriverPrivate; } I2CDevRec; -I2CDevPtr xf86CreateI2CDevRec(void); -void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc); -Bool xf86I2CDevInit(I2CDevPtr pI2CDev); -I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr); +#define CreateI2CDevRec xf86CreateI2CDevRec +extern _X_EXPORT I2CDevPtr xf86CreateI2CDevRec(void); +extern _X_EXPORT void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc); +#define I2CDevInit xf86I2CDevInit +extern _X_EXPORT Bool xf86I2CDevInit(I2CDevPtr pI2CDev); +extern _X_EXPORT I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr); /* See descriptions of these functions in xf86i2c.c */ -Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr); -Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite, +#define I2CProbeAddress xf86I2CProbeAddress +extern _X_EXPORT Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr); + +#define I2C_WriteRead xf86I2CWriteRead +extern _X_EXPORT Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte *WriteBuffer, int nWrite, I2CByte *ReadBuffer, int nRead); #define xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr) -Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte); -Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte); -Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n); -Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword); + +extern _X_EXPORT Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte *pbyte); +extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte); +extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *pbyte, int n); +extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword); #define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0) -Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte); -Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite); -Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word); -Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues); +extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte); +extern _X_EXPORT Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte *WriteBuffer, int nWrite); +extern _X_EXPORT Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word); +extern _X_EXPORT Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues); #endif /*_XF86I2C_H */ diff --git a/xorg-server/hw/xfree86/int10/Makefile.in b/xorg-server/hw/xfree86/int10/Makefile.in index 1afc07a81..8d6cf288d 100644 --- a/xorg-server/hw/xfree86/int10/Makefile.in +++ b/xorg-server/hw/xfree86/int10/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/int10 DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -117,6 +121,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@ @@ -137,9 +142,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@ @@ -168,7 +176,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@ @@ -177,9 +187,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@ @@ -218,12 +232,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@ @@ -243,7 +258,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@ @@ -253,6 +267,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -266,11 +281,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@ @@ -306,6 +320,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@ @@ -330,7 +345,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@ @@ -353,6 +367,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -384,7 +399,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@ diff --git a/xorg-server/hw/xfree86/int10/generic.c b/xorg-server/hw/xfree86/int10/generic.c index 0af7c1baa..9d39e99b0 100644 --- a/xorg-server/hw/xfree86/int10/generic.c +++ b/xorg-server/hw/xfree86/int10/generic.c @@ -75,6 +75,7 @@ static void *sysMem = NULL; * etc.). How do we know that \c pci_device_read_rom will return the * legacy VGA BIOS image? */ +#ifndef _PC static int read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf) { @@ -114,6 +115,7 @@ read_legacy_video_BIOS(struct pci_device *dev, unsigned char *Buf) return Len; } +#endif /* _PC */ xf86Int10InfoPtr @@ -126,8 +128,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) int screen; legacyVGARec vga; -#ifdef _PC - int size; +#if 0 CARD32 cs; #endif diff --git a/xorg-server/hw/xfree86/int10/helper_exec.c b/xorg-server/hw/xfree86/int10/helper_exec.c index 1c89ce508..6ba647f89 100644 --- a/xorg-server/hw/xfree86/int10/helper_exec.c +++ b/xorg-server/hw/xfree86/int10/helper_exec.c @@ -219,7 +219,7 @@ port_rep_inb(xf86Int10InfoPtr pInt, register int inc = d_f ? -1 : 1; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insb(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insb(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WB(pInt, dst, x_inb(port)); @@ -235,7 +235,7 @@ port_rep_inw(xf86Int10InfoPtr pInt, register int inc = d_f ? -2 : 2; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insw(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insw(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WW(pInt, dst, x_inw(port)); @@ -251,7 +251,7 @@ port_rep_inl(xf86Int10InfoPtr pInt, register int inc = d_f ? -4 : 4; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_insl(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_insl(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { MEM_WL(pInt, dst, x_inl(port)); @@ -267,7 +267,7 @@ port_rep_outb(xf86Int10InfoPtr pInt, register int inc = d_f ? -1 : 1; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outb(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outb(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outb(port, MEM_RB(pInt, dst)); @@ -283,7 +283,7 @@ port_rep_outw(xf86Int10InfoPtr pInt, register int inc = d_f ? -2 : 2; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outw(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outw(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outw(port, MEM_RW(pInt, dst)); @@ -299,7 +299,7 @@ port_rep_outl(xf86Int10InfoPtr pInt, register int inc = d_f ? -4 : 4; CARD32 dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" rep_outl(%#x) %d bytes at %8.8x %s\n", + ErrorF(" rep_outl(%#x) %ld bytes at %8.8lx %s\n", port, count, base, d_f ? "up" : "down"); while (count--) { x_outl(port, MEM_RL(pInt, dst)); @@ -409,7 +409,7 @@ x_inl(CARD16 port) if (!pciCfg1in(port, &val)) { val = inl(Int10Current->ioBase + port); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" inl(%#x) = %8.8x\n", port, val); + ErrorF(" inl(%#x) = %8.8lx\n", port, val); } return val; } @@ -419,7 +419,7 @@ x_outl(CARD16 port, CARD32 val) { if (!pciCfg1out(port, val)) { if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" outl(%#x, %8.8x)\n", port, val); + ErrorF(" outl(%#x, %8.8lx)\n", port, val); outl(Int10Current->ioBase + port, val); } } @@ -500,7 +500,7 @@ pciCfg1in(CARD16 addr, CARD32 *val) pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr)); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inl(%#x) = %8.8x\n", PciCfg1Addr, *val); + ErrorF(" cfg_inl(%#lx) = %8.8lx\n", PciCfg1Addr, *val); return 1; } return 0; @@ -515,7 +515,7 @@ pciCfg1out(CARD16 addr, CARD32 val) } if (addr == 0xCFC) { if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outl(%#x, %8.8x)\n", PciCfg1Addr, val); + ErrorF(" cfg_outl(%#lx, %8.8lx)\n", PciCfg1Addr, val); pci_device_cfg_write_u32(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr)); return 1; @@ -539,7 +539,7 @@ pciCfg1inw(CARD16 addr, CARD16 *val) pci_device_cfg_read_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inw(%#x) = %4.4x\n", PciCfg1Addr + offset, *val); + ErrorF(" cfg_inw(%#lx) = %4.4x\n", PciCfg1Addr + offset, *val); return 1; } return 0; @@ -560,7 +560,7 @@ pciCfg1outw(CARD16 addr, CARD16 val) const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outw(%#x, %4.4x)\n", PciCfg1Addr + offset, val); + ErrorF(" cfg_outw(%#lx, %4.4x)\n", PciCfg1Addr + offset, val); pci_device_cfg_write_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; @@ -584,7 +584,7 @@ pciCfg1inb(CARD16 addr, CARD8 *val) pci_device_cfg_read_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_inb(%#x) = %2.2x\n", PciCfg1Addr + offset, *val); + ErrorF(" cfg_inb(%#lx) = %2.2x\n", PciCfg1Addr + offset, *val); return 1; } return 0; @@ -605,7 +605,7 @@ pciCfg1outb(CARD16 addr, CARD8 val) const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outb(%#x, %2.2x)\n", PciCfg1Addr + offset, val); + ErrorF(" cfg_outb(%#lx, %2.2x)\n", PciCfg1Addr + offset, val); pci_device_cfg_write_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; @@ -644,7 +644,6 @@ bios_checksum(const CARD8 *start, int size) void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { - xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); vga->save_msr = inb(pInt->ioBase + 0x03CC); vga->save_vse = inb(pInt->ioBase + 0x03C3); #ifndef __ia64__ @@ -657,20 +656,17 @@ LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) outb(pInt->ioBase + 0x46E8, ~(CARD8)0x08 & vga->save_46e8); #endif outb(pInt->ioBase + 0x0102, ~(CARD8)0x01 & vga->save_pos102); - xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { - xf86SetCurrentAccess(FALSE, xf86Screens[pInt->scrnIndex]); outb(pInt->ioBase + 0x0102, vga->save_pos102); #ifndef __ia64__ outb(pInt->ioBase + 0x46E8, vga->save_46e8); #endif outb(pInt->ioBase + 0x03C3, vga->save_vse); outb(pInt->ioBase + 0x03C2, vga->save_msr); - xf86SetCurrentAccess(TRUE, xf86Screens[pInt->scrnIndex]); } #if defined (_PC) diff --git a/xorg-server/hw/xfree86/int10/xf86int10.h b/xorg-server/hw/xfree86/int10/xf86int10.h index 0e6669d8f..ba9ee5276 100644 --- a/xorg-server/hw/xfree86/int10/xf86int10.h +++ b/xorg-server/hw/xfree86/int10/xf86int10.h @@ -61,15 +61,18 @@ typedef struct { } legacyVGARec, *legacyVGAPtr; /* OS dependent functions */ -xf86Int10InfoPtr xf86InitInt10(int entityIndex); -xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags); -void xf86FreeInt10(xf86Int10InfoPtr pInt); -void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off); -void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num); -pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr); +extern _X_EXPORT xf86Int10InfoPtr xf86InitInt10(int entityIndex); +extern _X_EXPORT xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, + int Flags); +extern _X_EXPORT void xf86FreeInt10(xf86Int10InfoPtr pInt); +extern _X_EXPORT void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, + int *off); +extern _X_EXPORT void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, + int num); +extern _X_EXPORT pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr); /* x86 executor related functions */ -void xf86ExecX86int10(xf86Int10InfoPtr pInt); +extern _X_EXPORT void xf86ExecX86int10(xf86Int10InfoPtr pInt); #ifdef _INT10_PRIVATE @@ -112,12 +115,12 @@ void xf86ExecX86int10(xf86Int10InfoPtr pInt); #define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val) /* OS dependent functions */ -Bool MapCurrentInt10(xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool MapCurrentInt10(xf86Int10InfoPtr pInt); /* x86 executor related functions */ -Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); /* int.c */ -extern xf86Int10InfoPtr Int10Current; +extern _X_EXPORT xf86Int10InfoPtr Int10Current; int int_handler(xf86Int10InfoPtr pInt); /* helper_exec.c */ @@ -129,12 +132,11 @@ int run_bios_int(int num, xf86Int10InfoPtr pInt); void dump_code(xf86Int10InfoPtr pInt); void dump_registers(xf86Int10InfoPtr pInt); void stack_trace(xf86Int10InfoPtr pInt); -xf86Int10InfoPtr getInt10Rec(int entityIndex); CARD8 bios_checksum(const CARD8 *start, int size); void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); #if defined (_PC) -void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); +extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); #endif int port_rep_inb(xf86Int10InfoPtr pInt, CARD16 port, CARD32 base, int d_f, CARD32 count); @@ -168,13 +170,13 @@ void setup_int_vect(xf86Int10InfoPtr pInt); int setup_system_bios(void *base_addr); void reset_int_vect(xf86Int10InfoPtr pInt); void set_return_trap(xf86Int10InfoPtr pInt); -void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex); +extern _X_EXPORT void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex); Bool int10skip(const void* options); Bool int10_check_bios(int scrnIndex, int codeSeg, const unsigned char* vbiosMem); Bool initPrimary(const void* options); -BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt); -Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base); +extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt); +extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base); #ifdef DEBUG void dprint(unsigned long start, unsigned long size); #endif diff --git a/xorg-server/hw/xfree86/libxorg.c b/xorg-server/hw/xfree86/libxorg.c new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/xorg-server/hw/xfree86/libxorg.c diff --git a/xorg-server/hw/xfree86/loader/Makefile.am b/xorg-server/hw/xfree86/loader/Makefile.am index fa9dbfe5d..0bfa7a283 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.am +++ b/xorg-server/hw/xfree86/loader/Makefile.am @@ -1,27 +1,30 @@ -noinst_LIBRARIES = libloader.a +noinst_LTLIBRARIES = libloader.la -INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \ +INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac #AM_LDFLAGS = -r -AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h + loaderProcs.h \ + sdksyms.sh -libloader_a_SOURCES = \ +libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ dlloader.c \ os.c \ - dixsym.c \ - extsym.c \ - misym.c \ - xf86sym.c \ - sym.h + sdksyms.c + +CLEANFILES = sdksyms.c sdksyms.dep + +sdksyms.dep sdksyms.c: sdksyms.sh + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) + +sinclude sdksyms.dep diff --git a/xorg-server/hw/xfree86/loader/Makefile.in b/xorg-server/hw/xfree86/loader/Makefile.in index a004254a6..b642bde62 100644 --- a/xorg-server/hw/xfree86/loader/Makefile.in +++ b/xorg-server/hw/xfree86/loader/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/loader 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 @@ -48,18 +51,15 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libloader_a_AR = $(AR) $(ARFLAGS) -libloader_a_LIBADD = -am_libloader_a_OBJECTS = loader.$(OBJEXT) loadext.$(OBJEXT) \ - loadmod.$(OBJEXT) dlloader.$(OBJEXT) os.$(OBJEXT) \ - dixsym.$(OBJEXT) extsym.$(OBJEXT) misym.$(OBJEXT) \ - xf86sym.$(OBJEXT) -libloader_a_OBJECTS = $(am_libloader_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libloader_la_LIBADD = +am_libloader_la_OBJECTS = loader.lo loadext.lo loadmod.lo dlloader.lo \ + os.lo sdksyms.lo +libloader_la_OBJECTS = $(am_libloader_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -70,8 +70,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libloader_a_SOURCES) -DIST_SOURCES = $(libloader_a_SOURCES) +SOURCES = $(libloader_la_SOURCES) +DIST_SOURCES = $(libloader_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -80,6 +80,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@ @@ -100,9 +101,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@ @@ -131,7 +135,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@ @@ -140,9 +146,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@ @@ -181,12 +191,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@ @@ -206,7 +217,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@ @@ -216,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -229,11 +240,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@ @@ -269,6 +279,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@ @@ -293,7 +304,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@ @@ -316,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -347,39 +358,38 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libloader.a -INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../dixmods/extmod \ - -I$(srcdir)/../vbe -I$(top_srcdir)/miext/cw -I$(srcdir)/../int10 \ +noinst_LTLIBRARIES = libloader.la +INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(top_srcdir)/miext/cw \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac #AM_LDFLAGS = -r -AM_CFLAGS = -DIN_LOADER $(DIX_CFLAGS) $(XORG_CFLAGS) +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ dlloader.h \ loader.h \ - loaderProcs.h + loaderProcs.h \ + sdksyms.sh -libloader_a_SOURCES = \ +libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadext.c \ loadmod.c \ dlloader.c \ os.c \ - dixsym.c \ - extsym.c \ - misym.c \ - xf86sym.c \ - sym.h + sdksyms.c +CLEANFILES = sdksyms.c sdksyms.dep all: all-am .SUFFIXES: @@ -415,12 +425,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libloader.a: $(libloader_a_OBJECTS) $(libloader_a_DEPENDENCIES) - -rm -f libloader.a - $(libloader_a_AR) libloader.a $(libloader_a_OBJECTS) $(libloader_a_LIBADD) - $(RANLIB) libloader.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libloader.la: $(libloader_la_OBJECTS) $(libloader_la_DEPENDENCIES) + $(LINK) $(libloader_la_OBJECTS) $(libloader_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -428,15 +442,12 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixsym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlloader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extsym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misym.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86sym.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlloader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadext.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/os.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdksyms.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -549,7 +560,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -568,6 +579,7 @@ install-strip: mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -578,7 +590,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -650,7 +662,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -663,6 +675,11 @@ uninstall-am: pdf pdf-am ps ps-am tags uninstall uninstall-am +sdksyms.dep sdksyms.c: sdksyms.sh + CPP='$(CPP)' AWK='$(AWK)' $(srcdir)/sdksyms.sh $(top_srcdir) $(AM_CFLAGS) $(CFLAGS) $(INCLUDES) + +sinclude sdksyms.dep + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/xorg-server/hw/xfree86/loader/loader.c b/xorg-server/hw/xfree86/loader/loader.c index fc0db2886..6a4c08916 100644 --- a/xorg-server/hw/xfree86/loader/loader.c +++ b/xorg-server/hw/xfree86/loader/loader.c @@ -74,41 +74,50 @@ #include "xf86.h" #include "xf86Priv.h" #include "compiler.h" -#include "sym.h" -/* - * handles are used to identify files that are loaded. Even archives - * are counted as a single file. - */ +extern void *xorg_symbols[]; + #define MAX_HANDLE 256 -#define HANDLE_FREE 0 -#define HANDLE_USED 1 -static char freeHandles[MAX_HANDLE]; static int refCount[MAX_HANDLE]; -/* - * modules are used to identify compilation units (ie object modules). - * Archives contain multiple modules, each of which is treated seperately. - */ static int moduleseq = 0; /* Prototypes for static functions. */ -static loaderPtr _LoaderListPush(void); -static loaderPtr _LoaderListPop(int); +static loaderPtr listHead = NULL; -void -LoaderInit(void) +static loaderPtr +_LoaderListPush(void) +{ + loaderPtr item = calloc(1, sizeof(struct _loader)); + + item->next = listHead; + listHead = item; + + return item; +} + +static loaderPtr +_LoaderListPop(int handle) { - const char *osname = NULL; + loaderPtr item = listHead; + loaderPtr *bptr = &listHead; /* pointer to previous node */ - char *ld_bind_now = getenv("LD_BIND_NOW"); - if (ld_bind_now && *ld_bind_now) { - xf86Msg(X_ERROR, "LD_BIND_NOW is set, dlloader will NOT work!\n"); + while (item) { + if (item->handle == handle) { + *bptr = item->next; /* remove this from the list */ + return item; + } + bptr = &(item->next); + item = item->next; } - xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *) - ((long)dixLookupTab ^ (long)extLookupTab - ^ (long)miLookupTab ^ (long)xfree86LookupTab)); + return 0; +} + +void +LoaderInit(void) +{ + xf86MsgVerb(X_INFO, 2, "Loader magic: %p\n", (void *)xorg_symbols); xf86MsgVerb(X_INFO, 2, "Module ABI versions:\n"); xf86ErrorFVerb(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), @@ -123,10 +132,6 @@ LoaderInit(void) GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); - LoaderGetOS(&osname, NULL, NULL, NULL); - if (osname) - xf86MsgVerb(X_INFO, 2, "Loader running on %s\n", osname); - #if defined(__UNIXWARE__) && !defined(__GNUC__) /* For UnixWare we need to load the C Runtime libraries which are * normally auto-linked by the compiler. Otherwise we are bound to @@ -149,58 +154,6 @@ LoaderInit(void) #endif } -static loaderPtr listHead = (loaderPtr) 0; - -static loaderPtr -_LoaderListPush() -{ - loaderPtr item = calloc(1, sizeof(struct _loader)); - - item->next = listHead; - listHead = item; - - return item; -} - -static loaderPtr -_LoaderListPop(int handle) -{ - loaderPtr item = listHead; - loaderPtr *bptr = &listHead; /* pointer to previous node */ - - while (item) { - if (item->handle == handle) { - *bptr = item->next; /* remove this from the list */ - return item; - } - bptr = &(item->next); - item = item->next; - } - - return 0; -} - -/* These four are just ABI stubs */ -_X_EXPORT void -LoaderRefSymbols(const char *sym0, ...) -{ -} - -_X_EXPORT void -LoaderRefSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -LoaderReqSymLists(const char **list0, ...) -{ -} - -_X_EXPORT void -LoaderReqSymbols(const char *sym0, ...) -{ -} - /* Public Interface to the loader. */ int @@ -214,12 +167,7 @@ LoaderOpen(const char *module, const char *cname, int handle, ErrorF("LoaderOpen(%s)\n", module); #endif - /* - * Check to see if the module is already loaded. - * Only if we are loading it into an existing namespace. - * If it is to be loaded into a new namespace, don't check. - * Note: We only have one namespace. - */ + /* Is the module already loaded? */ if (handle >= 0) { tmp = listHead; while (tmp) { @@ -249,7 +197,7 @@ LoaderOpen(const char *module, const char *cname, int handle, * Find a free handle. */ new_handle = 1; - while (new_handle < MAX_HANDLE && freeHandles[new_handle]) + while (new_handle < MAX_HANDLE && refCount[new_handle]) new_handle++; if (new_handle == MAX_HANDLE) { @@ -261,7 +209,6 @@ LoaderOpen(const char *module, const char *cname, int handle, return -1; } - freeHandles[new_handle] = HANDLE_USED; refCount[new_handle] = 1; tmp = _LoaderListPush(); @@ -275,7 +222,7 @@ LoaderOpen(const char *module, const char *cname, int handle, if ((tmp->private = DLLoadModule(tmp, flags)) == NULL) { xf86Msg(X_ERROR, "Failed to load %s\n", module); _LoaderListPop(new_handle); - freeHandles[new_handle] = HANDLE_FREE; + refCount[new_handle] = 0; if (errmaj) *errmaj = LDR_NOLOAD; if (errmin) @@ -292,26 +239,19 @@ LoaderHandleOpen(int handle) if (handle < 0 || handle >= MAX_HANDLE) return -1; - if (freeHandles[handle] != HANDLE_USED) + if (!refCount[handle]) return -1; refCount[handle]++; return handle; } -_X_EXPORT void * +void * LoaderSymbol(const char *sym) { return (DLFindSymbol(sym)); } -/* more stub */ -_X_EXPORT int -LoaderCheckUnresolved(int delay_flag) -{ - return 0; -} - int LoaderUnload(int handle) { @@ -331,18 +271,13 @@ LoaderUnload(int handle) */ while ((tmp = _LoaderListPop(handle)) != NULL) { - if (strchr(tmp->name, ':') == NULL) { - /* It is not a member of an archive */ - xf86Msg(X_INFO, "Unloading %s\n", tmp->name); - } + xf86Msg(X_INFO, "Unloading %s\n", tmp->name); DLUnloadModule(tmp->private); free(tmp->name); free(tmp->cname); free(tmp); } - freeHandles[handle] = HANDLE_FREE; - return 0; } @@ -354,13 +289,13 @@ LoaderSetOptions(unsigned long opts) LoaderOptions |= opts; } -_X_EXPORT Bool +Bool LoaderShouldIgnoreABI(void) { return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0; } -_X_EXPORT int +int LoaderGetABIVersion(const char *abiclass) { struct { diff --git a/xorg-server/hw/xfree86/loader/loaderProcs.h b/xorg-server/hw/xfree86/loader/loaderProcs.h index a10f0b3a6..a7925ecee 100644 --- a/xorg-server/hw/xfree86/loader/loaderProcs.h +++ b/xorg-server/hw/xfree86/loader/loaderProcs.h @@ -53,8 +53,6 @@ #ifndef _LOADERPROCS_H #define _LOADERPROCS_H -#undef IN_LOADER -#define IN_LOADER #include "xf86Module.h" typedef struct module_desc { @@ -78,16 +76,7 @@ ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *, ModuleDescPtr LoadModule(const char *, const char *, const char **, const char **, pointer, const XF86ModReqInfo *, int *, int *); -ModuleDescPtr LoadSubModule(ModuleDescPtr, const char *, - const char **, const char **, pointer, - const XF86ModReqInfo *, int *, int *); -ModuleDescPtr LoadSubModuleLocal(ModuleDescPtr, const char *, - const char **, const char **, - pointer, const XF86ModReqInfo *, - int *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); -void UnloadModule(ModuleDescPtr); -void UnloadSubModule(ModuleDescPtr); void UnloadDriver(ModuleDescPtr); void LoaderSetPath(const char *path); void LoaderSortExtensions(void); diff --git a/xorg-server/hw/xfree86/loader/loadext.c b/xorg-server/hw/xfree86/loader/loadext.c index b7523289c..a61b28cc2 100644 --- a/xorg-server/hw/xfree86/loader/loadext.c +++ b/xorg-server/hw/xfree86/loader/loadext.c @@ -66,7 +66,7 @@ NewExtensionModule(void) } } -_X_EXPORT void +void LoadExtension(ExtensionModule * e, Bool builtin) { ExtensionModule *newext; @@ -387,7 +387,7 @@ tsort(void) } void -LoaderSortExtensions() +LoaderSortExtensions(void) { int i, j; ExtensionModule *ext, *newList; diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c index 22b540c5d..0b220f1b6 100644 --- a/xorg-server/hw/xfree86/loader/loadmod.c +++ b/xorg-server/hw/xfree86/loader/loadmod.c @@ -68,8 +68,6 @@ #include <dirent.h> #include <limits.h> -#define TestFree(a) if (a) { xfree (a); a = NULL; } - typedef struct _pattern { const char *pattern; regex_t rex; @@ -411,21 +409,21 @@ FindModuleInSubdir(const char *dirpath, const char *module) snprintf(tmpBuf, PATH_MAX, "lib%s.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } snprintf(tmpBuf, PATH_MAX, "%s.so", module); if (strcmp(direntry->d_name, tmpBuf) == 0) { ret = malloc(strlen(tmpBuf) + strlen(dirpath) + 2); - sprintf(ret, "%s/%s", dirpath, tmpBuf); + sprintf(ret, "%s%s", dirpath, tmpBuf); break; } } @@ -469,7 +467,7 @@ FindModule(const char *module, const char *dirname, const char **subdirlist, return name; } -_X_EXPORT char ** +char ** LoaderListDirs(const char **subdirlist, const char **patternlist) { char buf[PATH_MAX + 1]; @@ -563,7 +561,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) return listing; } -_X_EXPORT void +void LoaderFreeDirList(char **list) { FreeStringList(list); @@ -745,13 +743,14 @@ AddSibling(ModuleDescPtr head, ModuleDescPtr new) return (new); } -_X_EXPORT ModuleDescPtr -LoadSubModule(ModuleDescPtr parent, const char *module, +pointer +LoadSubModule(pointer _parent, const char *module, const char **subdirlist, const char **patternlist, pointer options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { ModuleDescPtr submod; + ModuleDescPtr parent = (ModuleDescPtr)_parent; xf86MsgVerb(X_INFO, 3, "Loading sub module \"%s\"\n", module); @@ -794,7 +793,7 @@ NewModuleDesc(const char *name) return (mdp); } -_X_EXPORT ModuleDescPtr +ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) { ModuleDescPtr ret; @@ -1019,19 +1018,10 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, LoadModule_exit: FreePathList(pathlist); FreePatterns(patterns); - TestFree(found); - TestFree(name); - TestFree(p); + xfree(found); + xfree(name); + xfree(p); - /* - * If you need to do something to keep the - * instruction cache in sync with the main - * memory before jumping to that code, you may - * do it here. - */ -#ifdef __alpha__ - istream_mem_barrier(); -#endif return ret; } @@ -1082,9 +1072,9 @@ LoadModule(const char *module, const char *path, const char **subdirlist, } void -UnloadModule(ModuleDescPtr mod) +UnloadModule(pointer mod) { - UnloadModuleOrDriver(mod); + UnloadModuleOrDriver((ModuleDescPtr)mod); } static void @@ -1106,16 +1096,15 @@ UnloadModuleOrDriver(ModuleDescPtr mod) UnloadModuleOrDriver(mod->child); if (mod->sib) UnloadModuleOrDriver(mod->sib); - TestFree(mod->name); + xfree(mod->name); xfree(mod); -#ifdef __alpha__ - istream_mem_barrier(); -#endif } -_X_EXPORT void -UnloadSubModule(ModuleDescPtr mod) +void +UnloadSubModule(pointer _mod) { + ModuleDescPtr mod = (ModuleDescPtr)_mod; + if (mod == NULL || mod->name == NULL) return; @@ -1130,7 +1119,7 @@ UnloadSubModule(ModuleDescPtr mod) if (mod->child) UnloadModuleOrDriver(mod->child); - TestFree(mod->name); + xfree(mod->name); xfree(mod); } @@ -1161,7 +1150,7 @@ RemoveChild(ModuleDescPtr child) return; } -_X_EXPORT void +void LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) { const char *msg; diff --git a/xorg-server/hw/xfree86/loader/os.c b/xorg-server/hw/xfree86/loader/os.c index ef9ac38b4..5acce0024 100644 --- a/xorg-server/hw/xfree86/loader/os.c +++ b/xorg-server/hw/xfree86/loader/os.c @@ -64,7 +64,7 @@ /* Return the OS name, and run-time OS version */ -_X_EXPORT void +void LoaderGetOS(const char **name, int *major, int *minor, int *teeny) { if (name) diff --git a/xorg-server/hw/xfree86/loader/sdksyms.c b/xorg-server/hw/xfree86/loader/sdksyms.c new file mode 100644 index 000000000..b96c1e6a1 --- /dev/null +++ b/xorg-server/hw/xfree86/loader/sdksyms.c @@ -0,0 +1,2342 @@ +/* This file is automatically generated by sdksyms.sh. */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + + +/* These must be included first */ +#include "misc.h" +#include "miscstruct.h" + + +/* render/Makefile.am */ +#include "picture.h" +#include "mipict.h" +#include "glyphstr.h" +#include "picturestr.h" +#include "renderedge.h" + + +/* fb/Makefile.am -- module */ +/* +#include "fb.h" +#include "fbrop.h" +#include "fboverlay.h" +#include "wfbrename.h" +#include "fbpict.h" + */ + + +/* miext/shadow/Makefile.am -- module */ +/* +#include "shadow.h" + */ + + +/* miext/damage/Makefile.am */ +#include "damage.h" +#include "damagestr.h" + + +/* Xext/Makefile.am -- half is module, half is builtin */ +/* +#include "xvdix.h" +#include "xvmcext.h" + */ +#include "geext.h" +#include "geint.h" +#include "shmint.h" +#if XINERAMA +# include "panoramiXsrv.h" +# include "panoramiX.h" +#endif + + +/* hw/xfree86/int10/Makefile.am -- module */ +/* +#include "xf86int10.h" + */ + + +/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */ +#include "xf86i2c.h" +/* +#include "bt829.h" +#include "fi1236.h" +#include "msp3430.h" +#include "tda8425.h" +#include "tda9850.h" +#include "tda9885.h" +#include "uda1380.h" +#include "i2c_def.h" + */ + + +/* hw/xfree86/modes/Makefile.am */ +#include "xf86Crtc.h" +#include "xf86Modes.h" +#include "xf86RandR12.h" +/* #include "xf86Rename.h" */ + + +/* hw/xfree86/ddc/Makefile.am */ +#include "edid.h" +#include "xf86DDC.h" + + +/* hw/xfree86/dri2/Makefile.am -- module */ +/* +#if DRI2 +# include "dri2.h" +#endif + */ + + +/* hw/xfree86/vgahw/Makefile.am -- module */ +/* +#include "vgaHW.h" + */ + + +/* hw/xfree86/fbdevhw/Makefile.am -- module */ +/* +#include "fbdevhw.h" + */ + + +/* hw/xfree86/common/Makefile.am */ +#include "compiler.h" +#include "fourcc.h" +#include "xf86.h" +#include "xf86Module.h" +#include "xf86Opt.h" +#include "xf86PciInfo.h" +#include "xf86Priv.h" +#include "xf86Privstr.h" +#include "xf86cmap.h" +#include "xf86fbman.h" +#include "xf86str.h" +#include "xf86Xinput.h" +#include "xf86VGAarbiter.h" +#include "xisb.h" +#if XV +# include "xf86xv.h" +# include "xf86xvmc.h" +# include "xf86xvpriv.h" +#endif +/* XF86VidMode code is in libextmod module */ +/* +#if XF86VIDMODE +# include "vidmodeproc.h" +#endif + */ +#include "xorgVersion.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86sbusBus.h" +#endif + + +/* hw/xfree86/ramdac/Makefile.am */ +#include "BT.h" +#include "IBM.h" +#include "TI.h" +#include "xf86Cursor.h" +#include "xf86RamDac.h" + + +/* hw/xfree86/shadowfb/Makefile.am -- module */ +/* +#include "shadowfb.h" + */ + + +/* hw/xfree86/os-support/solaris/Makefile.am */ +#if defined(sun386) +# include "agpgart.h" +#endif + + +/* hw/xfree86/os-support/Makefile.am */ +#include "xf86_OSproc.h" +#include "xf86_OSlib.h" + + +/* hw/xfree86/os-support/bus/Makefile.am */ +#include "xf86Pci.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86Sbus.h" +#endif + + +/* hw/xfree86/xaa/Makefile.am -- module */ +/* +#include "xaa.h" +#include "xaalocal.h" +#include "xaarop.h" +#include "xaaWrapper.h" + */ + + +/* hw/xfree86/dixmods/extmod/Makefile.am -- module */ +/* +#include "dgaproc.h" + */ + + +/* hw/xfree86/parser/Makefile.am */ +#include "xf86Parser.h" +#include "xf86Optrec.h" + + +/* hw/xfree86/vbe/Makefile.am -- module */ +/* +#include "vbe.h" +#include "vbeModes.h" + */ + + +/* hw/xfree86/dri/Makefile.am -- module */ +/* +#if XF86DRI +# include "dri.h" +# include "sarea.h" +# include "dristruct.h" +#endif + */ + + +/* hw/xfree86/xf8_16bpp/Makefile.am -- module */ +/* +#include "cfb8_16.h" + */ + + +/* mi/Makefile.am */ +#include "mibank.h" +#include "micmap.h" +#include "miline.h" +#include "mipointer.h" +#include "mi.h" +#include "mibstore.h" +#include "migc.h" +#include "mipointrst.h" +#include "mizerarc.h" +#include "micoord.h" +#include "mifillarc.h" +#include "mispans.h" +#include "miwideline.h" +#include "mistruct.h" +#include "mifpoly.h" +#include "mioverlay.h" + + +/* randr/Makefile.am */ +#include "randrstr.h" +#include "rrtransform.h" + + +/* dbe/Makefile.am -- module */ +/* +#include "dbestruct.h" + */ + + +/* exa/Makefile.am -- module */ +/* +#include "exa.h" + */ + + +/* xfixes/Makefile.am */ +#include "xfixes.h" + + +/* include/Makefile.am */ +#include "XIstubs.h" +#include "bstore.h" +#include "bstorestr.h" +#include "closestr.h" +#include "closure.h" +#include "colormap.h" +#include "colormapst.h" +#include "hotplug.h" +#include "cursor.h" +#include "cursorstr.h" +#include "dix.h" +#include "dixaccess.h" +#include "dixevents.h" +#include "dixfont.h" +#include "dixfontstr.h" +#include "dixgrabs.h" +#include "dixstruct.h" +#include "exevents.h" +#include "extension.h" +#include "extinit.h" +#include "extnsionst.h" +#include "gc.h" +#include "gcstruct.h" +#include "globals.h" +#include "input.h" +#include "inputstr.h" +/* already included */ +/* +#include "misc.h" +#include "miscstruct.h" + */ +#include "opaque.h" +#include "os.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "privates.h" +#include "property.h" +#include "propertyst.h" +#include "ptrveloc.h" +#include "region.h" +#include "regionstr.h" +#include "registry.h" +#include "resource.h" +#include "rgb.h" +#include "screenint.h" +#include "scrnintstr.h" +#include "selection.h" +#include "servermd.h" +#include "site.h" +#include "swaprep.h" +#include "swapreq.h" +#include "validate.h" +#include "window.h" +#include "windowstr.h" +#include "xace.h" +#include "xkbfile.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include "xkbrules.h" +#include "xserver-properties.h" + +/* + * These symbols are referenced to ensure they + * will be available in the X Server binary. + */ +/* topdir=../../.. */ +_X_HIDDEN void *xorg_symbols[] = { + (void *) &WaitForSomething, + (void *) &ReadRequestFromClient, + (void *) &InsertFakeRequest, + (void *) &ResetCurrentRequest, + (void *) &FlushAllOutput, + (void *) &FlushIfCriticalOutputPending, + (void *) &SetCriticalOutputPending, + (void *) &WriteToClient, + (void *) &ResetOsBuffers, + (void *) &InitConnectionLimits, + (void *) &NotifyParentProcess, + (void *) &CreateWellKnownSockets, + (void *) &ResetWellKnownSockets, + (void *) &CloseWellKnownConnections, + (void *) &AuthorizationIDOfClient, + (void *) &ClientAuthorized, + (void *) &EstablishNewConnections, + (void *) &CheckConnections, + (void *) &CloseDownConnection, + (void *) &AddGeneralSocket, + (void *) &RemoveGeneralSocket, + (void *) &AddEnabledDevice, + (void *) &RemoveEnabledDevice, + (void *) &OnlyListenToOneClient, + (void *) &ListenToAllClients, + (void *) &IgnoreClient, + (void *) &AttendClient, + (void *) &MakeClientGrabImpervious, + (void *) &MakeClientGrabPervious, + (void *) &GetTimeInMillis, + (void *) &AdjustWaitForDelay, + (void *) &TimerInit, + (void *) &TimerForce, + (void *) &TimerSet, + (void *) &TimerCheck, + (void *) &TimerCancel, + (void *) &TimerFree, + (void *) &SetScreenSaverTimer, + (void *) &FreeScreenSaverTimer, + (void *) &AutoResetServer, + (void *) &GiveUp, + (void *) &UseMsg, + (void *) &ProcessCommandLine, + (void *) &set_font_authorizations, + (void *) &Xalloc, + (void *) &Xcalloc, + (void *) &Xrealloc, + (void *) &Xfree, + (void *) &XNFalloc, + (void *) &XNFcalloc, + (void *) &XNFrealloc, + (void *) &Xstrdup, + (void *) &XNFstrdup, + (void *) &Xprintf, + (void *) &Xvprintf, + (void *) &XNFprintf, + (void *) &XNFvprintf, + (void *) &OsSignal, + (void *) &OsRegisterSigWrapper, + (void *) &auditTrailLevel, + (void *) &LockServer, + (void *) &UnlockServer, + (void *) &OsLookupColor, + (void *) &OsInit, + (void *) &OsCleanup, + (void *) &OsVendorFatalError, + (void *) &OsVendorInit, + (void *) &OsBlockSignals, + (void *) &OsReleaseSignals, + (void *) &System, + (void *) &Popen, + (void *) &Pclose, + (void *) &Fopen, + (void *) &Fclose, + (void *) &CheckUserParameters, + (void *) &CheckUserAuthorization, + (void *) &AddHost, + (void *) &ForEachHostInFamily, + (void *) &RemoveHost, + (void *) &GetHosts, + (void *) &InvalidHost, + (void *) &LocalClient, + (void *) &LocalClientCred, + (void *) &GetLocalClientCreds, + (void *) &FreeLocalClientCreds, + (void *) &ChangeAccessControl, + (void *) &GetAccessControl, + (void *) &AddLocalHosts, + (void *) &ResetHosts, + (void *) &EnableLocalHost, + (void *) &DisableLocalHost, + (void *) &AccessUsingXdmcp, + (void *) &DefineSelf, + (void *) &AugmentSelf, + (void *) &RegisterAuthorizations, + (void *) &InitAuthorization, + (void *) &AuthorizationFromID, + (void *) &CheckAuthorization, + (void *) &ResetAuthorization, + (void *) &RemoveAuthorization, + (void *) &AddAuthorization, + (void *) &ddxProcessArgument, + (void *) &ddxUseMsg, + (void *) &ReplyCallback, + (void *) &FlushCallback, + (void *) &AbortDDX, + (void *) &ddxGiveUp, + (void *) &TimeSinceLastInputEvent, + (void *) &strlcpy, + (void *) &strlcat, + (void *) &LogInit, + (void *) &LogClose, + (void *) &LogSetParameter, + (void *) &LogVWrite, + (void *) &LogWrite, + (void *) &LogVMessageVerb, + (void *) &LogMessageVerb, + (void *) &LogMessage, + (void *) &FreeAuditTimer, + (void *) &AuditF, + (void *) &VAuditF, + (void *) &FatalError, + (void *) &VErrorF, + (void *) &ErrorF, + (void *) &Error, + (void *) &LogPrintMarkers, + (void *) &xorg_backtrace, + (void *) &SwapLongs, + (void *) &SwapShorts, + (void *) &MakePredeclaredAtoms, + (void *) &Ones, + (void *) &globalSerialNumber, + (void *) &serverGeneration, + (void *) &AddScreen, + (void *) &GetScratchPixmapHeader, + (void *) &FreeScratchPixmapHeader, + (void *) &CreateScratchPixmapsForScreen, + (void *) &FreeScratchPixmapsForScreen, + (void *) &AllocatePixmap, + (void *) &ValidateGC, + (void *) &ChangeGC, + (void *) &DoChangeGC, + (void *) &dixChangeGC, + (void *) &CreateGC, + (void *) &CopyGC, + (void *) &FreeGC, + (void *) &CreateScratchGC, + (void *) &FreeGCperDepth, + (void *) &CreateGCperDepth, + (void *) &CreateDefaultStipple, + (void *) &FreeDefaultStipple, + (void *) &SetDashes, + (void *) &VerifyRectOrder, + (void *) &SetClipRects, + (void *) &GetScratchGC, + (void *) &FreeScratchGC, + (void *) &miEmptyBox, + (void *) &miEmptyData, + (void *) &miBrokenData, + (void *) &InitRegions, + (void *) &miRegionCreate, + (void *) &miRegionInit, + (void *) &miRegionDestroy, + (void *) &miRegionUninit, + (void *) &miRegionCopy, + (void *) &miIntersect, + (void *) &miUnion, + (void *) &miRegionAppend, + (void *) &miRegionValidate, + (void *) &miRectsToRegion, + (void *) &miSubtract, + (void *) &miInverse, + (void *) &miRectIn, + (void *) &miTranslateRegion, + (void *) &miRegionReset, + (void *) &miRegionBreak, + (void *) &miPointInRegion, + (void *) &miRegionEqual, + (void *) &miRegionNotEmpty, + (void *) &miRegionEmpty, + (void *) &miRegionExtents, + (void *) &miPrintRegion, + (void *) &TraverseTree, + (void *) &WalkTree, + (void *) &CreateRootWindow, + (void *) &InitRootWindow, + (void *) &RegisterRealChildHeadProc, + (void *) &RealChildHead, + (void *) &CreateWindow, + (void *) &DeleteWindow, + (void *) &DestroySubwindows, + (void *) &ChangeWindowAttributes, + (void *) &ChangeWindowDeviceCursor, + (void *) &WindowGetDeviceCursor, + (void *) &GetWindowAttributes, + (void *) &GravityTranslate, + (void *) &ConfigureWindow, + (void *) &CirculateWindow, + (void *) &ReparentWindow, + (void *) &MapWindow, + (void *) &MapSubwindows, + (void *) &UnmapWindow, + (void *) &UnmapSubwindows, + (void *) &HandleSaveSet, + (void *) &PointInWindowIsVisible, + (void *) &NotClippedByChildren, + (void *) &SendVisibilityNotify, + (void *) &dixSaveScreens, + (void *) &SaveScreens, + (void *) &FindWindowWithOptional, + (void *) &CheckWindowOptionalNeed, + (void *) &MakeWindowOptional, + (void *) &MoveWindowInStack, + (void *) &SetWinSize, + (void *) &SetBorderSize, + (void *) &ResizeChildrenWinSize, + (void *) &ShapeExtensionInit, + (void *) &SendShapeNotify, + (void *) &CreateBoundingShape, + (void *) &CreateClipShape, + (void *) &DisableMapUnmapEvents, + (void *) &EnableMapUnmapEvents, + (void *) &XkbRF_GetComponents, + (void *) &XkbRF_LoadRules, + (void *) &XkbRF_LoadRulesByName, + (void *) &XkbRF_Create, + (void *) &XkbRF_Free, + (void *) &InputEventList, + (void *) &InputEventListLen, + (void *) &defaultKeyboardControl, + (void *) &defaultPointerControl, + (void *) &set_key_down, + (void *) &set_key_up, + (void *) &key_is_down, + (void *) &InitCoreDevices, + (void *) &InitXTestDevices, + (void *) &AddInputDevice, + (void *) &EnableDevice, + (void *) &ActivateDevice, + (void *) &DisableDevice, + (void *) &InitAndStartDevices, + (void *) &CloseDownDevices, + (void *) &UndisplayDevices, + (void *) &RemoveDevice, + (void *) &NumMotionEvents, + (void *) &RegisterPointerDevice, + (void *) &RegisterKeyboardDevice, + (void *) &dixLookupDevice, + (void *) &QueryMinMaxKeyCodes, + (void *) &SetKeySymsMap, + (void *) &InitButtonClassDeviceStruct, + (void *) &InitValuatorClassDeviceStruct, + (void *) &InitPointerAccelerationScheme, + (void *) &InitAbsoluteClassDeviceStruct, + (void *) &InitFocusClassDeviceStruct, + (void *) &InitPtrFeedbackClassDeviceStruct, + (void *) &InitStringFeedbackClassDeviceStruct, + (void *) &InitBellFeedbackClassDeviceStruct, + (void *) &InitLedFeedbackClassDeviceStruct, + (void *) &InitIntegerFeedbackClassDeviceStruct, + (void *) &InitPointerDeviceStruct, + (void *) &InitKeyboardDeviceStruct, + (void *) &ApplyPointerMapping, + (void *) &BadDeviceMap, + (void *) &NoteLedState, + (void *) &MaybeStopHint, + (void *) &ProcessPointerEvent, + (void *) &ProcessKeyboardEvent, + (void *) &LegalModifier, + (void *) &ProcessInputEvents, + (void *) &InitInput, + (void *) &GetMaximumEventsNum, + (void *) &GetEventList, + (void *) &InitEventList, + (void *) &SetMinimumEventSize, + (void *) &FreeEventList, + (void *) &CreateClassesChangedEvent, + (void *) &GetPointerEvents, + (void *) &GetKeyboardEvents, + (void *) &GetKeyboardValuatorEvents, + (void *) &GetProximityEvents, + (void *) &PostSyntheticMotion, + (void *) &GetMotionHistorySize, + (void *) &AllocateMotionHistory, + (void *) &GetMotionHistory, + (void *) &AttachDevice, + (void *) &GetPairedDevice, + (void *) &GetMaster, + (void *) &AllocDevicePair, + (void *) &DeepCopyDeviceClasses, + (void *) &generate_modkeymap, + (void *) &change_modmap, + (void *) &AllocXTestDevice, + (void *) &IsXTestDevice, + (void *) &GetXTestDevice, + (void *) &GetEventFilter, + (void *) &GetWindowXI2Mask, + (void *) &NewInputDeviceRequest, + (void *) &DeleteInputDeviceRequest, + (void *) &DDXRingBell, + (void *) &EnableCursor, + (void *) &cursorScreenDevPriv, + (void *) &rootCursor, + (void *) &FreeCursor, + (void *) &AllocARGBCursor, + (void *) &AllocGlyphCursor, + (void *) &CreateRootCursor, + (void *) &ServerBitsFromGlyph, + (void *) &CursorMetricsFromGlyph, + (void *) &CheckCursorConfinement, + (void *) &NewCurrentScreen, + (void *) &PointerConfinedToScreen, + (void *) &GetSpritePosition, + (void *) &XineramaGetCursorScreen, + (void *) &GEExtensions, + (void *) &GERegisterExtension, + (void *) &GEInitEvent, + (void *) &GEExtensionInit, + (void *) &clients, + (void *) &serverClient, + (void *) ¤tMaxClients, + (void *) &dispatchExceptionAtReset, + (void *) &checkForInput, + (void *) &SetInputCheck, + (void *) &CloseDownClient, + (void *) &UpdateCurrentTime, + (void *) &UpdateCurrentTimeIf, + (void *) &dixDestroyPixmap, + (void *) &InitClient, + (void *) &NextAvailableClient, + (void *) &SendErrorToClient, + (void *) &MarkClientException, + (void *) &CreateConnectionBlock, + (void *) &CopyISOLatin1Lowered, + (void *) &CompareISOLatin1Lowered, + (void *) &dixLookupWindow, + (void *) &dixLookupDrawable, + (void *) &dixLookupGC, + (void *) &dixLookupClient, + (void *) &NoopDDA, + (void *) &AlterSaveSetForClient, + (void *) &DeleteWindowFromAnySaveSet, + (void *) &BlockHandler, + (void *) &WakeupHandler, + (void *) &RegisterBlockAndWakeupHandlers, + (void *) &RemoveBlockAndWakeupHandlers, + (void *) &InitBlockAndWakeupHandlers, + (void *) &ProcessWorkQueue, + (void *) &ProcessWorkQueueZombies, + (void *) &QueueWorkProc, + (void *) &ClientSleep, + (void *) &ClientSignal, + (void *) &ClientWakeup, + (void *) &ClientIsAsleep, + (void *) &MakeAtom, + (void *) &ValidAtom, + (void *) &NameForAtom, + (void *) &AtomError, + (void *) &FreeAllAtoms, + (void *) &InitAtoms, + (void *) &SetVendorRelease, + (void *) &SetVendorString, + (void *) &SetMaskForEvent, + (void *) &ConfineToShape, + (void *) &IsParent, + (void *) &GetCurrentRootWindow, + (void *) &GetSpriteWindow, + (void *) &NoticeEventTime, + (void *) &EnqueueEvent, + (void *) &ActivatePointerGrab, + (void *) &DeactivatePointerGrab, + (void *) &ActivateKeyboardGrab, + (void *) &DeactivateKeyboardGrab, + (void *) &ActivateFocusInGrab, + (void *) &AllowSome, + (void *) &ReleaseActiveGrabs, + (void *) &DeliverEventsToWindow, + (void *) &DeliverDeviceEvents, + (void *) &InitializeSprite, + (void *) &UpdateSpriteForScreen, + (void *) &WindowHasNewCursor, + (void *) &CheckDeviceGrabs, + (void *) &DeliverFocusedEvent, + (void *) &DeliverGrabbedEvent, + (void *) &FixKeyState, + (void *) &RecalculateDeliverableEvents, + (void *) &OtherClientGone, + (void *) &DoFocusEvents, + (void *) &SetInputFocus, + (void *) &GrabDevice, + (void *) &InitEvents, + (void *) &CloseDownEvents, + (void *) &DeleteWindowFromAnyEvents, + (void *) &EventMaskForClient, + (void *) &DeliverEvents, + (void *) &CheckMotion, + (void *) &WriteEventsToClient, + (void *) &TryClientEvents, + (void *) &WindowsRestructured, + (void *) &SetClientPointer, + (void *) &PickPointer, + (void *) &PickKeyboard, + (void *) &IsInterferingGrab, + (void *) &ReinitializeRootWindow, + (void *) &ScreenRestructured, + (void *) &ffs, + (void *) &AddCallback, + (void *) &DeleteCallback, + (void *) &CallCallbacks, + (void *) &DeleteCallbackList, + (void *) &InitCallbackManager, + (void *) &ServerGrabCallback, + (void *) &EventCallback, + (void *) &DeviceEventCallback, + (void *) &XItoCoreType, + (void *) &DevHasCursor, + (void *) &IsPointerDevice, + (void *) &IsKeyboardDevice, + (void *) &IsPointerEvent, + (void *) &IsMaster, + (void *) &CorePointerProc, + (void *) &CoreKeyboardProc, + (void *) &SecurityLookupWindow, + (void *) &LookupWindow, + (void *) &SecurityLookupDrawable, + (void *) &LookupDrawable, + (void *) &LookupClient, + (void *) &ResourceStateCallback, + (void *) &CreateNewResourceType, + (void *) &CreateNewResourceClass, + (void *) &InitClientResources, + (void *) &FakeClientID, + (void *) &AddResource, + (void *) &FreeResource, + (void *) &FreeResourceByType, + (void *) &ChangeResourceValue, + (void *) &FindClientResourcesByType, + (void *) &FindAllClientResources, + (void *) &FreeClientNeverRetainResources, + (void *) &FreeClientResources, + (void *) &FreeAllResources, + (void *) &LegalNewID, + (void *) &LookupClientResourceComplex, + (void *) &dixLookupResourceByType, + (void *) &dixLookupResourceByClass, + (void *) &GetXIDRange, + (void *) &GetXIDList, + (void *) &lastResourceType, + (void *) &TypeMask, + (void *) &dixLookupResource, + (void *) &SecurityLookupIDByType, + (void *) &SecurityLookupIDByClass, + (void *) &LookupIDByType, + (void *) &LookupIDByClass, + (void *) &dixRequestPrivate, + (void *) &dixAllocatePrivate, + (void *) &dixLookupPrivate, + (void *) &dixLookupPrivateAddr, + (void *) &dixSetPrivate, + (void *) &dixRegisterPrivateInitFunc, + (void *) &dixRegisterPrivateDeleteFunc, + (void *) &dixFreePrivates, + (void *) &dixResetPrivates, + (void *) &dixLookupPrivateOffset, + (void *) &dixRegisterPrivateOffset, + (void *) &PictureCmapPolicy, + (void *) &PictureParseCmapPolicy, + (void *) &RenderErrBase, + (void *) &RenderClientPrivateKey, + (void *) &CreateColormap, + (void *) &FreeColormap, + (void *) &TellLostMap, + (void *) &TellGainedMap, + (void *) &CopyColormapAndFree, + (void *) &AllocColor, + (void *) &FakeAllocColor, + (void *) &FakeFreeColor, + (void *) &FindColor, + (void *) &QueryColors, + (void *) &FreeClientPixels, + (void *) &AllocColorCells, + (void *) &AllocColorPlanes, + (void *) &FreeColors, + (void *) &StoreColors, + (void *) &IsMapInstalled, + (void *) &screenInfo, + (void *) &InitOutput, + (void *) &FindGlyphHashSet, + (void *) &GlyphUninit, + (void *) &FindGlyphHashSet, + (void *) &FindGlyphRef, + (void *) &FindGlyphByHash, + (void *) &HashGlyph, + (void *) &FreeGlyph, + (void *) &AddGlyph, + (void *) &DeleteGlyph, + (void *) &FindGlyph, + (void *) &AllocateGlyph, + (void *) &AllocateGlyphHash, + (void *) &ResizeGlyphHash, + (void *) &ResizeGlyphSet, + (void *) &AllocateGlyphSet, + (void *) &FreeGlyphSet, + (void *) &PictureScreenPrivateKey, + (void *) &PictureWindowPrivateKey, + (void *) &PictureType, + (void *) &PictFormatType, + (void *) &GlyphSetType, + (void *) &PictureDestroyWindow, + (void *) &PictureCloseScreen, + (void *) &PictureStoreColors, + (void *) &PictureInitIndexedFormat, + (void *) &PictureSetSubpixelOrder, + (void *) &PictureGetSubpixelOrder, + (void *) &PictureCreateDefaultFormats, + (void *) &PictureMatchVisual, + (void *) &PictureMatchFormat, + (void *) &PictureInit, + (void *) &PictureGetFilterId, + (void *) &PictureGetFilterName, + (void *) &PictureAddFilter, + (void *) &PictureSetFilterAlias, + (void *) &PictureSetDefaultFilters, + (void *) &PictureResetFilters, + (void *) &PictureFindFilter, + (void *) &SetPicturePictFilter, + (void *) &SetPictureFilter, + (void *) &PictureFinishInit, + (void *) &SetPictureToDefaults, + (void *) &CreatePicture, + (void *) &ChangePicture, + (void *) &SetPictureClipRects, + (void *) &SetPictureClipRegion, + (void *) &SetPictureTransform, + (void *) &CopyPicture, + (void *) &ValidatePicture, + (void *) &FreePicture, + (void *) &FreePictFormat, + (void *) &CompositePicture, + (void *) &CompositeGlyphs, + (void *) &CompositeRects, + (void *) &CompositeTrapezoids, + (void *) &CompositeTriangles, + (void *) &CompositeTriStrip, + (void *) &CompositeTriFan, + (void *) &PictureGradientColor, + (void *) &RenderExtensionInit, + (void *) &AddTraps, + (void *) &CreateSolidPicture, + (void *) &CreateLinearGradientPicture, + (void *) &CreateRadialGradientPicture, + (void *) &CreateConicalGradientPicture, + (void *) &PanoramiXRenderInit, + (void *) &PanoramiXRenderReset, + (void *) &PictTransform_from_xRenderTransform, + (void *) &xRenderTransform_from_PictTransform, + (void *) &PictureTransformPoint, + (void *) &PictureTransformPoint3d, + (void *) &miCreatePicture, + (void *) &miDestroyPicture, + (void *) &miDestroyPictureClip, + (void *) &miChangePictureClip, + (void *) &miChangePicture, + (void *) &miValidatePicture, + (void *) &miChangePictureTransform, + (void *) &miChangePictureFilter, + (void *) &miCompositeSourceValidate, + (void *) &miComputeCompositeRegion, + (void *) &miPictureInit, + (void *) &miRealizeGlyph, + (void *) &miUnrealizeGlyph, + (void *) &miGlyphs, + (void *) &miRenderColorToPixel, + (void *) &miRenderPixelToColor, + (void *) &miIsSolidAlpha, + (void *) &miCompositeRects, + (void *) &miTrapezoidBounds, + (void *) &miTrapezoids, + (void *) &miPointFixedBounds, + (void *) &miTriangleBounds, + (void *) &miTriangles, + (void *) &miTriStrip, + (void *) &miTriFan, + (void *) &miCreateAlphaPicture, + (void *) &miInitIndexed, + (void *) &miCloseIndexed, + (void *) &miUpdateIndexed, + (void *) &RenderSampleCeilY, + (void *) &RenderSampleFloorY, + (void *) &RenderEdgeStep, + (void *) &RenderEdgeInit, + (void *) &RenderLineFixedEdgeInit, + (void *) &miDamageCreate, + (void *) &miDamageRegister, + (void *) &miDamageUnregister, + (void *) &miDamageDestroy, + (void *) &DamageSetup, + (void *) &DamageCreate, + (void *) &DamageDrawInternal, + (void *) &DamageRegister, + (void *) &DamageUnregister, + (void *) &DamageDestroy, + (void *) &DamageSubtract, + (void *) &DamageEmpty, + (void *) &DamageRegion, + (void *) &DamagePendingRegion, + (void *) &DamageRegionAppend, + (void *) &DamageRegionProcessPending, + (void *) &DamageRegionRendered, + (void *) &DamageDamageRegion, + (void *) &DamageSetReportAfterOp, + (void *) &DamageSetPostRenderingFunctions, + (void *) &DamageGetScreenFuncs, + (void *) &ClientStateCallback, + (void *) &ReplyNotSwappd, + (void *) &SmartScheduleTime, + (void *) &SmartScheduleInterval, + (void *) &SmartScheduleSlice, + (void *) &SmartScheduleMaxSlice, + (void *) &SmartScheduleDisable, + (void *) &SmartScheduleStartTimer, + (void *) &SmartScheduleStopTimer, + (void *) &SmartScheduleInit, + (void *) ¤tTime, + (void *) &lastDeviceEventTime, + (void *) &CompareTimeStamps, + (void *) &ClientTimeToServerTime, + (void *) &InitialVector, + (void *) &ProcVector, + (void *) &SwappedProcVector, + (void *) &ReplySwapVector, + (void *) &ProcBadRequest, + (void *) &StandardMinorOpcode, + (void *) &MinorOpcodeOfRequest, + (void *) &EnableDisableExtension, + (void *) &EnableDisableExtensionError, + (void *) &InitExtensions, + (void *) &CloseDownExtensions, + (void *) &EventSwapVector, + (void *) &NotImplemented, + (void *) &AddExtension, + (void *) &AddExtensionAlias, + (void *) &CheckExtension, + (void *) &GetExtensionEntry, + (void *) &GEEventType, + (void *) &GEEventBase, + (void *) &GEErrorBase, + (void *) &GEClientPrivateKey, + (void *) &ProcGEVector, + (void *) &SProcGEVector, + (void *) &ShmRegisterFuncs, + (void *) &ShmRegisterFbFuncs, + (void *) &ShmSegType, + (void *) &ShmCompletionCode, + (void *) &BadShmSegCode, + (void *) &PanoramiXNumScreens, + (void *) &panoramiXdataPtr, + (void *) &PanoramiXPixWidth, + (void *) &PanoramiXPixHeight, + (void *) &PanoramiXTranslateVisualID, + (void *) &PanoramiXConsolidate, + (void *) &PanoramiXCreateConnectionBlock, + (void *) &PanoramiXFindIDByScrnum, + (void *) &XineramaRegisterConnectionBlockCallback, + (void *) &XineramaDeleteResource, + (void *) &XineramaReinitData, + (void *) &XineramaScreenRegions, + (void *) &XRC_DRAWABLE, + (void *) &XRT_WINDOW, + (void *) &XRT_PIXMAP, + (void *) &XRT_GC, + (void *) &XRT_COLORMAP, + (void *) &XineramaVisualsEqualPtr, + (void *) &XineramaGetImageData, + (void *) &xf86CreateI2CBusRec, + (void *) &xf86DestroyI2CBusRec, + (void *) &xf86I2CBusInit, + (void *) &xf86I2CFindBus, + (void *) &xf86I2CGetScreenBuses, + (void *) &xf86CreateI2CDevRec, + (void *) &xf86DestroyI2CDevRec, + (void *) &xf86I2CDevInit, + (void *) &xf86I2CFindDev, + (void *) &xf86I2CProbeAddress, + (void *) &xf86I2CWriteRead, + (void *) &xf86I2CReadStatus, + (void *) &xf86I2CReadByte, + (void *) &xf86I2CReadBytes, + (void *) &xf86I2CReadWord, + (void *) &xf86I2CWriteByte, + (void *) &xf86I2CWriteBytes, + (void *) &xf86I2CWriteWord, + (void *) &xf86I2CWriteVec, + (void *) &ConfiguredMonitor, + (void *) &dixLookupProperty, + (void *) &dixChangeWindowProperty, + (void *) &ChangeWindowProperty, + (void *) &DeleteProperty, + (void *) &DeleteAllWindowProperties, + (void *) &defaultScreenSaverTime, + (void *) &defaultScreenSaverInterval, + (void *) &ScreenSaverTime, + (void *) &ScreenSaverInterval, + (void *) &screenSaverSuspended, + (void *) &defaultFontPath, + (void *) &monitorResolution, + (void *) &defaultColorVisualClass, + (void *) &WindowTable, + (void *) &GrabInProgress, + (void *) &noTestExtensions, + (void *) &dixScreenOrigins, + (void *) &ConnectionInfo, + (void *) &DPMSStandbyTime, + (void *) &DPMSSuspendTime, + (void *) &DPMSOffTime, + (void *) &DPMSPowerLevel, + (void *) &DPMSEnabled, + (void *) &DPMSDisabledSwitch, + (void *) &DPMSCapableFlag, + (void *) &PanoramiXExtensionDisabledHack, + (void *) &noCompositeExtension, + (void *) &noDamageExtension, + (void *) &noDbeExtension, + (void *) &noDPMSExtension, + (void *) &noGlxExtension, + (void *) &noScreenSaverExtension, + (void *) &noMITShmExtension, + (void *) &noRRExtension, + (void *) &noRenderExtension, + (void *) &noResExtension, + (void *) &noXFree86DGAExtension, + (void *) &noXFree86DRIExtension, + (void *) &noXFree86VidModeExtension, + (void *) &noXFixesExtension, + (void *) &noPanoramiXExtension, + (void *) &noXvExtension, + (void *) &noDRI2Extension, + (void *) &defaultTextFont, + (void *) &defaultCursorFont, + (void *) &MaxClients, + (void *) &isItTimeToYield, + (void *) &dispatchException, + (void *) &TimeOutValue, + (void *) &ScreenSaverBlanking, + (void *) &ScreenSaverAllowExposures, + (void *) &defaultScreenSaverBlanking, + (void *) &defaultScreenSaverAllowExposures, + (void *) &display, + (void *) &defaultBackingStore, + (void *) &disableBackingStore, + (void *) &enableBackingStore, + (void *) &PartialNetwork, + (void *) &logoScreenSaver, + (void *) &defeatAccessControl, + (void *) &maxBigRequestSize, + (void *) &party_like_its_1989, + (void *) &whiteRoot, + (void *) &CoreDump, + (void *) &DontPropagateMasks, + (void *) &screenIsSaved, + (void *) &savedScreenInfo, + (void *) &PixmapWidthPaddingInfo, + (void *) &RRTransformInit, + (void *) &RRTransformFini, + (void *) &RRTransformEqual, + (void *) &RRTransformSetFilter, + (void *) &RRTransformCopy, + (void *) &RRTransformCompute, + (void *) &RREventBase, + (void *) &ProcRandrVector, + (void *) &SProcRandrVector, + (void *) &rrPrivKey, + (void *) &RRClientType, + (void *) &RRClientPrivateKey, + (void *) &RRCrtcType, + (void *) &RRExtensionInit, + (void *) &RRScreenSetSizeRange, + (void *) &RRScreenSizeNotify, + (void *) &RRScreenSizeSet, + (void *) &RRSendConfigNotify, + (void *) &ProcRRGetScreenSizeRange, + (void *) &ProcRRSetScreenSize, + (void *) &ProcRRGetScreenResources, + (void *) &ProcRRGetScreenResourcesCurrent, + (void *) &ProcRRSetScreenConfig, + (void *) &ProcRRGetScreenInfo, + (void *) &RRDeliverScreenEvent, + (void *) &miRandRInit, + (void *) &miRRGetInfo, + (void *) &miRRCrtcSet, + (void *) &miRROutputSetProperty, + (void *) &miRROutputGetProperty, + (void *) &miRROutputValidateMode, + (void *) &miRRModeDestroy, + (void *) &RRTellChanged, + (void *) &RRGetInfo, + (void *) &RRInit, + (void *) &RRScreenInit, + (void *) &RRFirstOutput, + (void *) &RRGetRotation, + (void *) &RRVerticalRefresh, + (void *) &RRRegisterSize, + (void *) &RRRegisterRate, + (void *) &RRSetCurrentConfig, + (void *) &RRScreenInit, + (void *) &RRGetRotation, + (void *) &RRCrtcChanged, + (void *) &RRCrtcCreate, + (void *) &RRCrtcSetRotations, + (void *) &RRCrtcSetTransformSupport, + (void *) &RRCrtcNotify, + (void *) &RRDeliverCrtcEvent, + (void *) &RRCrtcSet, + (void *) &RRCrtcGammaSet, + (void *) &RRCrtcGammaGet, + (void *) &RRCrtcGammaNotify, + (void *) &RRCrtcGammaSetSize, + (void *) &RRCrtcGetScanoutSize, + (void *) &RRTransformCompute, + (void *) &RRCrtcGetTransform, + (void *) &RRCrtcPendingTransform, + (void *) &RRCrtcDestroy, + (void *) &RRCrtcTransformSet, + (void *) &RRCrtcInit, + (void *) &ProcRRGetCrtcInfo, + (void *) &ProcRRSetCrtcConfig, + (void *) &ProcRRGetCrtcGammaSize, + (void *) &ProcRRGetCrtcGamma, + (void *) &ProcRRSetCrtcGamma, + (void *) &ProcRRSetCrtcTransform, + (void *) &ProcRRGetCrtcTransform, + (void *) &RRClientKnowsRates, + (void *) &RRModeGet, + (void *) &RRModeDestroy, + (void *) &RRModesForScreen, + (void *) &RRModeInit, + (void *) &ProcRRCreateMode, + (void *) &ProcRRDestroyMode, + (void *) &ProcRRAddOutputMode, + (void *) &ProcRRDeleteOutputMode, + (void *) &RROutputChanged, + (void *) &RROutputCreate, + (void *) &RROutputSetClones, + (void *) &RROutputSetModes, + (void *) &RROutputAddUserMode, + (void *) &RROutputDeleteUserMode, + (void *) &RROutputSetCrtcs, + (void *) &RROutputSetConnection, + (void *) &RROutputSetSubpixelOrder, + (void *) &RROutputSetPhysicalSize, + (void *) &RRDeliverOutputEvent, + (void *) &RROutputDestroy, + (void *) &ProcRRGetOutputInfo, + (void *) &ProcRRSetOutputPrimary, + (void *) &ProcRRGetOutputPrimary, + (void *) &RROutputInit, + (void *) &RRPointerMoved, + (void *) &RRPointerScreenConfigured, + (void *) &RRDeleteAllOutputProperties, + (void *) &RRGetOutputProperty, + (void *) &RRQueryOutputProperty, + (void *) &RRDeleteOutputProperty, + (void *) &RRPostPendingProperties, + (void *) &RRChangeOutputProperty, + (void *) &RRConfigureOutputProperty, + (void *) &ProcRRChangeOutputProperty, + (void *) &ProcRRGetOutputProperty, + (void *) &ProcRRListOutputProperties, + (void *) &ProcRRQueryOutputProperty, + (void *) &ProcRRConfigureOutputProperty, + (void *) &ProcRRDeleteOutputProperty, + (void *) &RRXineramaExtensionInit, + (void *) &ExtensionModuleList, + (void *) &LoadSubModule, + (void *) &UnloadSubModule, + (void *) &UnloadModule, + (void *) &LoaderSymbol, + (void *) &LoaderListDirs, + (void *) &LoaderFreeDirList, + (void *) &LoaderErrorMsg, + (void *) &LoadExtension, + (void *) &LoaderGetOS, + (void *) &LoaderShouldIgnoreABI, + (void *) &LoaderGetABIVersion, + (void *) &xf86SetIntOption, + (void *) &xf86SetRealOption, + (void *) &xf86SetStrOption, + (void *) &xf86SetBoolOption, + (void *) &xf86CheckIntOption, + (void *) &xf86CheckRealOption, + (void *) &xf86CheckStrOption, + (void *) &xf86CheckBoolOption, + (void *) &xf86AddNewOption, + (void *) &xf86NewOption, + (void *) &xf86NextOption, + (void *) &xf86OptionListCreate, + (void *) &xf86OptionListMerge, + (void *) &xf86OptionListFree, + (void *) &xf86OptionName, + (void *) &xf86OptionValue, + (void *) &xf86OptionListReport, + (void *) &xf86FindOption, + (void *) &xf86FindOptionValue, + (void *) &xf86MarkOptionUsed, + (void *) &xf86MarkOptionUsedByName, + (void *) &xf86CheckIfOptionUsed, + (void *) &xf86CheckIfOptionUsedByName, + (void *) &xf86ShowUnusedOptions, + (void *) &xf86ProcessOptions, + (void *) &xf86TokenToOptinfo, + (void *) &xf86TokenToOptName, + (void *) &xf86IsOptionSet, + (void *) &xf86GetOptValString, + (void *) &xf86GetOptValInteger, + (void *) &xf86GetOptValULong, + (void *) &xf86GetOptValReal, + (void *) &xf86GetOptValFreq, + (void *) &xf86GetOptValBool, + (void *) &xf86ReturnOptValBool, + (void *) &xf86NameCmp, + (void *) &xf86NormalizeName, + (void *) &xf86ReplaceIntOption, + (void *) &xf86ReplaceRealOption, + (void *) &xf86ReplaceBoolOption, + (void *) &xf86ReplaceStrOption, + (void *) &pciTag, + (void *) &xf86scanpci, + (void *) &xf86MapDomainMemory, + (void *) &xf86MapLegacyIO, + (void *) &xf86DoConfigure, + (void *) &xf86DoShowOptions, + (void *) &xf86DoConfigurePass1, + (void *) &xf86ScreenKey, + (void *) &xf86CreateRootWindowKey, + (void *) &xf86PixmapKey, + (void *) &xf86Screens, + (void *) &byte_reversed, + (void *) &pciSlotClaimed, + (void *) &fbSlotClaimed, + (void *) &xf86ConfigDRI, + (void *) &xf86inSuspend, + (void *) &xf86DRI2Enabled, + (void *) &VTSwitchEnabled, + (void *) &xf86CheckPciSlot, + (void *) &xf86ClaimPciSlot, + (void *) &xf86UnclaimPciSlot, + (void *) &xf86ParsePciBusString, + (void *) &xf86ComparePciBusString, + (void *) &xf86FormatPciBusNumber, + (void *) &xf86GetFbInfoForScreen, + (void *) &xf86ClaimFbSlot, + (void *) &xf86ClaimNoSlot, + (void *) &xf86EnableAccess, + (void *) &xf86IsPrimaryPci, + (void *) &xf86DriverHasEntities, + (void *) &xf86AddEntityToScreen, + (void *) &xf86SetEntityInstanceForScreen, + (void *) &xf86GetNumEntityInstances, + (void *) &xf86GetDevFromEntity, + (void *) &xf86RemoveEntityFromScreen, + (void *) &xf86GetEntityInfo, + (void *) &xf86GetPciInfoForEntity, + (void *) &xf86SetEntityFuncs, + (void *) &xf86CheckPciMemBase, + (void *) &xf86IsEntityPrimary, + (void *) &xf86EnterServerState, + (void *) &xf86FindScreenForEntity, + (void *) &xf86GetLastScrnFlag, + (void *) &xf86SetLastScrnFlag, + (void *) &xf86IsEntityShared, + (void *) &xf86SetEntityShared, + (void *) &xf86IsEntitySharable, + (void *) &xf86SetEntitySharable, + (void *) &xf86IsPrimInitDone, + (void *) &xf86SetPrimInitDone, + (void *) &xf86ClearPrimInitDone, + (void *) &xf86AllocateEntityPrivateIndex, + (void *) &xf86GetEntityPrivate, + (void *) &xf86AddBusDeviceToConfigure, + (void *) &xf86LockZoom, + (void *) &xf86InitViewport, + (void *) &xf86SetViewport, + (void *) &xf86ZoomViewport, + (void *) &xf86SwitchMode, + (void *) &xf86GetPointerScreenFuncs, + (void *) &xf86InitOrigins, + (void *) &xf86ReconfigureLayout, + (void *) &xf86CVTMode, + (void *) &xf86DPMSInit, + (void *) &DPMSSet, + (void *) &DPMSSupported, + (void *) &DGAInit, + (void *) &DGAReInitModes, + (void *) &xf86SetDGAMode, + (void *) &SetTimeSinceLastInputEvent, + (void *) &xf86AddInputHandler, + (void *) &xf86RemoveInputHandler, + (void *) &xf86DisableInputHandler, + (void *) &xf86EnableInputHandler, + (void *) &xf86AddGeneralHandler, + (void *) &xf86RemoveGeneralHandler, + (void *) &xf86DisableGeneralHandler, + (void *) &xf86EnableGeneralHandler, + (void *) &xf86InterceptSignals, + (void *) &xf86InterceptSigIll, + (void *) &xf86EnableVTSwitch, + (void *) &xf86ProcessActionEvent, + (void *) &xf86PrintBacktrace, + (void *) &xf86AddDriver, + (void *) &xf86DeleteDriver, + (void *) &xf86AllocateScreen, + (void *) &xf86DeleteScreen, + (void *) &xf86AllocateScrnInfoPrivateIndex, + (void *) &xf86AddPixFormat, + (void *) &xf86SetDepthBpp, + (void *) &xf86PrintDepthBpp, + (void *) &xf86SetWeight, + (void *) &xf86SetDefaultVisual, + (void *) &xf86SetGamma, + (void *) &xf86SetDpi, + (void *) &xf86SetBlackWhitePixels, + (void *) &xf86EnableDisableFBAccess, + (void *) &xf86VDrvMsgVerb, + (void *) &xf86DrvMsgVerb, + (void *) &xf86DrvMsg, + (void *) &xf86MsgVerb, + (void *) &xf86Msg, + (void *) &xf86ErrorFVerb, + (void *) &xf86ErrorF, + (void *) &xf86TokenToString, + (void *) &xf86StringToToken, + (void *) &xf86ShowClocks, + (void *) &xf86PrintChipsets, + (void *) &xf86MatchDevice, + (void *) &xf86MatchPciInstances, + (void *) &xf86GetClocks, + (void *) &xf86GetVisualName, + (void *) &xf86GetVerbosity, + (void *) &xf86GetPix24, + (void *) &xf86GetDepth, + (void *) &xf86GetWeight, + (void *) &xf86GetGamma, + (void *) &xf86GetFlipPixels, + (void *) &xf86GetServerName, + (void *) &xf86ServerIsExiting, + (void *) &xf86ServerIsResetting, + (void *) &xf86ServerIsInitialising, + (void *) &xf86ServerIsOnlyDetecting, + (void *) &xf86CaughtSignal, + (void *) &xf86GetVidModeAllowNonLocal, + (void *) &xf86GetVidModeEnabled, + (void *) &xf86GetModInDevAllowNonLocal, + (void *) &xf86GetModInDevEnabled, + (void *) &xf86GetAllowMouseOpenFail, + (void *) &xf86IsPc98, + (void *) &xf86DisableRandR, + (void *) &xorgGetVersion, + (void *) &xf86GetModuleVersion, + (void *) &xf86LoadDrvSubModule, + (void *) &xf86LoadSubModule, + (void *) &xf86LoadOneModule, + (void *) &xf86UnloadSubModule, + (void *) &xf86LoaderCheckSymbol, + (void *) &xf86SetBackingStore, + (void *) &xf86SetSilkenMouse, + (void *) &xf86FindXvOptions, + (void *) &xf86GetOS, + (void *) &xf86ConfigPciEntity, + (void *) &xf86ConfigFbEntity, + (void *) &xf86ConfigActivePciEntity, + (void *) &xf86IsScreenPrimary, + (void *) &xf86RegisterRootWindowProperty, + (void *) &xf86IsUnblank, + (void *) &xf86GetPixFormat, + (void *) &xf86GetBppFromDepth, + (void *) &xf86GetNearestClock, + (void *) &xf86ModeStatusToString, + (void *) &xf86LookupMode, + (void *) &xf86CheckModeForMonitor, + (void *) &xf86InitialCheckModeForDriver, + (void *) &xf86CheckModeForDriver, + (void *) &xf86ValidateModes, + (void *) &xf86DeleteMode, + (void *) &xf86PruneDriverModes, + (void *) &xf86SetCrtcForModes, + (void *) &xf86PrintModes, + (void *) &xf86ShowClockRanges, + (void *) &xf86ModeHSync, + (void *) &xf86ModeVRefresh, + (void *) &xf86SetModeDefaultName, + (void *) &xf86SetModeCrtc, + (void *) &xf86DuplicateMode, + (void *) &xf86DuplicateModes, + (void *) &xf86ModesEqual, + (void *) &xf86PrintModeline, + (void *) &xf86ModesAdd, + (void *) &xf86CollectOptions, + (void *) &xf86RandRInit, + (void *) &xf86GetRotation, + (void *) &xf86RandRSetNewVirtualAndDimensions, + (void *) &VidModeExtensionInit, + (void *) &xf86addNewOption, + (void *) &xf86optionListDup, + (void *) &xf86optionListFree, + (void *) &xf86optionName, + (void *) &xf86optionValue, + (void *) &xf86newOption, + (void *) &xf86nextOption, + (void *) &xf86findOption, + (void *) &xf86findOptionValue, + (void *) &xf86optionListCreate, + (void *) &xf86optionListMerge, + (void *) &xf86nameCompare, + (void *) &xf86uLongToString, + (void *) &xf86parseOption, + (void *) &xf86printOptionList, + (void *) &xf86openConfigFile, + (void *) &xf86setBuiltinConfig, + (void *) &xf86readConfigFile, + (void *) &xf86closeConfigFile, + (void *) &xf86freeConfig, + (void *) &xf86writeConfigFile, + (void *) &xf86findDevice, + (void *) &xf86findLayout, + (void *) &xf86findMonitor, + (void *) &xf86findModes, + (void *) &xf86findModeLine, + (void *) &xf86findScreen, + (void *) &xf86findInput, + (void *) &xf86findInputByDriver, + (void *) &xf86findVideoAdaptor, + (void *) &xf86addListItem, + (void *) &xf86itemNotSublist, + (void *) &xf86pathIsAbsolute, + (void *) &xf86pathIsSafe, + (void *) &xf86addComment, + (void *) &xf86ModeHSync, + (void *) &xf86ModeVRefresh, + (void *) &xf86ModeBandwidth, + (void *) &xf86ModeWidth, + (void *) &xf86ModeHeight, + (void *) &xf86DuplicateMode, + (void *) &xf86DuplicateModes, + (void *) &xf86SetModeDefaultName, + (void *) &xf86SetModeCrtc, + (void *) &xf86ModesEqual, + (void *) &xf86PrintModeline, + (void *) &xf86ModesAdd, + (void *) &xf86DDCGetModes, + (void *) &xf86CVTMode, + (void *) &xf86GTFMode, + (void *) &xf86ModeIsReduced, + (void *) &xf86ValidateModesFlags, + (void *) &xf86ValidateModesClocks, + (void *) &xf86ValidateModesSize, + (void *) &xf86ValidateModesSync, + (void *) &xf86ValidateModesBandwidth, + (void *) &xf86ValidateModesReducedBlanking, + (void *) &xf86PruneInvalidModes, + (void *) &xf86ValidateModesFlags, + (void *) &xf86ValidateModesUserConfig, + (void *) &xf86GetMonitorModes, + (void *) &xf86GetDefaultModes, + (void *) &xf86DDCApplyQuirks, + (void *) &miDCInitialize, + (void *) &miPointerInitialize, + (void *) &miPointerWarpCursor, + (void *) &miPointerCurrentScreen, + (void *) &miPointerGetScreen, + (void *) &miPointerSetScreen, + (void *) &miPointerGetPosition, + (void *) &miPointerSetPosition, + (void *) &miPointerUpdateSprite, + (void *) &miPointerScreenKey, + (void *) &xf86InitCursor, + (void *) &xf86CreateCursorInfoRec, + (void *) &xf86DestroyCursorInfoRec, + (void *) &xf86ForceHWCursor, + (void *) &xf86CrtcConfigPrivateIndex, + (void *) &xf86CrtcConfigInit, + (void *) &xf86CrtcSetSizeRange, + (void *) &xf86CrtcCreate, + (void *) &xf86CrtcDestroy, + (void *) &xf86CrtcSetModeTransform, + (void *) &xf86CrtcSetMode, + (void *) &xf86CrtcSetOrigin, + (void *) &xf86CrtcRotate, + (void *) &xf86RotateDestroy, + (void *) &xf86RotateFreeShadow, + (void *) &xf86RotateCloseScreen, + (void *) &xf86CrtcInUse, + (void *) &xf86OutputCreate, + (void *) &xf86OutputUseScreenMonitor, + (void *) &xf86OutputRename, + (void *) &xf86OutputDestroy, + (void *) &xf86ProbeOutputModes, + (void *) &xf86SetScrnInfoModes, + (void *) &xf86CrtcScreenInit, + (void *) &xf86InitialConfiguration, + (void *) &xf86DPMSSet, + (void *) &xf86SaveScreen, + (void *) &xf86DisableUnusedFunctions, + (void *) &xf86OutputFindClosestMode, + (void *) &xf86SetSingleMode, + (void *) &xf86OutputSetEDID, + (void *) &xf86OutputGetEDIDModes, + (void *) &xf86OutputGetEDID, + (void *) &xf86DiDGAInit, + (void *) &xf86DiDGAReInit, + (void *) &xf86CrtcSetScreenSubpixelOrder, + (void *) &xf86ConnectorGetName, + (void *) &xf86SetDesiredModes, + (void *) &xf86_cursors_init, + (void *) &xf86_reload_cursors, + (void *) &xf86_show_cursors, + (void *) &xf86_hide_cursors, + (void *) &xf86_cursors_fini, + (void *) &xf86_crtc_clip_video_helper, + (void *) &xf86_wrap_crtc_notify, + (void *) &xf86_unwrap_crtc_notify, + (void *) &xf86_crtc_notify, + (void *) &xf86_crtc_supports_gamma, + (void *) &xf86RandR12CreateScreenResources, + (void *) &xf86RandR12Init, + (void *) &xf86RandR12SetRotations, + (void *) &xf86RandR12SetTransformSupport, + (void *) &xf86RandR12SetConfig, + (void *) &xf86RandR12GetRotation, + (void *) &xf86RandR12GetOriginalVirtualSize, + (void *) &xf86RandR12PreInit, + (void *) &xf86RandR12TellChanged, + (void *) &xf86DoEDID_DDC1, + (void *) &xf86DoEDID_DDC2, + (void *) &xf86DoEEDID, + (void *) &xf86PrintEDID, + (void *) &xf86InterpretEDID, + (void *) &xf86InterpretEEDID, + (void *) &xf86EdidMonitorSet, + (void *) &xf86SetDDCproperties, + (void *) &xf86DDCGetModes, + (void *) &xf86MonitorIsHDMI, + (void *) &xf86DoDisplayID, + (void *) &xf86DisplayIDMonitorSet, + (void *) &FindDMTMode, + (void *) &DMTModes, + (void *) &xf86ConfigFile, + (void *) &xf86AllowMouseOpenFail, + (void *) &xf86VidModeDisabled, + (void *) &xf86VidModeAllowNonLocal, + (void *) &xf86fpFlag, + (void *) &xf86sFlag, + (void *) &xf86bsEnableFlag, + (void *) &xf86bsDisableFlag, + (void *) &xf86silkenMouseDisableFlag, + (void *) &xf86xkbdirFlag, + (void *) &xf86LayoutName, + (void *) &xf86ScreenName, + (void *) &xf86PointerName, + (void *) &xf86KeyboardName, + (void *) &xf86FbBpp, + (void *) &xf86Depth, + (void *) &xf86Pix24, + (void *) &xf86Weight, + (void *) &xf86FlipPixels, + (void *) &xf86Gamma, + (void *) &xf86ServerName, + (void *) &xf86IsolateDevice, + (void *) &xf86Info, + (void *) &xf86ModulePath, + (void *) &xf86ModPathFrom, + (void *) &xf86LogFile, + (void *) &xf86LogFileFrom, + (void *) &xf86LogFileWasOpened, + (void *) &xf86ConfigLayout, + (void *) &xf86DriverList, + (void *) &xf86NumDrivers, + (void *) &xf86Resetting, + (void *) &xf86Initialising, + (void *) &xf86NumScreens, + (void *) &xf86VisualNames, + (void *) &xf86Verbose, + (void *) &xf86LogVerbose, + (void *) &xorgHWAccess, + (void *) &xf86RegisteredPropertiesTable, + (void *) &xf86BusProbe, + (void *) &xf86AccessInit, + (void *) &xf86AccessEnter, + (void *) &xf86AccessLeave, + (void *) &xf86EntityInit, + (void *) &xf86FindPrimaryDevice, + (void *) &xf86PostProbe, + (void *) &xf86ClearEntityListForScreen, + (void *) &xf86AddDevToEntity, + (void *) &xf86PostScreenInit, + (void *) &xf86PathIsSafe, + (void *) &xf86DefaultModes, + (void *) &xf86NumDefaultModes, + (void *) &DoConfigure, + (void *) &DoShowOptions, + (void *) &xf86Wakeup, + (void *) &xf86SigWrapper, + (void *) &xf86HandlePMEvents, + (void *) &xf86PMGetEventFromOs, + (void *) &xf86PMConfirmEventToOs, + (void *) &xf86LogInit, + (void *) &xf86CloseLog, + (void *) &xf86LoadModules, + (void *) &xf86SetVerbosity, + (void *) &xf86SetLogVerbosity, + (void *) &xf86CallDriverProbe, + (void *) &xf86Events, + (void *) &xf86HandleColormaps, + (void *) &xf86ChangeGamma, + (void *) &xf86ChangeGammaRamp, + (void *) &xf86GetGammaRampSize, + (void *) &xf86GetGammaRamp, + (void *) &xf86RegisterOffscreenManager, + (void *) &xf86InitFBManagerRegion, + (void *) &xf86InitFBManagerArea, + (void *) &xf86InitFBManager, + (void *) &xf86InitFBManagerLinear, + (void *) &xf86FBManagerRunning, + (void *) &xf86AllocateOffscreenArea, + (void *) &xf86AllocateLinearOffscreenArea, + (void *) &xf86AllocateOffscreenLinear, + (void *) &xf86FreeOffscreenArea, + (void *) &xf86FreeOffscreenLinear, + (void *) &xf86ResizeOffscreenArea, + (void *) &xf86ResizeOffscreenLinear, + (void *) &xf86RegisterFreeBoxCallback, + (void *) &xf86PurgeUnlockedOffscreenAreas, + (void *) &xf86QueryLargestOffscreenArea, + (void *) &xf86QueryLargestOffscreenLinear, + (void *) &inputInfo, + (void *) &CloseInputDevice, + (void *) &AddOtherInputDevices, + (void *) &OpenInputDevice, + (void *) &SetDeviceMode, + (void *) &SetDeviceValuators, + (void *) &ChangeDeviceControl, + (void *) &xf86InputDevs, + (void *) &xf86PostMotionEvent, + (void *) &xf86PostMotionEventP, + (void *) &xf86PostProximityEvent, + (void *) &xf86PostProximityEventP, + (void *) &xf86PostButtonEvent, + (void *) &xf86PostButtonEventP, + (void *) &xf86PostKeyEvent, + (void *) &xf86PostKeyEventP, + (void *) &xf86PostKeyboardEvent, + (void *) &xf86ActivateDevice, + (void *) &xf86FirstLocalDevice, + (void *) &xf86ScaleAxis, + (void *) &xf86XInputSetScreen, + (void *) &xf86ProcessCommonOptions, + (void *) &xf86InitValuatorAxisStruct, + (void *) &xf86InitValuatorDefaults, + (void *) &xf86AddEnabledDevice, + (void *) &xf86RemoveEnabledDevice, + (void *) &xf86DisableDevice, + (void *) &xf86EnableDevice, + (void *) &xf86AddInputDriver, + (void *) &xf86DeleteInputDriver, + (void *) &xf86AllocateInput, + (void *) &xf86LookupInputDriver, + (void *) &xf86LookupInput, + (void *) &xf86DeleteInput, + (void *) &xf86MotionHistoryAllocate, + (void *) &xf86CollectInputOptions, + (void *) &xf86VGAarbiterInit, + (void *) &xf86VGAarbiterFini, + (void *) &xf86VGAarbiterWrapFunctions, + (void *) &xf86VGAarbiterLock, + (void *) &xf86VGAarbiterUnlock, + (void *) &xf86VGAarbiterDeviceDecodes, + (void *) &xf86VGAarbiterAllowDRI, + (void *) &XisbNew, + (void *) &XisbFree, + (void *) &XisbRead, + (void *) &XisbWrite, + (void *) &XisbTrace, + (void *) &XisbBlockDuration, + (void *) &xf86XVScreenInit, + (void *) &xf86XVRegisterGenericAdaptorDriver, + (void *) &xf86XVListGenericAdaptors, + (void *) &xf86XVRegisterOffscreenImages, + (void *) &xf86XVQueryOffscreenImages, + (void *) &xf86XVAllocateVideoAdaptorRec, + (void *) &xf86XVFreeVideoAdaptorRec, + (void *) &xf86XVFillKeyHelper, + (void *) &xf86XVFillKeyHelperDrawable, + (void *) &xf86XVClipVideoHelper, + (void *) &xf86XVCopyYUV12ToPacked, + (void *) &xf86XVCopyPacked, + (void *) &XvGetScreenKeyProc, + (void *) &XvGetRTPortProc, + (void *) &XvScreenInitProc, + (void *) &xf86XvMCScreenInit, + (void *) &xf86XvMCCreateAdaptorRec, + (void *) &xf86XvMCDestroyAdaptorRec, + (void *) &XvMCScreenInitProc, + (void *) &XF86XvScreenKey, + (void *) &RamDacHWPrivateIndex, + (void *) &RamDacScreenPrivateIndex, + (void *) &RamDacCreateInfoRec, + (void *) &RamDacHelperCreateInfoRec, + (void *) &RamDacDestroyInfoRec, + (void *) &RamDacHelperDestroyInfoRec, + (void *) &RamDacInit, + (void *) &RamDacHandleColormaps, + (void *) &RamDacFreeRec, + (void *) &RamDacGetHWIndex, + (void *) &BTramdacProbe, + (void *) &BTramdacSave, + (void *) &BTramdacRestore, + (void *) &BTramdacSetBpp, + (void *) &IBMramdacProbe, + (void *) &IBMramdacSave, + (void *) &IBMramdacRestore, + (void *) &IBMramdac526SetBpp, + (void *) &IBMramdac640SetBpp, + (void *) &IBMramdac526CalculateMNPCForClock, + (void *) &IBMramdac640CalculateMNPCForClock, + (void *) &IBMramdac526HWCursorInit, + (void *) &IBMramdac640HWCursorInit, + (void *) &IBMramdac526SetBppWeak, + (void *) &TIramdacCalculateMNPForClock, + (void *) &TIramdacProbe, + (void *) &TIramdacSave, + (void *) &TIramdacRestore, + (void *) &TIramdac3026SetBpp, + (void *) &TIramdac3030SetBpp, + (void *) &TIramdacHWCursorInit, + (void *) &TIramdacLoadPalette, + (void *) &TIramdacLoadPaletteWeak, + (void *) &xf86LinearVidMem, + (void *) &xf86CheckMTRR, + (void *) &xf86MapVidMem, + (void *) &xf86UnMapVidMem, + (void *) &xf86MapReadSideEffects, + (void *) &xf86ReadBIOS, + (void *) &xf86EnableIO, + (void *) &xf86DisableIO, + (void *) &xf86OSRingBell, + (void *) &xf86SetReallySlowBcopy, + (void *) &xf86SlowBcopy, + (void *) &xf86OpenSerial, + (void *) &xf86SetSerial, + (void *) &xf86SetSerialSpeed, + (void *) &xf86ReadSerial, + (void *) &xf86WriteSerial, + (void *) &xf86CloseSerial, + (void *) &xf86FlushInput, + (void *) &xf86WaitForInput, + (void *) &xf86SerialSendBreak, + (void *) &xf86SetSerialModemState, + (void *) &xf86GetSerialModemState, + (void *) &xf86SerialModemSetBits, + (void *) &xf86SerialModemClearBits, + (void *) &xf86LoadKernelModule, + (void *) &xf86AgpGARTSupported, + (void *) &xf86GetAGPInfo, + (void *) &xf86AcquireGART, + (void *) &xf86ReleaseGART, + (void *) &xf86AllocateGARTMemory, + (void *) &xf86DeallocateGARTMemory, + (void *) &xf86BindGARTMemory, + (void *) &xf86UnbindGARTMemory, + (void *) &xf86EnableAGP, + (void *) &xf86GARTCloseScreen, + (void *) &xf86InstallSIGIOHandler, + (void *) &xf86RemoveSIGIOHandler, + (void *) &xf86BlockSIGIO, + (void *) &xf86UnblockSIGIO, + (void *) &xf86AssertBlockedSIGIO, + (void *) &xf86SIGIOSupported, + (void *) &miInitializeBanking, + (void *) &miScanLineWidth, + (void *) &miInstalledMaps, + (void *) &miListInstalledColormaps, + (void *) &miInstallColormap, + (void *) &miUninstallColormap, + (void *) &miResolveColor, + (void *) &miInitializeColormap, + (void *) &miExpandDirectColors, + (void *) &miCreateDefColormap, + (void *) &miClearVisualTypes, + (void *) &miSetVisualTypes, + (void *) &miSetPixmapDepths, + (void *) &miSetVisualTypesAndMasks, + (void *) &miGetDefaultVisualMask, + (void *) &miInitVisuals, + (void *) &miSetZeroLineBias, + (void *) &miZeroLineScreenKey, + (void *) &miZeroClipLine, + (void *) &miPolyArc, + (void *) &miCopyArea, + (void *) &miCopyPlane, + (void *) &miGetImage, + (void *) &miPutImage, + (void *) &miCopyRegion, + (void *) &miDoCopy, + (void *) &miRecolorCursor, + (void *) &miStepDash, + (void *) &mieqInit, + (void *) &mieqResizeEvents, + (void *) &mieqEnqueue, + (void *) &mieqSwitchScreen, + (void *) &mieqProcessDeviceEvent, + (void *) &mieqProcessInputEvents, + (void *) &CopyGetMasterEvent, + (void *) &miHandleExposures, + (void *) &miSendGraphicsExpose, + (void *) &miSendExposures, + (void *) &miWindowExposures, + (void *) &miPaintWindow, + (void *) &miClearDrawable, + (void *) &miPolyFillRect, + (void *) &miPolyGlyphBlt, + (void *) &miImageGlyphBlt, + (void *) &miFillPolygon, + (void *) &miFillConvexPoly, + (void *) &miFillGeneralPoly, + (void *) &miPolyPoint, + (void *) &miPolyRectangle, + (void *) &miPolySegment, + (void *) &miPolyText8, + (void *) &miPolyText16, + (void *) &miImageText8, + (void *) &miImageText16, + (void *) &miPushPixels, + (void *) &miRectAlloc, + (void *) &miRegionBroken, + (void *) &miModifyPixmapHeader, + (void *) &miCreateScreenResources, + (void *) &miScreenDevPrivateInit, + (void *) &miScreenInit, + (void *) &miAllocateGCPrivateIndex, + (void *) &miShapedWindowIn, + (void *) &miRegisterRedirectBorderClipProc, + (void *) &miValidateTree, + (void *) &miWideLine, + (void *) &miWideDash, + (void *) &miClearToBackground, + (void *) &miMarkWindow, + (void *) &miMarkOverlappedWindows, + (void *) &miHandleValidateExposures, + (void *) &miMoveWindow, + (void *) &miSlideAndSizeWindow, + (void *) &miGetLayerWindow, + (void *) &miSetShape, + (void *) &miChangeBorderWidth, + (void *) &miMarkUnrealizedWindow, + (void *) &miSegregateChildren, + (void *) &miZeroPolyArc, + (void *) &miZeroLine, + (void *) &miZeroDashLine, + (void *) &miPolyFillArc, + (void *) &miInitializeBackingStore, + (void *) &miChangeGC, + (void *) &miDestroyGC, + (void *) &miDestroyClip, + (void *) &miChangeClip, + (void *) &miCopyClip, + (void *) &miCopyGC, + (void *) &miComputeCompositeClip, + (void *) &miZeroArcSetup, + (void *) &miFillArcSetup, + (void *) &miFillArcSliceSetup, + (void *) &miInitSpanGroup, + (void *) &miAppendSpans, + (void *) &miFillUniqueSpanGroup, + (void *) &miFreeSpanGroup, + (void *) &miClipSpans, + (void *) &miFillSppPoly, + (void *) &miRoundJoinClip, + (void *) &miRoundCapClip, + (void *) &miPolyBuildEdge, + (void *) &miPolyBuildPoly, + (void *) &miInitOverlay, + (void *) &miOverlayGetPrivateClips, + (void *) &miOverlayCollectUnderlayRegions, + (void *) &miOverlayComputeCompositeClip, + (void *) &miOverlayCopyUnderlay, + (void *) &miOverlaySetTransFunction, + (void *) &miOverlaySetRootClip, + (void *) &RegionResType, + (void *) &XFixesErrorBase, + (void *) &XFixesRegionCopy, + (void *) &config_init, + (void *) &config_fini, + (void *) &SetCriticalEvent, + (void *) &GetSpriteCursor, + (void *) &ProcAllowEvents, + (void *) &MaybeDeliverEventsToClient, + (void *) &ProcWarpPointer, + (void *) &EventSelectForWindow, + (void *) &EventSuppressForWindow, + (void *) &ProcSetInputFocus, + (void *) &ProcGetInputFocus, + (void *) &ProcGrabPointer, + (void *) &ProcChangeActivePointerGrab, + (void *) &ProcUngrabPointer, + (void *) &ProcGrabKeyboard, + (void *) &ProcUngrabKeyboard, + (void *) &ProcQueryPointer, + (void *) &ProcSendEvent, + (void *) &ProcUngrabKey, + (void *) &ProcGrabKey, + (void *) &ProcGrabButton, + (void *) &ProcUngrabButton, + (void *) &ProcRecolorCursor, + (void *) &PostSyntheticMotion, + (void *) &SetDefaultFont, + (void *) &QueueFontWakeup, + (void *) &RemoveFontWakeup, + (void *) &FontWakeup, + (void *) &OpenFont, + (void *) &CloseFont, + (void *) &QueryFont, + (void *) &ListFonts, + (void *) &doListFontsWithInfo, + (void *) &doPolyText, + (void *) &PolyText, + (void *) &doImageText, + (void *) &ImageText, + (void *) &SetFontPath, + (void *) &SetDefaultFontPath, + (void *) &GetFontPath, + (void *) &DeleteClientFontStuff, + (void *) &InitFonts, + (void *) &FreeFonts, + (void *) &find_old_font, + (void *) &GetGlyphs, + (void *) &QueryGlyphExtents, + (void *) &QueryTextExtents, + (void *) &ParseGlyphCachingMode, + (void *) &InitGlyphCaching, + (void *) &SetGlyphCachingMode, + (void *) &BuiltinRegisterFpeFunctions, + (void *) &client_auth_generation, + (void *) &DeleteFontClientID, + (void *) &GetClientResolutions, + (void *) &GetDefaultPointSize, + (void *) &GetNewFontClientID, + (void *) &init_fs_handlers, + (void *) &RegisterFPEFunctions, + (void *) &remove_fs_handlers, + (void *) &StoreFontClientFont, + (void *) &CreateGrab, + (void *) &DeletePassiveGrab, + (void *) &GrabMatchesSecond, + (void *) &AddPassiveGrabToList, + (void *) &DeletePassiveGrabFromList, + (void *) &InitProximityClassDeviceStruct, + (void *) &InitValuatorAxisStruct, + (void *) &XIDeleteAllDeviceProperties, + (void *) &XIDeleteDeviceProperty, + (void *) &XIChangeDeviceProperty, + (void *) &XIGetDeviceProperty, + (void *) &XISetDevicePropertyDeletable, + (void *) &XIRegisterPropertyHandler, + (void *) &XIUnregisterPropertyHandler, + (void *) &XIGetKnownProperty, + (void *) &XIGetDevice, + (void *) &XIPropToInt, + (void *) &XIPropToFloat, + (void *) &RegisterOtherDevice, + (void *) &UpdateDeviceState, + (void *) &ProcessOtherEvent, + (void *) &DeviceFocusEvent, + (void *) &CheckGrabValues, + (void *) &GrabButton, + (void *) &GrabKey, + (void *) &GrabWindow, + (void *) &SelectForWindow, + (void *) &AddExtensionClient, + (void *) &RecalculateDeviceDeliverableEvents, + (void *) &InputClientGone, + (void *) &SendEvent, + (void *) &SetButtonMapping, + (void *) &ChangeKeyMapping, + (void *) &DeleteWindowFromAnyExtEvents, + (void *) &MaybeSendDeviceMotionNotifyHint, + (void *) &CheckDeviceGrabAndHintWindow, + (void *) &MaybeStopDeviceHint, + (void *) &DeviceEventSuppressForWindow, + (void *) &SendEventToAllWindows, + (void *) &XI2EventSwap, + (void *) &XIShouldNotify, + (void *) &XISendDeviceChangedEvent, + (void *) &XISetEventMask, + (void *) &XICheckInvalidMaskBits, + (void *) &XInputExtensionInit, + (void *) &AssignTypeAndName, + (void *) &InitVelocityData, + (void *) &InitTrackers, + (void *) &ProcessVelocityData2D, + (void *) &BasicComputeAcceleration, + (void *) &FreeVelocityData, + (void *) &InitializePredictableAccelerationProperties, + (void *) &SetAccelerationProfile, + (void *) &GetDevicePredictableAccelData, + (void *) &SetDeviceSpecificAccelerationProfile, + (void *) &AccelerationDefaultCleanup, + (void *) &acceleratePointerPredictable, + (void *) &acceleratePointerLightweight, + (void *) &RegisterResourceName, + (void *) &RegisterExtensionNames, + (void *) &LookupMajorName, + (void *) &LookupRequestName, + (void *) &LookupEventName, + (void *) &LookupErrorName, + (void *) &LookupResourceName, + (void *) &dixResetRegistry, + (void *) &dixLookupSelection, + (void *) &CurrentSelections, + (void *) &SelectionCallback, + (void *) &InitSelections, + (void *) &DeleteWindowFromAnySelections, + (void *) &DeleteClientFromAnySelections, + (void *) &Swap32Write, + (void *) &CopySwap32Write, + (void *) &CopySwap16Write, + (void *) &SGenericReply, + (void *) &SGetWindowAttributesReply, + (void *) &SGetGeometryReply, + (void *) &SQueryTreeReply, + (void *) &SInternAtomReply, + (void *) &SGetAtomNameReply, + (void *) &SGetPropertyReply, + (void *) &SListPropertiesReply, + (void *) &SGetSelectionOwnerReply, + (void *) &SQueryPointerReply, + (void *) &SwapTimeCoordWrite, + (void *) &SGetMotionEventsReply, + (void *) &STranslateCoordsReply, + (void *) &SGetInputFocusReply, + (void *) &SQueryKeymapReply, + (void *) &SQueryFontReply, + (void *) &SQueryTextExtentsReply, + (void *) &SListFontsReply, + (void *) &SListFontsWithInfoReply, + (void *) &SGetFontPathReply, + (void *) &SGetImageReply, + (void *) &SListInstalledColormapsReply, + (void *) &SAllocColorReply, + (void *) &SAllocNamedColorReply, + (void *) &SAllocColorCellsReply, + (void *) &SAllocColorPlanesReply, + (void *) &SQColorsExtend, + (void *) &SQueryColorsReply, + (void *) &SLookupColorReply, + (void *) &SQueryBestSizeReply, + (void *) &SListExtensionsReply, + (void *) &SGetKeyboardMappingReply, + (void *) &SGetPointerMappingReply, + (void *) &SGetModifierMappingReply, + (void *) &SGetKeyboardControlReply, + (void *) &SGetPointerControlReply, + (void *) &SGetScreenSaverReply, + (void *) &SLHostsExtend, + (void *) &SListHostsReply, + (void *) &SErrorEvent, + (void *) &SwapConnSetupInfo, + (void *) &WriteSConnectionInfo, + (void *) &SwapConnSetupPrefix, + (void *) &WriteSConnSetupPrefix, + (void *) &SCirculateEvent, + (void *) &SClientMessageEvent, + (void *) &SColormapEvent, + (void *) &SConfigureNotifyEvent, + (void *) &SConfigureRequestEvent, + (void *) &SCreateNotifyEvent, + (void *) &SDestroyNotifyEvent, + (void *) &SEnterLeaveEvent, + (void *) &SExposeEvent, + (void *) &SFocusEvent, + (void *) &SGraphicsExposureEvent, + (void *) &SGravityEvent, + (void *) &SKeyButtonPtrEvent, + (void *) &SKeymapNotifyEvent, + (void *) &SMapNotifyEvent, + (void *) &SMapRequestEvent, + (void *) &SMappingEvent, + (void *) &SNoExposureEvent, + (void *) &SPropertyEvent, + (void *) &SReparentEvent, + (void *) &SResizeRequestEvent, + (void *) &SSelectionClearEvent, + (void *) &SSelectionNotifyEvent, + (void *) &SSelectionRequestEvent, + (void *) &SUnmapNotifyEvent, + (void *) &SVisibilityEvent, + (void *) &SwapColorItem, + (void *) &SwapConnClientPrefix, + (void *) &SProcAllocColor, + (void *) &SProcAllocColorCells, + (void *) &SProcAllocColorPlanes, + (void *) &SProcAllocNamedColor, + (void *) &SProcChangeActivePointerGrab, + (void *) &SProcChangeGC, + (void *) &SProcChangeHosts, + (void *) &SProcChangeKeyboardControl, + (void *) &SProcChangeKeyboardMapping, + (void *) &SProcChangePointerControl, + (void *) &SProcChangeProperty, + (void *) &SProcChangeWindowAttributes, + (void *) &SProcClearToBackground, + (void *) &SProcConfigureWindow, + (void *) &SProcConvertSelection, + (void *) &SProcCopyArea, + (void *) &SProcCopyColormapAndFree, + (void *) &SProcCopyGC, + (void *) &SProcCopyPlane, + (void *) &SProcCreateColormap, + (void *) &SProcCreateCursor, + (void *) &SProcCreateGC, + (void *) &SProcCreateGlyphCursor, + (void *) &SProcCreatePixmap, + (void *) &SProcCreateWindow, + (void *) &SProcDeleteProperty, + (void *) &SProcFillPoly, + (void *) &SProcFreeColors, + (void *) &SProcGetImage, + (void *) &SProcGetMotionEvents, + (void *) &SProcGetProperty, + (void *) &SProcGrabButton, + (void *) &SProcGrabKey, + (void *) &SProcGrabKeyboard, + (void *) &SProcGrabPointer, + (void *) &SProcImageText, + (void *) &SProcInternAtom, + (void *) &SProcListFonts, + (void *) &SProcListFontsWithInfo, + (void *) &SProcLookupColor, + (void *) &SProcNoOperation, + (void *) &SProcOpenFont, + (void *) &SProcPoly, + (void *) &SProcPolyText, + (void *) &SProcPutImage, + (void *) &SProcQueryBestSize, + (void *) &SProcQueryColors, + (void *) &SProcQueryExtension, + (void *) &SProcRecolorCursor, + (void *) &SProcReparentWindow, + (void *) &SProcResourceReq, + (void *) &SProcRotateProperties, + (void *) &SProcSendEvent, + (void *) &SProcSetClipRectangles, + (void *) &SProcSetDashes, + (void *) &SProcSetFontPath, + (void *) &SProcSetInputFocus, + (void *) &SProcSetScreenSaver, + (void *) &SProcSetSelectionOwner, + (void *) &SProcSimpleReq, + (void *) &SProcStoreColors, + (void *) &SProcStoreNamedColor, + (void *) &SProcTranslateCoords, + (void *) &SProcUngrabButton, + (void *) &SProcUngrabKey, + (void *) &SProcWarpPointer, + (void *) &XaceHooks, + (void *) &XaceHook, + (void *) &XaceHookDispatch, + (void *) &XaceHookPropertyAccess, + (void *) &XaceHookSelectionAccess, + (void *) &XaceHookAuditEnd, + (void *) &XaceGetConnectionNumber, + (void *) &XaceIsLocal, + (void *) &XaceCensorImage, + (void *) &XkbIndentText, + (void *) &XkbAtomText, + (void *) &XkbKeysymText, + (void *) &XkbStringText, + (void *) &XkbKeyNameText, + (void *) &XkbModIndexText, + (void *) &XkbModMaskText, + (void *) &XkbVModIndexText, + (void *) &XkbVModMaskText, + (void *) &XkbConfigText, + (void *) &XkbSIMatchText, + (void *) &XkbIMWhichStateMaskText, + (void *) &XkbControlsMaskText, + (void *) &XkbGeomFPText, + (void *) &XkbDoodadTypeText, + (void *) &XkbActionTypeText, + (void *) &XkbActionText, + (void *) &XkbBehaviorText, + (void *) &_XkbKSCheckCase, + (void *) &XkbFindKeycodeByName, + (void *) &XkbInternAtom, + (void *) &XkbConvertGetByNameComponents, + (void *) &XkbNameMatchesPattern, + (void *) &XkbWriteXKBKeycodes, + (void *) &XkbWriteXKBKeyTypes, + (void *) &XkbWriteXKBCompatMap, + (void *) &XkbWriteXKBSymbols, + (void *) &XkbWriteXKBGeometry, + (void *) &XkbWriteXKBKeymapForNames, + (void *) &XkmProbe, + (void *) &XkmReadFile, + (void *) &xkbDevicePrivateKey, + (void *) &xkbUnwrapProc, + (void *) &XkbReqCode, + (void *) &XkbEventBase, + (void *) &XkbKeyboardErrorCode, + (void *) &XkbBaseDirectory, + (void *) &XkbBinDirectory, + (void *) &xkbDebugFlags, + (void *) &DeviceKeyPress, + (void *) &DeviceButtonPress, + (void *) &XkbUseMsg, + (void *) &XkbProcessArguments, + (void *) &XkbSetExtension, + (void *) &SrvXkbFreeCompatMap, + (void *) &SrvXkbFreeNames, + (void *) &_XkbLookupAnyDevice, + (void *) &_XkbLookupKeyboard, + (void *) &_XkbLookupBellDevice, + (void *) &_XkbLookupLedDevice, + (void *) &_XkbLookupButtonDevice, + (void *) &SrvXkbAllocKeyboard, + (void *) &SrvXkbAllocClientMap, + (void *) &SrvXkbAllocServerMap, + (void *) &SrvXkbFreeClientMap, + (void *) &SrvXkbFreeServerMap, + (void *) &SrvXkbAllocIndicatorMaps, + (void *) &SrvXkbAllocCompatMap, + (void *) &SrvXkbAllocNames, + (void *) &SrvXkbAllocControls, + (void *) &SrvXkbCopyKeyTypes, + (void *) &SrvXkbResizeKeyType, + (void *) &SrvXkbFreeKeyboard, + (void *) &XkbSetActionKeyMods, + (void *) &XkbMaskForVMask, + (void *) &SrvXkbVirtualModsToReal, + (void *) &XkbAdjustGroup, + (void *) &SrvXkbResizeKeySyms, + (void *) &SrvXkbResizeKeyActions, + (void *) &XkbUpdateKeyTypesFromCore, + (void *) &XkbUpdateDescActions, + (void *) &XkbUpdateActions, + (void *) &XkbGetCoreMap, + (void *) &XkbApplyMappingChange, + (void *) &XkbSetIndicators, + (void *) &XkbUpdateIndicators, + (void *) &XkbAllocSrvLedInfo, + (void *) &XkbCopySrvLedInfo, + (void *) &XkbFindSrvLedInfo, + (void *) &XkbApplyLedNameChanges, + (void *) &XkbApplyLedMapChanges, + (void *) &XkbApplyLedStateChanges, + (void *) &XkbFlushLedEvents, + (void *) &XkbIndicatorsToUpdate, + (void *) &XkbComputeDerivedState, + (void *) &XkbCheckSecondaryEffects, + (void *) &XkbCheckIndicatorMaps, + (void *) &XkbStateChangedFlags, + (void *) &XkbSendStateNotify, + (void *) &XkbSendMapNotify, + (void *) &XkbComputeControlsNotify, + (void *) &XkbSendControlsNotify, + (void *) &XkbSendCompatMapNotify, + (void *) &XkbHandleBell, + (void *) &XkbSendAccessXNotify, + (void *) &XkbSendNamesNotify, + (void *) &XkbSendActionMessage, + (void *) &XkbSendExtensionDeviceNotify, + (void *) &XkbSendNotification, + (void *) &XkbProcessKeyboardEvent, + (void *) &XkbHandleActions, + (void *) &XkbEnableDisableControls, + (void *) &AccessXInit, + (void *) &AccessXFilterPressEvent, + (void *) &AccessXFilterReleaseEvent, + (void *) &AccessXCancelRepeatKey, + (void *) &AccessXComputeCurveFactor, + (void *) &XkbFindClientResource, + (void *) &XkbAddClientResource, + (void *) &XkbRemoveResourceClient, + (void *) &XkbDDXAccessXBeep, + (void *) &XkbDDXUsesSoftRepeat, + (void *) &XkbDDXKeybdCtrlProc, + (void *) &XkbDDXChangeControls, + (void *) &XkbDDXUpdateDeviceIndicators, + (void *) &XkbDDXFakePointerMotion, + (void *) &XkbDDXFakeDeviceButton, + (void *) &XkbDDXTerminateServer, + (void *) &XkbDDXSwitchScreen, + (void *) &XkbDDXPrivate, + (void *) &XkbDisableComputedAutoRepeats, + (void *) &XkbSetRepeatKeys, + (void *) &SrvXkbLatchModifiers, + (void *) &SrvXkbLatchGroup, + (void *) &XkbClearAllLatchesAndLocks, + (void *) &XkbGetRulesDflts, + (void *) &XkbFreeRMLVOSet, + (void *) &XkbSetRulesDflts, + (void *) &XkbDeleteRulesDflts, + (void *) &SProcXkbDispatch, + (void *) &XkbLookupNamedGeometry, + (void *) &_XkbDupString, + (void *) &XkbConvertCase, + (void *) &SrvXkbChangeKeycodeRange, + (void *) &XkbFreeSrvLedInfo, + (void *) &XkbFreeInfo, + (void *) &SrvXkbChangeTypesOfKey, + (void *) &SrvXkbKeyTypesForCoreSymbols, + (void *) &SrvXkbApplyCompatMapToKey, + (void *) &SrvXkbApplyVirtualModChanges, + (void *) &XkbSendNewKeyboardNotify, + (void *) &XkbCopyKeymap, + (void *) &XkbCopyDeviceKeymap, + (void *) &XkbFilterEvents, + (void *) &XkbDDXList, + (void *) &XkbDDXLoadKeymapByNames, + (void *) &XkbDDXNamesFromRules, + (void *) &XkbCompileKeymap, +}; diff --git a/xorg-server/hw/xfree86/loader/sdksyms.sh b/xorg-server/hw/xfree86/loader/sdksyms.sh new file mode 100644 index 000000000..11865472f --- /dev/null +++ b/xorg-server/hw/xfree86/loader/sdksyms.sh @@ -0,0 +1,418 @@ +#!/bin/sh + +cat > sdksyms.c << EOF +/* This file is automatically generated by sdksyms.sh. */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + + +/* These must be included first */ +#include "misc.h" +#include "miscstruct.h" + + +/* render/Makefile.am */ +#include "picture.h" +#include "mipict.h" +#include "glyphstr.h" +#include "picturestr.h" +#include "renderedge.h" + + +/* fb/Makefile.am -- module */ +/* +#include "fb.h" +#include "fbrop.h" +#include "fboverlay.h" +#include "wfbrename.h" +#include "fbpict.h" + */ + + +/* miext/shadow/Makefile.am -- module */ +/* +#include "shadow.h" + */ + + +/* miext/damage/Makefile.am */ +#include "damage.h" +#include "damagestr.h" + + +/* Xext/Makefile.am -- half is module, half is builtin */ +/* +#include "xvdix.h" +#include "xvmcext.h" + */ +#include "geext.h" +#include "geint.h" +#include "shmint.h" +#if XINERAMA +# include "panoramiXsrv.h" +# include "panoramiX.h" +#endif + + +/* hw/xfree86/int10/Makefile.am -- module */ +/* +#include "xf86int10.h" + */ + + +/* hw/xfree86/i2c/Makefile.am -- "mostly" modules */ +#include "xf86i2c.h" +/* +#include "bt829.h" +#include "fi1236.h" +#include "msp3430.h" +#include "tda8425.h" +#include "tda9850.h" +#include "tda9885.h" +#include "uda1380.h" +#include "i2c_def.h" + */ + + +/* hw/xfree86/modes/Makefile.am */ +#include "xf86Crtc.h" +#include "xf86Modes.h" +#include "xf86RandR12.h" +/* #include "xf86Rename.h" */ + + +/* hw/xfree86/ddc/Makefile.am */ +#include "edid.h" +#include "xf86DDC.h" + + +/* hw/xfree86/dri2/Makefile.am -- module */ +/* +#if DRI2 +# include "dri2.h" +#endif + */ + + +/* hw/xfree86/vgahw/Makefile.am -- module */ +/* +#include "vgaHW.h" + */ + + +/* hw/xfree86/fbdevhw/Makefile.am -- module */ +/* +#include "fbdevhw.h" + */ + + +/* hw/xfree86/common/Makefile.am */ +#include "compiler.h" +#include "fourcc.h" +#include "xf86.h" +#include "xf86Module.h" +#include "xf86Opt.h" +#include "xf86PciInfo.h" +#include "xf86Priv.h" +#include "xf86Privstr.h" +#include "xf86cmap.h" +#include "xf86fbman.h" +#include "xf86str.h" +#include "xf86Xinput.h" +#include "xf86VGAarbiter.h" +#include "xisb.h" +#if XV +# include "xf86xv.h" +# include "xf86xvmc.h" +# include "xf86xvpriv.h" +#endif +/* XF86VidMode code is in libextmod module */ +/* +#if XF86VIDMODE +# include "vidmodeproc.h" +#endif + */ +#include "xorgVersion.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86sbusBus.h" +#endif + + +/* hw/xfree86/ramdac/Makefile.am */ +#include "BT.h" +#include "IBM.h" +#include "TI.h" +#include "xf86Cursor.h" +#include "xf86RamDac.h" + + +/* hw/xfree86/shadowfb/Makefile.am -- module */ +/* +#include "shadowfb.h" + */ + + +/* hw/xfree86/os-support/solaris/Makefile.am */ +#if defined(sun386) +# include "agpgart.h" +#endif + + +/* hw/xfree86/os-support/Makefile.am */ +#include "xf86_OSproc.h" +#include "xf86_OSlib.h" + + +/* hw/xfree86/os-support/bus/Makefile.am */ +#include "xf86Pci.h" +#if defined(__sparc__) || defined(__sparc) +# include "xf86Sbus.h" +#endif + + +/* hw/xfree86/xaa/Makefile.am -- module */ +/* +#include "xaa.h" +#include "xaalocal.h" +#include "xaarop.h" +#include "xaaWrapper.h" + */ + + +/* hw/xfree86/dixmods/extmod/Makefile.am -- module */ +/* +#include "dgaproc.h" + */ + + +/* hw/xfree86/parser/Makefile.am */ +#include "xf86Parser.h" +#include "xf86Optrec.h" + + +/* hw/xfree86/vbe/Makefile.am -- module */ +/* +#include "vbe.h" +#include "vbeModes.h" + */ + + +/* hw/xfree86/dri/Makefile.am -- module */ +/* +#if XF86DRI +# include "dri.h" +# include "sarea.h" +# include "dristruct.h" +#endif + */ + + +/* hw/xfree86/xf8_16bpp/Makefile.am -- module */ +/* +#include "cfb8_16.h" + */ + + +/* mi/Makefile.am */ +#include "mibank.h" +#include "micmap.h" +#include "miline.h" +#include "mipointer.h" +#include "mi.h" +#include "mibstore.h" +#include "migc.h" +#include "mipointrst.h" +#include "mizerarc.h" +#include "micoord.h" +#include "mifillarc.h" +#include "mispans.h" +#include "miwideline.h" +#include "mistruct.h" +#include "mifpoly.h" +#include "mioverlay.h" + + +/* randr/Makefile.am */ +#include "randrstr.h" +#include "rrtransform.h" + + +/* dbe/Makefile.am -- module */ +/* +#include "dbestruct.h" + */ + + +/* exa/Makefile.am -- module */ +/* +#include "exa.h" + */ + + +/* xfixes/Makefile.am */ +#include "xfixes.h" + + +/* include/Makefile.am */ +#include "XIstubs.h" +#include "bstore.h" +#include "bstorestr.h" +#include "closestr.h" +#include "closure.h" +#include "colormap.h" +#include "colormapst.h" +#include "hotplug.h" +#include "cursor.h" +#include "cursorstr.h" +#include "dix.h" +#include "dixaccess.h" +#include "dixevents.h" +#include "dixfont.h" +#include "dixfontstr.h" +#include "dixgrabs.h" +#include "dixstruct.h" +#include "exevents.h" +#include "extension.h" +#include "extinit.h" +#include "extnsionst.h" +#include "gc.h" +#include "gcstruct.h" +#include "globals.h" +#include "input.h" +#include "inputstr.h" +/* already included */ +/* +#include "misc.h" +#include "miscstruct.h" + */ +#include "opaque.h" +#include "os.h" +#include "pixmap.h" +#include "pixmapstr.h" +#include "privates.h" +#include "property.h" +#include "propertyst.h" +#include "ptrveloc.h" +#include "region.h" +#include "regionstr.h" +#include "registry.h" +#include "resource.h" +#include "rgb.h" +#include "screenint.h" +#include "scrnintstr.h" +#include "selection.h" +#include "servermd.h" +#include "site.h" +#include "swaprep.h" +#include "swapreq.h" +#include "validate.h" +#include "window.h" +#include "windowstr.h" +#include "xace.h" +#include "xkbfile.h" +#include "xkbsrv.h" +#include "xkbstr.h" +#include "xkbrules.h" +#include "xserver-properties.h" + +EOF + +topdir=$1 +shift +LC_ALL=C +export LC_ALL +${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' +BEGIN { + sdk = 0; + print("/*"); + print(" * These symbols are referenced to ensure they"); + print(" * will be available in the X Server binary."); + print(" */"); + printf("/* topdir=%s */\n", topdir); + print("_X_HIDDEN void *xorg_symbols[] = {"); + + printf("sdksyms.c:") > "sdksyms.dep"; +} +/^# [0-9]+ "/ { + # Process text after a include in a relative path or when the + # processed file has a basename matching $top_srcdir. + # Note that indexing starts at 1; 0 means no match, and there + # is a starting ". + sdk = $3 !~ /^"\// || index($3, topdir) == 2; + + if (sdk && $3 ~ /\.h"$/) { + # remove quotes + gsub(/"/, "", $3); + if (! headers[$3]) { + printf(" \\\n %s", $3) >> "sdksyms.dep"; + headers[$3] = 1; + } + } +} + +/^extern[ ]/ { + if (sdk) { + n = 3; + + # skip attribute, if any + while ($n ~ /^(__attribute__|__global)/ || + # skip modifiers, if any + $n ~ /^\*?(unsigned|const|volatile|struct)$/ || + # skip pointer + $n ~ /\*$/) + n++; + + # type specifier may not be set, as in + # extern _X_EXPORT unsigned name(...) + if ($n !~ /[^a-zA-Z0-9_]/) + n++; + + # match + # extern _X_EXPORT type (* name[])(...) + if ($n ~ /^[^a-zA-Z0-9_]+$/) + n++; + + # match + # extern _X_EXPORT const name *const ... + if ($n ~ /^([^a-zA-Z0-9_]+)?const$/) + n++; + + # actual name may be in the next line, as in + # extern _X_EXPORT type + # possibly ending with a * + # name(...) + if ($n == "" || $n ~ /^\*+$/) { + getline; + n = 1; + } + + # dont modify $0 or $n + symbol = $n; + + # remove starting non word chars + sub(/^[^a-zA-Z0-9_]+/, "",symbol); + + # remove from first non word to end of line + sub(/[^a-zA-Z0-9_].*/, "", symbol); + + #print; + printf(" (void *) &%s,\n", symbol); + } +} + +END { + print("};"); + + print("") >> "sdksyms.dep"; +}' > _sdksyms.c + +STATUS=$? + +cat _sdksyms.c >> sdksyms.c +rm _sdksyms.c + +[ $? != 0 ] && exit $? + +exit $STATUS diff --git a/xorg-server/hw/xfree86/modes/Makefile.am b/xorg-server/hw/xfree86/modes/Makefile.am index 331e4061c..9236426bf 100644 --- a/xorg-server/hw/xfree86/modes/Makefile.am +++ b/xorg-server/hw/xfree86/modes/Makefile.am @@ -1,19 +1,24 @@ -noinst_LIBRARIES = libxf86modes.a +noinst_LTLIBRARIES = libxf86modes.la -libxf86modes_a_SOURCES = \ +if DGA +DGA_SRCS = xf86DiDGA.c +endif + +libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86cvt.c \ xf86gtf.c \ - xf86DiDGA.c \ + xf86DisplayIDModes.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rename.h \ - xf86Rotate.c + xf86Rotate.c \ + $(DGA_SRCS) INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ diff --git a/xorg-server/hw/xfree86/modes/Makefile.in b/xorg-server/hw/xfree86/modes/Makefile.in index 89ed8cadb..b094ff16d 100644 --- a/xorg-server/hw/xfree86/modes/Makefile.in +++ b/xorg-server/hw/xfree86/modes/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/modes DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,18 +53,21 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libxf86modes_a_AR = $(AR) $(ARFLAGS) -libxf86modes_a_LIBADD = -am_libxf86modes_a_OBJECTS = xf86Crtc.$(OBJEXT) xf86Cursors.$(OBJEXT) \ - xf86cvt.$(OBJEXT) xf86gtf.$(OBJEXT) xf86DiDGA.$(OBJEXT) \ - xf86EdidModes.$(OBJEXT) xf86Modes.$(OBJEXT) \ - xf86RandR12.$(OBJEXT) xf86Rotate.$(OBJEXT) -libxf86modes_a_OBJECTS = $(am_libxf86modes_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxf86modes_la_LIBADD = +am__libxf86modes_la_SOURCES_DIST = xf86Crtc.c xf86Crtc.h xf86Cursors.c \ + xf86cvt.c xf86gtf.c xf86DisplayIDModes.c xf86EdidModes.c \ + xf86Modes.c xf86Modes.h xf86RandR12.c xf86RandR12.h \ + xf86Rename.h xf86Rotate.c xf86DiDGA.c +@DGA_TRUE@am__objects_1 = xf86DiDGA.lo +am_libxf86modes_la_OBJECTS = xf86Crtc.lo xf86Cursors.lo xf86cvt.lo \ + xf86gtf.lo xf86DisplayIDModes.lo xf86EdidModes.lo xf86Modes.lo \ + xf86RandR12.lo xf86Rotate.lo $(am__objects_1) +libxf86modes_la_OBJECTS = $(am_libxf86modes_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -72,8 +78,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libxf86modes_a_SOURCES) -DIST_SOURCES = $(libxf86modes_a_SOURCES) +SOURCES = $(libxf86modes_la_SOURCES) +DIST_SOURCES = $(am__libxf86modes_la_SOURCES_DIST) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -105,6 +111,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@ @@ -125,9 +132,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@ @@ -156,7 +166,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@ @@ -165,9 +177,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@ @@ -206,12 +222,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@ @@ -231,7 +248,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@ @@ -241,6 +257,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -254,11 +271,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@ @@ -294,6 +310,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@ @@ -318,7 +335,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@ @@ -341,6 +357,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -372,27 +389,31 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libxf86modes.a -libxf86modes_a_SOURCES = \ +noinst_LTLIBRARIES = libxf86modes.la +@DGA_TRUE@DGA_SRCS = xf86DiDGA.c +libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86cvt.c \ xf86gtf.c \ - xf86DiDGA.c \ + xf86DisplayIDModes.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rename.h \ - xf86Rotate.c + xf86Rotate.c \ + $(DGA_SRCS) INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ @@ -442,12 +463,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libxf86modes.a: $(libxf86modes_a_OBJECTS) $(libxf86modes_a_DEPENDENCIES) - -rm -f libxf86modes.a - $(libxf86modes_a_AR) libxf86modes.a $(libxf86modes_a_OBJECTS) $(libxf86modes_a_LIBADD) - $(RANLIB) libxf86modes.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxf86modes.la: $(libxf86modes_la_OBJECTS) $(libxf86modes_la_DEPENDENCIES) + $(LINK) $(libxf86modes_la_OBJECTS) $(libxf86modes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -455,15 +480,16 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Crtc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursors.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DiDGA.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86EdidModes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Crtc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursors.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DiDGA.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DisplayIDModes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86EdidModes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cvt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -596,7 +622,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -628,7 +654,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -700,7 +726,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index e9bde36e3..8d636af48 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -40,8 +40,7 @@ #include "xf86Priv.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #ifdef RENDER #include "picturestr.h" @@ -55,7 +54,7 @@ int xf86CrtcConfigPrivateIndex = -1; -_X_EXPORT void +void xf86CrtcConfigInit (ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec *funcs) { @@ -70,7 +69,7 @@ xf86CrtcConfigInit (ScrnInfoPtr scrn, scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config; } -_X_EXPORT void +void xf86CrtcSetSizeRange (ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight) @@ -86,7 +85,7 @@ xf86CrtcSetSizeRange (ScrnInfoPtr scrn, /* * Crtc functions */ -_X_EXPORT xf86CrtcPtr +xf86CrtcPtr xf86CrtcCreate (ScrnInfoPtr scrn, const xf86CrtcFuncsRec *funcs) { @@ -117,6 +116,16 @@ xf86CrtcCreate (ScrnInfoPtr scrn, crtc->desiredTransformPresent = FALSE; memset (&crtc->bounds, '\0', sizeof (crtc->bounds)); + /* Preallocate gamma at a sensible size. */ + crtc->gamma_size = 256; + crtc->gamma_red = malloc(3 * crtc->gamma_size * sizeof (CARD16)); + if (!crtc->gamma_red) { + xfree (crtc); + return NULL; + } + crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; + crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; + if (xf86_config->crtc) crtcs = xrealloc (xf86_config->crtc, (xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); @@ -132,7 +141,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn, return crtc; } -_X_EXPORT void +void xf86CrtcDestroy (xf86CrtcPtr crtc) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); @@ -150,6 +159,7 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) } if (crtc->params) xfree (crtc->params); + free(crtc->gamma_red); xfree (crtc); } @@ -158,7 +168,7 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) * Return whether any outputs are connected to the specified pipe */ -_X_EXPORT Bool +Bool xf86CrtcInUse (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; @@ -171,7 +181,7 @@ xf86CrtcInUse (xf86CrtcPtr crtc) return FALSE; } -_X_EXPORT void +void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) { #ifdef RENDER @@ -239,7 +249,7 @@ xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) /** * Sets the given video mode on the given crtc */ -_X_EXPORT Bool +Bool xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y) { @@ -257,9 +267,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati crtc->enabled = xf86CrtcInUse (crtc); + /* We only hit this if someone explicitly sends a "disabled" modeset. */ if (!crtc->enabled) { - /* XXX disable crtc? */ + /* Check everything for stuff that should be off. */ + xf86DisableUnusedFunctions(scrn); return TRUE; } @@ -341,6 +353,11 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati output->funcs->mode_set(output, mode, adjusted_mode); } + /* Only upload when needed, to avoid unneeded delays. */ + if (!crtc->active) + crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, + crtc->gamma_blue, crtc->gamma_size); + /* Now, enable the clocks, plane, pipe, and outputs that we set up. */ crtc->funcs->commit(crtc); for (i = 0; i < xf86_config->num_output; i++) @@ -350,13 +367,14 @@ xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotati output->funcs->commit(output); } - /* XXX free adjustedmode */ ret = TRUE; - if (scrn->pScreen) - xf86CrtcSetScreenSubpixelOrder (scrn->pScreen); done: - if (!ret) { + if (ret) { + crtc->active = TRUE; + if (scrn->pScreen) + xf86CrtcSetScreenSubpixelOrder (scrn->pScreen); + } else { crtc->x = saved_x; crtc->y = saved_y; crtc->rotation = saved_rotation; @@ -366,6 +384,8 @@ done: crtc->transformPresent = saved_transform_present; } + free(adjusted_mode); + if (didLock) crtc->funcs->unlock (crtc); @@ -376,7 +396,7 @@ done: * Sets the given video mode on the given crtc, but without providing * a transform */ -_X_EXPORT Bool +Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { @@ -386,7 +406,7 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, /** * Pans the screen, does not change the mode */ -_X_EXPORT void +void xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y) { crtc->x = x; @@ -420,6 +440,7 @@ typedef enum { OPTION_IGNORE, OPTION_ROTATE, OPTION_PANNING, + OPTION_PRIMARY, } OutputOpts; static OptionInfoRec xf86OutputOptions[] = { @@ -436,6 +457,7 @@ static OptionInfoRec xf86OutputOptions[] = { {OPTION_IGNORE, "Ignore", OPTV_BOOLEAN, {0}, FALSE }, {OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE }, {OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE }, + {OPTION_PRIMARY, "Primary", OPTV_BOOLEAN, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -444,7 +466,7 @@ enum { }; static OptionInfoRec xf86DeviceOptions[] = { - {OPTION_MODEDEBUG, "ModeDebug", OPTV_STRING, {0}, FALSE }, + {OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -560,7 +582,7 @@ xf86OutputInitialRotation (xf86OutputPtr output) return RR_Rotate_0; } -_X_EXPORT xf86OutputPtr +xf86OutputPtr xf86OutputCreate (ScrnInfoPtr scrn, const xf86OutputFuncsRec *funcs, const char *name) @@ -568,6 +590,7 @@ xf86OutputCreate (ScrnInfoPtr scrn, xf86OutputPtr output, *outputs; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int len; + Bool primary; if (name) len = strlen (name) + 1; @@ -613,14 +636,26 @@ xf86OutputCreate (ScrnInfoPtr scrn, xfree (output); return NULL; } - + xf86_config->output = outputs; - xf86_config->output[xf86_config->num_output++] = output; - + + if (xf86GetOptValBool (output->options, OPTION_PRIMARY, &primary) && primary) + { + memmove(xf86_config->output + 1, xf86_config->output, + xf86_config->num_output * sizeof (xf86OutputPtr)); + xf86_config->output[0] = output; + } + else + { + xf86_config->output[xf86_config->num_output] = output; + } + + xf86_config->num_output++; + return output; } -_X_EXPORT Bool +Bool xf86OutputRename (xf86OutputPtr output, const char *name) { int len = strlen(name) + 1; @@ -639,7 +674,7 @@ xf86OutputRename (xf86OutputPtr output, const char *name) return TRUE; } -_X_EXPORT void +void xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor) { if (use_screen_monitor != output->use_screen_monitor) @@ -649,7 +684,7 @@ xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor) } } -_X_EXPORT void +void xf86OutputDestroy (xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; @@ -725,7 +760,6 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen) /* * Called at ScreenInit time to set up */ -_X_EXPORT #ifdef RANDR_13_INTERFACE int #else @@ -1484,7 +1518,7 @@ GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) mon->vrefresh[0].lo = 58.0; } -_X_EXPORT void +void xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -1630,8 +1664,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) } if (add_default_modes) - default_modes = xf86GetDefaultModes (output->interlaceAllowed, - output->doubleScanAllowed); + default_modes = xf86GetDefaultModes (); /* * If this is not an RB monitor, remove RB modes from the default @@ -1668,11 +1701,17 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) output->probed_modes = xf86ModesAdd (output->probed_modes, default_modes); /* - * Check all modes against max size + * Check all modes against max size, interlace, and doublescan */ if (maxX && maxY) xf86ValidateModesSize (scrn, output->probed_modes, maxX, maxY, 0); + + { + int flags = (output->interlaceAllowed ? V_INTERLACE : 0) | + (output->doubleScanAllowed ? V_DBLSCAN : 0); + xf86ValidateModesFlags (scrn, output->probed_modes, flags); + } /* * Check all modes against output @@ -1745,7 +1784,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) */ /* XXX where does this function belong? Here? */ -_X_EXPORT void +void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y); static DisplayModePtr @@ -1840,7 +1879,7 @@ SetCompatOutput(xf86CrtcConfigPtr config) return output; } -_X_EXPORT void +void xf86SetScrnInfoModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -1885,7 +1924,8 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) } static void -xf86EnableOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled) +xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, + Bool *enabled) { Bool any_enabled = FALSE; int o; @@ -2181,6 +2221,99 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, return FALSE; } +static Bool +xf86CrtcSetInitialGamma(xf86CrtcPtr crtc, float gamma_red, float gamma_green, + float gamma_blue) +{ + int i, size = 256; + CARD16 *red, *green, *blue; + + red = malloc(3 * size * sizeof(CARD16)); + green = red + size; + blue = green + size; + + /* Only cause warning if user wanted gamma to be set. */ + if (!crtc->funcs->gamma_set && (gamma_red != 1.0 || gamma_green != 1.0 || gamma_blue != 1.0)) { + free(red); + return FALSE; + } else if (!crtc->funcs->gamma_set) { + free(red); + return TRUE; + } + + /* At this early stage none of the randr-interface stuff is up. + * So take the default gamma size for lack of something better. + */ + for (i = 0; i < size; i++) { + if (gamma_red == 1.0) + red[i] = i << 8; + else + red[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_red) * (double)(size - 1) * 256); + + if (gamma_green == 1.0) + green[i] = i << 8; + else + green[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_green) * (double)(size - 1) * 256); + + if (gamma_blue == 1.0) + blue[i] = i << 8; + else + blue[i] = (CARD16)(pow((double)i/(double)(size - 1), + 1. / (double)gamma_blue) * (double)(size - 1) * 256); + } + + /* Default size is 256, so anything else is failure. */ + if (size != crtc->gamma_size) { + free(red); + return FALSE; + } + + crtc->gamma_size = size; + memcpy (crtc->gamma_red, red, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_green, green, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_blue, blue, crtc->gamma_size * sizeof (CARD16)); + + /* Do not set gamma now, delay until the crtc is activated. */ + + free(red); + + return TRUE; +} + +static Bool +xf86OutputSetInitialGamma(xf86OutputPtr output) +{ + XF86ConfMonitorPtr mon = output->conf_monitor; + float gamma_red = 1.0, gamma_green = 1.0, gamma_blue = 1.0; + + if (!mon) + return TRUE; + + if (!output->crtc) + return FALSE; + + /* Get configured values, where they exist. */ + if (mon->mon_gamma_red >= GAMMA_MIN && + mon->mon_gamma_red <= GAMMA_MAX) + gamma_red = mon->mon_gamma_red; + + if (mon->mon_gamma_green >= GAMMA_MIN && + mon->mon_gamma_green <= GAMMA_MAX) + gamma_green = mon->mon_gamma_green; + + if (mon->mon_gamma_blue >= GAMMA_MIN && + mon->mon_gamma_blue <= GAMMA_MAX) + gamma_blue = mon->mon_gamma_blue; + + /* This avoids setting gamma 1.0 in case another cloned output on this crtc has a specific gamma. */ + if (gamma_red != 1.0 || gamma_green != 1.0 || gamma_blue != 1.0) { + xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s wants gamma correction (%.1f, %.1f, %.1f)\n", output->name, gamma_red, gamma_green, gamma_blue); + return xf86CrtcSetInitialGamma(output->crtc, gamma_red, gamma_green, gamma_blue); + }else + return TRUE; +} /** * Construct default screen configuration @@ -2196,7 +2329,7 @@ xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, * accordingly. */ -_X_EXPORT Bool +Bool xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2231,7 +2364,7 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr)); enabled = xnfcalloc (config->num_output, sizeof (Bool)); - xf86EnableOutputs(scrn, config, enabled); + xf86CollectEnabledOutputs(scrn, config, enabled); if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); @@ -2291,8 +2424,14 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->enabled = FALSE; memset (&crtc->desiredMode, '\0', sizeof (crtc->desiredMode)); + /* Set default gamma for all crtc's. */ + /* This is done to avoid problems later on with cloned outputs. */ + xf86CrtcSetInitialGamma(crtc, 1.0, 1.0, 1.0); } - + + if (xf86_crtc_supports_gamma(scrn)) + xf86DrvMsg(scrn->scrnIndex, X_INFO, "Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.\n"); + /* * Set initial configuration */ @@ -2310,17 +2449,17 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) crtc->desiredY = output->initial_y; crtc->desiredTransformPresent = FALSE; crtc->enabled = TRUE; - crtc->x = output->initial_x; - crtc->y = output->initial_y; memcpy (&crtc->panningTotalArea, &output->initialTotalArea, sizeof(BoxRec)); memcpy (&crtc->panningTrackingArea, &output->initialTrackingArea, sizeof(BoxRec)); memcpy (crtc->panningBorder, output->initialBorder, 4*sizeof(INT16)); output->crtc = crtc; + if (!xf86OutputSetInitialGamma(output)) + xf86DrvMsg (scrn->scrnIndex, X_WARNING, "Initial gamma correction for output %s: failed.\n", output->name); } else { output->crtc = NULL; } } - + if (scrn->display->virtualX == 0) { /* @@ -2429,7 +2568,7 @@ xf86PrepareCrtcs (ScrnInfoPtr scrn) * modes (used in EnterVT functions, or at server startup) */ -_X_EXPORT Bool +Bool xf86SetDesiredModes (ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2507,7 +2646,7 @@ xf86SetDesiredModes (ScrnInfoPtr scrn) * - Closer in refresh rate to the requested mode. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired) { DisplayModePtr best = NULL, scan = NULL; @@ -2570,7 +2709,7 @@ xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired) * mode across all outputs that are currently active. */ -_X_EXPORT Bool +Bool xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -2643,7 +2782,7 @@ xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) * If the new mode is off, it will turn off outputs and then CRTCs. * Otherwise, it will affect CRTCs before outputs. */ -_X_EXPORT void +void xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); @@ -2681,7 +2820,7 @@ xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) * Even for monitors with no DPMS support, by the definition of our DPMS hooks, * the outputs will still get disabled (blanked). */ -_X_EXPORT Bool +Bool xf86SaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -2697,7 +2836,7 @@ xf86SaveScreen(ScreenPtr pScreen, int mode) /** * Disable all inactive crtcs and outputs */ -_X_EXPORT void +void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -2719,6 +2858,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) crtc->funcs->dpms(crtc, DPMSModeOff); memset(&crtc->mode, 0, sizeof(crtc->mode)); xf86RotateDestroy(crtc); + crtc->active = FALSE; } } if (pScrn->pScreen) @@ -2727,7 +2867,7 @@ xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) #ifdef RANDR_12_INTERFACE -#define EDID_ATOM_NAME "EDID_DATA" +#define EDID_ATOM_NAME "EDID" /** * Set the RandR EDID property @@ -2754,7 +2894,7 @@ xf86OutputSetEDIDProperty (xf86OutputPtr output, void *data, int data_len) /** * Set the EDID information for the specified output */ -_X_EXPORT void +void xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) { ScrnInfoPtr scrn = output->scrn; @@ -2822,7 +2962,7 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) * Return the list of modes supported by the EDID information * stored in 'output' */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86OutputGetEDIDModes (xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; @@ -2834,7 +2974,7 @@ xf86OutputGetEDIDModes (xf86OutputPtr output) } /* maybe we should care about DDC1? meh. */ -_X_EXPORT xf86MonPtr +xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) { ScrnInfoPtr scrn = output->scrn; @@ -2853,7 +2993,7 @@ static char *_xf86ConnectorNames[] = { "Component", "LFP", "Proprietary", "HDMI", "DisplayPort", }; -_X_EXPORT char * +char * xf86ConnectorGetName(xf86ConnectorType connector) { return _xf86ConnectorNames[connector]; @@ -2938,7 +3078,7 @@ xf86_covering_crtc(ScrnInfoPtr pScrn, * not that the video shouldn't be displayed */ -_X_EXPORT Bool +Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr *crtc_ret, xf86CrtcPtr desired_crtc, @@ -3015,3 +3155,23 @@ xf86_crtc_notify(ScreenPtr screen) if (config->xf86_crtc_notify) config->xf86_crtc_notify(screen); } + +Bool +xf86_crtc_supports_gamma(ScrnInfoPtr pScrn) +{ + if (xf86CrtcConfigPrivateIndex != -1) { + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); + xf86CrtcPtr crtc; + + /* for multiple drivers loaded we need this */ + if (!xf86_config) + return FALSE; + if (xf86_config->num_crtc == 0) + return FALSE; + crtc = xf86_config->crtc[0]; + + return (crtc->funcs->gamma_set != NULL); + } + + return FALSE; +} diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.h b/xorg-server/hw/xfree86/modes/xf86Crtc.h index 0a596bc49..69afaa5d1 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.h +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.h @@ -216,13 +216,14 @@ typedef struct _xf86CrtcFuncs { /** * Callback for panning. Doesn't change the mode. + * Added in ABI version 2 */ void (*set_origin)(xf86CrtcPtr crtc, int x, int y); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; -#define XF86_CRTC_VERSION 2 +#define XF86_CRTC_VERSION 3 struct _xf86Crtc { /** @@ -236,9 +237,9 @@ struct _xf86Crtc { ScrnInfoPtr scrn; /** - * Active state of this CRTC + * Desired state of this CRTC * - * Set when this CRTC is driving one or more outputs + * Set when this CRTC should be driving one or more outputs */ Bool enabled; @@ -312,18 +313,19 @@ struct _xf86Crtc { * Current transformation matrix */ PictTransform crtc_to_framebuffer; - struct pict_f_transform f_crtc_to_framebuffer; - struct pict_f_transform f_framebuffer_to_crtc; - PictFilterPtr filter; - xFixed *params; - int nparams; - int filter_width; - int filter_height; + /* framebuffer_to_crtc was removed in ABI 2 */ + struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */ + struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */ + PictFilterPtr filter; /* ABI 2 */ + xFixed *params; /* ABI 2 */ + int nparams; /* ABI 2 */ + int filter_width; /* ABI 2 */ + int filter_height; /* ABI 2 */ Bool transform_in_use; - RRTransformRec transform; - Bool transformPresent; - RRTransformRec desiredTransform; - Bool desiredTransformPresent; + RRTransformRec transform; /* ABI 2 */ + Bool transformPresent; /* ABI 2 */ + RRTransformRec desiredTransform; /* ABI 2 */ + Bool desiredTransformPresent; /* ABI 2 */ /** * Bounding box in screen space */ @@ -333,10 +335,28 @@ struct _xf86Crtc { * TotalArea: total panning area, larger than CRTC's size * TrackingArea: Area of the pointer for which the CRTC is panned * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them + * Added in ABI version 2 */ BoxRec panningTotalArea; BoxRec panningTrackingArea; INT16 panningBorder[4]; + + /** + * Current gamma, especially useful after initial config. + * Added in ABI version 3 + */ + CARD16 *gamma_red; + CARD16 *gamma_green; + CARD16 *gamma_blue; + int gamma_size; + + /** + * Actual state of this CRTC + * + * Set to TRUE after modesetting, set to FALSE if no outputs are connected + * Added in ABI version 3 + */ + Bool active; /** * Clear the shadow */ @@ -578,7 +598,10 @@ struct _xf86Output { #else void *randr_output; #endif - /** Desired initial panning */ + /** + * Desired initial panning + * Added in ABI version 2 + */ BoxRec initialTotalArea; BoxRec initialTrackingArea; INT16 initialBorder[4]; @@ -662,7 +685,7 @@ typedef struct _xf86CrtcConfig { } xf86CrtcConfigRec, *xf86CrtcConfigPtr; -extern int xf86CrtcConfigPrivateIndex; +extern _X_EXPORT int xf86CrtcConfigPrivateIndex; #define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr)) @@ -670,11 +693,11 @@ extern int xf86CrtcConfigPrivateIndex; * Initialize xf86CrtcConfig structure */ -void +extern _X_EXPORT void xf86CrtcConfigInit (ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec *funcs); -void +extern _X_EXPORT void xf86CrtcSetSizeRange (ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight); @@ -682,11 +705,11 @@ xf86CrtcSetSizeRange (ScrnInfoPtr scrn, /* * Crtc functions */ -xf86CrtcPtr +extern _X_EXPORT xf86CrtcPtr xf86CrtcCreate (ScrnInfoPtr scrn, const xf86CrtcFuncsRec *funcs); -void +extern _X_EXPORT void xf86CrtcDestroy (xf86CrtcPtr crtc); @@ -694,138 +717,142 @@ xf86CrtcDestroy (xf86CrtcPtr crtc); * Sets the given video mode on the given crtc */ -Bool +extern _X_EXPORT Bool xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y); -Bool +extern _X_EXPORT Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); -void +extern _X_EXPORT void xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y); /* * Assign crtc rotation during mode set */ -Bool +extern _X_EXPORT Bool xf86CrtcRotate (xf86CrtcPtr crtc); /* * Clean up any rotation data, used when a crtc is turned off * as well as when rotation is disabled. */ -void +extern _X_EXPORT void xf86RotateDestroy (xf86CrtcPtr crtc); /* * free shadow memory allocated for all crtcs */ -void +extern _X_EXPORT void xf86RotateFreeShadow(ScrnInfoPtr pScrn); /* * Clean up rotation during CloseScreen */ -void +extern _X_EXPORT void xf86RotateCloseScreen (ScreenPtr pScreen); /** * Return whether any output is assigned to the crtc */ -Bool +extern _X_EXPORT Bool xf86CrtcInUse (xf86CrtcPtr crtc); /* * Output functions */ -xf86OutputPtr +extern _X_EXPORT xf86OutputPtr xf86OutputCreate (ScrnInfoPtr scrn, const xf86OutputFuncsRec *funcs, const char *name); -void +extern _X_EXPORT void xf86OutputUseScreenMonitor (xf86OutputPtr output, Bool use_screen_monitor); -Bool +extern _X_EXPORT Bool xf86OutputRename (xf86OutputPtr output, const char *name); -void +extern _X_EXPORT void xf86OutputDestroy (xf86OutputPtr output); -void +extern _X_EXPORT void xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY); -void +extern _X_EXPORT void xf86SetScrnInfoModes (ScrnInfoPtr pScrn); #ifdef RANDR_13_INTERFACE -int +# define ScreenInitRetType int #else -Bool +# define ScreenInitRetType Bool #endif + +extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit (ScreenPtr pScreen); -Bool +extern _X_EXPORT Bool xf86InitialConfiguration (ScrnInfoPtr pScrn, Bool canGrow); -void +extern _X_EXPORT void xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); -Bool +extern _X_EXPORT Bool xf86SaveScreen(ScreenPtr pScreen, int mode); -void +extern _X_EXPORT void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn); -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86OutputFindClosestMode (xf86OutputPtr output, DisplayModePtr desired); -Bool +extern _X_EXPORT Bool xf86SetSingleMode (ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation); /** * Set the EDID information for the specified output */ -void +extern _X_EXPORT void xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon); /** * Return the list of modes supported by the EDID information * stored in 'output' */ -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86OutputGetEDIDModes (xf86OutputPtr output); -xf86MonPtr +extern _X_EXPORT xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus); /** * Initialize dga for this screen */ -Bool +#ifdef XFreeXDGA +extern _X_EXPORT Bool xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address); /** * Re-initialize dga for this screen (as when the set of modes changes) */ -Bool +extern _X_EXPORT Bool xf86DiDGAReInit (ScreenPtr pScreen); +#endif /* * Set the subpixel order reported for the screen using * the information from the outputs */ -void +extern _X_EXPORT void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen); /* * Get a standard string name for a connector type */ -char * +extern _X_EXPORT char * xf86ConnectorGetName(xf86ConnectorType connector); /* @@ -833,7 +860,7 @@ xf86ConnectorGetName(xf86ConnectorType connector); * modes (used in EnterVT functions, or at server startup) */ -Bool +extern _X_EXPORT Bool xf86SetDesiredModes (ScrnInfoPtr pScrn); /** @@ -842,7 +869,7 @@ xf86SetDesiredModes (ScrnInfoPtr pScrn); * * Driver should call this from ScreenInit function */ -Bool +extern _X_EXPORT Bool xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags); /** @@ -852,25 +879,25 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags); * * Driver should call this from crtc commit function. */ -void +extern _X_EXPORT void xf86_reload_cursors (ScreenPtr screen); /** * Called from EnterVT to turn the cursors back on */ -void +extern _X_EXPORT void xf86_show_cursors (ScrnInfoPtr scrn); /** * Called by the driver to turn cursors off */ -void +extern _X_EXPORT void xf86_hide_cursors (ScrnInfoPtr scrn); /** * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time. */ -void +extern _X_EXPORT void xf86_cursors_fini (ScreenPtr screen); /* @@ -879,7 +906,7 @@ xf86_cursors_fini (ScreenPtr screen); * wraps xf86XVClipVideoHelper() */ -Bool +extern _X_EXPORT Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr *crtc_ret, xf86CrtcPtr desired_crtc, @@ -892,28 +919,20 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, INT32 width, INT32 height); -xf86_crtc_notify_proc_ptr +extern _X_EXPORT xf86_crtc_notify_proc_ptr xf86_wrap_crtc_notify (ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new); -void +extern _X_EXPORT void xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old); -void +extern _X_EXPORT void xf86_crtc_notify(ScreenPtr pScreen); /** - * Panning + * Gamma */ -Bool -xf86_crtc_get_panning(ScrnInfoPtr pScrn, - BoxPtr totalArea, - BoxPtr TrackingArea, - INT16 *border); - -Bool -xf86_crtc_set_panning(ScrnInfoPtr pScrn, - BoxPtr totalArea, - BoxPtr TrackingArea, - INT16 *border); + +extern _X_EXPORT Bool +xf86_crtc_supports_gamma(ScrnInfoPtr pScrn); #endif /* _XF86CRTC_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86Cursors.c b/xorg-server/hw/xfree86/modes/xf86Cursors.c index fbd61e9fd..fc4df8477 100644 --- a/xorg-server/hw/xfree86/modes/xf86Cursors.c +++ b/xorg-server/hw/xfree86/modes/xf86Cursors.c @@ -39,8 +39,7 @@ #include "xf86RandR12.h" #include "xf86CursorPriv.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #ifdef RENDER #include "picturestr.h" @@ -265,7 +264,7 @@ xf86_crtc_hide_cursor (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86_hide_cursors (ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -291,7 +290,7 @@ xf86_crtc_show_cursor (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86_show_cursors (ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -543,7 +542,7 @@ xf86_load_cursor_argb (ScrnInfoPtr scrn, CursorPtr cursor) } } -_X_EXPORT Bool +Bool xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; @@ -594,7 +593,7 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags) * Reloads cursor images as needed, then adjusts cursor positions */ -_X_EXPORT void +void xf86_reload_cursors (ScreenPtr screen) { ScrnInfoPtr scrn; @@ -651,7 +650,7 @@ xf86_reload_cursors (ScreenPtr screen) /** * Clean up CRTC-based cursor code */ -_X_EXPORT void +void xf86_cursors_fini (ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; diff --git a/xorg-server/hw/xfree86/modes/xf86DiDGA.c b/xorg-server/hw/xfree86/modes/xf86DiDGA.c index f40d0abef..0964cefa7 100644 --- a/xorg-server/hw/xfree86/modes/xf86DiDGA.c +++ b/xorg-server/hw/xfree86/modes/xf86DiDGA.c @@ -255,7 +255,7 @@ static DGAFunctionRec xf86_dga_funcs = { NULL }; -_X_EXPORT Bool +Bool xf86DiDGAReInit (ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; @@ -267,7 +267,7 @@ xf86DiDGAReInit (ScreenPtr pScreen) return DGAReInitModes (pScreen, xf86_config->dga_modes, xf86_config->dga_nmode); } -_X_EXPORT Bool +Bool xf86DiDGAInit (ScreenPtr pScreen, unsigned long dga_address) { ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; diff --git a/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c new file mode 100644 index 000000000..182d43e0e --- /dev/null +++ b/xorg-server/hw/xfree86/modes/xf86DisplayIDModes.c @@ -0,0 +1,437 @@ +/* + * Copyright 2009 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software") + * to deal in the software without restriction, including without limitation + * on the rights to use, copy, modify, merge, publish, distribute, sub + * license, and/or sell copies of the Software, and to permit persons to whom + * them Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTIBILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: + * Adam Jackson <ajax@redhat.com> + */ + +#include "xorg-config.h" +#include "xf86.h" +#include "xf86str.h" +#include "edid.h" +#include "xf86DDC.h" + +typedef void (*did_proc)(int scrnIndex, unsigned char *data, void *closure); + +#define DID_PRODUCT_ID 0x00 +#define DID_DISPLAY_PARAMETERS 0x01 +#define DID_COLOR_INFO 0x02 +#define DID_TIMING_1_DETAILED 0x03 +#define DID_TIMING_2_DETAILED 0x04 +#define DID_TIMING_3_SHORT 0x05 +#define DID_TIMING_4_DMT 0x06 +#define DID_TIMING_VESA 0x07 +#define DID_TIMING_CEA 0x08 +#define DID_TIMING_RANGE_LIMITS 0x09 +#define DID_PRODUCT_SERIAL 0x0A +#define DID_ASCII_STRING 0x0B +#define DID_DISPLAY_DEVICE 0x0C +#define DID_POWER_SEQUENCING 0x0D +#define DID_TRANSFER_INFO 0x0E +#define DID_DISPLAY_INTERFACE 0x0F +#define DID_STEREO 0x10 +#define DID_VENDOR 0x7F + +#define extract_le16(x, i) ((x[i+1] << 8) + (x[i])) +#define extract_le24(x, i) ((x[i+2] << 16) + (x[i+1] << 8) + (x[i])) + +static DisplayModePtr +modeCalloc(void) +{ + return xcalloc(1, sizeof(DisplayModeRec)); +} + +/* + * How awesome is it to have two detailed timing formats, neither of which + * are compatible with the format in EDID? So awesome. + */ + +static void +didDetailedTiming1(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr m = modeCalloc(); + + if (!m) + return; + + m->Clock = extract_le24(x, 0); + + m->HDisplay = extract_le16(x, 4); + m->HSyncStart = m->HDisplay + (extract_le16(x, 8) & 0x7f); + m->HSyncEnd = m->HSyncStart + extract_le16(x, 10); + m->HTotal = m->HDisplay + extract_le16(x, 6); + m->Flags |= (x[9] & 0x80) ? V_PHSYNC : V_NHSYNC; + + m->VDisplay = extract_le16(x, 12); + m->VSyncStart = m->VDisplay + (extract_le16(x, 16) & 0x7f); + m->VSyncEnd = m->VSyncStart + extract_le16(x, 18); + m->VTotal = m->VDisplay + extract_le16(x, 14); + m->Flags |= (x[17] & 0x80) ? V_PVSYNC : V_NVSYNC; + + m->type = M_T_DRIVER; + if (x[3] & 0x80) + m->type |= M_T_PREFERRED; + + /* XXX double check handling of this */ + if (x[3] & 0x10) + m->Flags |= V_INTERLACE; + + mon->Modes = xf86ModesAdd(mon->Modes, m); +} + +/* XXX no sync bits. what to do? */ +static void +didDetailedTiming2(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr mode = modeCalloc(); + + if (!mode) + return; + + mode->Clock = extract_le24(x, 0); + + /* horiz sizes are in character cells, not pixels, hence * 8 */ + mode->HDisplay = ((extract_le16(x, 4) & 0x01ff) + 1) * 8; + mode->HSyncStart = mode->HDisplay + (((x[6] & 0xf0) >> 4) + 1) * 8; + mode->HSyncEnd = mode->HSyncStart + ((x[6] & 0x0f) + 1) * 8; + mode->HTotal = mode->HDisplay + ((x[5] >> 1) + 1) * 8; + + mode->VDisplay = extract_le16(x, 7) & 0x07ff; + mode->VSyncStart = mode->VDisplay + (x[10] >> 4) + 1; + mode->VSyncEnd = mode->VSyncStart + (x[10] & 0x0f) + 1; + mode->VTotal = mode->VDisplay + x[9]; + + mode->status = M_T_DRIVER; + if (x[3] & 0x80) + mode->status |= M_T_PREFERRED; + + /* XXX double check handling of this */ + if (x[3] & 0x10) + mode->Flags |= V_INTERLACE; + + mon->Modes = xf86ModesAdd(mon->Modes, mode); +} + +static void +didShortTiming(int i, unsigned char *x, MonPtr mon) +{ + DisplayModePtr m; + int w, h, r; + + w = (x[1] + 1) * 8; + switch (x[0] & 0x0f) { + case 0: + h = w; + break; + case 1: + h = (w * 4) / 5; + break; + case 2: + h = (w * 3) / 4; + break; + case 3: + h = (w * 9) / 15; + break; + case 4: + h = (w * 9) / 16; + break; + case 5: + h = (w * 10) / 16; + break; + default: + return; + } + r = (x[2] & 0x7f) + 1; + + m = xf86CVTMode(w, h, r, !!(x[0] & 0x10), !!(x[2] & 0x80)); + + m->type = M_T_DRIVER; + if (x[0] & 0x80) + m->type |= M_T_PREFERRED; + + mon->Modes = xf86ModesAdd(mon->Modes, m); +} + +static void +didDMTTiming(int i, unsigned char *x, void *closure) +{ + MonPtr mon = closure; + + mon->Modes = xf86ModesAdd(mon->Modes, + xf86DuplicateMode(DMTModes + *x)); +} + +#define RB 1 +#define INT 2 +static const struct did_dmt { + short w, h, r, f; +} did_dmt[] = { + /* byte 3 */ + { 640, 350, 85, 0 }, + { 640, 400, 85, 0 }, + { 720, 400, 85, 0 }, + { 640, 480, 60, 0 }, + { 640, 480, 72, 0 }, + { 640, 480, 75, 0 }, + { 640, 480, 85, 0 }, + { 800, 600, 56, 0 }, + /* byte 4 */ + { 800, 600, 60, 0 }, + { 800, 600, 72, 0 }, + { 800, 600, 75, 0 }, + { 800, 600, 85, 0 }, + { 800, 600, 120, RB }, + { 848, 480, 60, 0 }, + { 1024, 768, 43, INT }, + { 1024, 768, 60, 0 }, + /* byte 5 */ + { 1024, 768, 70, 0 }, + { 1024, 768, 75, 0 }, + { 1024, 768, 85, 0 }, + { 1024, 768, 120, RB }, + { 1152, 864, 75, 0 }, + { 1280, 768, 60, RB }, + { 1280, 768, 60, 0 }, + { 1280, 768, 75, 0 }, + /* byte 6 */ + { 1280, 768, 85, 0 }, + { 1280, 768, 120, RB }, + { 1280, 800, 60, RB }, + { 1280, 800, 60, 0 }, + { 1280, 800, 75, 0 }, + { 1280, 800, 85, 0 }, + { 1280, 800, 120, RB }, + { 1280, 960, 60, 0 }, + /* byte 7 */ + { 1280, 960, 85, 0 }, + { 1280, 960, 120, RB }, + { 1280, 1024, 60, 0 }, + { 1280, 1024, 75, 0 }, + { 1280, 1024, 85, 0 }, + { 1280, 1024, 120, RB }, + { 1360, 768, 60, 0 }, + { 1360, 768, 120, RB }, + /* byte 8 */ + { 1400, 1050, 60, RB }, + { 1400, 1050, 60, 0 }, + { 1400, 1050, 75, 0 }, + { 1400, 1050, 85, 0 }, + { 1400, 1050, 120, RB }, + { 1440, 900, 60, RB }, + { 1440, 900, 60, 0 }, + { 1440, 900, 75, 0 }, + /* byte 9 */ + { 1440, 900, 85, 0 }, + { 1440, 900, 120, RB }, + { 1600, 1200, 60, 0 }, + { 1600, 1200, 65, 0 }, + { 1600, 1200, 70, 0 }, + { 1600, 1200, 75, 0 }, + { 1600, 1200, 85, 0 }, + { 1600, 1200, 120, RB }, + /* byte a */ + { 1680, 1050, 60, RB }, + { 1680, 1050, 60, 0 }, + { 1680, 1050, 75, 0 }, + { 1680, 1050, 85, 0 }, + { 1680, 1050, 120, RB }, + { 1792, 1344, 60, 0 }, + { 1792, 1344, 75, 0 }, + { 1792, 1344, 120, RB }, + /* byte b */ + { 1856, 1392, 60, 0 }, + { 1856, 1392, 75, 0 }, + { 1856, 1392, 120, RB }, + { 1920, 1200, 60, RB }, + { 1920, 1200, 60, 0 }, + { 1920, 1200, 75, 0 }, + { 1920, 1200, 85, 0 }, + { 1920, 1200, 120, RB }, + /* byte c */ + { 1920, 1440, 60, 0 }, + { 1920, 1440, 75, 0 }, + { 1920, 1440, 120, RB }, + { 2560, 1600, 60, RB }, + { 2560, 1600, 60, 0 }, + { 2560, 1600, 75, 0 }, + { 2560, 1600, 85, 0 }, + { 2560, 1600, 120, RB }, +}; + +static void +didVesaTiming(int scrn, unsigned char *x, MonPtr mon) +{ + int i, j; + + x += 3; + + for (i = 0; i < 10; i++) + for (j = 0; j < 8; j++) + if (x[i] & (1 << j)) { + const struct did_dmt *d = &(did_dmt[i * 8 + j]); + if (d->f == INT) + continue; + mon->Modes = xf86ModesAdd(mon->Modes, + FindDMTMode(d->w, d->h, d->r, + d->f == RB)); + } + +} + +static void +handleDisplayIDBlock(int scrnIndex, unsigned char *x, void *closure) +{ + MonPtr mon = closure; + + switch (x[0]) { + case DID_DISPLAY_PARAMETERS: + /* w/h are in decimillimeters */ + mon->widthmm = (extract_le16(x, 3) + 5) / 10; + mon->heightmm = (extract_le16(x, 5) + 5) / 10; + /* XXX pixel count, feature flags, gamma, aspect, color depth */ + break; + + case DID_TIMING_RANGE_LIMITS: + { + int n; + + mon->maxPixClock = max(mon->maxPixClock, extract_le24(x, 6) * 10); + + n = mon->nHsync++; + if (n < MAX_HSYNC) { + mon->hsync[n].lo = x[9]; + mon->hsync[n].hi = x[10]; + } else { + n = MAX_HSYNC; + } + n = mon->nVrefresh++; + if (n < MAX_VREFRESH) { + mon->vrefresh[n].lo = x[13]; + mon->vrefresh[n].hi = x[14]; + } else { + n = MAX_VREFRESH; + } + break; + } + + case DID_TIMING_1_DETAILED: + { + int i; + for (i = 0; i < x[2]; i += 20) + didDetailedTiming1(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_2_DETAILED: + { + int i; + for (i = 0; i < x[2]; i += 11) + didDetailedTiming2(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_3_SHORT: + { + int i; + for (i = 0; i < x[2]; i += 3) + didShortTiming(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_4_DMT: + { + int i; + for (i = 0; i < x[2]; i++) + didDMTTiming(scrnIndex, x + i + 3, mon); + break; + } + + case DID_TIMING_VESA: + didVesaTiming(scrnIndex, x, mon); + break; + + /* XXX pixel format, ar, orientation, subpixel, dot pitch, bit depth */ + case DID_DISPLAY_DEVICE: + + /* XXX interface, links, color encoding, ss, drm */ + case DID_DISPLAY_INTERFACE: + + /* XXX stereo */ + case DID_STEREO: + + /* nothing interesting in these */ + case DID_COLOR_INFO: + case DID_PRODUCT_SERIAL: + case DID_ASCII_STRING: + case DID_POWER_SEQUENCING: + case DID_TRANSFER_INFO: + case DID_VENDOR: + break; + + /* warn about anything else */ + default: + xf86DrvMsg(scrnIndex, X_WARNING, + "Unknown DisplayID block type %hx\n", x[0]); + break; + } +} + +static void +forEachDisplayIDBlock(int scrnIndex, unsigned char *did, did_proc proc, + void *closure) +{ + int num_extensions = did[3]; + int section_size = did[1]; + unsigned char *block; + + do { + if ((did[0] & 0xf0) != 0x10) /* not 1.x, abort */ + return; + /* XXX also, checksum */ + + block = did + 4; + + while (section_size > 0) { + int block_size = (block[2] + 2); + + proc(scrnIndex, block, closure); + + section_size -= block_size; + block += block_size; + } + + did += (did[1] + 5); + } while (num_extensions--); +} + +/* + * Fill out MonPtr with xf86MonPtr information. + */ +void +xf86DisplayIDMonitorSet(int scrnIndex, MonPtr mon, xf86MonPtr DDC) +{ + if (!mon || !DDC) + return; + + mon->DDC = DDC; + + forEachDisplayIDBlock(scrnIndex, DDC->rawData, handleDisplayIDBlock, mon); +} diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c index 6256fda0e..6e11f9a3d 100644 --- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c +++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c @@ -160,6 +160,11 @@ static Bool quirk_detailed_v_in_cm (int scrnIndex, xf86MonPtr DDC) DDC->vendor.prod_id == 47360) return TRUE; + /* Bug #21750: Samsung Syncmaster 2333HD */ + if (memcmp (DDC->vendor.name, "SAM", 4) == 0 && + DDC->vendor.prod_id == 1157) + return TRUE; + return FALSE; } @@ -333,7 +338,7 @@ DDCModesFromEstablished(int scrnIndex, struct established_timings *timing, } /* Autogenerated from the DMT spec */ -static const DisplayModeRec DMTModes[] = { +const DisplayModeRec DMTModes[] = { { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX }, /* 640x350@85Hz */ { MODEPREFIX, 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 640x400@85Hz */ { MODEPREFIX, 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX }, /* 720x400@85Hz */ @@ -443,7 +448,7 @@ ModeRefresh(const DisplayModeRec *mode) * part of the DMT pool. For the 'standard' EDID mode descriptor there's * no way to specify whether the mode should be RB or not. */ -static DisplayModePtr +DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb) { int i; @@ -486,29 +491,37 @@ DDCModesFromStandardTiming(struct std_timings *timing, ddc_quirk_t quirks, int timing_level, Bool rb) { DisplayModePtr Modes = NULL, Mode = NULL; - int i; + int i, hsize, vsize, refresh; for (i = 0; i < STD_TIMINGS; i++) { - if (timing[i].hsize && timing[i].vsize && timing[i].refresh) { - Mode = FindDMTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, rb); + hsize = timing[i].hsize; + vsize = timing[i].vsize; + refresh = timing[i].refresh; + + /* HDTV hack. Hooray. */ + if (hsize == 1360 && vsize == 765 && refresh == 60) { + Mode = xf86CVTMode(1366, 768, 60, FALSE, FALSE); + Mode->HDisplay = 1366; + Mode->VSyncStart--; + Mode->VSyncEnd--; + } else if (hsize && vsize && refresh) { + Mode = FindDMTMode(hsize, vsize, refresh, rb); if (!Mode) { if (timing_level == LEVEL_CVT) /* pass rb here too? */ - Mode = xf86CVTMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86CVTMode(hsize, vsize, refresh, FALSE, FALSE); else if (timing_level == LEVEL_GTF) - Mode = xf86GTFMode(timing[i].hsize, timing[i].vsize, - timing[i].refresh, FALSE, FALSE); + Mode = xf86GTFMode(hsize, vsize, refresh, FALSE, FALSE); } - if (!Mode) - continue; + } + if (Mode) { Mode->type = M_T_DRIVER; - Modes = xf86ModesAdd(Modes, Mode); - } + Modes = xf86ModesAdd(Modes, Mode); + } + Mode = NULL; } return Modes; @@ -853,7 +866,7 @@ xf86DDCSetPreferredRefresh(int scrnIndex, DisplayModePtr modes, best->type |= M_T_PREFERRED; } -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) { int i; @@ -929,8 +942,8 @@ xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) /* * Fill out MonPtr with xf86MonPtr information. */ -_X_EXPORT void -xf86DDCMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) +void +xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) { DisplayModePtr Modes = NULL, Mode; int i, clock; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.c b/xorg-server/hw/xfree86/modes/xf86Modes.c index 1522fa731..d105b48ab 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.c +++ b/xorg-server/hw/xfree86/modes/xf86Modes.c @@ -48,10 +48,8 @@ extern XF86ConfigPtr xf86configptr; /** * Calculates the horizontal sync rate of a mode. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT double +double xf86ModeHSync(const DisplayModeRec *mode) { double hsync = 0.0; @@ -66,10 +64,8 @@ xf86ModeHSync(const DisplayModeRec *mode) /** * Calculates the vertical refresh rate of a mode. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT double +double xf86ModeVRefresh(const DisplayModeRec *mode) { double refresh = 0.0; @@ -88,7 +84,7 @@ xf86ModeVRefresh(const DisplayModeRec *mode) return refresh; } -_X_EXPORT int +int xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { @@ -103,7 +99,7 @@ xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation) } } -_X_EXPORT int +int xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation) { switch (rotation & 0xf) { @@ -119,11 +115,11 @@ xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation) } /** Calculates the memory bandwidth (in MiB/sec) of a mode. */ -_X_EXPORT unsigned int +unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth) { float a_active, a_total, active_percent, pixels_per_second; - int bytes_per_pixel = (depth + 7) / 8; + int bytes_per_pixel = bits_to_bytes(depth); if (!mode->HTotal || !mode->VTotal || !mode->Clock) return 0; @@ -137,7 +133,7 @@ xf86ModeBandwidth(DisplayModePtr mode, int depth) } /** Sets a default mode name of <width>x<height> on a mode. */ -_X_EXPORT void +void xf86SetModeDefaultName(DisplayModePtr mode) { if (mode->name != NULL) @@ -151,10 +147,8 @@ xf86SetModeDefaultName(DisplayModePtr mode) * * Initialises the Crtc parameters for a mode. The initialisation includes * adjustments for interlaced and double scan modes. - * - * Exact copy of xf86Mode.c's. */ -_X_EXPORT void +void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) { if ((p == NULL) || ((p->type & M_T_CRTC_C) == M_T_BUILTIN)) @@ -205,7 +199,7 @@ xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) /** * Allocates and returns a copy of pMode, including pointers within pMode. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode) { DisplayModePtr pNew; @@ -229,7 +223,7 @@ xf86DuplicateMode(const DisplayModeRec *pMode) * * \param modeList doubly-linked mode list */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr first = NULL, last = NULL; @@ -260,10 +254,8 @@ xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) * * This doesn't use Crtc values, as it might be used on ModeRecs without the * Crtc values set. So, it's assumed that the other numbers are enough. - * - * This isn't in xf86Modes.c, but it might deserve to be there. */ -_X_EXPORT Bool +Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2) { if (pMode1->Clock == pMode2->Clock && @@ -285,7 +277,6 @@ xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2) } } -/* exact copy of xf86Mode.c */ static void add(char **p, char *new) { @@ -296,10 +287,8 @@ add(char **p, char *new) /** * Print out a modeline. - * - * Convenient VRefresh printing was added, though, compared to xf86Mode.c */ -_X_EXPORT void +void xf86PrintModeline(int scrnIndex,DisplayModePtr mode) { char tmp[256]; @@ -345,12 +334,15 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode) * * \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough? */ -_X_EXPORT void +void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags) { DisplayModePtr mode; + if (flags == (V_INTERLACE | V_DBLSCAN)) + return; + for (mode = modeList; mode != NULL; mode = mode->next) { if (mode->Flags & V_INTERLACE && !(flags & V_INTERLACE)) mode->status = MODE_NO_INTERLACE; @@ -364,7 +356,7 @@ xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch) { @@ -391,7 +383,7 @@ xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon) { @@ -436,7 +428,7 @@ xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, * \param max pointer to maximums of clock ranges * \param n_ranges number of ranges. */ -_X_EXPORT void +void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges) { @@ -469,7 +461,7 @@ xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr mode; @@ -501,7 +493,7 @@ xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) * \param bandwidth bandwidth in MHz. * \param depth color depth. */ -_X_EXPORT void +void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth) { @@ -535,20 +527,12 @@ xf86ModeIsReduced(const DisplayModeRec *mode) * * \param modeList doubly-linked list of modes. */ -_X_EXPORT void +void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) { - DisplayModePtr mode; - - for (mode = modeList; mode != NULL; mode = mode->next) { - /* gratuitous duplication from pre-randr validation code */ - if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && - ((mode->HTotal - mode->HDisplay) == 160) && - ((mode->HSyncEnd - mode->HDisplay) == 80) && - ((mode->HSyncEnd - mode->HSyncStart) == 32) && - ((mode->VSyncStart - mode->VDisplay) == 3)) - mode->status = MODE_NO_REDUCED; - } + for (; modeList != NULL; modeList = modeList->next) + if (xf86ModeIsReduced(modeList)) + modeList->status = MODE_NO_REDUCED; } /** @@ -558,7 +542,7 @@ xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) * \param verbose determines whether the reason for mode invalidation is * printed. */ -_X_EXPORT void +void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose) { @@ -592,7 +576,7 @@ xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, * * \param modes doubly-linked mode list. */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) { if (modes == NULL) @@ -658,7 +642,7 @@ xf86GetConfigModes (XF86ConfModeLinePtr conf_mode) /** * Build a mode list from a monitor configuration */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) { DisplayModePtr modes = NULL; @@ -690,8 +674,8 @@ xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) /** * Build a mode list containing all of the default modes */ -_X_EXPORT DisplayModePtr -xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed) +DisplayModePtr +xf86GetDefaultModes (void) { DisplayModePtr head = NULL, mode; int i; @@ -700,13 +684,7 @@ xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed) { const DisplayModeRec *defMode = &xf86DefaultModes[i]; - if (!interlaceAllowed && (defMode->Flags & V_INTERLACE)) - continue; - if (!doubleScanAllowed && (defMode->Flags & V_DBLSCAN)) - continue; - mode = xf86DuplicateMode(defMode); - head = xf86ModesAdd(head, mode); } return head; diff --git a/xorg-server/hw/xfree86/modes/xf86Modes.h b/xorg-server/hw/xfree86/modes/xf86Modes.h index 2fb6a374d..908f59b48 100644 --- a/xorg-server/hw/xfree86/modes/xf86Modes.h +++ b/xorg-server/hw/xfree86/modes/xf86Modes.h @@ -40,75 +40,75 @@ #include "xf86Rename.h" #endif -double xf86ModeHSync(const DisplayModeRec *mode); -double xf86ModeVRefresh(const DisplayModeRec *mode); -unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); +extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec *mode); +extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec *mode); +extern _X_EXPORT unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); -int +extern _X_EXPORT int xf86ModeWidth (const DisplayModeRec *mode, Rotation rotation); -int +extern _X_EXPORT int xf86ModeHeight (const DisplayModeRec *mode, Rotation rotation); -DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); -DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, +extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec *pMode); +extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); -void xf86SetModeDefaultName(DisplayModePtr mode); -void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); -Bool xf86ModesEqual(const DisplayModeRec *pMode1, +extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); +extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); +extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec *pMode1, const DisplayModeRec *pMode2); -void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); -DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); +extern _X_EXPORT void xf86PrintModeline(int scrnIndex,DisplayModePtr mode); +extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); -DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); -DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, +extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); +extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); -DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); +extern _X_EXPORT DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); -Bool +extern _X_EXPORT Bool xf86ModeIsReduced(const DisplayModeRec *mode); -void +extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); -void +extern _X_EXPORT void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges); -void +extern _X_EXPORT void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch); -void +extern _X_EXPORT void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon); -void +extern _X_EXPORT void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth); -void +extern _X_EXPORT void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList); -void +extern _X_EXPORT void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList, Bool verbose); -void +extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); -void +extern _X_EXPORT void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList); -DisplayModePtr +extern _X_EXPORT DisplayModePtr xf86GetMonitorModes (ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor); -DisplayModePtr -xf86GetDefaultModes (Bool interlaceAllowed, Bool doubleScanAllowed); +extern _X_EXPORT DisplayModePtr +xf86GetDefaultModes (void); -void +extern _X_EXPORT void xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC); #endif /* _XF86MODES_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c index 454649213..c2465bce3 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.c +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c @@ -55,6 +55,13 @@ typedef struct _xf86RandR12Info { int pointerY; Rotation rotation; /* current mode */ Rotation supported_rotations; /* driver supported */ + + /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends + * (actually, any time that we switch back into our VT). + * + * See https://bugs.freedesktop.org/show_bug.cgi?id=21554 + */ + xf86EnterVTProc *orig_EnterVT; } XF86RandRInfoRec, *XF86RandRInfoPtr; #ifdef RANDR_12_INTERFACE @@ -460,7 +467,9 @@ xf86RandR12GetInfo (ScreenPtr pScreen, Rotation *rotations) { xf86ProbeOutputModes (scrp, 0, 0); xf86SetScrnInfoModes (scrp); +#ifdef XFreeXDGA xf86DiDGAReInit (pScreen); +#endif } for (mode = scrp->modes; ; mode = mode->next) @@ -588,7 +597,7 @@ xf86RandR12SetMode (ScreenPtr pScreen, return ret; } -_X_EXPORT Bool +Bool xf86RandR12SetConfig (ScreenPtr pScreen, Rotation rotation, int rate, @@ -740,7 +749,7 @@ finish: return ret; } -_X_EXPORT Rotation +Rotation xf86RandR12GetRotation(ScreenPtr pScreen) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); @@ -748,7 +757,7 @@ xf86RandR12GetRotation(ScreenPtr pScreen) return randrp->rotation; } -_X_EXPORT Bool +Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -800,7 +809,6 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) else { xf86OutputPtr output = config->output[config->compat_output]; - xf86CrtcPtr crtc = output->crtc; if (output->conf_monitor && (output->conf_monitor->mon_width > 0 && @@ -812,17 +820,6 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) mmWidth = output->conf_monitor->mon_width; mmHeight = output->conf_monitor->mon_height; } - else if (crtc && crtc->mode.HDisplay && - output->mm_width && output->mm_height) - { - /* - * If the output has a mode and a declared size, use that - * to scale the screen size - */ - DisplayModePtr mode = &crtc->mode; - mmWidth = output->mm_width * width / mode->HDisplay; - mmHeight = output->mm_height * height / mode->VDisplay; - } else { /* @@ -868,7 +865,7 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen) } -_X_EXPORT Bool +Bool xf86RandR12Init (ScreenPtr pScreen) { rrScrPrivPtr rp; @@ -926,7 +923,7 @@ xf86RandR12Init (ScreenPtr pScreen) return TRUE; } -_X_EXPORT void +void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) { XF86RandRInfoPtr randrp; @@ -952,7 +949,7 @@ xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) randrp->supported_rotations = rotations; } -_X_EXPORT void +void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms) { XF86RandRInfoPtr randrp; @@ -977,7 +974,7 @@ xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms) #endif } -_X_EXPORT void +void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) { ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex]; @@ -1260,8 +1257,58 @@ xf86RandR12CrtcSetGamma (ScreenPtr pScreen, if (!crtc->scrn->vtSema) return TRUE; - crtc->funcs->gamma_set(crtc, randr_crtc->gammaRed, randr_crtc->gammaGreen, - randr_crtc->gammaBlue, randr_crtc->gammaSize); + /* Realloc local gamma if needed. */ + if (randr_crtc->gammaSize != crtc->gamma_size) { + CARD16 *tmp_ptr; + tmp_ptr = realloc(crtc->gamma_red, 3 * crtc->gamma_size * sizeof (CARD16)); + if (!tmp_ptr) + return FALSE; + crtc->gamma_red = tmp_ptr; + crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; + crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; + } + + crtc->gamma_size = randr_crtc->gammaSize; + memcpy (crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_green, randr_crtc->gammaGreen, crtc->gamma_size * sizeof (CARD16)); + memcpy (crtc->gamma_blue, randr_crtc->gammaBlue, crtc->gamma_size * sizeof (CARD16)); + + /* Only set it when the crtc is actually running. + * Otherwise it will be set when it's activated. + */ + if (crtc->active) + crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, + crtc->gamma_blue, crtc->gamma_size); + + return TRUE; +} + +static Bool +xf86RandR12CrtcGetGamma (ScreenPtr pScreen, + RRCrtcPtr randr_crtc) +{ + xf86CrtcPtr crtc = randr_crtc->devPrivate; + + if (!crtc->gamma_size) + return FALSE; + + if (!crtc->gamma_red || !crtc->gamma_green || !crtc->gamma_blue) + return FALSE; + + /* Realloc randr gamma if needed. */ + if (randr_crtc->gammaSize != crtc->gamma_size) { + CARD16 *tmp_ptr; + tmp_ptr = realloc(randr_crtc->gammaRed, 3 * crtc->gamma_size * sizeof (CARD16)); + if (!tmp_ptr) + return FALSE; + randr_crtc->gammaRed = tmp_ptr; + randr_crtc->gammaGreen = randr_crtc->gammaRed + crtc->gamma_size; + randr_crtc->gammaBlue = randr_crtc->gammaGreen + crtc->gamma_size; + } + randr_crtc->gammaSize = crtc->gamma_size; + memcpy (randr_crtc->gammaRed, crtc->gamma_red, crtc->gamma_size * sizeof (CARD16)); + memcpy (randr_crtc->gammaGreen, crtc->gamma_green, crtc->gamma_size * sizeof (CARD16)); + memcpy (randr_crtc->gammaBlue, crtc->gamma_blue, crtc->gamma_size * sizeof (CARD16)); return TRUE; } @@ -1481,7 +1528,9 @@ xf86RandR12GetInfo12 (ScreenPtr pScreen, Rotation *rotations) return TRUE; xf86ProbeOutputModes (pScrn, 0, 0); xf86SetScrnInfoModes (pScrn); +#ifdef XFreeXDGA xf86DiDGAReInit (pScreen); +#endif return xf86RandR12SetInfo12 (pScreen); } @@ -1549,7 +1598,7 @@ xf86RandR12CreateScreenResources12 (ScreenPtr pScreen) * to DGA, VidMode or hot key. Tell RandR */ -_X_EXPORT void +void xf86RandR12TellChanged (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; @@ -1647,16 +1696,83 @@ xf86RandR13SetPanning (ScreenPtr pScreen, } } +/* + * Compatibility with XF86VidMode's gamma changer. This necessarily clobbers + * any per-crtc setup. You asked for it... + */ + +static void +gamma_to_ramp(float gamma, CARD16 *ramp, int size) +{ + int i; + + for (i = 0; i < size; i++) { + if (gamma == 1.0) + ramp[i] = i << 8; + else + ramp[i] = (CARD16)(pow((double)i / (double)(size - 1), 1. / gamma) + * (double)(size - 1) * 256); + } +} + +static int +xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma) +{ + CARD16 *points, *red, *green, *blue; + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); + RRCrtcPtr crtc = config->output[config->compat_output]->crtc->randr_crtc; + int size = max(0, crtc->gammaSize); + + if (!size) + return Success; + + points = xcalloc(size, 3 * sizeof(CARD16)); + if (!points) + return BadAlloc; + + red = points; + green = points + size; + blue = points + 2 * size; + + gamma_to_ramp(gamma.red, red, size); + gamma_to_ramp(gamma.green, green, size); + gamma_to_ramp(gamma.blue, blue, size); + RRCrtcGammaSet(crtc, red, green, blue); + + xfree(points); + + pScrn->gamma = gamma; + + return Success; +} + +static Bool +xf86RandR12EnterVT (int screen_index, int flags) +{ + ScreenPtr pScreen = screenInfo.screens[screen_index]; + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + + if (randrp->orig_EnterVT) { + if (!randrp->orig_EnterVT (screen_index, flags)) + return FALSE; + } + + return RRGetInfo (pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */ +} + static Bool xf86RandR12Init12 (ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; rrScrPrivPtr rp = rrGetScrPriv(pScreen); + XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); rp->rrGetInfo = xf86RandR12GetInfo12; rp->rrScreenSetSize = xf86RandR12ScreenSetSize; rp->rrCrtcSet = xf86RandR12CrtcSet; rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; + rp->rrCrtcGetGamma = xf86RandR12CrtcGetGamma; rp->rrOutputSetProperty = xf86RandR12OutputSetProperty; rp->rrOutputValidateMode = xf86RandR12OutputValidateMode; #if RANDR_13_INTERFACE @@ -1667,6 +1783,11 @@ xf86RandR12Init12 (ScreenPtr pScreen) rp->rrModeDestroy = xf86RandR12ModeDestroy; rp->rrSetConfig = NULL; pScrn->PointerMoved = xf86RandR12PointerMoved; + pScrn->ChangeGamma = xf86RandR12ChangeGamma; + + randrp->orig_EnterVT = pScrn->EnterVT; + pScrn->EnterVT = xf86RandR12EnterVT; + if (!xf86RandR12CreateObjects12 (pScreen)) return FALSE; @@ -1680,7 +1801,7 @@ xf86RandR12Init12 (ScreenPtr pScreen) #endif -_X_EXPORT Bool +Bool xf86RandR12PreInit (ScrnInfoPtr pScrn) { return TRUE; diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.h b/xorg-server/hw/xfree86/modes/xf86RandR12.h index 17a2dcc7f..c8d9918cf 100644 --- a/xorg-server/hw/xfree86/modes/xf86RandR12.h +++ b/xorg-server/hw/xfree86/modes/xf86RandR12.h @@ -28,15 +28,15 @@ #include "xf86Rename.h" #endif -Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); -Bool xf86RandR12Init(ScreenPtr pScreen); -void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); -void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); -Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, +extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); +extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen); +extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); +extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); +extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); -Rotation xf86RandR12GetRotation(ScreenPtr pScreen); -void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); -Bool xf86RandR12PreInit (ScrnInfoPtr pScrn); -void xf86RandR12TellChanged (ScreenPtr pScreen); +extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen); +extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); +extern _X_EXPORT Bool xf86RandR12PreInit (ScrnInfoPtr pScrn); +extern _X_EXPORT void xf86RandR12TellChanged (ScreenPtr pScreen); #endif /* _XF86_RANDR_H_ */ diff --git a/xorg-server/hw/xfree86/modes/xf86Rotate.c b/xorg-server/hw/xfree86/modes/xf86Rotate.c index bb17df431..d9face1cb 100644 --- a/xorg-server/hw/xfree86/modes/xf86Rotate.c +++ b/xorg-server/hw/xfree86/modes/xf86Rotate.c @@ -40,8 +40,7 @@ #include "xf86Modes.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" -#define DPMS_SERVER -#include "X11/extensions/dpms.h" +#include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" /* borrowed from composite extension, move to Render and publish? */ @@ -146,6 +145,37 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) } static void +xf86CrtcShadowClear (xf86CrtcPtr crtc) +{ + PixmapPtr dst_pixmap = crtc->rotatedPixmap; + ScrnInfoPtr scrn = crtc->scrn; + ScreenPtr screen = scrn->pScreen; + PicturePtr dst; + PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]); + static xRenderColor black = { 0, 0, 0, 0 }; + xRectangle rect; + int error; + + if (!dst_pixmap) + return; + dst = CreatePicture (None, + &dst_pixmap->drawable, + format, + 0L, + NULL, + serverClient, + &error); + if (!dst) + return; + rect.x = 0; + rect.y = 0; + rect.width = dst_pixmap->drawable.width; + rect.height = dst_pixmap->drawable.height; + CompositeRects (PictOpSrc, dst, &black, 1, &rect); + FreePicture (dst, None); +} + +static void xf86CrtcDamageShadow (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; @@ -316,7 +346,7 @@ xf86RotateDestroy (xf86CrtcPtr crtc) } } -_X_EXPORT void +void xf86RotateFreeShadow(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); @@ -334,7 +364,7 @@ xf86RotateFreeShadow(ScrnInfoPtr pScrn) } } -_X_EXPORT void +void xf86RotateCloseScreen (ScreenPtr screen) { ScrnInfoPtr scrn = xf86Screens[screen->myNum]; @@ -374,7 +404,7 @@ xf86CrtcFitsScreen (xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb) 0 <= b.y1 && b.y2 <= pScrn->virtualY); } -_X_EXPORT Bool +Bool xf86CrtcRotate (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; diff --git a/xorg-server/hw/xfree86/modes/xf86cvt.c b/xorg-server/hw/xfree86/modes/xf86cvt.c index e9c74aa62..1da5fe50b 100644 --- a/xorg-server/hw/xfree86/modes/xf86cvt.c +++ b/xorg-server/hw/xfree86/modes/xf86cvt.c @@ -63,7 +63,7 @@ * want that. -- libv * */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced) { diff --git a/xorg-server/hw/xfree86/modes/xf86gtf.c b/xorg-server/hw/xfree86/modes/xf86gtf.c index fed56bd12..9d5d50a2d 100644 --- a/xorg-server/hw/xfree86/modes/xf86gtf.c +++ b/xorg-server/hw/xfree86/modes/xf86gtf.c @@ -102,7 +102,7 @@ * XServer of fbset mode descriptions, from what I can tell). */ -_X_EXPORT DisplayModePtr +DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) { DisplayModeRec *mode = xnfcalloc(1, sizeof(DisplayModeRec)); diff --git a/xorg-server/hw/xfree86/os-support/Makefile.in b/xorg-server/hw/xfree86/os-support/Makefile.in index c4873c87f..df03ad299 100644 --- a/xorg-server/hw/xfree86/os-support/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/os-support DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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) @@ -138,6 +142,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@ @@ -158,9 +163,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@ @@ -189,7 +197,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@ @@ -198,9 +208,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@ @@ -239,12 +253,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@ @@ -264,7 +279,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@ @@ -274,6 +288,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -287,11 +302,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@ @@ -327,6 +341,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@ @@ -351,7 +366,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@ @@ -374,6 +388,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -405,7 +420,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@ diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am index e52dac13b..b6ecdf1d1 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.am @@ -17,9 +17,6 @@ else KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c endif -# FIXME: Non-i386/ia64 resource support. -RES_SOURCES = $(srcdir)/../shared/stdResource.c - if AGP AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c else diff --git a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in index 4f5a15a06..9c8a8bedb 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bsd/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/bsd 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 @@ -48,7 +51,8 @@ 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) @@ -62,7 +66,7 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/agp_noop.c $(srcdir)/../linux/lnx_agp.c \ $(srcdir)/../shared/pm_noop.c $(srcdir)/bsd_apm.c \ $(srcdir)/bsd_kqueue_apm.c $(srcdir)/../shared/kmod_noop.c \ - bsd_kmod.c $(srcdir)/../shared/stdResource.c + bsd_kmod.c @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_TRUE@am__objects_1 = ppc_video.lo @@ -77,10 +81,9 @@ am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ @BSD_KQUEUE_APM_TRUE@am__objects_3 = bsd_kqueue_apm.lo @FREEBSD_KLDLOAD_FALSE@am__objects_4 = kmod_noop.lo @FREEBSD_KLDLOAD_TRUE@am__objects_4 = bsd_kmod.lo -am__objects_5 = stdResource.lo am_libbsd_la_OBJECTS = posix_tty.lo sigio.lo vidmem.lo bsd_VTsw.lo \ bsd_init.lo bsd_bell.lo $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) $(am__objects_5) + $(am__objects_3) $(am__objects_4) libbsd_la_OBJECTS = $(am_libbsd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -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@ @@ -383,9 +399,6 @@ noinst_LTLIBRARIES = libbsd.la @BSD_KQUEUE_APM_TRUE@APM_SOURCES = $(srcdir)/bsd_kqueue_apm.c @FREEBSD_KLDLOAD_FALSE@KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c @FREEBSD_KLDLOAD_TRUE@KMOD_SOURCES = bsd_kmod.c - -# FIXME: Non-i386/ia64 resource support. -RES_SOURCES = $(srcdir)/../shared/stdResource.c @AGP_FALSE@AGP_SOURCES = $(srcdir)/../shared/agp_noop.c @AGP_TRUE@AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c @@ -501,7 +514,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc64_video.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@ @@ -603,13 +615,6 @@ kmod_noop.lo: $(srcdir)/../shared/kmod_noop.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 kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.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 - mostlyclean-libtool: -rm -f *.lo diff --git a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c index 9de25f66b..18e1e0b67 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/alpha_video.c @@ -162,10 +162,15 @@ memory_base(void) if (abw_count < 0) init_abw(); - if (abw_count > 0) { + if (abw_count > 1) { xf86Msg(X_INFO, "memory base = %#lx\n", abw[1].abw_abst.abst_sys_start); /* XXXX */ return abw[1].abw_abst.abst_sys_start; + } else if (abw_count == 1) { + /* assume memory_base == dense_base */ + xf86Msg(X_INFO, "memory base = %#lx\n", + abw[0].abw_abst.abst_sys_start); /* XXXX */ + return abw[0].abw_abst.abst_sys_start; } else { xf86Msg(X_INFO, "no memory base\n"); /* XXXX */ return 0; @@ -355,7 +360,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -400,7 +405,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, extern int ioperm(unsigned long from, unsigned long num, int on); -_X_EXPORT Bool +Bool xf86EnableIO() { if (!ioperm(0, 65536, TRUE)) @@ -408,7 +413,7 @@ xf86EnableIO() return FALSE; } -_X_EXPORT void +void xf86DisableIO() { return; @@ -693,22 +698,22 @@ 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; diff --git a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c index a0ebdf2e6..466a8a0db 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/arm_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/arm_video.c @@ -233,7 +233,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -450,7 +450,7 @@ armUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) #ifdef USE_DEV_IO static int IoFd = -1; -_X_EXPORT Bool +Bool xf86EnableIO() { if (IoFd >= 0) @@ -465,7 +465,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (IoFd < 0) diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c index 43eda7421..73c88dca3 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_apm.c @@ -122,7 +122,7 @@ xf86OSPMOpen(void) } xf86PMGetEventFromOs = bsdPMGetEventFromOS; xf86PMConfirmEventToOs = bsdPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); return bsdCloseAPM; } @@ -132,7 +132,7 @@ bsdCloseAPM(void) int fd; if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c index cb10a9d40..77c87ce1d 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_axp.c @@ -36,7 +36,7 @@ static _AXP axpList[] = { {"lca",LCA}, {"t2",T2}, {"tsunami",TSUNAMI}, - {NULL,NONE} + {NULL,SYS_NONE} }; axpDevice @@ -65,7 +65,7 @@ bsdGetAXP(void) #endif for (i=0;;i++) { if (axpList[i].name == NULL) - return NONE; + return SYS_NONE; if (!strcmp(sysname, axpList[i].name)) return axpList[i].type; } diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c index 0d2420102..55eb75231 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_bell.c @@ -41,7 +41,7 @@ #define KBD_FD(i) ((i).kbdFd != -1 ? (i).kbdFd : (i).consoleFd) #endif -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { #ifdef WSCONS_SUPPORT diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c index b2141192e..31b364df3 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_ev56.c @@ -13,6 +13,15 @@ #include "xf86_OSlib.h" #include "xf86OSpriv.h" +#include <machine/bwx.h> + +/* + * The following functions are used only on EV56 and greater CPUs, + * and the assembler requires going to EV56 mode in order to emit + * these instructions. + */ +__asm(".arch ev56"); + int readDense8(pointer Base, register unsigned long Offset); int readDense16(pointer Base, register unsigned long Offset); int readDense32(pointer Base, register unsigned long Offset); @@ -33,14 +42,14 @@ int readDense8(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD8*) ((unsigned long)Base+(Offset)); + return (alpha_ldbu((pointer)((unsigned long)Base+(Offset)))); } int readDense16(pointer Base, register unsigned long Offset) { mem_barrier(); - return *(volatile CARD16*) ((unsigned long)Base+(Offset)); + return (alpha_ldwu((pointer)((unsigned long)Base+(Offset)))); } int @@ -53,13 +62,13 @@ readDense32(pointer Base, register unsigned long Offset) void writeDenseNB8(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD8*)((unsigned long)Base+(Offset)) = Value; + alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); } void writeDenseNB16(int Value, pointer Base, register unsigned long Offset) { - *(volatile CARD16*)((unsigned long)Base + (Offset)) = Value; + alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); } void @@ -72,14 +81,14 @@ void writeDense8(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD8 *)((unsigned long)Base+(Offset)) = Value; + alpha_stb((pointer)((unsigned long)Base+(Offset)), Value); } void writeDense16(int Value, pointer Base, register unsigned long Offset) { write_mem_barrier(); - *(volatile CARD16 *)((unsigned long)Base+(Offset)) = Value; + alpha_stw((pointer)((unsigned long)Base + (Offset)), Value); } void diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c index b6c755852..34e434188 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kmod.c @@ -19,7 +19,7 @@ * Return: * 0 for failure, 1 for success */ -_X_EXPORT int xf86LoadKernelModule(const char *modName) +int xf86LoadKernelModule(const char *modName) { if (kldload(modName) != -1) return 1; diff --git a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index b37070c37..053619e1d 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/xorg-server/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -178,7 +178,7 @@ xf86OSPMOpen(void) xf86PMGetEventFromOs = bsdPMGetEventFromOS; xf86PMConfirmEventToOs = bsdPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(kq, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(kq, xf86HandlePMEvents, NULL); return bsdCloseAPM; } @@ -188,7 +188,7 @@ bsdCloseAPM(void) int kq; if (APMihPtr) { - kq = xf86RemoveInputHandler(APMihPtr); + kq = xf86RemoveGeneralHandler(APMihPtr); close(devFd); devFd = -1; close(kq); diff --git a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c index 83dabc9c6..10db9c7b8 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/i386_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/i386_video.c @@ -279,7 +279,7 @@ unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) * Read BIOS via mmap()ing DEV_MEM */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -331,7 +331,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, static Bool ExtendedEnabled = FALSE; -_X_EXPORT Bool +Bool xf86EnableIO() { if (ExtendedEnabled) @@ -353,7 +353,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (!ExtendedEnabled) diff --git a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c index f1ff64c2a..7e3fcdb2c 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/ppc_video.c @@ -68,7 +68,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) } -_X_EXPORT volatile unsigned char *ioBase = MAP_FAILED; +volatile unsigned char *ioBase = MAP_FAILED; static pointer ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) @@ -97,7 +97,7 @@ ppcUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) munmap(Base, Size); } -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { diff --git a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c index fe3b5e7f2..ea520c49e 100644 --- a/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xorg-server/hw/xfree86/os-support/bsd/sparc64_video.c @@ -82,7 +82,7 @@ sparc64UnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) munmap(Base, Size); } -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { diff --git a/xorg-server/hw/xfree86/os-support/bus/Makefile.in b/xorg-server/hw/xfree86/os-support/bus/Makefile.in index 2396d4123..e5ea2cf75 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/bus/Makefile.in @@ -42,8 +42,11 @@ subdir = hw/xfree86/os-support/bus DIST_COMMON = $(am__sdk_HEADERS_DIST) $(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 @@ -53,7 +56,8 @@ 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) @@ -109,6 +113,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@ @@ -129,9 +134,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@ @@ -160,7 +168,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@ @@ -169,9 +179,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@ @@ -210,12 +224,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@ @@ -235,7 +250,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@ @@ -245,6 +259,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -258,11 +273,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@ @@ -298,6 +312,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@ @@ -322,7 +337,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@ @@ -345,6 +359,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -376,7 +391,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@ diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.c b/xorg-server/hw/xfree86/os-support/bus/Pci.c index 8ca2f1f9b..b7fa25f71 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.c @@ -138,29 +138,12 @@ /* Global data */ -pciBusFuncs_t *pciBusFuncs = NULL; - -_X_EXPORT ADDRESS -pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - if (pciBusFuncs && pciBusFuncs->pciAddrBusToHost) - return pciBusFuncs->pciAddrBusToHost(tag, type, addr); - else - return addr; -} - -_X_EXPORT PCITAG +PCITAG pciTag(int busnum, int devnum, int funcnum) { return(PCI_MAKE_TAG(busnum,devnum,funcnum)); } -ADDRESS -pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - return(addr); -} - Bool xf86scanpci(void) { @@ -168,13 +151,6 @@ xf86scanpci(void) success = (pci_system_init() == 0); - /* XXX */ -#if defined(DEBUGPCI) - if (DEBUGPCI >= xf86Verbose) { - xf86Verbose = DEBUGPCI; - } -#endif - /* choose correct platform/OS specific PCI init routine */ ARCH_PCI_INIT(); diff --git a/xorg-server/hw/xfree86/os-support/bus/Pci.h b/xorg-server/hw/xfree86/os-support/bus/Pci.h index 5feb73349..b52a6cfae 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/Pci.h @@ -150,26 +150,9 @@ #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u) -/* - * Debug Macros/Definitions - */ -/* #define DEBUGPCI 2 */ /* Disable/enable trace in PCI code */ - -#if defined(DEBUGPCI) - -# define PCITRACE(lvl,printfargs) \ - if (lvl > xf86Verbose) { \ - ErrorF printfargs; \ - } - -#else /* !defined(DEBUGPCI) */ - -# define PCITRACE(lvl,printfargs) - -#endif /* !defined(DEBUGPCI) */ - -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__DragonFly__) || defined(__sun) +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ + defined(__OpenBSD__) || defined(__NetBSD__) || \ + defined(__DragonFly__) || defined(__sun) || defined(__GNU__) #define ARCH_PCI_INIT bsdPciInit #endif @@ -183,17 +166,4 @@ extern void ARCH_PCI_INIT(void); -/* - * Table of functions used to access a specific PCI bus domain - * (e.g. a primary PCI bus and all of its secondaries) - */ -typedef struct pci_bus_funcs { - ADDRESS (*pciAddrBusToHost)(PCITAG, PciAddrType, ADDRESS); -} pciBusFuncs_t, *pciBusFuncs_p; - -/* Generic PCI service functions and helpers */ -ADDRESS pciAddrNOOP(PCITAG tag, PciAddrType type, ADDRESS); - -extern pciBusFuncs_t *pciBusFuncs; - #endif /* _PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/bus/Sbus.c b/xorg-server/hw/xfree86/os-support/bus/Sbus.c index 1363d5746..0b6205f0b 100644 --- a/xorg-server/hw/xfree86/os-support/bus/Sbus.c +++ b/xorg-server/hw/xfree86/os-support/bus/Sbus.c @@ -180,7 +180,7 @@ promIsP1275(void) #endif } -_X_EXPORT void +void sparcPromClose(void) { if (promOpenCount > 1) { @@ -198,7 +198,7 @@ sparcPromClose(void) promOpenCount = 0; } -_X_EXPORT int +int sparcPromInit(void) { if (promOpenCount) { @@ -224,7 +224,7 @@ sparcPromInit(void) return 0; } -_X_EXPORT char * +char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp) { if (promSetNode(pnode)) @@ -232,7 +232,7 @@ sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp) return promGetProperty(prop, lenp); } -_X_EXPORT int +int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop) { if (promSetNode(pnode)) @@ -609,7 +609,7 @@ sparcPromPathname2Node(const char *pathName) return i; } -_X_EXPORT pointer +pointer xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) { pointer ret; @@ -636,7 +636,7 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) return (char *)ret + (offset - off); } -_X_EXPORT void +void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) { unsigned long mask = getpagesize() - 1; @@ -647,7 +647,7 @@ xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) } /* Tell OS that we are driving the HW cursor ourselves. */ -_X_EXPORT void +void xf86SbusHideOsHwCursor(sbusDevicePtr psdp) { struct fbcursor fbcursor; @@ -668,7 +668,7 @@ xf86SbusHideOsHwCursor(sbusDevicePtr psdp) } /* Set HW cursor colormap. */ -_X_EXPORT void +void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg) { struct fbcursor fbcursor; diff --git a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c index 9b55d3a44..17b52db49 100644 --- a/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c +++ b/xorg-server/hw/xfree86/os-support/bus/bsd_pci.c @@ -48,7 +48,7 @@ #include "pciaccess.h" -_X_EXPORT pointer +pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size) { diff --git a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c index 263fd8ff1..920a14949 100644 --- a/xorg-server/hw/xfree86/os-support/bus/linuxPci.c +++ b/xorg-server/hw/xfree86/os-support/bus/linuxPci.c @@ -56,29 +56,6 @@ #include "Pci.h" #include <dirent.h> -/* - * linux platform specific PCI access functions -- using /proc/bus/pci - * needs kernel version 2.2.x - */ -static ADDRESS linuxTransAddrBusToHost(PCITAG tag, PciAddrType type, ADDRESS addr); -#if defined(__powerpc__) -static ADDRESS linuxPpcBusAddrToHostAddr(PCITAG, PciAddrType, ADDRESS); -#endif - -static pciBusFuncs_t linuxFuncs0 = { -#if defined(__powerpc__) -/* pciAddrBusToHost */ linuxPpcBusAddrToHostAddr, -#else -/* linuxTransAddrBusToHost is busted on sparc64 but the PCI rework tree - * makes it all moot, so we kludge it for now */ -#if defined(__sparc__) -/* pciAddrBusToHost */ pciAddrNOOP, -#else -/* pciAddrBusToHost */ linuxTransAddrBusToHost, -#endif /* __sparc64__ */ -#endif -}; - static const struct pci_id_match match_host_bridge = { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_HOST << 8), @@ -91,16 +68,7 @@ static pointer DomainMmappedIO[MAX_DOMAINS]; void linuxPciInit(void) { - struct stat st; - memset(DomainMmappedIO, 0, sizeof(DomainMmappedIO)); - - if (-1 == stat("/proc/bus/pci", &st)) { - /* when using this as default for all linux architectures, - we'll need a fallback for 2.0 kernels here */ - return; - } - pciBusFuncs = &linuxFuncs0; } /** @@ -178,53 +146,6 @@ linuxPciOpenFile(struct pci_device *dev, Bool write) } /* - * This function will convert a BAR address into a host address - * suitable for passing into the mmap function of a /proc/bus - * device. - */ -ADDRESS linuxTransAddrBusToHost(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - ADDRESS ret = xf86GetOSOffsetFromPCI(tag, PCI_MEM|PCI_IO, addr); - - if (ret) - return ret; - - /* - * if it is not a BAR address, it must be legacy, (or wrong) - * return it as is.. - */ - return addr; -} - - -#if defined(__powerpc__) - -#ifndef __NR_pciconfig_iobase -#define __NR_pciconfig_iobase 200 -#endif - -static ADDRESS -linuxPpcBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr) -{ - if (type == PCI_MEM) - { - ADDRESS membase = syscall(__NR_pciconfig_iobase, 1, - PCI_BUS_FROM_TAG(tag), PCI_DFN_FROM_TAG(tag)); - return (addr + membase); - } - else if (type == PCI_IO) - { - ADDRESS iobase = syscall(__NR_pciconfig_iobase, 2, - PCI_BUS_FROM_TAG(tag), PCI_DFN_FROM_TAG(tag)); - return (addr + iobase); - } - else return addr; -} - -#endif /* __powerpc__ */ - - -/* * Compiling the following simply requires the presence of <linux/pci.c>. * Actually running this is another matter altogether... * @@ -464,7 +385,7 @@ linuxOpenLegacy(struct pci_device *dev, char *name) * returns a pointer to it. The pointer is saved for future use if it's in * the legacy ISA memory space (memory in a domain between 0 and 1MB). */ -_X_EXPORT pointer +pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size) { @@ -531,58 +452,3 @@ xf86MapLegacyIO(struct pci_device *dev) return (IOADDRESS)DomainMmappedIO[domain]; } -resPtr -xf86AccResFromOS(resPtr pRes) -{ - struct pci_device *dev; - struct pci_device_iterator *iter; - resRange range; - - iter = pci_id_match_iterator_create(& match_host_bridge); - while ((dev = pci_device_next(iter)) != NULL) { - const int domain = dev->domain; - const struct pciSizes * const sizes = linuxGetSizesStruct(dev); - - /* - * At minimum, the top and bottom resources must be claimed, so - * that resources that are (or appear to be) unallocated can be - * relocated. - */ - RANGE(range, 0x00000000u, 0x0009ffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000c0000u, 0x000effffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, 0x000f0000u, 0x000fffffu, - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, (ADDRESS)(sizes->mem_size - 1), - (ADDRESS)(sizes->mem_size - 1), - RANGE_TYPE(ResExcMemBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - RANGE(range, 0x00000000u, 0x00000000u, - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - RANGE(range, (IOADDRESS)(sizes->io_size - 1), - (IOADDRESS)(sizes->io_size - 1), - RANGE_TYPE(ResExcIoBlock, domain)); - pRes = xf86AddResToList(pRes, &range, -1); - - /* FIXME: The old code reserved domain 0 for a special purpose. The - * FIXME: new code just uses whatever domains the kernel tells it, - * FIXME: but there is no way to get a domain < 0. What should - * FIXME: happen here? - * - if (domain <= 0) - break; - */ - } - - pci_iterator_destroy(iter); - - return pRes; -} - diff --git a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h index 3a73678b3..ce1336bf2 100644 --- a/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h +++ b/xorg-server/hw/xfree86/os-support/bus/xf86Pci.h @@ -251,13 +251,12 @@ typedef enum { /* Public PCI access functions */ -ADDRESS pciBusAddrToHostAddr(PCITAG tag, PciAddrType type, ADDRESS addr); -PCITAG pciTag(int busnum, int devnum, int funcnum); -Bool xf86scanpci(void); +extern _X_EXPORT PCITAG pciTag(int busnum, int devnum, int funcnum); +extern _X_EXPORT Bool xf86scanpci(void); /* Domain access functions. Some of these probably shouldn't be public */ -pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, +extern _X_EXPORT pointer xf86MapDomainMemory(int ScreenNum, int Flags, struct pci_device *dev, ADDRESS Base, unsigned long Size); -IOADDRESS xf86MapLegacyIO(struct pci_device *dev); +extern _X_EXPORT IOADDRESS xf86MapLegacyIO(struct pci_device *dev); #endif /* _XF86PCI_H */ diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am index b405b1f2a..3e8224753 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.am @@ -4,7 +4,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ diff --git a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in index e09ad2617..187b4a2fd 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/hurd/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/hurd 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 @@ -48,13 +51,14 @@ 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) libhurd_la_LIBADD = am_libhurd_la_OBJECTS = hurd_bell.lo hurd_init.lo hurd_mmap.lo \ - hurd_video.lo VTsw_noop.lo posix_tty.lo stdResource.lo \ + hurd_video.lo VTsw_noop.lo posix_tty.lo vidmem.lo \ sigiostubs.lo pm_noop.lo kmod_noop.lo agp_noop.lo libhurd_la_OBJECTS = $(am_libhurd_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include @@ -77,6 +81,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@ @@ -97,9 +102,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@ @@ -128,7 +136,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@ @@ -137,9 +147,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@ @@ -178,12 +192,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@ @@ -203,7 +218,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@ @@ -213,6 +227,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -226,11 +241,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@ @@ -266,6 +280,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@ @@ -290,7 +305,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@ @@ -313,6 +327,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -344,7 +359,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@ @@ -355,7 +372,7 @@ libhurd_la_SOURCES = hurd_bell.c hurd_init.c hurd_mmap.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ @@ -425,7 +442,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.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@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -462,12 +479,12 @@ posix_tty.lo: $(srcdir)/../shared/posix_tty.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 posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.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@ +vidmem.lo: $(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/vidmem.c' object='vidmem.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 +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c index 732a1cadb..33965a44c 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_bell.c @@ -30,7 +30,7 @@ #include "xf86.h" #include "xf86Priv.h" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { return; diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c index 8cd8f54d6..94e261553 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_init.c @@ -43,19 +43,19 @@ #include <assert.h> #include <mach.h> -int +int xf86ProcessArgument( int argc,char **argv, int i ) { return 0; } -void +void xf86UseMsg() { return; } -void +void xf86OpenConsole() { if( serverGeneration == 1 ) @@ -81,7 +81,7 @@ xf86OpenConsole() return; } -void +void xf86CloseConsole() { close( xf86Info.consoleFd ); diff --git a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c index b814072cb..b8b00c892 100644 --- a/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c +++ b/xorg-server/hw/xfree86/os-support/hurd/hurd_video.c @@ -41,8 +41,8 @@ /************************************************************************** * Video Memory Mapping section ***************************************************************************/ -pointer -xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) +static pointer +mapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) { mach_port_t device,iopl_dev; memory_object_t iopl_mem; @@ -95,8 +95,8 @@ xf86MapVidMem(int ScreenNum,int Flags, unsigned long Base, unsigned long Size) return (pointer)addr; } -void -xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size) +static void +unmapVidMem(int ScreenNum,pointer Base,unsigned long Size) { kern_return_t err = vm_deallocate(mach_task_self(), (int)Base, Size); if( err ) @@ -107,12 +107,6 @@ xf86UnMapVidMem(int ScreenNum,pointer Base,unsigned long Size) return; } -Bool -xf86LinearVidMem() -{ - return(TRUE); -} - /************************************************************************** * I/O Permissions section ***************************************************************************/ @@ -143,14 +137,10 @@ xf86DisableIO() } void -xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base, - unsigned long Size) +xf86OSInitVidMem(VidMemInfoPtr pVidMem) { + pVidMem->linearSupported = TRUE; + pVidMem->mapMem = mapVidMem; + pVidMem->unmapMem = unmapVidMem; + pVidMem->initialised = TRUE; } - -Bool -xf86CheckMTRR(int s) -{ - return FALSE; -} - 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 <sys/stat.h> -#ifdef USE_DEV_FB -extern char *getenv(const char *); -#include <linux/fb.h> -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__ */ diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.am b/xorg-server/hw/xfree86/os-support/misc/Makefile.am index 3d4b8ff0e..4bd3fc3e1 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c +libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r diff --git a/xorg-server/hw/xfree86/os-support/misc/Makefile.in b/xorg-server/hw/xfree86/os-support/misc/Makefile.in index e69b9ae8a..bf214ff3c 100644 --- a/xorg-server/hw/xfree86/os-support/misc/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/misc/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/misc 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 @@ -48,12 +51,13 @@ 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) libmisc_la_LIBADD = -am_libmisc_la_OBJECTS = Delay.lo BUSmemcpy.lo SlowBcopy.lo +am_libmisc_la_OBJECTS = SlowBcopy.lo libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -75,6 +79,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@ @@ -95,9 +100,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@ @@ -126,7 +134,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@ @@ -135,9 +145,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@ @@ -176,12 +190,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@ @@ -201,7 +216,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@ @@ -211,6 +225,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -224,11 +239,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@ @@ -264,6 +278,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@ @@ -288,7 +303,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@ @@ -311,6 +325,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -342,14 +357,16 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmisc.la -libmisc_la_SOURCES = Delay.c BUSmemcpy.c SlowBcopy.c +libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r INCLUDES = $(XORG_INCS) @@ -407,8 +424,6 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BUSmemcpy.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Delay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SlowBcopy.Plo@am__quote@ .c.o: diff --git a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c index be69b9dd1..8a5017e52 100644 --- a/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c +++ b/xorg-server/hw/xfree86/os-support/misc/SlowBcopy.c @@ -1,15 +1,8 @@ -/******************************************************************************* - for Alpha Linux -*******************************************************************************/ - /* * Create a dependency that should be immune from the effect of register * renaming as is commonly seen in superscalar processors. This should * insert a minimum of 100-ns delays between reads/writes at clock rates * up to 100 MHz---GGL - * - * Slowbcopy(char *src, char *dst, int count) - * */ #ifdef HAVE_XORG_CONFIG_H @@ -24,7 +17,7 @@ static int really_slow_bcopy; -_X_EXPORT void +void xf86SetReallySlowBcopy(void) { really_slow_bcopy = 1; @@ -42,7 +35,7 @@ static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int l #endif /* The outb() isn't needed on my machine, but who knows ... -- ost */ -_X_EXPORT void +void xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) { #if defined(__i386__) || defined(__amd64__) @@ -54,48 +47,3 @@ xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) while(len--) *dst++ = *src++; } - -#ifdef __alpha__ - -#ifdef linux - -#define SPARSE (7) - -#else - -#define SPARSE 0 - -#endif - -_X_EXPORT void -xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count) -{ - unsigned long addr; - long result; - - addr = (unsigned long) src; - while( count ){ - result = *(volatile int *) addr; - result >>= ((addr>>SPARSE) & 3) * 8; - *dst++ = (unsigned char) (0xffUL & result); - addr += 1<<SPARSE; - count--; - outb(0x80, 0x00); - } -} - -_X_EXPORT void -xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count) -{ - unsigned long addr; - - addr = (unsigned long) dst; - while(count) { - *(volatile unsigned int *) addr = (unsigned short)(*src) * 0x01010101; - src++; - addr += 1<<SPARSE; - count--; - outb(0x80, 0x00); - } -} -#endif diff --git a/xorg-server/hw/xfree86/os-support/sco/Makefile.in b/xorg-server/hw/xfree86/os-support/sco/Makefile.in index 8baed7330..7de5be1ae 100644 --- a/xorg-server/hw/xfree86/os-support/sco/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/sco/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/sco 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 @@ -47,7 +50,8 @@ 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 = SOURCES = @@ -58,6 +62,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@ @@ -78,9 +83,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@ @@ -109,7 +117,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@ @@ -118,9 +128,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@ @@ -159,12 +173,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@ @@ -184,7 +199,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@ @@ -194,6 +208,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -207,11 +222,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@ @@ -247,6 +261,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@ @@ -271,7 +286,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@ @@ -294,6 +308,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -325,7 +340,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@ diff --git a/xorg-server/hw/xfree86/os-support/sco/sco_iop.c b/xorg-server/hw/xfree86/os-support/sco/sco_iop.c index 86210d71a..3da4fcf3a 100644 --- a/xorg-server/hw/xfree86/os-support/sco/sco_iop.c +++ b/xorg-server/hw/xfree86/os-support/sco/sco_iop.c @@ -64,7 +64,7 @@ extern long sysi86 (int cmd, ...); static Bool IOEnabled = FALSE; -_X_EXPORT Bool +Bool xf86EnableIO(void) { if (IOEnabled) @@ -79,7 +79,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { if (!IOEnabled) diff --git a/xorg-server/hw/xfree86/os-support/sco/sco_video.c b/xorg-server/hw/xfree86/os-support/sco/sco_video.c index 7edf71db3..f63b71df8 100644 --- a/xorg-server/hw/xfree86/os-support/sco/sco_video.c +++ b/xorg-server/hw/xfree86/os-support/sco/sco_video.c @@ -124,9 +124,7 @@ mapVidMemMMAP(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", Base,realBase,alignOff); -#endif + DebugF("base: %lx, realBase: %lx, alignOff: %lx\n", Base,realBase,alignOff); base = mmap((caddr_t)0, Size + alignOff, (flags & VIDMEM_READONLY) ? PROT_READ : (PROT_READ | PROT_WRITE), @@ -138,9 +136,7 @@ mapVidMemMMAP(int ScreenNum, unsigned long Base, unsigned long Size, int flags) return 0; /* NOTREACHED */ } -#ifdef DEBUG - ErrorF("base: %lx aligned base: %lx\n",base, base + alignOff); -#endif + DebugF("base: %lx aligned base: %lx\n",base, base + alignOff); return (pointer)((char *)base + alignOff); } diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c index a3cfe40b9..78cbe0e34 100644 --- a/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_noop.c @@ -36,19 +36,19 @@ */ Bool -xf86VTSwitchPending() +xf86VTSwitchPending(void) { return(FALSE); } Bool -xf86VTSwitchAway() +xf86VTSwitchAway(void) { return(FALSE); } Bool -xf86VTSwitchTo() +xf86VTSwitchTo(void) { return(TRUE); } diff --git a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c index 4d473147f..9308640e2 100644 --- a/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c +++ b/xorg-server/hw/xfree86/os-support/shared/VTsw_usl.c @@ -53,13 +53,13 @@ xf86VTRequest(int sig) } Bool -xf86VTSwitchPending() +xf86VTSwitchPending(void) { return(xf86Info.vtRequestsPending ? TRUE : FALSE); } Bool -xf86VTSwitchAway() +xf86VTSwitchAway(void) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) @@ -76,7 +76,7 @@ xf86VTSwitchAway() } Bool -xf86VTSwitchTo() +xf86VTSwitchTo(void) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) diff --git a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c index 5774bc231..eda466a52 100644 --- a/xorg-server/hw/xfree86/os-support/shared/agp_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/agp_noop.c @@ -40,63 +40,63 @@ #include "xf86_OSlib.h" #include "xf86OSpriv.h" -_X_EXPORT Bool +Bool xf86GARTCloseScreen(int screenNum) { return FALSE; } -_X_EXPORT Bool +Bool xf86AgpGARTSupported() { return FALSE; } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { return NULL; } -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { return FALSE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { return -1; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { return FALSE; } -_X_EXPORT Bool +Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { return FALSE; } -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { return FALSE; } -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { return FALSE; diff --git a/xorg-server/hw/xfree86/os-support/shared/bios_devmem.c b/xorg-server/hw/xfree86/os-support/shared/bios_devmem.c index 7288239be..67a14f5d6 100644 --- a/xorg-server/hw/xfree86/os-support/shared/bios_devmem.c +++ b/xorg-server/hw/xfree86/os-support/shared/bios_devmem.c @@ -39,7 +39,7 @@ # define DEV_MEM "/dev/mem" #endif -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { diff --git a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c index 0c368e713..a615a1d45 100644 --- a/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c +++ b/xorg-server/hw/xfree86/os-support/shared/bios_mmap.c @@ -40,7 +40,7 @@ */ #ifndef __alpha__ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -68,10 +68,8 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, close(fd); return(-1); } -#ifdef DEBUG - ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", + DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", Base, ptr[0] | (ptr[1] << 8)); -#endif (void)memcpy(Buf, (void *)(ptr + Offset), Len); (void)munmap((caddr_t)ptr, mlen); (void)close(fd); @@ -133,7 +131,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, return(-1); } - xf86SlowBCopyFromBus((unsigned char *)(base+Offset), Buf, Len); + xf86SlowBcopy((unsigned char *)(base+Offset), Buf, Len); munmap((caddr_t)base, mlen); close(fd); diff --git a/xorg-server/hw/xfree86/os-support/shared/ia64Pci.c b/xorg-server/hw/xfree86/os-support/shared/ia64Pci.c index 6f6924b59..c93c74c4a 100644 --- a/xorg-server/hw/xfree86/os-support/shared/ia64Pci.c +++ b/xorg-server/hw/xfree86/os-support/shared/ia64Pci.c @@ -60,7 +60,7 @@ static int ia64_port_to_fd(unsigned long port) return (port >> 24) & 0xffffffff; } -_X_EXPORT void outb(unsigned long port, unsigned char val) +void outb(unsigned long port, unsigned char val) { int fd = ia64_port_to_fd(port); @@ -80,7 +80,7 @@ _X_EXPORT void outb(unsigned long port, unsigned char val) return; } -_X_EXPORT void outw(unsigned long port, unsigned short val) +void outw(unsigned long port, unsigned short val) { int fd = ia64_port_to_fd(port); @@ -100,7 +100,7 @@ _X_EXPORT void outw(unsigned long port, unsigned short val) return; } -_X_EXPORT void outl(unsigned long port, unsigned int val) +void outl(unsigned long port, unsigned int val) { int fd = ia64_port_to_fd(port); @@ -120,7 +120,7 @@ _X_EXPORT void outl(unsigned long port, unsigned int val) return; } -_X_EXPORT unsigned int inb(unsigned long port) +unsigned int inb(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned char val; @@ -142,7 +142,7 @@ _X_EXPORT unsigned int inb(unsigned long port) return val; } -_X_EXPORT unsigned int inw(unsigned long port) +unsigned int inw(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned short val; @@ -164,7 +164,7 @@ _X_EXPORT unsigned int inw(unsigned long port) return val; } -_X_EXPORT unsigned int inl(unsigned long port) +unsigned int inl(unsigned long port) { int fd = ia64_port_to_fd(port); unsigned int val; diff --git a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c index 1d7851a5b..805caccac 100644 --- a/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/ioperm_noop.c @@ -35,13 +35,13 @@ #include "xf86Priv.h" #include "xf86_OSlib.h" -_X_EXPORT Bool +Bool xf86EnableIO() { return TRUE; } -_X_EXPORT void +void xf86DisableIO() { return; diff --git a/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c b/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c index 6525e8414..e86d7472f 100644 --- a/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c +++ b/xorg-server/hw/xfree86/os-support/shared/kmod_noop.c @@ -31,7 +31,7 @@ #include "xf86_OSproc.h" -_X_EXPORT int xf86LoadKernelModule(const char *pathname) +int xf86LoadKernelModule(const char *pathname) { (void) pathname; return 0; /* failure */ diff --git a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c index 316526bdc..bf1bb03a3 100644 --- a/xorg-server/hw/xfree86/os-support/shared/posix_tty.c +++ b/xorg-server/hw/xfree86/os-support/shared/posix_tty.c @@ -111,7 +111,7 @@ GetBaud (int baudrate) return (0); } -_X_EXPORT int +int xf86OpenSerial (pointer options) { struct termios t; @@ -194,7 +194,7 @@ xf86OpenSerial (pointer options) return (fd); } -_X_EXPORT int +int xf86SetSerial (int fd, pointer options) { struct termios t; @@ -365,7 +365,7 @@ xf86SetSerial (int fd, pointer options) return (r); } -_X_EXPORT int +int xf86SetSerialSpeed (int fd, int speed) { struct termios t; @@ -396,41 +396,36 @@ xf86SetSerialSpeed (int fd, int speed) return (r); } -_X_EXPORT int +int xf86ReadSerial (int fd, void *buf, int count) { int r; -#ifdef DEBUG int i; -#endif + SYSCALL (r = read (fd, buf, count)); -#ifdef DEBUG - ErrorF("ReadingSerial: 0x%x", + DebugF("ReadingSerial: 0x%x", (unsigned char)*(((unsigned char *)buf))); for (i = 1; i < r; i++) - ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); - ErrorF("\n"); -#endif + DebugF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); + DebugF("\n"); return (r); } -_X_EXPORT int +int xf86WriteSerial (int fd, const void *buf, int count) { int r; -#ifdef DEBUG int i; - ErrorF("WritingSerial: 0x%x",(unsigned char)*(((unsigned char *)buf))); + DebugF("WritingSerial: 0x%x",(unsigned char)*(((unsigned char *)buf))); for (i = 1; i < count; i++) ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); - ErrorF("\n"); -#endif + DebugF("\n"); SYSCALL (r = write (fd, buf, count)); return (r); } -_X_EXPORT int +int xf86CloseSerial (int fd) { int r; @@ -439,7 +434,7 @@ xf86CloseSerial (int fd) return (r); } -_X_EXPORT int +int xf86WaitForInput (int fd, int timeout) { fd_set readfds; @@ -465,7 +460,7 @@ xf86WaitForInput (int fd, int timeout) return (r); } -_X_EXPORT int +int xf86SerialSendBreak (int fd, int duration) { int r; @@ -475,16 +470,14 @@ xf86SerialSendBreak (int fd, int duration) } -_X_EXPORT int +int xf86FlushInput(int fd) { fd_set fds; struct timeval timeout; char c[4]; -#ifdef DEBUG - ErrorF("FlushingSerial\n"); -#endif + DebugF("FlushingSerial\n"); if (tcflush(fd, TCIFLUSH) == 0) return 0; @@ -576,7 +569,7 @@ getOsStateMask(void) static int osStateMask = 0; -_X_EXPORT int +int xf86SetSerialModemState(int fd, int state) { int ret; @@ -609,7 +602,7 @@ xf86SetSerialModemState(int fd, int state) #endif } -_X_EXPORT int +int xf86GetSerialModemState(int fd) { int ret; @@ -632,7 +625,7 @@ xf86GetSerialModemState(int fd) #endif } -_X_EXPORT int +int xf86SerialModemSetBits(int fd, int bits) { int ret; @@ -654,7 +647,7 @@ xf86SerialModemSetBits(int fd, int bits) #endif } -_X_EXPORT int +int xf86SerialModemClearBits(int fd, int bits) { int ret; diff --git a/xorg-server/hw/xfree86/os-support/shared/sigio.c b/xorg-server/hw/xfree86/os-support/shared/sigio.c index 92bdd2988..44136ccfb 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigio.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigio.c @@ -63,6 +63,10 @@ # include "xf86_OSlib.h" # include "inputstr.h" +#ifdef HAVE_STROPTS_H +# include <stropts.h> +#endif + /* * Linux libc5 defines FASYNC, but not O_ASYNC. Don't know if it is * functional or not. @@ -71,11 +75,11 @@ # define O_ASYNC FASYNC #endif -#ifdef MAX_DEVICES -/* MAX_DEVICES represents the maximimum number of input devices usable +#ifdef MAXDEVICES +/* MAXDEVICES represents the maximimum number of input devices usable * at the same time plus one entry for DRM support. */ -# define MAX_FUNCS (MAX_DEVICES + 1) +# define MAX_FUNCS (MAXDEVICES + 1) #else # define MAX_FUNCS 16 #endif @@ -132,13 +136,14 @@ xf86IsPipe (int fd) return S_ISFIFO(buf.st_mode); } -_X_EXPORT int +int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) { struct sigaction sa; struct sigaction osa; int i; int blocked; + int installed = FALSE; for (i = 0; i < MAX_FUNCS; i++) { @@ -147,15 +152,30 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) if (xf86IsPipe (fd)) return 0; blocked = xf86BlockSIGIO(); +#ifdef O_ASYNC if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) { - xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", + xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", fd, strerror(errno)); - xf86UnblockSIGIO(blocked); - return 0; + } else { + if (fcntl(fd, F_SETOWN, getpid()) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", + fd, strerror(errno)); + } else { + installed = TRUE; + } } - if (fcntl(fd, F_SETOWN, getpid()) == -1) { - xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", - fd, strerror(errno)); +#endif +#ifdef I_SETSIG /* System V Streams - used on Solaris for input devices */ + if (!installed && isastream(fd)) { + if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n", + fd, strerror(errno)); + } else { + installed = TRUE; + } + } +#endif + if (!installed) { xf86UnblockSIGIO(blocked); return 0; } @@ -186,7 +206,7 @@ xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) return 0; } -_X_EXPORT int +int xf86RemoveSIGIOHandler(int fd) { struct sigaction sa; @@ -221,7 +241,17 @@ xf86RemoveSIGIOHandler(int fd) } if (ret) { +#ifdef O_ASYNC fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC); +#endif +#ifdef I_SETSIG + if (isastream(fd)) { + if (ioctl(fd, I_SETSIG, 0) == -1) { + xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n", + fd, strerror(errno)); + } + } +#endif xf86SigIOMax = max; xf86SigIOMaxFd = maxfd; if (!max) @@ -236,7 +266,7 @@ xf86RemoveSIGIOHandler(int fd) return ret; } -_X_EXPORT int +int xf86BlockSIGIO (void) { sigset_t set, old; @@ -249,7 +279,7 @@ xf86BlockSIGIO (void) return ret; } -_X_EXPORT void +void xf86UnblockSIGIO (int wasset) { sigset_t set; diff --git a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c index 7113968c6..cecec37f7 100644 --- a/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c +++ b/xorg-server/hw/xfree86/os-support/shared/sigiostubs.c @@ -34,25 +34,25 @@ # include "xf86Priv.h" # include "xf86_OSlib.h" -_X_EXPORT int +int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *closure) { return 0; } -_X_EXPORT int +int xf86RemoveSIGIOHandler(int fd) { return 0; } -_X_EXPORT int +int xf86BlockSIGIO (void) { return 0; } -_X_EXPORT void +void xf86UnblockSIGIO (int wasset) { } diff --git a/xorg-server/hw/xfree86/os-support/shared/vidmem.c b/xorg-server/hw/xfree86/os-support/shared/vidmem.c index 0b4411604..803ce09bd 100644 --- a/xorg-server/hw/xfree86/os-support/shared/vidmem.c +++ b/xorg-server/hw/xfree86/os-support/shared/vidmem.c @@ -184,7 +184,7 @@ xf86InitVidMem(void) } } -_X_EXPORT pointer +pointer xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) { pointer vbase = NULL; @@ -230,7 +230,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) return vbase; } -_X_EXPORT void +void xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) { VidMapPtr vp; @@ -257,7 +257,7 @@ xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) removeMapping(vp, mp); } -_X_EXPORT Bool +Bool xf86CheckMTRR(int ScreenNum) { VidMapPtr vp = getVidMapRec(ScreenNum); @@ -274,14 +274,14 @@ xf86CheckMTRR(int ScreenNum) return FALSE; } -_X_EXPORT Bool -xf86LinearVidMem() +Bool +xf86LinearVidMem(void) { xf86InitVidMem(); return vidMemInfo.linearSupported; } -_X_EXPORT void +void xf86MapReadSideEffects(int ScreenNum, int Flags, pointer base, unsigned long Size) { diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am index a4ef67b91..5163f4423 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.am +++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.am @@ -1,33 +1,32 @@ -if SOLARIS_USL_CONSOLE -VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c +if SOLARIS_VT +VTSW_SRC = sun_VTsw.c else VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c endif -# TODO: Don't build agpgart on SPARC -#if defined(i386Architecture) || defined(AMD64Architecture) +if AGP AGP_SRC = sun_agp.c -#else -#AGP_SRC = $(srcdir)/../shared/agp_noop.c -#endif +else +AGP_SRC = $(srcdir)/../shared/agp_noop.c +endif SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S - $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@ + $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) -sdk_HEADERS = agpgart.h +sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) diff --git a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in index 74baaea27..ced1ff70d 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/solaris/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/os-support/solaris DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,23 +53,25 @@ 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) libsolaris_la_LIBADD = am__libsolaris_la_SOURCES_DIST = sun_init.c sun_vid.c sun_bell.c \ - sun_agp.c sun_apm.c $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c \ - $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c $(srcdir)/../shared/vidmem.c \ - $(srcdir)/../shared/VTsw_noop.c $(srcdir)/../shared/VTsw_usl.c -am__objects_1 = sun_agp.lo -@SOLARIS_USL_CONSOLE_FALSE@am__objects_2 = VTsw_noop.lo -@SOLARIS_USL_CONSOLE_TRUE@am__objects_2 = VTsw_usl.lo + $(srcdir)/../shared/agp_noop.c sun_agp.c sun_apm.c \ + $(srcdir)/../shared/kmod_noop.c \ + $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigio.c \ + $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/VTsw_noop.c \ + sun_VTsw.c +@AGP_FALSE@am__objects_1 = agp_noop.lo +@AGP_TRUE@am__objects_1 = sun_agp.lo +@SOLARIS_VT_FALSE@am__objects_2 = VTsw_noop.lo +@SOLARIS_VT_TRUE@am__objects_2 = sun_VTsw.lo am_libsolaris_la_OBJECTS = sun_init.lo sun_vid.lo sun_bell.lo \ - $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo \ - sigiostubs.lo stdResource.lo vidmem.lo $(am__objects_2) + $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo sigio.lo \ + vidmem.lo $(am__objects_2) am__objects_3 = solaris-@SOLARIS_INOUT_ARCH@.lo nodist_libsolaris_la_OBJECTS = $(am__objects_3) libsolaris_la_OBJECTS = $(am_libsolaris_la_OBJECTS) \ @@ -119,6 +124,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@ @@ -139,9 +145,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@ @@ -170,7 +179,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@ @@ -179,9 +190,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@ @@ -220,12 +235,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@ @@ -245,7 +261,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@ @@ -255,6 +270,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -268,11 +284,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@ @@ -308,6 +323,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@ @@ -332,7 +348,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@ @@ -355,6 +370,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -386,34 +402,31 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@SOLARIS_USL_CONSOLE_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c -@SOLARIS_USL_CONSOLE_TRUE@VTSW_SRC = $(srcdir)/../shared/VTsw_usl.c - -# TODO: Don't build agpgart on SPARC -#if defined(i386Architecture) || defined(AMD64Architecture) -AGP_SRC = sun_agp.c -#else -#AGP_SRC = $(srcdir)/../shared/agp_noop.c -#endif +@SOLARIS_VT_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c +@SOLARIS_VT_TRUE@VTSW_SRC = sun_VTsw.c +@AGP_FALSE@AGP_SRC = $(srcdir)/../shared/agp_noop.c +@AGP_TRUE@AGP_SRC = sun_agp.c SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ - $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigiostubs.c \ - $(srcdir)/../shared/stdResource.c \ + $(srcdir)/../shared/posix_tty.c \ + $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) -sdk_HEADERS = agpgart.h +sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) INCLUDES = $(XORG_INCS) @@ -473,12 +486,12 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_usl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdResource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_VTsw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_agp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_apm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bell.Plo@am__quote@ @@ -528,6 +541,13 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +agp_noop.lo: $(srcdir)/../shared/agp_noop.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.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 agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c + kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @@ -542,19 +562,12 @@ posix_tty.lo: $(srcdir)/../shared/posix_tty.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 posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c -sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigiostubs.Tpo $(DEPDIR)/sigiostubs.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigiostubs.c' object='sigiostubs.lo' libtool=yes @AMDEPBACKSLASH@ +sigio.lo: $(srcdir)/../shared/sigio.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/sigio.c' object='sigio.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 sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.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 +@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 vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @@ -570,13 +583,6 @@ VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.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 VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c -VTsw_usl.lo: $(srcdir)/../shared/VTsw_usl.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_usl.lo -MD -MP -MF $(DEPDIR)/VTsw_usl.Tpo -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/VTsw_usl.Tpo $(DEPDIR)/VTsw_usl.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srcdir)/../shared/VTsw_usl.c' object='VTsw_usl.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 VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c - mostlyclean-libtool: -rm -f *.lo @@ -828,7 +834,7 @@ uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S - $(CPP) -P -DINLINE_ASM solaris-@SOLARIS_INOUT_ARCH@.S > $@ + $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S index 9f5e58cb0..4a0e0f48a 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-amd64.S @@ -32,7 +32,7 @@ #define _ASM #include <sys/asm_linkage.h> #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S index e2d9cf60a..280154bab 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-ia32.S @@ -32,7 +32,7 @@ #define _ASM #include <sys/asm_linkage.h> #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) diff --git a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S index fb23942ef..dbaa0308b 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S +++ b/xorg-server/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S @@ -33,7 +33,7 @@ #define _ASM #include <sys/asm_linkage.h> #define FUNCTION_START(f,n) ENTRY(f) -#define FUNCTION_END(f) SET_SIZE(f) +#define FUNCTION_END(f) retl; nop; SET_SIZE(f) #endif /* Converted from common/compiler.h gcc inline format to Sun cc inline diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c new file mode 100644 index 000000000..0dc76b8b5 --- /dev/null +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_VTsw.c @@ -0,0 +1,110 @@ +/* + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <X11/X.h> + +#include "xf86.h" +#include "xf86Priv.h" +#include "xf86_OSlib.h" + +#include <door.h> +#include <sys/vtdaemon.h> + +/* + * Handle the VT-switching interface for Solaris/OpenSolaris + */ + +void +xf86VTRequest(int sig) +{ + if (xf86Info.vtPendingNum != -1) + { + ioctl(xf86Info.consoleFd, VT_RELDISP, 1); + xf86Info.vtPendingNum = -1; + + return; + } + + xf86Info.vtRequestsPending = TRUE; + return; +} + +Bool +xf86VTSwitchPending(void) +{ + return(xf86Info.vtRequestsPending ? TRUE : FALSE); +} + +Bool +xf86VTSwitchAway(void) +{ + int door_fd; + vt_cmd_arg_t vt_door_arg; + door_arg_t door_arg; + + xf86Info.vtRequestsPending = FALSE; + + vt_door_arg.vt_ev = VT_EV_HOTKEYS; + vt_door_arg.vt_num = xf86Info.vtPendingNum; + door_arg.data_ptr = (char *)&vt_door_arg; + door_arg.data_size = sizeof (vt_cmd_arg_t); + door_arg.rbuf = NULL; + door_arg.rsize = 0; + door_arg.desc_ptr = NULL; + door_arg.desc_num = 0; + + if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0) + return (FALSE); + + if (door_call(door_fd, &door_arg) != 0) { + close(door_fd); + return (FALSE); + } + + close(door_fd); + return (TRUE); +} + +Bool +xf86VTSwitchTo(void) +{ + xf86Info.vtRequestsPending = FALSE; + if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) + { + return(FALSE); + } + else + { + return(TRUE); + } +} diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c index e97ab9ef9..376f98edd 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_agp.c @@ -34,8 +34,6 @@ * of the copyright holder. */ -#pragma ident "@(#)sun_agp.c 1.1 05/04/04 SMI" - #ifdef HAVE_XORG_CONFIG_H #include <xorg-config.h> #endif @@ -49,11 +47,8 @@ #include <sys/ioccom.h> #include <sys/types.h> #include <fcntl.h> -#include "agpgart.h" +#include <sys/agpgart.h> -#ifndef AGP_DEVICE -#define AGP_DEVICE "/dev/agpgart" -#endif /* AGP page size is independent of the host page size. */ #ifndef AGP_PAGE_SIZE #define AGP_PAGE_SIZE 4096 @@ -66,7 +61,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) { @@ -110,14 +105,14 @@ GARTInit(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86AgpGARTSupported(void) { return (GARTInit(-1)); } -_X_EXPORT AgpInfoPtr +AgpInfoPtr xf86GetAGPInfo(int screenNum) { agp_info_t agpinf; @@ -150,7 +145,7 @@ xf86GetAGPInfo(int screenNum) return info; } -_X_EXPORT Bool +Bool xf86AcquireGART(int screenNum) { @@ -171,7 +166,7 @@ xf86AcquireGART(int screenNum) return TRUE; } -_X_EXPORT Bool +Bool xf86ReleaseGART(int screenNum) { @@ -200,7 +195,7 @@ xf86ReleaseGART(int screenNum) return FALSE; } -_X_EXPORT int +int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { @@ -238,7 +233,7 @@ xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, return alloc.agpa_key; } -_X_EXPORT Bool +Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) @@ -255,7 +250,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) { agp_bind_t bind; @@ -291,7 +286,7 @@ xf86BindGARTMemory(int screenNum, int key, unsigned long offset) } /* Unbind GART memory with "key" */ -_X_EXPORT Bool +Bool xf86UnbindGARTMemory(int screenNum, int key) { agp_unbind_t unbind; @@ -317,7 +312,7 @@ xf86UnbindGARTMemory(int screenNum, int key) /* XXX Interface may change. */ -_X_EXPORT Bool +Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup_t setup; diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c index 7decc900f..e128c13d0 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_apm.c @@ -215,7 +215,7 @@ xf86OSPMOpen(void) } xf86PMGetEventFromOs = sunPMGetEventFromOS; xf86PMConfirmEventToOs = sunPMConfirmEventToOs; - APMihPtr = xf86AddInputHandler(fd, xf86HandlePMEvents, NULL); + APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); return sunCloseAPM; } @@ -225,7 +225,7 @@ sunCloseAPM(void) int fd; if (APMihPtr) { - fd = xf86RemoveInputHandler(APMihPtr); + fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c index 29ecd7300..b25f40d8e 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_bell.c @@ -48,7 +48,7 @@ #define AUDIO_DEVICE "/dev/audio" -_X_EXPORT void +void xf86OSRingBell(int loudness, int pitch, int duration) { static short samples[BELL_SAMPLES]; diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c index 795b0c13c..2c569f02c 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_init.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_init.c @@ -38,13 +38,15 @@ static Bool Protect0 = FALSE; #ifdef HAS_USL_VTS static int VTnum = -1; static int xf86StartVT = -1; +static int vtEnabled = 0; #endif -#if defined(__SOL8__) || (!defined(__i386__) && !defined(__i386)) -static char fb_dev[PATH_MAX] = "/dev/fb"; -#else -static char fb_dev[PATH_MAX] = "/dev/console"; -#endif +/* Device to open as xf86Info.consoleFd */ +static char consoleDev[PATH_MAX] = "/dev/fb"; + +/* Set by -dev argument on CLI + Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */ +_X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb"; void xf86OpenConsole(void) @@ -93,86 +95,101 @@ xf86OpenConsole(void) /* * Setup the virtual terminal manager */ - if (VTnum != -1) + if ((fd = open("/dev/vt/0",O_RDWR,0)) == -1) { - xf86Info.vtno = VTnum; - from = X_CMDLINE; + xf86ErrorF("xf86OpenConsole: Cannot open /dev/vt/0 (%s)\n", + strerror(errno)); + vtEnabled = 0; } else { - if ((fd = open("/dev/vt00",O_RDWR,0)) < 0) - FatalError("xf86OpenConsole: Cannot open /dev/vt00 (%s)\n", - strerror(errno)); + if (ioctl(fd, VT_ENABLED, &vtEnabled) < 0) + { + xf86ErrorF("xf86OpenConsole: VT_ENABLED failed (%s)\n", + strerror(errno)); + vtEnabled = 0; + } + } + + if (vtEnabled == 0) + { + /* VT not enabled - kernel too old or Sparc platforms + without visual_io support */ + xf86Msg(from, "VT infrastructure is not available\n"); + + xf86StartVT = 0; + xf86Info.vtno = 0; + strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev)); + } + else + { if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0) FatalError("xf86OpenConsole: Cannot determine current VT\n"); xf86StartVT = vtinfo.v_active; - /* - * There is a SEVERE problem with x86's VT's. The VT_OPENQRY - * ioctl() will panic the entire system if all 8 (7 VT's+Console) - * terminals are used. The only other way I've found to determine - * if there is a free VT is to try activating all the the available - * VT's and see if they all succeed - if they do, there there is no - * free VT, and the Xserver cannot continue without panic'ing the - * system. (It's ugly, but it seems to work.) Note there is a - * possible race condition here. - * - * David Holland 2/23/94 - */ - - FreeVTslot = 0; - for (i = 7; (i >= 0) && !FreeVTslot; i--) - if (ioctl(fd, VT_ACTIVATE, i) != 0) - FreeVTslot = 1; + if (VTnum != -1) + { + xf86Info.vtno = VTnum; + from = X_CMDLINE; + } + else + { + if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || + (xf86Info.vtno == -1)) { + FatalError("xf86OpenConsole: Cannot find a free VT\n"); + } + } - if (!FreeVTslot || - (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || - (xf86Info.vtno == -1)) - FatalError("xf86OpenConsole: Cannot find a free VT\n"); + xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); + snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno); + } + if (fd != -1) { close(fd); } - xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); - - sprintf(fb_dev, "/dev/vt%02d", xf86Info.vtno); /* Solaris 2.1 x86 */ - #endif /* HAS_USL_VTS */ if (!KeepTty) setpgrp(); - if (((xf86Info.consoleFd = open(fb_dev, O_RDWR | O_NDELAY, 0)) < 0)) + if (((xf86Info.consoleFd = open(consoleDev, O_RDWR | O_NDELAY, 0)) < 0)) FatalError("xf86OpenConsole: Cannot open %s (%s)\n", - fb_dev, strerror(errno)); + consoleDev, strerror(errno)); #ifdef HAS_USL_VTS /* Change ownership of the vt */ - chown(fb_dev, getuid(), getgid()); + chown(consoleDev, getuid(), getgid()); - /* - * Now get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); + if (vtEnabled) + { + /* + * Now get the VT + */ + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); + + if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) + FatalError("xf86OpenConsole: VT_GETMODE failed\n"); - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) - FatalError("xf86OpenConsole: VT_GETMODE failed\n"); + OsSignal(SIGUSR1, xf86VTRequest); - signal(SIGUSR1, xf86VTRequest); + VT.mode = VT_PROCESS; + VT.relsig = SIGUSR1; + VT.acqsig = SIGUSR1; - VT.mode = VT_PROCESS; - VT.relsig = SIGUSR1; - VT.acqsig = SIGUSR1; + if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) + FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); - if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) - FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); + if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n"); + } #endif #ifdef KDSETMODE @@ -180,30 +197,31 @@ xf86OpenConsole(void) if (i < 0) { xf86Msg(X_WARNING, "xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n", - fb_dev, strerror(errno)); + consoleDev, strerror(errno)); } #endif } else /* serverGeneration != 1 */ { #ifdef HAS_USL_VTS - /* - * Now re-get the VT - */ - if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - - if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) - xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + if (vtEnabled) { + /* + * Now re-get the VT + */ + if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); - /* - * If the server doesn't have the VT when the reset occurs, - * this is to make sure we don't continue until the activate - * signal is received. - */ - if (!xf86Screens[0]->vtSema) - sleep(5); + if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno) != 0) + xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); + /* + * If the server doesn't have the VT when the reset occurs, + * this is to make sure we don't continue until the activate + * signal is received. + */ + if (!xf86Screens[0]->vtSema) + sleep(5); + } #endif /* HAS_USL_VTS */ } @@ -218,7 +236,7 @@ xf86CloseConsole(void) #if !defined(__i386__) && !defined(__i386) && !defined(__x86) - if (!xf86DoProbe && !xf86DoConfigure) { + if (!xf86DoConfigure) { int fd; /* @@ -228,7 +246,7 @@ xf86CloseConsole(void) * at this point whether this should be done for all framebuffers in * the system, rather than only the console. */ - if ((fd = open("/dev/fb", O_RDWR, 0)) < 0) { + if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) { xf86Msg(X_WARNING, "xf86CloseConsole(): unable to open framebuffer (%s)\n", strerror(errno)); @@ -267,30 +285,16 @@ xf86CloseConsole(void) #endif #ifdef HAS_USL_VTS + if (vtEnabled == 1) { + if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) + { + VT.mode = VT_AUTO; /* Set default vt handling */ + ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); + } - /* - * Solaris 2.1 x86 doesn't seem to "switch" back to the console when the VT - * is relinquished and its mode is reset to auto. Also, Solaris 2.1 seems - * to associate vt00 with the console so I've opened the "console" back up - * and made it the active vt again in text mode and then closed it. There - * must be a better hack for this but I'm not aware of one at this time. - * - * Doug Anson 11/6/93 - * danson@lgc.com - * - * Fixed - 12/5/93 - David Holland - davidh@dorite.use.com - * Did the whole thing similarly to the way linux does it - */ - - if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) - { - VT.mode = VT_AUTO; /* Set default vt handling */ - ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); + /* Activate the VT that X was started on */ + ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT); } - - /* Activate the VT that X was started on */ - ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86StartVT); - #endif /* HAS_USL_VTS */ close(xf86Info.consoleFd); @@ -323,7 +327,7 @@ xf86ProcessArgument(int argc, char **argv, int i) if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { - if (sscanf(argv[i], "vt%2d", &VTnum) == 0) + if (sscanf(argv[i], "vt%d", &VTnum) == 0) { UseMsg(); VTnum = -1; @@ -337,8 +341,7 @@ xf86ProcessArgument(int argc, char **argv, int i) if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { - strncpy(fb_dev, argv[i+1], PATH_MAX); - fb_dev[PATH_MAX - 1] = '\0'; + strlcpy(xf86SolarisFbDev, argv[i+1], sizeof(xf86SolarisFbDev)); return 2; } } @@ -349,7 +352,7 @@ xf86ProcessArgument(int argc, char **argv, int i) void xf86UseMsg() { #ifdef HAS_USL_VTS - ErrorF("vtXX Use the specified VT number\n"); + ErrorF("vtX Use the specified VT number\n"); #endif ErrorF("-dev <fb> Framebuffer device\n"); ErrorF("-keeptty Don't detach controlling tty\n"); diff --git a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c index 3982f631f..2078646b1 100644 --- a/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c +++ b/xorg-server/hw/xfree86/os-support/solaris/sun_vid.c @@ -186,7 +186,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) /* * Read BIOS via mmap()ing physical memory. */ -_X_EXPORT int +int xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { @@ -235,7 +235,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, static Bool ExtendedEnabled = FALSE; #endif -_X_EXPORT Bool +Bool xf86EnableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) @@ -251,7 +251,7 @@ xf86EnableIO(void) return TRUE; } -_X_EXPORT void +void xf86DisableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) diff --git a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in index c2eff591c..394126c69 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/Makefile.in +++ b/xorg-server/hw/xfree86/os-support/sysv/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/os-support/sysv 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 @@ -47,7 +50,8 @@ 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 = SOURCES = @@ -58,6 +62,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@ @@ -78,9 +83,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@ @@ -109,7 +117,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@ @@ -118,9 +128,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@ @@ -159,12 +173,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@ @@ -184,7 +199,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@ @@ -194,6 +208,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -207,11 +222,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@ @@ -247,6 +261,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@ @@ -271,7 +286,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@ @@ -294,6 +308,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -325,7 +340,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@ diff --git a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c index a9bbd6580..43c30621c 100644 --- a/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c +++ b/xorg-server/hw/xfree86/os-support/sysv/sysv_video.c @@ -283,7 +283,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) static Bool ExtendedEnabled = FALSE; static Bool InitDone = FALSE; -_X_EXPORT Bool +Bool xf86EnableIO() { int i; @@ -302,7 +302,7 @@ xf86EnableIO() return TRUE; } -_X_EXPORT void +void xf86DisableIO() { if (!ExtendedEnabled) diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h index 48d922301..c53fc0dac 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSlib.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSlib.h @@ -117,15 +117,9 @@ # include <sys/seg.h> # endif /* SVR4 && !sun */ /* V86SC_IOPL was moved to <sys/sysi86.h> on Solaris 7 and later */ -# if defined(sun) && defined (SVR4) /* Solaris? */ -# if defined(__i386__) || defined(__i386) || defined(__x86) /* on x86 or x64? */ -# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ -# include <sys/v86.h> /* Nope */ -# endif -# endif /* V86SC_IOPL */ -# else -# include <sys/v86.h> /* Not solaris */ -# endif /* sun && i386 && SVR4 */ +# if !defined(V86SC_IOPL) /* Solaris 7 or later? */ +# include <sys/v86.h> /* Nope */ +# endif # if defined(sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) # include <sys/psw.h> # endif @@ -140,7 +134,7 @@ # include <sys/mmap.h> /* MMAP driver header */ # endif -# if !defined(sun) || (!defined(sparc) && !defined(__SOL8__)) +# if !defined(sun) || defined(HAVE_SYS_VT_H) # define HAS_USL_VTS # endif # if !defined(sun) @@ -155,10 +149,14 @@ # define LED_NUM NLKED # define LED_SCR SLKED # elif defined(HAS_USL_VTS) -# include <sys/at_ansi.h> +# if !defined(sun) +# include <sys/at_ansi.h> +# endif # include <sys/kd.h> # include <sys/vt.h> -# elif defined(sun) +# endif + +# if defined(sun) # include <sys/fbio.h> # include <sys/kbd.h> # include <sys/kbio.h> @@ -198,9 +196,8 @@ # endif /* SVR4 */ -# if defined(sun) && (defined (__i386__) || defined(__i386)) && defined (SVR4) && !defined(__SOL8__) +# if defined(sun) && defined(HAS_USL_VTS) # define USE_VT_SYSREQ -# define VT_SYSREQ_DEFAULT TRUE # endif #endif /* (SYSV || SVR4) */ diff --git a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h index b4513d65f..c1a117334 100644 --- a/xorg-server/hw/xfree86/os-support/xf86_OSproc.h +++ b/xorg-server/hw/xfree86/os-support/xf86_OSproc.h @@ -68,10 +68,6 @@ #ifndef _XF86_OSPROC_H #define _XF86_OSPROC_H -#ifdef XF86_OS_PRIVS -#include "xf86Pci.h" -#endif - /* * The actual prototypes have been pulled into this seperate file so * that they can can be used without pulling in all of the OS specific @@ -110,10 +106,6 @@ #define XF86_M_RNG 0x080 /* ring */ #define XF86_M_DSR 0x100 /* data set ready */ -#ifdef XF86_OS_PRIVS -extern void xf86WrapperInit(void); -#endif - #ifndef NO_OSLIB_PROTOTYPES /* * This is to prevent re-entrancy to FatalError() when aborting. @@ -138,37 +130,35 @@ extern void xf86WrapperInit(void); _XFUNCPROTOBEGIN /* public functions */ -extern Bool xf86LinearVidMem(void); -extern Bool xf86CheckMTRR(int); -extern pointer xf86MapVidMem(int, int, unsigned long, unsigned long); -extern void xf86UnMapVidMem(int, pointer, unsigned long); -extern void xf86MapReadSideEffects(int, int, pointer, unsigned long); -extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); -extern Bool xf86EnableIO(void); -extern void xf86DisableIO(void); -extern void xf86SetTVOut(int); -extern void xf86SetRGBOut(void); -extern void xf86OSRingBell(int, int, int); -extern void xf86BusToMem(unsigned char *, unsigned char *, int); -extern void xf86MemToBus(unsigned char *, unsigned char *, int); -extern void xf86UDelay(long usec); -extern void xf86SetReallySlowBcopy(void); -extern void xf86SlowBcopy(unsigned char *, unsigned char *, int); -extern int xf86OpenSerial(pointer options); -extern int xf86SetSerial(int fd, pointer options); -extern int xf86SetSerialSpeed(int fd, int speed); -extern int xf86ReadSerial(int fd, void *buf, int count); -extern int xf86WriteSerial(int fd, const void *buf, int count); -extern int xf86CloseSerial(int fd); -extern int xf86FlushInput(int fd); -extern int xf86WaitForInput(int fd, int timeout); -extern int xf86SerialSendBreak(int fd, int duration); -extern int xf86SetSerialModemState(int fd, int state); -extern int xf86GetSerialModemState(int fd); -extern int xf86SerialModemSetBits(int fd, int bits); -extern int xf86SerialModemClearBits(int fd, int bits); -extern int xf86LoadKernelModule(const char *pathname); -extern void xf86RingBell(int volume, int pitch, int duration); +extern _X_EXPORT Bool xf86LinearVidMem(void); +extern _X_EXPORT Bool xf86CheckMTRR(int); +extern _X_EXPORT pointer xf86MapVidMem(int, int, unsigned long, unsigned long); +extern _X_EXPORT void xf86UnMapVidMem(int, pointer, unsigned long); +extern _X_EXPORT void xf86MapReadSideEffects(int, int, pointer, unsigned long); +extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); +extern _X_EXPORT Bool xf86EnableIO(void); +extern _X_EXPORT void xf86DisableIO(void); +#ifdef __NetBSD__ +extern _X_EXPORT void xf86SetTVOut(int); +extern _X_EXPORT void xf86SetRGBOut(void); +#endif +extern _X_EXPORT void xf86OSRingBell(int, int, int); +extern _X_EXPORT void xf86SetReallySlowBcopy(void); +extern _X_EXPORT void xf86SlowBcopy(unsigned char *, unsigned char *, int); +extern _X_EXPORT int xf86OpenSerial(pointer options); +extern _X_EXPORT int xf86SetSerial(int fd, pointer options); +extern _X_EXPORT int xf86SetSerialSpeed(int fd, int speed); +extern _X_EXPORT int xf86ReadSerial(int fd, void *buf, int count); +extern _X_EXPORT int xf86WriteSerial(int fd, const void *buf, int count); +extern _X_EXPORT int xf86CloseSerial(int fd); +extern _X_EXPORT int xf86FlushInput(int fd); +extern _X_EXPORT int xf86WaitForInput(int fd, int timeout); +extern _X_EXPORT int xf86SerialSendBreak(int fd, int duration); +extern _X_EXPORT int xf86SetSerialModemState(int fd, int state); +extern _X_EXPORT int xf86GetSerialModemState(int fd); +extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits); +extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits); +extern _X_EXPORT int xf86LoadKernelModule(const char *pathname); /* AGP GART interface */ @@ -182,55 +172,43 @@ typedef struct _AgpInfo { unsigned long usedPages; } AgpInfo, *AgpInfoPtr; -extern Bool xf86AgpGARTSupported(void); -extern AgpInfoPtr xf86GetAGPInfo(int screenNum); -extern Bool xf86AcquireGART(int screenNum); -extern Bool xf86ReleaseGART(int screenNum); -extern int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, +extern _X_EXPORT Bool xf86AgpGARTSupported(void); +extern _X_EXPORT AgpInfoPtr xf86GetAGPInfo(int screenNum); +extern _X_EXPORT Bool xf86AcquireGART(int screenNum); +extern _X_EXPORT Bool xf86ReleaseGART(int screenNum); +extern _X_EXPORT int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical); -extern Bool xf86DeallocateGARTMemory(int screenNum, int key); -extern Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset); -extern Bool xf86UnbindGARTMemory(int screenNum, int key); -extern Bool xf86EnableAGP(int screenNum, CARD32 mode); -extern Bool xf86GARTCloseScreen(int screenNum); +extern _X_EXPORT Bool xf86DeallocateGARTMemory(int screenNum, int key); +extern _X_EXPORT Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset); +extern _X_EXPORT Bool xf86UnbindGARTMemory(int screenNum, int key); +extern _X_EXPORT Bool xf86EnableAGP(int screenNum, CARD32 mode); +extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum); /* These routines are in shared/sigio.c and are not loaded as part of the module. These routines are small, and the code if very POSIX-signal (or OS-signal) specific, so it seemed better to provide more complex wrappers than to wrap each individual function called. */ -extern int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *); -extern int xf86RemoveSIGIOHandler(int fd); -extern int xf86BlockSIGIO (void); -extern void xf86UnblockSIGIO (int); -extern void xf86AssertBlockedSIGIO (char *); -extern Bool xf86SIGIOSupported (void); +extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f)(int, void *), void *); +extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd); +extern _X_EXPORT int xf86BlockSIGIO (void); +extern _X_EXPORT void xf86UnblockSIGIO (int); +extern _X_EXPORT void xf86AssertBlockedSIGIO (char *); +extern _X_EXPORT Bool xf86SIGIOSupported (void); #ifdef XF86_OS_PRIVS typedef void (*PMClose)(void); -extern void xf86OpenConsole(void); -extern void xf86CloseConsole(void); -extern Bool xf86VTSwitchPending(void); -extern Bool xf86VTSwitchAway(void); -extern Bool xf86VTSwitchTo(void); -extern void xf86VTRequest(int sig); -extern int xf86ProcessArgument(int, char **, int); -extern void xf86UseMsg(void); -extern void xf86ReloadInputDevs(int sig); -extern PMClose xf86OSPMOpen(void); - -#ifdef NEED_OS_RAC_PROTOS -/* RAC-related privs */ -/* internal to os-support layer */ -resPtr xf86StdAccResFromOS(resPtr ret); - -/* available to the common layer */ -resPtr xf86AccResFromOS(resPtr ret); -#endif /* NEED_OS_RAC_PROTOS */ - -extern unsigned long xf86GetOSOffsetFromPCI(PCITAG tag, int space, unsigned long base); - -extern void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer); -extern void xf86InitVidMem(void); +extern _X_EXPORT void xf86OpenConsole(void); +extern _X_EXPORT void xf86CloseConsole(void); +extern _X_EXPORT Bool xf86VTSwitchPending(void); +extern _X_EXPORT Bool xf86VTSwitchAway(void); +extern _X_EXPORT Bool xf86VTSwitchTo(void); +extern _X_EXPORT void xf86VTRequest(int sig); +extern _X_EXPORT int xf86ProcessArgument(int, char **, int); +extern _X_EXPORT void xf86UseMsg(void); +extern _X_EXPORT PMClose xf86OSPMOpen(void); + +extern _X_EXPORT void xf86MakeNewMapping(int, int, unsigned long, unsigned long, pointer); +extern _X_EXPORT void xf86InitVidMem(void); #endif /* XF86_OS_PRIVS */ diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h index 815c1a376..cdc7be806 100644 --- a/xorg-server/hw/xfree86/parser/Configint.h +++ b/xorg-server/hw/xfree86/parser/Configint.h @@ -92,18 +92,14 @@ LexRec, *LexPtr; #include "configProcs.h" #include <stdlib.h> -#define xf86confmalloc malloc -#define xf86confrealloc realloc -#define xf86confcalloc calloc -#define xf86conffree free -#define TestFree(a) if (a) { xf86conffree (a); a = NULL; } +#define TestFree(a) if (a) { free (a); a = NULL; } #define parsePrologue(typeptr,typerec) typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } +if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return NULL; } #define parsePrologueVoid(typeptr,typerec) int token; typeptr ptr; \ -if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return; } +if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return; } #define HANDLE_RETURN(f,func)\ if ((ptr->f=func) == NULL)\ diff --git a/xorg-server/hw/xfree86/parser/DRI.c b/xorg-server/hw/xfree86/parser/DRI.c index 68a6db90b..12b8d1d1a 100644 --- a/xorg-server/hw/xfree86/parser/DRI.c +++ b/xorg-server/hw/xfree86/parser/DRI.c @@ -58,7 +58,7 @@ xf86freeBuffersList (XF86ConfBuffersPtr ptr) TestFree (ptr->buf_comment); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -183,5 +183,5 @@ xf86freeDRI (XF86ConfDRIPtr ptr) xf86freeBuffersList (ptr->dri_buffers_lst); TestFree (ptr->dri_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Device.c b/xorg-server/hw/xfree86/parser/Device.c index 216789fc1..47ece07de 100644 --- a/xorg-server/hw/xfree86/parser/Device.c +++ b/xorg-server/hw/xfree86/parser/Device.c @@ -353,7 +353,7 @@ xf86freeDeviceList (XF86ConfDevicePtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -369,14 +369,3 @@ xf86findDevice (const char *ident, XF86ConfDevicePtr p) } return (NULL); } - -char * -xf86configStrdup (const char *s) -{ - char *tmp; - if (!s) return NULL; - tmp = xf86confmalloc (sizeof (char) * (strlen (s) + 1)); - if (tmp) - strcpy (tmp, s); - return (tmp); -} diff --git a/xorg-server/hw/xfree86/parser/Extensions.c b/xorg-server/hw/xfree86/parser/Extensions.c index b64f08111..4003b521a 100644 --- a/xorg-server/hw/xfree86/parser/Extensions.c +++ b/xorg-server/hw/xfree86/parser/Extensions.c @@ -107,5 +107,5 @@ xf86freeExtensions (XF86ConfExtensionsPtr ptr) xf86optionListFree (ptr->ext_option_lst); TestFree (ptr->extensions_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c index c3523024d..0c718354e 100644 --- a/xorg-server/hw/xfree86/parser/Files.c +++ b/xorg-server/hw/xfree86/parser/Files.c @@ -70,11 +70,11 @@ static xf86ConfigSymTabRec FilesTab[] = {ENDSECTION, "endsection"}, {FONTPATH, "fontpath"}, {MODULEPATH, "modulepath"}, - {INPUTDEVICES, "inputdevices"}, {LOGFILEPATH, "logfile"}, {XKBDIR, "xkbdir"}, /* Obsolete keywords that aren't used but shouldn't cause errors: */ {OBSOLETE_TOKEN, "rgbpath"}, + {OBSOLETE_TOKEN, "inputdevices"}, {-1, ""}, }; @@ -103,7 +103,7 @@ xf86parseFilesSection (void) str = val.str; if (ptr->file_fontpath == NULL) { - ptr->file_fontpath = xf86confmalloc (1); + ptr->file_fontpath = malloc (1); ptr->file_fontpath[0] = '\0'; i = strlen (str) + 1; } @@ -117,12 +117,12 @@ xf86parseFilesSection (void) } } ptr->file_fontpath = - xf86confrealloc (ptr->file_fontpath, i); + realloc (ptr->file_fontpath, i); if (j) strcat (ptr->file_fontpath, ","); strcat (ptr->file_fontpath, str); - xf86conffree (val.str); + free (val.str); break; case MODULEPATH: if (xf86getSubToken (&(ptr->file_comment)) != STRING) @@ -131,7 +131,7 @@ xf86parseFilesSection (void) str = val.str; if (ptr->file_modulepath == NULL) { - ptr->file_modulepath = xf86confmalloc (1); + ptr->file_modulepath = malloc (1); ptr->file_modulepath[0] = '\0'; k = strlen (str) + 1; } @@ -144,39 +144,12 @@ xf86parseFilesSection (void) l = TRUE; } } - ptr->file_modulepath = xf86confrealloc (ptr->file_modulepath, k); + ptr->file_modulepath = realloc (ptr->file_modulepath, k); if (l) strcat (ptr->file_modulepath, ","); strcat (ptr->file_modulepath, str); - xf86conffree (val.str); - break; - case INPUTDEVICES: - if (xf86getSubToken (&(ptr->file_comment)) != STRING) - Error (QUOTE_MSG, "InputDevices"); - l = FALSE; - str = val.str; - if (ptr->file_inputdevs == NULL) - { - ptr->file_inputdevs = xf86confmalloc (1); - ptr->file_inputdevs[0] = '\0'; - k = strlen (str) + 1; - } - else - { - k = strlen (ptr->file_inputdevs) + strlen (str) + 1; - if (ptr->file_inputdevs[strlen (ptr->file_inputdevs) - 1] != ',') - { - k++; - l = TRUE; - } - } - ptr->file_inputdevs = xf86confrealloc (ptr->file_inputdevs, k); - if (l) - strcat (ptr->file_inputdevs, ","); - - strcat (ptr->file_inputdevs, str); - xf86conffree (val.str); + free (val.str); break; case LOGFILEPATH: if (xf86getSubToken (&(ptr->file_comment)) != STRING) @@ -237,21 +210,6 @@ xf86printFileSection (FILE * cf, XF86ConfFilesPtr ptr) } fprintf (cf, "\tModulePath \"%s\"\n", s); } - if (ptr->file_inputdevs) - { - s = ptr->file_inputdevs; - p = index (s, ','); - while (p) - { - *p = '\000'; - fprintf (cf, "\tInputDevices \"%s\"\n", s); - *p = ','; - s = p; - s++; - p = index (s, ','); - } - fprintf (cf, "\tInputDevices \"%s\"\n", s); - } if (ptr->file_fontpath) { s = ptr->file_fontpath; @@ -279,10 +237,9 @@ xf86freeFiles (XF86ConfFilesPtr p) TestFree (p->file_logfile); TestFree (p->file_modulepath); - TestFree (p->file_inputdevs); TestFree (p->file_fontpath); TestFree (p->file_comment); TestFree (p->file_xkbdir); - xf86conffree (p); + free (p); } diff --git a/xorg-server/hw/xfree86/parser/Flags.c b/xorg-server/hw/xfree86/parser/Flags.c index 19b9d1477..6865d3592 100644 --- a/xorg-server/hw/xfree86/parser/Flags.c +++ b/xorg-server/hw/xfree86/parser/Flags.c @@ -1,5 +1,4 @@ /* - * * Copyright (c) 1997 Metro Link Incorporated * * Permission is hereby granted, free of charge, to any person obtaining a @@ -134,7 +133,7 @@ xf86parseFlagsSection (void) { char *valstr = NULL; /* can't use strdup because it calls malloc */ - tmp = xf86configStrdup (ServerFlagsTab[i].name); + tmp = strdup (ServerFlagsTab[i].name); if (hasvalue) { tokentype = xf86getSubToken(&(ptr->flg_comment)); @@ -145,7 +144,7 @@ xf86parseFlagsSection (void) } else { if (tokentype != NUMBER) Error (NUMBER_MSG, tmp); - valstr = xf86confmalloc(16); + valstr = malloc(16); if (valstr) sprintf(valstr, "%d", val.num); } @@ -202,11 +201,11 @@ addNewOption2 (XF86OptionPtr head, char *name, char *val, int used) /* Don't allow duplicates, free old strings */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { new = old; - xf86conffree(new->opt_name); - xf86conffree(new->opt_val); + free(new->opt_name); + free(new->opt_val); } else - new = xf86confcalloc (1, sizeof (XF86OptionRec)); + new = calloc (1, sizeof (XF86OptionRec)); new->opt_name = name; new->opt_val = val; new->opt_used = used; @@ -229,21 +228,22 @@ xf86freeFlags (XF86ConfFlagsPtr flags) return; xf86optionListFree (flags->flg_option_lst); TestFree(flags->flg_comment); - xf86conffree (flags); + free (flags); } XF86OptionPtr xf86optionListDup (XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; + char *val; while (opt) { - newopt = xf86addNewOption(newopt, xf86configStrdup(opt->opt_name), - xf86configStrdup(opt->opt_val)); + val = opt->opt_val ? strdup(opt->opt_val) : NULL; + newopt = xf86addNewOption(newopt, strdup(opt->opt_name), val); newopt->opt_used = opt->opt_used; if (opt->opt_comment) - newopt->opt_comment = xf86configStrdup(opt->opt_comment); + newopt->opt_comment = strdup(opt->opt_comment); opt = opt->list.next; } return newopt; @@ -261,7 +261,7 @@ xf86optionListFree (XF86OptionPtr opt) TestFree (opt->opt_comment); prev = opt; opt = opt->list.next; - xf86conffree (prev); + free (prev); } } @@ -286,7 +286,7 @@ xf86newOption(char *name, char *value) { XF86OptionPtr opt; - opt = xf86confcalloc(1, sizeof (XF86OptionRec)); + opt = calloc(1, sizeof (XF86OptionRec)); if (!opt) return NULL; @@ -331,7 +331,7 @@ xf86findOption (XF86OptionPtr list, const char *name) * returned. If the option is not found, a NULL is returned. */ -_X_EXPORT char * +char * xf86findOptionValue (XF86OptionPtr list, const char *name) { XF86OptionPtr p = xf86findOption (list, name); @@ -366,10 +366,10 @@ xf86optionListCreate( const char **options, int count, int used ) for (i = 0; i < count; i += 2) { /* can't use strdup because it calls malloc */ - t1 = xf86confmalloc (sizeof (char) * + t1 = malloc (sizeof (char) * (strlen (options[i]) + 1)); strcpy (t1, options[i]); - t2 = xf86confmalloc (sizeof (char) * + t2 = malloc (sizeof (char) * (strlen (options[i + 1]) + 1)); strcpy (t2, options[i + 1]); p = addNewOption2 (p, t1, t2, used); @@ -435,7 +435,7 @@ xf86uLongToString(unsigned long i) int l; l = (int)(ceil(log10((double)i) + 2.5)); - s = xf86confmalloc(l); + s = malloc(l); if (!s) return NULL; sprintf(s, "%lu", i); @@ -452,7 +452,7 @@ xf86parseOption(XF86OptionPtr head) if ((token = xf86getSubToken(&comment)) != STRING) { xf86parseError(BAD_OPTION_MSG, NULL); if (comment) - xf86conffree(comment); + free(comment); return (head); } @@ -479,10 +479,10 @@ xf86parseOption(XF86OptionPtr head) /* Don't allow duplicates */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { cnew = old; - xf86conffree(option->opt_name); + free(option->opt_name); TestFree(option->opt_val); TestFree(option->opt_comment); - xf86conffree(option); + free(option); } else cnew = option; diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c index 3d9801968..4e3c04e53 100644 --- a/xorg-server/hw/xfree86/parser/Input.c +++ b/xorg-server/hw/xfree86/parser/Input.c @@ -163,7 +163,7 @@ xf86freeInputList (XF86ConfInputPtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Layout.c b/xorg-server/hw/xfree86/parser/Layout.c index 5d1348acb..d548cd210 100644 --- a/xorg-server/hw/xfree86/parser/Layout.c +++ b/xorg-server/hw/xfree86/parser/Layout.c @@ -116,10 +116,10 @@ xf86parseLayoutSection (void) { XF86ConfInactivePtr iptr; - iptr = xf86confcalloc (1, sizeof (XF86ConfInactiveRec)); + iptr = calloc (1, sizeof (XF86ConfInactiveRec)); iptr->list.next = NULL; if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree (iptr); + free (iptr); Error (INACTIVE_MSG, NULL); } iptr->inactive_device_str = val.str; @@ -132,7 +132,7 @@ xf86parseLayoutSection (void) XF86ConfAdjacencyPtr aptr; int absKeyword = 0; - aptr = xf86confcalloc (1, sizeof (XF86ConfAdjacencyRec)); + aptr = calloc (1, sizeof (XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_scrnum = -1; aptr->adj_where = CONF_ADJ_OBSOLETE; @@ -145,7 +145,7 @@ xf86parseLayoutSection (void) xf86unGetToken (token); token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_screen_str = val.str; @@ -173,7 +173,7 @@ xf86parseLayoutSection (void) absKeyword = 1; break; case EOF_TOKEN: - xf86conffree(aptr); + free(aptr); Error (UNEXPECTED_EOF_MSG, NULL); break; default: @@ -194,13 +194,13 @@ xf86parseLayoutSection (void) aptr->adj_x = val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_y = val.num; } else { if (absKeyword) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } else xf86unGetToken (token); @@ -213,7 +213,7 @@ xf86parseLayoutSection (void) case CONF_ADJ_RELATIVE: token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_refscreen = val.str; @@ -221,13 +221,13 @@ xf86parseLayoutSection (void) { token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_x = val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { - xf86conffree(aptr); + free(aptr); Error(INVALID_SCR_MSG, NULL); } aptr->adj_y = val.num; @@ -239,21 +239,21 @@ xf86parseLayoutSection (void) /* bottom */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_bottom_str = val.str; /* left */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_left_str = val.str; /* right */ if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(aptr); + free(aptr); Error (SCREEN_MSG, NULL); } aptr->adj_right_str = val.str; @@ -267,11 +267,11 @@ xf86parseLayoutSection (void) { XF86ConfInputrefPtr iptr; - iptr = xf86confcalloc (1, sizeof (XF86ConfInputrefRec)); + iptr = calloc (1, sizeof (XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; if (xf86getSubToken (&(ptr->lay_comment)) != STRING) { - xf86conffree(iptr); + free(iptr); Error (INPUTDEV_MSG, NULL); } iptr->iref_inputdev_str = val.str; @@ -397,7 +397,7 @@ xf86freeAdjacencyList (XF86ConfAdjacencyPtr ptr) prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -413,7 +413,7 @@ xf86freeInputrefList (XF86ConfInputrefPtr ptr) xf86optionListFree (ptr->iref_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -431,7 +431,7 @@ xf86freeLayoutList (XF86ConfLayoutPtr ptr) xf86freeInputrefList (ptr->lay_input_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Makefile.am b/xorg-server/hw/xfree86/parser/Makefile.am index a2774a47e..b8fab2835 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.am +++ b/xorg-server/hw/xfree86/parser/Makefile.am @@ -1,10 +1,14 @@ if INSTALL_LIBXF86CONFIG +noinst_LTLIBRARIES = libxf86config_internal.la lib_LIBRARIES = libxf86config.a +LIBHEADERS = \ + xf86Optrec.h \ + xf86Parser.h else -noinst_LIBRARIES = libxf86config.a +noinst_LTLIBRARIES = libxf86config_internal.la endif -libxf86config_a_SOURCES = \ +INTERNAL_SOURCES= \ Device.c \ Files.c \ Flags.c \ @@ -22,13 +26,22 @@ libxf86config_a_SOURCES = \ DRI.c \ Extensions.c +libxf86config_internal_la_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_SOURCES = \ + $(INTERNAL_SOURCES) +libxf86config_a_CFLAGS = $(AM_CFLAGS) + AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ + xf86Optrec.h \ + xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - xf86Optrec.h \ - xf86Parser.h + xf86Parser.h \ + xf86Optrec.h diff --git a/xorg-server/hw/xfree86/parser/Makefile.in b/xorg-server/hw/xfree86/parser/Makefile.in index e49c50837..123aa3479 100644 --- a/xorg-server/hw/xfree86/parser/Makefile.in +++ b/xorg-server/hw/xfree86/parser/Makefile.in @@ -16,6 +16,7 @@ @SET_MAKE@ + VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ @@ -39,8 +40,11 @@ subdir = hw/xfree86/parser DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +54,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -75,17 +80,36 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sdkdir)" -LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES) +LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru libxf86config_a_AR = $(AR) $(ARFLAGS) libxf86config_a_LIBADD = -am_libxf86config_a_OBJECTS = Device.$(OBJEXT) Files.$(OBJEXT) \ - Flags.$(OBJEXT) Input.$(OBJEXT) Layout.$(OBJEXT) \ - Module.$(OBJEXT) Video.$(OBJEXT) Monitor.$(OBJEXT) \ - Pointer.$(OBJEXT) Screen.$(OBJEXT) Vendor.$(OBJEXT) \ - read.$(OBJEXT) scan.$(OBJEXT) write.$(OBJEXT) DRI.$(OBJEXT) \ - Extensions.$(OBJEXT) +am__objects_1 = libxf86config_a-Device.$(OBJEXT) \ + libxf86config_a-Files.$(OBJEXT) \ + libxf86config_a-Flags.$(OBJEXT) \ + libxf86config_a-Input.$(OBJEXT) \ + libxf86config_a-Layout.$(OBJEXT) \ + libxf86config_a-Module.$(OBJEXT) \ + libxf86config_a-Video.$(OBJEXT) \ + libxf86config_a-Monitor.$(OBJEXT) \ + libxf86config_a-Pointer.$(OBJEXT) \ + libxf86config_a-Screen.$(OBJEXT) \ + libxf86config_a-Vendor.$(OBJEXT) \ + libxf86config_a-read.$(OBJEXT) libxf86config_a-scan.$(OBJEXT) \ + libxf86config_a-write.$(OBJEXT) libxf86config_a-DRI.$(OBJEXT) \ + libxf86config_a-Extensions.$(OBJEXT) +am_libxf86config_a_OBJECTS = $(am__objects_1) libxf86config_a_OBJECTS = $(am_libxf86config_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libxf86config_internal_la_LIBADD = +am__objects_2 = Device.lo Files.lo Flags.lo Input.lo Layout.lo \ + Module.lo Video.lo Monitor.lo Pointer.lo Screen.lo Vendor.lo \ + read.lo scan.lo write.lo DRI.lo Extensions.lo +am_libxf86config_internal_la_OBJECTS = $(am__objects_2) +libxf86config_internal_la_OBJECTS = \ + $(am_libxf86config_internal_la_OBJECTS) +@INSTALL_LIBXF86CONFIG_FALSE@am_libxf86config_internal_la_rpath = +@INSTALL_LIBXF86CONFIG_TRUE@am_libxf86config_internal_la_rpath = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -96,8 +120,10 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libxf86config_a_SOURCES) -DIST_SOURCES = $(libxf86config_a_SOURCES) +SOURCES = $(libxf86config_a_SOURCES) \ + $(libxf86config_internal_la_SOURCES) +DIST_SOURCES = $(libxf86config_a_SOURCES) \ + $(libxf86config_internal_la_SOURCES) HEADERS = $(sdk_HEADERS) ETAGS = etags CTAGS = ctags @@ -107,6 +133,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@ @@ -127,9 +154,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@ @@ -158,7 +188,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@ @@ -167,9 +199,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@ @@ -208,12 +244,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@ @@ -233,7 +270,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@ @@ -243,6 +279,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -256,11 +293,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@ @@ -296,6 +332,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@ @@ -320,7 +357,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@ @@ -343,6 +379,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -374,15 +411,22 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +@INSTALL_LIBXF86CONFIG_FALSE@noinst_LTLIBRARIES = libxf86config_internal.la +@INSTALL_LIBXF86CONFIG_TRUE@noinst_LTLIBRARIES = libxf86config_internal.la @INSTALL_LIBXF86CONFIG_TRUE@lib_LIBRARIES = libxf86config.a -@INSTALL_LIBXF86CONFIG_FALSE@noinst_LIBRARIES = libxf86config.a -libxf86config_a_SOURCES = \ +@INSTALL_LIBXF86CONFIG_TRUE@LIBHEADERS = \ +@INSTALL_LIBXF86CONFIG_TRUE@ xf86Optrec.h \ +@INSTALL_LIBXF86CONFIG_TRUE@ xf86Parser.h + +INTERNAL_SOURCES = \ Device.c \ Files.c \ Flags.c \ @@ -400,15 +444,24 @@ libxf86config_a_SOURCES = \ DRI.c \ Extensions.c +libxf86config_internal_la_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_SOURCES = \ + $(INTERNAL_SOURCES) + +libxf86config_a_CFLAGS = $(AM_CFLAGS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ Configint.h \ configProcs.h \ + xf86Optrec.h \ + xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ - xf86Optrec.h \ - xf86Parser.h + xf86Parser.h \ + xf86Optrec.h all: all-am @@ -476,36 +529,60 @@ uninstall-libLIBRARIES: clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libxf86config.a: $(libxf86config_a_OBJECTS) $(libxf86config_a_DEPENDENCIES) -rm -f libxf86config.a $(libxf86config_a_AR) libxf86config.a $(libxf86config_a_OBJECTS) $(libxf86config_a_LIBADD) $(RANLIB) libxf86config.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libxf86config_internal.la: $(libxf86config_internal_la_OBJECTS) $(libxf86config_internal_la_DEPENDENCIES) + $(LINK) $(am_libxf86config_internal_la_rpath) $(libxf86config_internal_la_OBJECTS) $(libxf86config_internal_la_LIBADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DRI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extensions.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Files.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flags.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Input.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Video.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DRI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extensions.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Files.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flags.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Input.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Video.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-DRI.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Device.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Extensions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Files.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Flags.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Layout.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Module.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Monitor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Pointer.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Screen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Vendor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-Video.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-read.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-scan.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_a-write.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -528,6 +605,230 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +libxf86config_a-Device.o: Device.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Device.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Device.Tpo -c -o libxf86config_a-Device.o `test -f 'Device.c' || echo '$(srcdir)/'`Device.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Device.Tpo $(DEPDIR)/libxf86config_a-Device.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Device.c' object='libxf86config_a-Device.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Device.o `test -f 'Device.c' || echo '$(srcdir)/'`Device.c + +libxf86config_a-Device.obj: Device.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Device.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Device.Tpo -c -o libxf86config_a-Device.obj `if test -f 'Device.c'; then $(CYGPATH_W) 'Device.c'; else $(CYGPATH_W) '$(srcdir)/Device.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Device.Tpo $(DEPDIR)/libxf86config_a-Device.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Device.c' object='libxf86config_a-Device.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Device.obj `if test -f 'Device.c'; then $(CYGPATH_W) 'Device.c'; else $(CYGPATH_W) '$(srcdir)/Device.c'; fi` + +libxf86config_a-Files.o: Files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Files.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Files.Tpo -c -o libxf86config_a-Files.o `test -f 'Files.c' || echo '$(srcdir)/'`Files.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Files.Tpo $(DEPDIR)/libxf86config_a-Files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Files.c' object='libxf86config_a-Files.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Files.o `test -f 'Files.c' || echo '$(srcdir)/'`Files.c + +libxf86config_a-Files.obj: Files.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Files.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Files.Tpo -c -o libxf86config_a-Files.obj `if test -f 'Files.c'; then $(CYGPATH_W) 'Files.c'; else $(CYGPATH_W) '$(srcdir)/Files.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Files.Tpo $(DEPDIR)/libxf86config_a-Files.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Files.c' object='libxf86config_a-Files.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Files.obj `if test -f 'Files.c'; then $(CYGPATH_W) 'Files.c'; else $(CYGPATH_W) '$(srcdir)/Files.c'; fi` + +libxf86config_a-Flags.o: Flags.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Flags.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Flags.Tpo -c -o libxf86config_a-Flags.o `test -f 'Flags.c' || echo '$(srcdir)/'`Flags.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Flags.Tpo $(DEPDIR)/libxf86config_a-Flags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Flags.c' object='libxf86config_a-Flags.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Flags.o `test -f 'Flags.c' || echo '$(srcdir)/'`Flags.c + +libxf86config_a-Flags.obj: Flags.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Flags.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Flags.Tpo -c -o libxf86config_a-Flags.obj `if test -f 'Flags.c'; then $(CYGPATH_W) 'Flags.c'; else $(CYGPATH_W) '$(srcdir)/Flags.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Flags.Tpo $(DEPDIR)/libxf86config_a-Flags.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Flags.c' object='libxf86config_a-Flags.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Flags.obj `if test -f 'Flags.c'; then $(CYGPATH_W) 'Flags.c'; else $(CYGPATH_W) '$(srcdir)/Flags.c'; fi` + +libxf86config_a-Input.o: Input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Input.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Input.Tpo -c -o libxf86config_a-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Input.Tpo $(DEPDIR)/libxf86config_a-Input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Input.c' object='libxf86config_a-Input.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Input.o `test -f 'Input.c' || echo '$(srcdir)/'`Input.c + +libxf86config_a-Input.obj: Input.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Input.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Input.Tpo -c -o libxf86config_a-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Input.Tpo $(DEPDIR)/libxf86config_a-Input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Input.c' object='libxf86config_a-Input.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Input.obj `if test -f 'Input.c'; then $(CYGPATH_W) 'Input.c'; else $(CYGPATH_W) '$(srcdir)/Input.c'; fi` + +libxf86config_a-Layout.o: Layout.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Layout.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Layout.Tpo -c -o libxf86config_a-Layout.o `test -f 'Layout.c' || echo '$(srcdir)/'`Layout.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Layout.Tpo $(DEPDIR)/libxf86config_a-Layout.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Layout.c' object='libxf86config_a-Layout.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Layout.o `test -f 'Layout.c' || echo '$(srcdir)/'`Layout.c + +libxf86config_a-Layout.obj: Layout.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Layout.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Layout.Tpo -c -o libxf86config_a-Layout.obj `if test -f 'Layout.c'; then $(CYGPATH_W) 'Layout.c'; else $(CYGPATH_W) '$(srcdir)/Layout.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Layout.Tpo $(DEPDIR)/libxf86config_a-Layout.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Layout.c' object='libxf86config_a-Layout.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Layout.obj `if test -f 'Layout.c'; then $(CYGPATH_W) 'Layout.c'; else $(CYGPATH_W) '$(srcdir)/Layout.c'; fi` + +libxf86config_a-Module.o: Module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Module.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Module.Tpo -c -o libxf86config_a-Module.o `test -f 'Module.c' || echo '$(srcdir)/'`Module.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Module.Tpo $(DEPDIR)/libxf86config_a-Module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Module.c' object='libxf86config_a-Module.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Module.o `test -f 'Module.c' || echo '$(srcdir)/'`Module.c + +libxf86config_a-Module.obj: Module.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Module.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Module.Tpo -c -o libxf86config_a-Module.obj `if test -f 'Module.c'; then $(CYGPATH_W) 'Module.c'; else $(CYGPATH_W) '$(srcdir)/Module.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Module.Tpo $(DEPDIR)/libxf86config_a-Module.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Module.c' object='libxf86config_a-Module.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Module.obj `if test -f 'Module.c'; then $(CYGPATH_W) 'Module.c'; else $(CYGPATH_W) '$(srcdir)/Module.c'; fi` + +libxf86config_a-Video.o: Video.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Video.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Video.Tpo -c -o libxf86config_a-Video.o `test -f 'Video.c' || echo '$(srcdir)/'`Video.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Video.Tpo $(DEPDIR)/libxf86config_a-Video.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Video.c' object='libxf86config_a-Video.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Video.o `test -f 'Video.c' || echo '$(srcdir)/'`Video.c + +libxf86config_a-Video.obj: Video.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Video.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Video.Tpo -c -o libxf86config_a-Video.obj `if test -f 'Video.c'; then $(CYGPATH_W) 'Video.c'; else $(CYGPATH_W) '$(srcdir)/Video.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Video.Tpo $(DEPDIR)/libxf86config_a-Video.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Video.c' object='libxf86config_a-Video.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Video.obj `if test -f 'Video.c'; then $(CYGPATH_W) 'Video.c'; else $(CYGPATH_W) '$(srcdir)/Video.c'; fi` + +libxf86config_a-Monitor.o: Monitor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Monitor.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Monitor.Tpo -c -o libxf86config_a-Monitor.o `test -f 'Monitor.c' || echo '$(srcdir)/'`Monitor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Monitor.Tpo $(DEPDIR)/libxf86config_a-Monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Monitor.c' object='libxf86config_a-Monitor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Monitor.o `test -f 'Monitor.c' || echo '$(srcdir)/'`Monitor.c + +libxf86config_a-Monitor.obj: Monitor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Monitor.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Monitor.Tpo -c -o libxf86config_a-Monitor.obj `if test -f 'Monitor.c'; then $(CYGPATH_W) 'Monitor.c'; else $(CYGPATH_W) '$(srcdir)/Monitor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Monitor.Tpo $(DEPDIR)/libxf86config_a-Monitor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Monitor.c' object='libxf86config_a-Monitor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Monitor.obj `if test -f 'Monitor.c'; then $(CYGPATH_W) 'Monitor.c'; else $(CYGPATH_W) '$(srcdir)/Monitor.c'; fi` + +libxf86config_a-Pointer.o: Pointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Pointer.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Pointer.Tpo -c -o libxf86config_a-Pointer.o `test -f 'Pointer.c' || echo '$(srcdir)/'`Pointer.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Pointer.Tpo $(DEPDIR)/libxf86config_a-Pointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Pointer.c' object='libxf86config_a-Pointer.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Pointer.o `test -f 'Pointer.c' || echo '$(srcdir)/'`Pointer.c + +libxf86config_a-Pointer.obj: Pointer.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Pointer.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Pointer.Tpo -c -o libxf86config_a-Pointer.obj `if test -f 'Pointer.c'; then $(CYGPATH_W) 'Pointer.c'; else $(CYGPATH_W) '$(srcdir)/Pointer.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Pointer.Tpo $(DEPDIR)/libxf86config_a-Pointer.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Pointer.c' object='libxf86config_a-Pointer.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Pointer.obj `if test -f 'Pointer.c'; then $(CYGPATH_W) 'Pointer.c'; else $(CYGPATH_W) '$(srcdir)/Pointer.c'; fi` + +libxf86config_a-Screen.o: Screen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Screen.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Screen.Tpo -c -o libxf86config_a-Screen.o `test -f 'Screen.c' || echo '$(srcdir)/'`Screen.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Screen.Tpo $(DEPDIR)/libxf86config_a-Screen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Screen.c' object='libxf86config_a-Screen.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Screen.o `test -f 'Screen.c' || echo '$(srcdir)/'`Screen.c + +libxf86config_a-Screen.obj: Screen.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Screen.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Screen.Tpo -c -o libxf86config_a-Screen.obj `if test -f 'Screen.c'; then $(CYGPATH_W) 'Screen.c'; else $(CYGPATH_W) '$(srcdir)/Screen.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Screen.Tpo $(DEPDIR)/libxf86config_a-Screen.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Screen.c' object='libxf86config_a-Screen.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Screen.obj `if test -f 'Screen.c'; then $(CYGPATH_W) 'Screen.c'; else $(CYGPATH_W) '$(srcdir)/Screen.c'; fi` + +libxf86config_a-Vendor.o: Vendor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Vendor.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Vendor.Tpo -c -o libxf86config_a-Vendor.o `test -f 'Vendor.c' || echo '$(srcdir)/'`Vendor.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Vendor.Tpo $(DEPDIR)/libxf86config_a-Vendor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Vendor.c' object='libxf86config_a-Vendor.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Vendor.o `test -f 'Vendor.c' || echo '$(srcdir)/'`Vendor.c + +libxf86config_a-Vendor.obj: Vendor.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Vendor.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Vendor.Tpo -c -o libxf86config_a-Vendor.obj `if test -f 'Vendor.c'; then $(CYGPATH_W) 'Vendor.c'; else $(CYGPATH_W) '$(srcdir)/Vendor.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Vendor.Tpo $(DEPDIR)/libxf86config_a-Vendor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Vendor.c' object='libxf86config_a-Vendor.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Vendor.obj `if test -f 'Vendor.c'; then $(CYGPATH_W) 'Vendor.c'; else $(CYGPATH_W) '$(srcdir)/Vendor.c'; fi` + +libxf86config_a-read.o: read.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-read.o -MD -MP -MF $(DEPDIR)/libxf86config_a-read.Tpo -c -o libxf86config_a-read.o `test -f 'read.c' || echo '$(srcdir)/'`read.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-read.Tpo $(DEPDIR)/libxf86config_a-read.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read.c' object='libxf86config_a-read.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-read.o `test -f 'read.c' || echo '$(srcdir)/'`read.c + +libxf86config_a-read.obj: read.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-read.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-read.Tpo -c -o libxf86config_a-read.obj `if test -f 'read.c'; then $(CYGPATH_W) 'read.c'; else $(CYGPATH_W) '$(srcdir)/read.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-read.Tpo $(DEPDIR)/libxf86config_a-read.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='read.c' object='libxf86config_a-read.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-read.obj `if test -f 'read.c'; then $(CYGPATH_W) 'read.c'; else $(CYGPATH_W) '$(srcdir)/read.c'; fi` + +libxf86config_a-scan.o: scan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-scan.o -MD -MP -MF $(DEPDIR)/libxf86config_a-scan.Tpo -c -o libxf86config_a-scan.o `test -f 'scan.c' || echo '$(srcdir)/'`scan.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-scan.Tpo $(DEPDIR)/libxf86config_a-scan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan.c' object='libxf86config_a-scan.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-scan.o `test -f 'scan.c' || echo '$(srcdir)/'`scan.c + +libxf86config_a-scan.obj: scan.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-scan.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-scan.Tpo -c -o libxf86config_a-scan.obj `if test -f 'scan.c'; then $(CYGPATH_W) 'scan.c'; else $(CYGPATH_W) '$(srcdir)/scan.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-scan.Tpo $(DEPDIR)/libxf86config_a-scan.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='scan.c' object='libxf86config_a-scan.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-scan.obj `if test -f 'scan.c'; then $(CYGPATH_W) 'scan.c'; else $(CYGPATH_W) '$(srcdir)/scan.c'; fi` + +libxf86config_a-write.o: write.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-write.o -MD -MP -MF $(DEPDIR)/libxf86config_a-write.Tpo -c -o libxf86config_a-write.o `test -f 'write.c' || echo '$(srcdir)/'`write.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-write.Tpo $(DEPDIR)/libxf86config_a-write.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write.c' object='libxf86config_a-write.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-write.o `test -f 'write.c' || echo '$(srcdir)/'`write.c + +libxf86config_a-write.obj: write.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-write.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-write.Tpo -c -o libxf86config_a-write.obj `if test -f 'write.c'; then $(CYGPATH_W) 'write.c'; else $(CYGPATH_W) '$(srcdir)/write.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-write.Tpo $(DEPDIR)/libxf86config_a-write.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='write.c' object='libxf86config_a-write.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-write.obj `if test -f 'write.c'; then $(CYGPATH_W) 'write.c'; else $(CYGPATH_W) '$(srcdir)/write.c'; fi` + +libxf86config_a-DRI.o: DRI.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-DRI.o -MD -MP -MF $(DEPDIR)/libxf86config_a-DRI.Tpo -c -o libxf86config_a-DRI.o `test -f 'DRI.c' || echo '$(srcdir)/'`DRI.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-DRI.Tpo $(DEPDIR)/libxf86config_a-DRI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DRI.c' object='libxf86config_a-DRI.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-DRI.o `test -f 'DRI.c' || echo '$(srcdir)/'`DRI.c + +libxf86config_a-DRI.obj: DRI.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-DRI.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-DRI.Tpo -c -o libxf86config_a-DRI.obj `if test -f 'DRI.c'; then $(CYGPATH_W) 'DRI.c'; else $(CYGPATH_W) '$(srcdir)/DRI.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-DRI.Tpo $(DEPDIR)/libxf86config_a-DRI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='DRI.c' object='libxf86config_a-DRI.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-DRI.obj `if test -f 'DRI.c'; then $(CYGPATH_W) 'DRI.c'; else $(CYGPATH_W) '$(srcdir)/DRI.c'; fi` + +libxf86config_a-Extensions.o: Extensions.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Extensions.o -MD -MP -MF $(DEPDIR)/libxf86config_a-Extensions.Tpo -c -o libxf86config_a-Extensions.o `test -f 'Extensions.c' || echo '$(srcdir)/'`Extensions.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Extensions.Tpo $(DEPDIR)/libxf86config_a-Extensions.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Extensions.c' object='libxf86config_a-Extensions.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Extensions.o `test -f 'Extensions.c' || echo '$(srcdir)/'`Extensions.c + +libxf86config_a-Extensions.obj: Extensions.c +@am__fastdepCC_TRUE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -MT libxf86config_a-Extensions.obj -MD -MP -MF $(DEPDIR)/libxf86config_a-Extensions.Tpo -c -o libxf86config_a-Extensions.obj `if test -f 'Extensions.c'; then $(CYGPATH_W) 'Extensions.c'; else $(CYGPATH_W) '$(srcdir)/Extensions.c'; fi` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libxf86config_a-Extensions.Tpo $(DEPDIR)/libxf86config_a-Extensions.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='Extensions.c' object='libxf86config_a-Extensions.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libxf86config_a_CFLAGS) $(CFLAGS) -c -o libxf86config_a-Extensions.obj `if test -f 'Extensions.c'; then $(CYGPATH_W) 'Extensions.c'; else $(CYGPATH_W) '$(srcdir)/Extensions.c'; fi` + mostlyclean-libtool: -rm -f *.lo @@ -638,7 +939,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -671,7 +972,7 @@ maintainer-clean-generic: clean: clean-am clean-am: clean-generic clean-libLIBRARIES clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -742,7 +1043,7 @@ uninstall-am: uninstall-libLIBRARIES uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLIBRARIES clean-libtool clean-noinstLIBRARIES ctags \ + clean-libLIBRARIES clean-libtool clean-noinstLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ diff --git a/xorg-server/hw/xfree86/parser/Module.c b/xorg-server/hw/xfree86/parser/Module.c index 2012ce6d2..ca323fc5a 100644 --- a/xorg-server/hw/xfree86/parser/Module.c +++ b/xorg-server/hw/xfree86/parser/Module.c @@ -108,11 +108,11 @@ xf86parseModuleSubSection (XF86LoadPtr head, char *name) break; case EOF_TOKEN: xf86parseError (UNEXPECTED_EOF_MSG, NULL); - xf86conffree(ptr); + free(ptr); return NULL; default: xf86parseError (INVALID_KEYWORD_MSG, xf86tokenString ()); - xf86conffree(ptr); + free(ptr); return NULL; break; } @@ -233,7 +233,7 @@ xf86addNewLoadDirective (XF86LoadPtr head, char *name, int type, XF86OptionPtr o XF86LoadPtr new; int token; - new = xf86confcalloc (1, sizeof (XF86LoadRec)); + new = calloc (1, sizeof (XF86LoadRec)); new->load_name = name; new->load_type = type; new->load_opt = opts; @@ -263,7 +263,7 @@ xf86freeModules (XF86ConfModulePtr ptr) TestFree (lptr->load_comment); prev = lptr; lptr = lptr->list.next; - xf86conffree (prev); + free (prev); } lptr = ptr->mod_disable_lst; while (lptr) @@ -272,8 +272,8 @@ xf86freeModules (XF86ConfModulePtr ptr) TestFree (lptr->load_comment); prev = lptr; lptr = lptr->list.next; - xf86conffree (prev); + free (prev); } TestFree (ptr->mod_comment); - xf86conffree (ptr); + free (ptr); } diff --git a/xorg-server/hw/xfree86/parser/Monitor.c b/xorg-server/hw/xfree86/parser/Monitor.c index 9d533125e..50de091fc 100644 --- a/xorg-server/hw/xfree86/parser/Monitor.c +++ b/xorg-server/hw/xfree86/parser/Monitor.c @@ -134,7 +134,7 @@ xf86freeModeLineList (XF86ConfModeLinePtr ptr) TestFree (ptr->ml_comment); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -580,7 +580,7 @@ VertDone: /* add to the end of the list of modes sections referenced here */ - mptr = xf86confcalloc (1, sizeof (XF86ConfModesLinkRec)); + mptr = calloc (1, sizeof (XF86ConfModesLinkRec)); mptr->list.next = NULL; mptr->ml_modes_str = val.str; mptr->ml_modes = NULL; @@ -822,7 +822,7 @@ xf86freeMonitorList (XF86ConfMonitorPtr ptr) xf86freeModeLineList (ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -838,7 +838,7 @@ xf86freeModesList (XF86ConfModesPtr ptr) xf86freeModeLineList (ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Pointer.c b/xorg-server/hw/xfree86/parser/Pointer.c index eeb0834bf..56a26ba74 100644 --- a/xorg-server/hw/xfree86/parser/Pointer.c +++ b/xorg-server/hw/xfree86/parser/Pointer.c @@ -115,19 +115,19 @@ xf86parsePointerSection (void) if (xf86getSubToken (&(ptr->inp_comment)) != STRING) Error (QUOTE_MSG, "Protocol"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Protocol"), + strdup("Protocol"), val.str); break; case PDEVICE: if (xf86getSubToken (&(ptr->inp_comment)) != STRING) Error (QUOTE_MSG, "Device"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Device"), + strdup("Device"), val.str); break; case EMULATE3: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Emulate3Buttons"), + strdup("Emulate3Buttons"), NULL); break; case EM3TIMEOUT: @@ -135,12 +135,12 @@ xf86parsePointerSection (void) Error (POSITIVE_INT_MSG, "Emulate3Timeout"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Emulate3Timeout"), + strdup("Emulate3Timeout"), s); break; case CHORDMIDDLE: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ChordMiddle"), + strdup("ChordMiddle"), NULL); break; case PBUTTONS: @@ -148,36 +148,36 @@ xf86parsePointerSection (void) Error (POSITIVE_INT_MSG, "Buttons"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Buttons"), s); + strdup("Buttons"), s); break; case BAUDRATE: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "BaudRate"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("BaudRate"), s); + strdup("BaudRate"), s); break; case SAMPLERATE: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "SampleRate"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("SampleRate"), s); + strdup("SampleRate"), s); break; case PRESOLUTION: if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) Error (POSITIVE_INT_MSG, "Resolution"); s = xf86uLongToString(val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("Resolution"), s); + strdup("Resolution"), s); break; case CLEARDTR: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ClearDTR"), NULL); + strdup("ClearDTR"), NULL); break; case CLEARRTS: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ClearRTS"), NULL); + strdup("ClearRTS"), NULL); break; case ZAXISMAPPING: switch (xf86getToken(ZMapTab)) { @@ -186,28 +186,28 @@ xf86parsePointerSection (void) Error (ZAXISMAPPING_MSG, NULL); s1 = xf86uLongToString(val.num); if (xf86getSubToken (&(ptr->inp_comment)) != NUMBER || val.num < 0) { - xf86conffree(s1); + free(s1); Error (ZAXISMAPPING_MSG, NULL); } s2 = xf86uLongToString(val.num); l = strlen(s1) + 1 + strlen(s2) + 1; - s = xf86confmalloc(l); + s = malloc(l); sprintf(s, "%s %s", s1, s2); - xf86conffree(s1); - xf86conffree(s2); + free(s1); + free(s2); break; case XAXIS: - s = xf86configStrdup("x"); + s = strdup("x"); break; case YAXIS: - s = xf86configStrdup("y"); + s = strdup("y"); break; default: Error (ZAXISMAPPING_MSG, NULL); break; } ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("ZAxisMapping"), + strdup("ZAxisMapping"), s); break; case ALWAYSCORE: @@ -221,10 +221,10 @@ xf86parsePointerSection (void) } } - ptr->inp_identifier = xf86configStrdup(CONF_IMPLICIT_POINTER); - ptr->inp_driver = xf86configStrdup("mouse"); + ptr->inp_identifier = strdup(CONF_IMPLICIT_POINTER); + ptr->inp_driver = strdup("mouse"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - xf86configStrdup("CorePointer"), NULL); + strdup("CorePointer"), NULL); #ifdef DEBUG printf ("Pointer section parsed\n"); diff --git a/xorg-server/hw/xfree86/parser/Screen.c b/xorg-server/hw/xfree86/parser/Screen.c index dfc02bb72..b3b004df6 100644 --- a/xorg-server/hw/xfree86/parser/Screen.c +++ b/xorg-server/hw/xfree86/parser/Screen.c @@ -169,7 +169,7 @@ xf86parseDisplaySubSection (void) while ((token = xf86getSubTokenWithTab (&(ptr->disp_comment), DisplayTab)) == STRING) { - mptr = xf86confcalloc (1, sizeof (XF86ModeRec)); + mptr = calloc (1, sizeof (XF86ModeRec)); mptr->mode_name = val.str; mptr->list.next = NULL; ptr->disp_mode_lst = (XF86ModePtr) @@ -292,7 +292,7 @@ xf86parseScreenSection (void) if (aptr == NULL) { - aptr = xf86confcalloc (1, sizeof (XF86ConfAdaptorLinkRec)); + aptr = calloc (1, sizeof (XF86ConfAdaptorLinkRec)); aptr->list.next = NULL; aptr->al_adaptor_str = val.str; ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr) @@ -315,7 +315,7 @@ xf86parseScreenSection (void) if (xf86getSubToken (&(ptr->scrn_comment)) != STRING) Error (QUOTE_MSG, "SubSection"); { - xf86conffree(val.str); + free(val.str); HANDLE_LIST (scrn_display_lst, xf86parseDisplaySubSection, XF86ConfDisplayPtr); } @@ -456,7 +456,7 @@ xf86freeScreenList (XF86ConfScreenPtr ptr) xf86freeDisplayList (ptr->scrn_display_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -470,7 +470,7 @@ xf86freeAdaptorLinkList (XF86ConfAdaptorLinkPtr ptr) TestFree (ptr->al_adaptor_str); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -485,7 +485,7 @@ xf86freeDisplayList (XF86ConfDisplayPtr ptr) xf86optionListFree (ptr->disp_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -499,7 +499,7 @@ xf86freeModeList (XF86ModePtr ptr) TestFree (ptr->mode_name); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -544,7 +544,7 @@ xf86validateScreen (XF86ConfigPtr p) return (FALSE); } - adaptor->al_adaptor->va_fwdref = xf86configStrdup(screen->scrn_identifier); + adaptor->al_adaptor->va_fwdref = strdup(screen->scrn_identifier); adaptor = adaptor->list.next; } diff --git a/xorg-server/hw/xfree86/parser/Vendor.c b/xorg-server/hw/xfree86/parser/Vendor.c index d1e608067..dce3f1ca1 100644 --- a/xorg-server/hw/xfree86/parser/Vendor.c +++ b/xorg-server/hw/xfree86/parser/Vendor.c @@ -223,7 +223,7 @@ xf86freeVendorList (XF86ConfVendorPtr p) TestFree (p->vnd_identifier); TestFree (p->vnd_comment); xf86optionListFree (p->vnd_option_lst); - xf86conffree (p); + free (p); } void @@ -239,6 +239,6 @@ xf86freeVendorSubList (XF86ConfVendSubPtr ptr) xf86optionListFree (ptr->vs_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/Video.c b/xorg-server/hw/xfree86/parser/Video.c index a8912cf44..beeb43e4f 100644 --- a/xorg-server/hw/xfree86/parser/Video.c +++ b/xorg-server/hw/xfree86/parser/Video.c @@ -86,7 +86,7 @@ xf86freeVideoPortList (XF86ConfVideoPortPtr ptr) xf86optionListFree (ptr->vp_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } @@ -278,7 +278,7 @@ xf86freeVideoAdaptorList (XF86ConfVideoAdaptorPtr ptr) xf86optionListFree (ptr->va_option_lst); prev = ptr; ptr = ptr->list.next; - xf86conffree (prev); + free (prev); } } diff --git a/xorg-server/hw/xfree86/parser/configProcs.h b/xorg-server/hw/xfree86/parser/configProcs.h index 3c9ce7a83..26ba40ebb 100644 --- a/xorg-server/hw/xfree86/parser/configProcs.h +++ b/xorg-server/hw/xfree86/parser/configProcs.h @@ -27,6 +27,9 @@ /* Private procs. Public procs are in xf86Parser.h and xf86Optrec.h */ +/* exported functions are/were used by the X Server, and need to be + * made public when installing libxf86config */ + /* Device.c */ XF86ConfDevicePtr xf86parseDeviceSection(void); void xf86printDeviceSection(FILE *cf, XF86ConfDevicePtr ptr); @@ -53,14 +56,14 @@ int xf86validateLayout(XF86ConfigPtr p); /* Module.c */ XF86ConfModulePtr xf86parseModuleSection(void); void xf86printModuleSection(FILE *cf, XF86ConfModulePtr ptr); -XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, XF86OptionPtr opts); +extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, XF86OptionPtr opts); void xf86freeModules(XF86ConfModulePtr ptr); /* Monitor.c */ XF86ConfMonitorPtr xf86parseMonitorSection(void); XF86ConfModesPtr xf86parseModesSection(void); void xf86printMonitorSection(FILE *cf, XF86ConfMonitorPtr ptr); void xf86printModesSection(FILE *cf, XF86ConfModesPtr ptr); -void xf86freeMonitorList(XF86ConfMonitorPtr ptr); +extern _X_EXPORT void xf86freeMonitorList(XF86ConfMonitorPtr ptr); void xf86freeModesList(XF86ConfModesPtr ptr); int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen); /* Pointer.c */ @@ -68,7 +71,7 @@ XF86ConfInputPtr xf86parsePointerSection(void); /* Screen.c */ XF86ConfScreenPtr xf86parseScreenSection(void); void xf86printScreenSection(FILE *cf, XF86ConfScreenPtr ptr); -void xf86freeScreenList(XF86ConfScreenPtr ptr); +extern _X_EXPORT void xf86freeScreenList(XF86ConfScreenPtr ptr); void xf86freeAdaptorLinkList(XF86ConfAdaptorLinkPtr ptr); void xf86freeDisplayList(XF86ConfDisplayPtr ptr); void xf86freeModeList(XF86ModePtr ptr); diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c index b044a6af8..e965d209e 100644 --- a/xorg-server/hw/xfree86/parser/read.c +++ b/xorg-server/hw/xfree86/parser/read.c @@ -96,7 +96,7 @@ xf86readConfigFile (void) int token; XF86ConfigPtr ptr = NULL; - if ((ptr = xf86confcalloc (1, sizeof (XF86ConfigRec))) == NULL) + if ((ptr = calloc (1, sizeof (XF86ConfigRec))) == NULL) { return NULL; } @@ -118,107 +118,107 @@ xf86readConfigFile (void) xf86setSection (val.str); if (xf86nameCompare (val.str, "files") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_files, xf86parseFilesSection ()); } else if (xf86nameCompare (val.str, "serverflags") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_flags, xf86parseFlagsSection ()); } else if (xf86nameCompare (val.str, "pointer") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_input_lst, xf86parsePointerSection, XF86ConfInputPtr); } else if (xf86nameCompare (val.str, "videoadaptor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_videoadaptor_lst, xf86parseVideoAdaptorSection, XF86ConfVideoAdaptorPtr); } else if (xf86nameCompare (val.str, "device") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_device_lst, xf86parseDeviceSection, XF86ConfDevicePtr); } else if (xf86nameCompare (val.str, "monitor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_monitor_lst, xf86parseMonitorSection, XF86ConfMonitorPtr); } else if (xf86nameCompare (val.str, "modes") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_modes_lst, xf86parseModesSection, XF86ConfModesPtr); } else if (xf86nameCompare (val.str, "screen") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_screen_lst, xf86parseScreenSection, XF86ConfScreenPtr); } else if (xf86nameCompare(val.str, "inputdevice") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_input_lst, xf86parseInputSection, XF86ConfInputPtr); } else if (xf86nameCompare (val.str, "module") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_modules, xf86parseModuleSection ()); } else if (xf86nameCompare (val.str, "serverlayout") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_layout_lst, xf86parseLayoutSection, XF86ConfLayoutPtr); } else if (xf86nameCompare (val.str, "vendor") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_LIST (conf_vendor_lst, xf86parseVendorSection, XF86ConfVendorPtr); } else if (xf86nameCompare (val.str, "dri") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_dri, xf86parseDRISection ()); } else if (xf86nameCompare (val.str, "extensions") == 0) { - xf86conffree(val.str); + free(val.str); val.str = NULL; HANDLE_RETURN (conf_extensions, xf86parseExtensionsSection ()); } else { Error (INVALID_SECTION_MSG, xf86tokenString ()); - xf86conffree(val.str); + free(val.str); val.str = NULL; } break; default: Error (INVALID_KEYWORD_MSG, xf86tokenString ()); - xf86conffree(val.str); + free(val.str); val.str = NULL; } } @@ -306,5 +306,5 @@ xf86freeConfig (XF86ConfigPtr p) xf86freeExtensions (p->conf_extensions); TestFree(p->conf_comment); - xf86conffree (p); + free (p); } diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c index 7f10c0daa..d2e8b6d2b 100644 --- a/xorg-server/hw/xfree86/parser/scan.c +++ b/xorg-server/hw/xfree86/parser/scan.c @@ -180,8 +180,8 @@ xf86getNextLine(void) if (configBufLen != CONFIG_BUF_LEN) { - tmpConfigBuf = xf86confmalloc(CONFIG_BUF_LEN); - tmpConfigRBuf = xf86confmalloc(CONFIG_BUF_LEN); + tmpConfigBuf = malloc(CONFIG_BUF_LEN); + tmpConfigRBuf = malloc(CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { @@ -190,8 +190,8 @@ xf86getNextLine(void) * and free any partial allocations */ - xf86conffree(tmpConfigBuf); - xf86conffree(tmpConfigRBuf); + free(tmpConfigBuf); + free(tmpConfigRBuf); } else { @@ -202,8 +202,8 @@ xf86getNextLine(void) configBufLen = CONFIG_BUF_LEN; - xf86conffree(configBuf); - xf86conffree(configRBuf); + free(configBuf); + free(configRBuf); configBuf = tmpConfigBuf; configRBuf = tmpConfigRBuf; @@ -237,8 +237,8 @@ xf86getNextLine(void) if (!eolFound) { - tmpConfigBuf = xf86confrealloc(configBuf, configBufLen + CONFIG_BUF_LEN); - tmpConfigRBuf = xf86confrealloc(configRBuf, configBufLen + CONFIG_BUF_LEN); + tmpConfigBuf = realloc(configBuf, configBufLen + CONFIG_BUF_LEN); + tmpConfigRBuf = realloc(configRBuf, configBufLen + CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { @@ -420,7 +420,7 @@ again: } while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0')); configRBuf[i] = '\0'; - val.str = xf86confmalloc (strlen (configRBuf) + 1); + val.str = malloc (strlen (configRBuf) + 1); strcpy (val.str, configRBuf); /* private copy ! */ return (STRING); } @@ -595,7 +595,7 @@ xf86pathIsSafe(const char *path) #endif #define BAIL_OUT do { \ - xf86conffree(result); \ + free(result); \ return NULL; \ } while (0) @@ -632,7 +632,7 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, if (envUsed) *envUsed = 0; - result = xf86confmalloc(PATH_MAX + 1); + result = malloc(PATH_MAX + 1); l = 0; for (i = 0; template[i]; i++) { if (template[i] != '%') { @@ -669,11 +669,11 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, break; case 'H': if (!hostname) { - if ((hostname = xf86confmalloc(MAXHOSTNAMELEN + 1))) { + if ((hostname = malloc(MAXHOSTNAMELEN + 1))) { if (gethostname(hostname, MAXHOSTNAMELEN) == 0) { hostname[MAXHOSTNAMELEN] = '\0'; } else { - xf86conffree(hostname); + free(hostname); hostname = NULL; } } @@ -791,7 +791,7 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) if (!path || !path[0]) path = DEFAULT_CONF_PATH; - pathcopy = xf86confmalloc(strlen(path) + 1); + pathcopy = malloc(strlen(path) + 1); strcpy(pathcopy, path); if (!projroot || !projroot[0]) projroot = PROJECTROOT; @@ -811,7 +811,7 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) } } if (configPath && !configFile) { - xf86conffree(configPath); + free(configPath); configPath = NULL; } template = strtok(NULL, ","); @@ -834,21 +834,21 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) } } if (configPath && !configFile) { - xf86conffree(configPath); + free(configPath); configPath = NULL; } template = strtok(NULL, ","); } } - xf86conffree(pathcopy); + free(pathcopy); if (!configFile) { return NULL; } - configBuf = xf86confmalloc (CONFIG_BUF_LEN); - configRBuf = xf86confmalloc (CONFIG_BUF_LEN); + configBuf = malloc (CONFIG_BUF_LEN); + configRBuf = malloc (CONFIG_BUF_LEN); configBuf[0] = '\0'; /* sanity ... */ return configPath; @@ -857,11 +857,11 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) void xf86closeConfigFile (void) { - xf86conffree (configPath); + free (configPath); configPath = NULL; - xf86conffree (configRBuf); + free (configRBuf); configRBuf = NULL; - xf86conffree (configBuf); + free (configBuf); configBuf = NULL; if (configFile) { @@ -877,9 +877,9 @@ void xf86setBuiltinConfig(const char *config[]) { builtinConfig = config; - configPath = xf86configStrdup("<builtin configuration>"); - configBuf = xf86confmalloc (CONFIG_BUF_LEN); - configRBuf = xf86confmalloc (CONFIG_BUF_LEN); + configPath = strdup("<builtin configuration>"); + configBuf = malloc (CONFIG_BUF_LEN); + configRBuf = malloc (CONFIG_BUF_LEN); configBuf[0] = '\0'; /* sanity ... */ } @@ -915,8 +915,8 @@ void xf86setSection (char *section) { if (configSection) - xf86conffree(configSection); - configSection = xf86confmalloc(strlen (section) + 1); + free(configSection); + configSection = malloc(strlen (section) + 1); strcpy (configSection, section); } @@ -948,7 +948,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab) * Compare two names. The characters '_', ' ', and '\t' are ignored * in the comparison. */ -_X_EXPORT int +int xf86nameCompare (const char *s1, const char *s2) { char c1, c2; @@ -1013,7 +1013,7 @@ xf86addComment(char *cur, char *add) endnewline = add[len - 1] == '\n'; len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen; - if ((str = xf86confrealloc(cur, len + curlen)) == NULL) + if ((str = realloc(cur, len + curlen)) == NULL) return (cur); cur = str; diff --git a/xorg-server/hw/xfree86/parser/xf86Optrec.h b/xorg-server/hw/xfree86/parser/xf86Optrec.h index 183b85720..5ccf7285b 100644 --- a/xorg-server/hw/xfree86/parser/xf86Optrec.h +++ b/xorg-server/hw/xfree86/parser/xf86Optrec.h @@ -64,6 +64,9 @@ #ifndef _xf86Optrec_h_ #define _xf86Optrec_h_ #include <stdio.h> +#include <string.h> + +#include <X11/Xfuncproto.h> /* * all records that need to be linked lists should contain a GenericList as @@ -89,24 +92,21 @@ typedef struct XF86OptionRec, *XF86OptionPtr; -XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val); -XF86OptionPtr xf86optionListDup(XF86OptionPtr opt); -void xf86optionListFree(XF86OptionPtr opt); -char *xf86optionName(XF86OptionPtr opt); -char *xf86optionValue(XF86OptionPtr opt); -XF86OptionPtr xf86newOption(char *name, char *value); -XF86OptionPtr xf86nextOption(XF86OptionPtr list); -XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name); -char *xf86findOptionValue(XF86OptionPtr list, const char *name); -int xf86findOptionBoolean (XF86OptionPtr, const char *, int); -XF86OptionPtr xf86optionListCreate(const char **options, int count, int used); -XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail); -char *xf86configStrdup (const char *s); -int xf86nameCompare (const char *s1, const char *s2); -char *xf86uLongToString(unsigned long i); -void xf86debugListOptions(XF86OptionPtr); -XF86OptionPtr xf86parseOption(XF86OptionPtr head); -void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs); +extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val); +extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt); +extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt); +extern _X_EXPORT char *xf86optionName(XF86OptionPtr opt); +extern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt); +extern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value); +extern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list); +extern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name); +extern _X_EXPORT char *xf86findOptionValue(XF86OptionPtr list, const char *name); +extern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options, int count, int used); +extern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail); +extern _X_EXPORT int xf86nameCompare (const char *s1, const char *s2); +extern _X_EXPORT char *xf86uLongToString(unsigned long i); +extern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head); +extern _X_EXPORT void xf86printOptionList(FILE *fp, XF86OptionPtr list, int tabs); #endif /* _xf86Optrec_h_ */ diff --git a/xorg-server/hw/xfree86/parser/xf86Parser.h b/xorg-server/hw/xfree86/parser/xf86Parser.h index 1c7b285c8..603080066 100644 --- a/xorg-server/hw/xfree86/parser/xf86Parser.h +++ b/xorg-server/hw/xfree86/parser/xf86Parser.h @@ -72,7 +72,6 @@ typedef struct { char *file_logfile; char *file_modulepath; - char *file_inputdevs; char *file_fontpath; char *file_comment; char *file_xkbdir; @@ -457,29 +456,29 @@ xf86ConfigSymTabRec, *xf86ConfigSymTabPtr; /* * prototypes for public functions */ -extern const char *xf86openConfigFile (const char *, const char *, +extern _X_EXPORT const char *xf86openConfigFile (const char *, const char *, const char *); -extern void xf86setBuiltinConfig(const char *config[]); -extern XF86ConfigPtr xf86readConfigFile (void); -extern void xf86closeConfigFile (void); -extern void xf86freeConfig (XF86ConfigPtr p); -extern int xf86writeConfigFile (const char *, XF86ConfigPtr); -XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); -XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list); -XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p); -XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p); -XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p); -XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p); -XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p); -XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p); -XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, +extern _X_EXPORT void xf86setBuiltinConfig(const char *config[]); +extern _X_EXPORT XF86ConfigPtr xf86readConfigFile (void); +extern _X_EXPORT void xf86closeConfigFile (void); +extern _X_EXPORT void xf86freeConfig (XF86ConfigPtr p); +extern _X_EXPORT int xf86writeConfigFile (const char *, XF86ConfigPtr); +extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); +extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list); +extern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p); +extern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p); +extern _X_EXPORT XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p); +extern _X_EXPORT XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p); +extern _X_EXPORT XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p); +extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p); +extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, XF86ConfVideoAdaptorPtr p); -GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); -int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); +extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); +extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); -int xf86pathIsAbsolute(const char *path); -int xf86pathIsSafe(const char *path); -char *xf86addComment(char *cur, char *add); +extern _X_EXPORT int xf86pathIsAbsolute(const char *path); +extern _X_EXPORT int xf86pathIsSafe(const char *path); +extern _X_EXPORT char *xf86addComment(char *cur, char *add); #endif /* _xf86Parser_h_ */ diff --git a/xorg-server/hw/xfree86/parser/xf86tokens.h b/xorg-server/hw/xfree86/parser/xf86tokens.h index b2d23508d..4c1d38c03 100644 --- a/xorg-server/hw/xfree86/parser/xf86tokens.h +++ b/xorg-server/hw/xfree86/parser/xf86tokens.h @@ -99,7 +99,6 @@ typedef enum { /* File tokens */ FONTPATH, MODULEPATH, - INPUTDEVICES, LOGFILEPATH, XKBDIR, diff --git a/xorg-server/hw/xfree86/ramdac/BT.h b/xorg-server/hw/xfree86/ramdac/BT.h index b3426bada..35d0bdbd9 100644 --- a/xorg-server/hw/xfree86/ramdac/BT.h +++ b/xorg-server/hw/xfree86/ramdac/BT.h @@ -1,10 +1,10 @@ #include "xf86RamDac.h" -RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT RamDacHelperRecPtr BTramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void BTramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void BTramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void BTramdacSetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); #define ATT20C504_RAMDAC (VENDOR_BT << 16) | 0x00 #define ATT20C505_RAMDAC (VENDOR_BT << 16) | 0x01 diff --git a/xorg-server/hw/xfree86/ramdac/IBM.h b/xorg-server/hw/xfree86/ramdac/IBM.h index fdb0f5ad1..6fa18b219 100644 --- a/xorg-server/hw/xfree86/ramdac/IBM.h +++ b/xorg-server/hw/xfree86/ramdac/IBM.h @@ -1,24 +1,24 @@ #include <xf86RamDac.h> -RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void IBMramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -void IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -unsigned long IBMramdac526CalculateMNPCForClock(unsigned long RefClock, +extern _X_EXPORT RamDacHelperRecPtr IBMramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void IBMramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdac526SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void IBMramdac640SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT unsigned long IBMramdac526CalculateMNPCForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP, unsigned long *rC); -unsigned long IBMramdac640CalculateMNPCForClock(unsigned long RefClock, +extern _X_EXPORT unsigned long IBMramdac640CalculateMNPCForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP, unsigned long *rC); -void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr); -void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr); typedef void IBMramdac526SetBppProc(ScrnInfoPtr, RamDacRegRecPtr); -IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void); +extern _X_EXPORT IBMramdac526SetBppProc *IBMramdac526SetBppWeak(void); #define IBM524_RAMDAC ((VENDOR_IBM << 16) | 0x00) #define IBM524A_RAMDAC ((VENDOR_IBM << 16) | 0x01) diff --git a/xorg-server/hw/xfree86/ramdac/Makefile.am b/xorg-server/hw/xfree86/ramdac/Makefile.am index 2b84cb4dd..98e367c88 100644 --- a/xorg-server/hw/xfree86/ramdac/Makefile.am +++ b/xorg-server/hw/xfree86/ramdac/Makefile.am @@ -1,6 +1,6 @@ -noinst_LIBRARIES = libramdac.a +noinst_LTLIBRARIES = libramdac.la -libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ +libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \ xf86BitOrder.c diff --git a/xorg-server/hw/xfree86/ramdac/Makefile.in b/xorg-server/hw/xfree86/ramdac/Makefile.in index 7290a2e45..38dee136b 100644 --- a/xorg-server/hw/xfree86/ramdac/Makefile.in +++ b/xorg-server/hw/xfree86/ramdac/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/ramdac DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,17 +53,15 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libramdac_a_AR = $(AR) $(ARFLAGS) -libramdac_a_LIBADD = -am_libramdac_a_OBJECTS = xf86RamDac.$(OBJEXT) xf86RamDacCmap.$(OBJEXT) \ - xf86Cursor.$(OBJEXT) xf86HWCurs.$(OBJEXT) IBM.$(OBJEXT) \ - BT.$(OBJEXT) TI.$(OBJEXT) xf86BitOrder.$(OBJEXT) -libramdac_a_OBJECTS = $(am_libramdac_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libramdac_la_LIBADD = +am_libramdac_la_OBJECTS = xf86RamDac.lo xf86RamDacCmap.lo \ + xf86Cursor.lo xf86HWCurs.lo IBM.lo BT.lo TI.lo xf86BitOrder.lo +libramdac_la_OBJECTS = $(am_libramdac_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -71,8 +72,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libramdac_a_SOURCES) -DIST_SOURCES = $(libramdac_a_SOURCES) +SOURCES = $(libramdac_la_SOURCES) +DIST_SOURCES = $(libramdac_la_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -104,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@ @@ -124,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@ @@ -155,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@ @@ -164,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@ @@ -205,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@ @@ -230,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@ @@ -240,6 +251,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -253,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@ @@ -293,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@ @@ -317,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@ @@ -340,6 +351,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -371,14 +383,16 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libramdac.a -libramdac_a_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ +noinst_LTLIBRARIES = libramdac.la +libramdac_la_SOURCES = xf86RamDac.c xf86RamDacCmap.c \ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \ xf86BitOrder.c @@ -426,12 +440,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libramdac.a: $(libramdac_a_OBJECTS) $(libramdac_a_DEPENDENCIES) - -rm -f libramdac.a - $(libramdac_a_AR) libramdac.a $(libramdac_a_OBJECTS) $(libramdac_a_LIBADD) - $(RANLIB) libramdac.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libramdac.la: $(libramdac_la_OBJECTS) $(libramdac_la_DEPENDENCIES) + $(LINK) $(libramdac_la_OBJECTS) $(libramdac_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -439,14 +457,14 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BT.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IBM.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TI.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86BitOrder.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDac.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDacCmap.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BT.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IBM.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TI.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86BitOrder.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RamDacCmap.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -579,7 +597,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) $(HEADERS) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -612,7 +630,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -684,7 +702,7 @@ uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/ramdac/TI.c b/xorg-server/hw/xfree86/ramdac/TI.c index f421fc39a..1c541d76b 100644 --- a/xorg-server/hw/xfree86/ramdac/TI.c +++ b/xorg-server/hw/xfree86/ramdac/TI.c @@ -115,10 +115,8 @@ TIramdacCalculateMNPForClock( VCO = 8.0 * IntRef * best_m / best_n; ActualClock = VCO / ( 1 << p ); -#ifdef DEBUG - ErrorF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n", + DebugF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n", ActualClock, VCO, *rN, *rM, *rP); -#endif return (ActualClock); } diff --git a/xorg-server/hw/xfree86/ramdac/TI.h b/xorg-server/hw/xfree86/ramdac/TI.h index bc807f40c..f5499f903 100644 --- a/xorg-server/hw/xfree86/ramdac/TI.h +++ b/xorg-server/hw/xfree86/ramdac/TI.h @@ -1,26 +1,22 @@ #include <xf86RamDac.h> -unsigned long TIramdacCalculateMNPForClock(unsigned long RefClock, +extern _X_EXPORT unsigned long TIramdacCalculateMNPForClock(unsigned long RefClock, unsigned long ReqClock, char IsPixClock, unsigned long MinClock, unsigned long MaxClock, unsigned long *rM, unsigned long *rN, unsigned long *rP); -RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); -void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); -void TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -void TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); -unsigned long TIramdac3030CalculateMNPForClock(unsigned long RefClock, - unsigned long ReqClock, char IsPixClock, unsigned long MinClock, - unsigned long MaxClock, unsigned long *rM, unsigned long *rN, - unsigned long *rP); -void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr); -void TIramdacLoadPalette( ScrnInfoPtr pScrn, int numColors, int *indices, +extern _X_EXPORT RamDacHelperRecPtr TIramdacProbe(ScrnInfoPtr pScrn, RamDacSupportedInfoRecPtr ramdacs); +extern _X_EXPORT void TIramdacSave(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdacRestore(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdac3026SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdac3030SetBpp(ScrnInfoPtr pScrn, RamDacRegRecPtr RamDacRegRec); +extern _X_EXPORT void TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr); +extern _X_EXPORT void TIramdacLoadPalette( ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual); typedef void TIramdacLoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr); -TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void); +extern _X_EXPORT TIramdacLoadPaletteProc *TIramdacLoadPaletteWeak(void); #define TI3030_RAMDAC (VENDOR_TI << 16) | 0x00 #define TI3026_RAMDAC (VENDOR_TI << 16) | 0x01 diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c index 896ed3700..6b71f4677 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.c +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.c @@ -303,7 +303,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ if (ScreenPriv->SWCursor || - !(pDev == inputInfo.pointer || !pDev->isMaster && pDev->u.master == inputInfo.pointer)) + !(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)) (*ScreenPriv->spriteFuncs->SetCursor)(pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); @@ -315,7 +315,7 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, /* only update for VCP, otherwise we get cursor jumps when removing a sprite. The second cursor is never HW rendered anyway. */ if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer)) { ScreenPriv->CurrentCursor = pCurs; ScreenPriv->x = x; @@ -380,7 +380,7 @@ xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) /* only update coordinate state for first sprite, otherwise we get jumps when removing a sprite. The second sprite is never HW rendered anyway */ if (pDev == inputInfo.pointer || - (!pDev->isMaster && pDev->u.master == inputInfo.pointer)) + (!IsMaster(pDev) && pDev->u.master == inputInfo.pointer)) { ScreenPriv->x = x; ScreenPriv->y = y; diff --git a/xorg-server/hw/xfree86/ramdac/xf86Cursor.h b/xorg-server/hw/xfree86/ramdac/xf86Cursor.h index 469f48f01..3f3618b59 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86Cursor.h +++ b/xorg-server/hw/xfree86/ramdac/xf86Cursor.h @@ -25,10 +25,10 @@ typedef struct _xf86CursorInfoRec { } xf86CursorInfoRec, *xf86CursorInfoPtr; -Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); -xf86CursorInfoPtr xf86CreateCursorInfoRec(void); -void xf86DestroyCursorInfoRec(xf86CursorInfoPtr); -void xf86ForceHWCursor (ScreenPtr pScreen, Bool on); +extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); +extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void); +extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr); +extern _X_EXPORT void xf86ForceHWCursor (ScreenPtr pScreen, Bool on); #define HARDWARE_CURSOR_INVERT_MASK 0x00000001 #define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002 diff --git a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h index f82be2edc..32be9c2f3 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/xorg-server/hw/xfree86/ramdac/xf86CursorPriv.h @@ -45,6 +45,6 @@ Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); CARD32 xf86ReverseBitOrder(CARD32 data); -extern DevPrivateKey xf86CursorScreenKey; +extern _X_EXPORT DevPrivateKey xf86CursorScreenKey; #endif /* _XF86CURSORPRIV_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c index 1dd3daf1b..bd4f3466a 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.c @@ -37,7 +37,7 @@ int RamDacHWPrivateIndex = -1; int RamDacScreenPrivateIndex = -1; RamDacRecPtr -RamDacCreateInfoRec() +RamDacCreateInfoRec(void) { RamDacRecPtr infoRec; @@ -47,7 +47,7 @@ RamDacCreateInfoRec() } RamDacHelperRecPtr -RamDacHelperCreateInfoRec() +RamDacHelperCreateInfoRec(void) { RamDacHelperRecPtr infoRec; @@ -56,13 +56,13 @@ RamDacHelperCreateInfoRec() return infoRec; } -void +void RamDacDestroyInfoRec(RamDacRecPtr infoRec) { xfree(infoRec); } -void +void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec) { xfree(infoRec); @@ -86,7 +86,7 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv) } void -RamDacGetRecPrivate() +RamDacGetRecPrivate(void) { if (RamDacHWPrivateIndex < 0) RamDacHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); @@ -142,13 +142,13 @@ RamDacFreeRec(ScrnInfoPtr pScrn) } int -RamDacGetHWIndex() +RamDacGetHWIndex(void) { return RamDacHWPrivateIndex; } int -RamDacGetScreenIndex() +RamDacGetScreenIndex(void) { return RamDacScreenPrivateIndex; } diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h index 1f03dfb99..4a3900b93 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDac.h +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDac.h @@ -101,23 +101,21 @@ typedef struct _RamdacScreenRec { } RamDacScreenRec, *RamDacScreenRecPtr; #define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec -extern int RamDacHWPrivateIndex; -extern int RamDacScreenPrivateIndex; +extern _X_EXPORT int RamDacHWPrivateIndex; +extern _X_EXPORT int RamDacScreenPrivateIndex; typedef struct { int token; } RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr; -RamDacRecPtr RamDacCreateInfoRec(void); -RamDacHelperRecPtr RamDacHelperCreateInfoRec(void); -void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec); -void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec); -Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec); -void RamDacSetGamma(ScrnInfoPtr pScrn, Bool Real8BitDac); -void RamDacRestoreDACValues(ScrnInfoPtr pScrn); -Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, +extern _X_EXPORT RamDacRecPtr RamDacCreateInfoRec(void); +extern _X_EXPORT RamDacHelperRecPtr RamDacHelperCreateInfoRec(void); +extern _X_EXPORT void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec); +extern _X_EXPORT void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec); +extern _X_EXPORT Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec); +extern _X_EXPORT Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, unsigned int flags); -void RamDacFreeRec(ScrnInfoPtr pScrn); -int RamDacGetHWIndex(void); +extern _X_EXPORT void RamDacFreeRec(ScrnInfoPtr pScrn); +extern _X_EXPORT int RamDacGetHWIndex(void); #endif /* _XF86RAMDAC_H */ diff --git a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c index 600fe3f07..c6dc83157 100644 --- a/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c +++ b/xorg-server/hw/xfree86/ramdac/xf86RamDacCmap.c @@ -39,9 +39,6 @@ #include "colormapst.h" #include "xf86RamDacPriv.h" -#include "xf86PciInfo.h" -#include "xf86Pci.h" - void RamDacLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) diff --git a/xorg-server/hw/xfree86/shadowfb/Makefile.in b/xorg-server/hw/xfree86/shadowfb/Makefile.in index e81ab786a..7e5de6e1f 100644 --- a/xorg-server/hw/xfree86/shadowfb/Makefile.in +++ b/xorg-server/hw/xfree86/shadowfb/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/shadowfb DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,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@ @@ -123,9 +128,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@ @@ -154,7 +162,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@ @@ -163,9 +173,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@ @@ -204,12 +218,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@ @@ -229,7 +244,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@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,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@ @@ -292,6 +306,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@ @@ -316,7 +331,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@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,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@ diff --git a/xorg-server/hw/xfree86/shadowfb/shadow.c b/xorg-server/hw/xfree86/shadowfb/shadow.c index ff775efbd..9c9aa0d55 100644 --- a/xorg-server/hw/xfree86/shadowfb/shadow.c +++ b/xorg-server/hw/xfree86/shadowfb/shadow.c @@ -31,9 +31,6 @@ # include "picturestr.h" #endif -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)>(b))?(a):(b)) - static Bool ShadowCloseScreen (int i, ScreenPtr pScreen); static void ShadowCopyWindow( WindowPtr pWin, @@ -102,7 +99,7 @@ static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) #define GET_GC_PRIVATE(pGC) \ - (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey); + (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey) #define SHADOW_GC_FUNC_PROLOGUE(pGC)\ ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\ @@ -1364,44 +1361,44 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, if (pFont->info.constantWidth) { int ascent, descent, left, right = 0; - ascent = MAX(pFont->info.fontAscent, pFont->info.maxbounds.ascent); - descent = MAX(pFont->info.fontDescent, pFont->info.maxbounds.descent); + ascent = max(pFont->info.fontAscent, pFont->info.maxbounds.ascent); + descent = max(pFont->info.fontDescent, pFont->info.maxbounds.descent); left = pFont->info.maxbounds.leftSideBearing; if (count > 0) { right = (count - 1) * pFont->info.maxbounds.characterWidth; } right += pFont->info.maxbounds.rightSideBearing; BB->x1 = - MAX(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = - MAX(pDrawable->y + y - ascent, + max(pDrawable->y + y - ascent, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = - MIN(pDrawable->x + x + right, + min(pDrawable->x + x + right, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = - MIN(pDrawable->y + y + descent, + min(pDrawable->y + y + descent, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y2); } else { ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit : Linear8Bit, BB); BB->x1 = - MAX(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, + max(pDrawable->x + x + BB->x1, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x1); BB->y1 = - MAX(pDrawable->y + y + BB->y1, + max(pDrawable->y + y + BB->y1, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y1); BB->x2 = - MIN(pDrawable->x + x + BB->x2, + min(pDrawable->x + x + BB->x2, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->x2); BB->y2 = - MIN(pDrawable->y + y + BB->y2, + min(pDrawable->y + y + BB->y2, (REGION_EXTENTS(pGC->pScreen, &((WindowPtr) pDrawable)->winSize))->y2); } diff --git a/xorg-server/hw/xfree86/shadowfb/shadowfb.h b/xorg-server/hw/xfree86/shadowfb/shadowfb.h index 6c9635879..56e0e86fe 100644 --- a/xorg-server/hw/xfree86/shadowfb/shadowfb.h +++ b/xorg-server/hw/xfree86/shadowfb/shadowfb.h @@ -19,7 +19,7 @@ typedef void (*RefreshAreaFuncPtr)(ScrnInfoPtr, int, BoxPtr); * * Returns FALSE in the event of an error. */ -Bool +extern _X_EXPORT Bool ShadowFBInit ( ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea @@ -33,7 +33,7 @@ ShadowFBInit ( * * Returns FALSE in the event of an error */ -Bool +extern _X_EXPORT Bool ShadowFBInit2 ( ScreenPtr pScreen, RefreshAreaFuncPtr preRefreshArea, diff --git a/xorg-server/hw/xfree86/utils/Makefile.in b/xorg-server/hw/xfree86/utils/Makefile.in index 7c3f2313f..36c4401e6 100644 --- a/xorg-server/hw/xfree86/utils/Makefile.in +++ b/xorg-server/hw/xfree86/utils/Makefile.in @@ -36,8 +36,11 @@ host_triplet = @host@ subdir = hw/xfree86/utils 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 @@ -47,7 +50,8 @@ 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 = SOURCES = @@ -98,6 +102,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@ @@ -118,9 +123,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@ @@ -149,7 +157,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@ @@ -158,9 +168,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@ @@ -199,12 +213,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@ @@ -224,7 +239,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@ @@ -234,6 +248,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -247,11 +262,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@ @@ -287,6 +301,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@ @@ -311,7 +326,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@ @@ -334,6 +348,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -365,7 +380,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@ diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.am b/xorg-server/hw/xfree86/utils/cvt/Makefile.am index 4db175fbd..5db1d7cf9 100644 --- a/xorg-server/hw/xfree86/utils/cvt/Makefile.am +++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.am @@ -31,12 +31,10 @@ bin_PROGRAMS = cvt INCLUDES = $(XORG_INCS) \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/parser -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib # gah cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a man1_MANS = cvt.man diff --git a/xorg-server/hw/xfree86/utils/cvt/Makefile.in b/xorg-server/hw/xfree86/utils/cvt/Makefile.in index a5eba3dfa..6964e74b7 100644 --- a/xorg-server/hw/xfree86/utils/cvt/Makefile.in +++ b/xorg-server/hw/xfree86/utils/cvt/Makefile.in @@ -71,8 +71,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/utils/cvt 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 @@ -82,15 +85,15 @@ 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 = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_cvt_OBJECTS = cvt-cvt.$(OBJEXT) cvt-xf86cvt.$(OBJEXT) cvt_OBJECTS = $(am_cvt_OBJECTS) -cvt_DEPENDENCIES = \ - $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a +cvt_LDADD = $(LDADD) cvt_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(cvt_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -138,6 +141,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@ @@ -158,9 +162,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@ @@ -189,7 +196,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@ @@ -198,9 +207,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@ @@ -239,12 +252,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@ @@ -264,7 +278,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@ @@ -274,6 +287,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -287,11 +301,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@ @@ -327,6 +340,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@ @@ -351,7 +365,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@ @@ -374,6 +387,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -405,7 +419,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@ @@ -415,12 +431,10 @@ INCLUDES = $(XORG_INCS) \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/parser -DUMMYLIB_SRCDIR = $(XFREE86_SRCDIR)/dummylib # gah cvt_SOURCES = cvt.c $(top_srcdir)/hw/xfree86/modes/xf86cvt.c cvt_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) -cvt_LDADD = $(top_builddir)/hw/xfree86/dummylib/libdummy-nonserver.a man1_MANS = cvt.man CLEANFILES = $(man1_MANS) SUFFIXES = .pre .man .man.pre diff --git a/xorg-server/hw/xfree86/utils/cvt/cvt.c b/xorg-server/hw/xfree86/utils/cvt/cvt.c index fee4f7c3e..cf0a479f2 100644 --- a/xorg-server/hw/xfree86/utils/cvt/cvt.c +++ b/xorg-server/hw/xfree86/utils/cvt/cvt.c @@ -25,6 +25,34 @@ #include "xf86.h" +/* xnfalloc implementation used by the server code we built in */ +pointer +XNFalloc(unsigned long n) +{ + pointer r; + + r = malloc(n); + if (!r) { + perror("malloc failed"); + exit(1); + } + return r; +} + +/* xnfcalloc implementation used by the server code we built in */ +pointer +XNFcalloc(unsigned long n) +{ + pointer r; + + r = calloc(1, n); + if (!r) { + perror("calloc failed"); + exit(1); + } + return r; +} + /* * Quickly check wether this is a CVT standard mode. */ @@ -174,7 +202,7 @@ main (int argc, char *argv[]) if ((argc < 3) || (argc > 7)) { PrintUsage(argv[0]); - return 0; + return 1; } /* This doesn't filter out bad flags properly. Bad flags get passed down @@ -191,15 +219,30 @@ main (int argc, char *argv[]) else if (!strcmp(argv[n], "-h") || !strcmp(argv[n], "--help")) { PrintUsage(argv[0]); return 0; - } else if (!HDisplay) + } else if (!HDisplay) { HDisplay = atoi(argv[n]); - else if (!VDisplay) + if (!HDisplay) { + PrintUsage(argv[0]); + return 1; + } + } + else if (!VDisplay) { VDisplay = atoi(argv[n]); - else if (!VRefresh) + if (!VDisplay) { + PrintUsage(argv[0]); + return 1; + } + } + else if (!VRefresh) { VRefresh = atof(argv[n]); + if (!VRefresh) { + PrintUsage(argv[0]); + return 1; + } + } else { PrintUsage(argv[0]); - return 0; + return 1; } } @@ -218,11 +261,14 @@ main (int argc, char *argv[]) HDisplay += 8; } - if (Reduced && (VRefresh != 60.0)) { - fprintf(stderr, "\nERROR: 60Hz refresh rate required for reduced" - " blanking.\n"); - PrintUsage(argv[0]); - return 0; + if (Reduced) { + if ((VRefresh / 60.0) != floor(VRefresh / 60.0)) { + fprintf(stderr, + "\nERROR: Multiple of 60Hz refresh rate required for " + " reduced blanking.\n"); + PrintUsage(argv[0]); + return 0; + } } IsCVT = CVTCheckStandard(HDisplay, VDisplay, VRefresh, Reduced, Verbose); diff --git a/xorg-server/hw/xfree86/utils/gtf/Makefile.in b/xorg-server/hw/xfree86/utils/gtf/Makefile.in index 56114fc4c..6c62fef0e 100644 --- a/xorg-server/hw/xfree86/utils/gtf/Makefile.in +++ b/xorg-server/hw/xfree86/utils/gtf/Makefile.in @@ -72,8 +72,11 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/cpprules.in subdir = hw/xfree86/utils/gtf 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 @@ -83,7 +86,8 @@ 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 = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" @@ -136,6 +140,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@ @@ -156,9 +161,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@ @@ -187,7 +195,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@ @@ -196,9 +206,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@ @@ -237,12 +251,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@ @@ -262,7 +277,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@ @@ -272,6 +286,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -285,11 +300,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@ @@ -325,6 +339,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@ @@ -349,7 +364,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@ @@ -372,6 +386,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -403,7 +418,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@ diff --git a/xorg-server/hw/xfree86/vbe/Makefile.in b/xorg-server/hw/xfree86/vbe/Makefile.in index 94377082f..d394e6593 100644 --- a/xorg-server/hw/xfree86/vbe/Makefile.in +++ b/xorg-server/hw/xfree86/vbe/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/vbe DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,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@ @@ -123,9 +128,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@ @@ -154,7 +162,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@ @@ -163,9 +173,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@ @@ -204,12 +218,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@ @@ -229,7 +244,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@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,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@ @@ -292,6 +306,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@ @@ -316,7 +331,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@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,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@ diff --git a/xorg-server/hw/xfree86/vbe/vbe.c b/xorg-server/hw/xfree86/vbe/vbe.c index 4986b5b29..26f5911d5 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.c +++ b/xorg-server/hw/xfree86/vbe/vbe.c @@ -18,8 +18,7 @@ #include "xf86.h" #include "vbe.h" #include <X11/Xarch.h> -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x) diff --git a/xorg-server/hw/xfree86/vbe/vbe.h b/xorg-server/hw/xfree86/vbe/vbe.h index de9237c9d..b1ec5a9fb 100644 --- a/xorg-server/hw/xfree86/vbe/vbe.h +++ b/xorg-server/hw/xfree86/vbe/vbe.h @@ -37,10 +37,10 @@ typedef struct { #define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1) #define VBE_VERSION_MINOR(x) (CARD8)(x) -vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); -vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); -void vbeFree(vbeInfoPtr pVbe); -xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); +extern _X_EXPORT vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); +extern _X_EXPORT vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); +extern _X_EXPORT void vbeFree(vbeInfoPtr pVbe); +extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, pointer pDDCModule); #pragma pack(1) @@ -99,8 +99,8 @@ struct _VbeInfoBlock { } __attribute__((packed)); /* Return Super VGA Information */ -VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); -void VBEFreeVBEInfo(VbeInfoBlock *block); +extern _X_EXPORT VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEFreeVBEInfo(VbeInfoBlock *block); /* * INT 1 @@ -163,8 +163,8 @@ struct _VbeModeInfoBlock { } __attribute__((packed)); /* Return VBE Mode Information */ -VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); -void VBEFreeModeInfo(VbeModeInfoBlock *block); +extern _X_EXPORT VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT void VBEFreeModeInfo(VbeModeInfoBlock *block); /* * INT2 @@ -189,13 +189,13 @@ struct _VbeCRTCInfoBlock { } __attribute__((packed)); /* VbeCRTCInfoBlock is in the VESA 3.0 specs */ -Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); +extern _X_EXPORT Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock *crtc); /* * INT 3 */ -Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); +extern _X_EXPORT Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); /* * INT 4 @@ -217,7 +217,7 @@ typedef enum { MODE_RESTORE } vbeSaveRestoreFunction; -Bool +extern _X_EXPORT Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, pointer *memory, int *size, int *real_mode_pages); @@ -225,7 +225,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, * INT 5 */ -Bool +extern _X_EXPORT Bool VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window); /* @@ -251,7 +251,7 @@ typedef enum { #define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \ pixels, bytes, max) -Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, +extern _X_EXPORT Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max); @@ -260,15 +260,15 @@ Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, */ /* 16 bit code */ -Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); -Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); +extern _X_EXPORT Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); +extern _X_EXPORT Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); /* * INT 8 */ /* if bits is 0, then it is a GET */ -int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); +extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); /* * INT 9 @@ -280,7 +280,7 @@ int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); * If setting a palette, it will return the pointer received on success, * NULL on failure. */ -CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, +extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace); #define VBEFreePaletteData(data) xfree(data) @@ -294,7 +294,7 @@ typedef struct _VBEpmi { int tbl_len; } VBEpmi; -VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); +extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); #define VESAFreeVBEpmi(pmi) xfree(pmi) /* high level helper functions */ @@ -307,12 +307,6 @@ typedef struct _vbeModeInfoRec { struct _vbeModeInfoRec *next; } vbeModeInfoRec, *vbeModeInfoPtr; -vbeModeInfoPtr VBEBuildVbeModeList(vbeInfoPtr pVbe, - VbeInfoBlock *vbe); - -unsigned short VBECalcVbeModeIndex(vbeModeInfoPtr m, - DisplayModePtr mode, int bpp); - typedef struct { CARD8 *state; CARD8 *pstate; @@ -321,12 +315,12 @@ typedef struct { int stateMode; } vbeSaveRestoreRec, *vbeSaveRestorePtr; -void +extern _X_EXPORT void VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbeSaveRestoreFunction function); -int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); -Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); +extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); +extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); struct vbePanelID { short hsize; @@ -341,7 +335,7 @@ struct vbePanelID { char reserved[14]; }; -void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); -struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); +extern _X_EXPORT void VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data); +extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); #endif diff --git a/xorg-server/hw/xfree86/vbe/vbeModes.c b/xorg-server/hw/xfree86/vbe/vbeModes.c index fb730a708..1a4d2407c 100644 --- a/xorg-server/hw/xfree86/vbe/vbeModes.c +++ b/xorg-server/hw/xfree86/vbe/vbeModes.c @@ -414,11 +414,9 @@ VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) data->block->PixelClock = best->Clock * 1000; /* XXX May not have this. */ clock = VBEGetPixelClock(pVbe, data->mode, data->block->PixelClock); -#ifdef DEBUG - ErrorF("Setting clock %.2fMHz, closest is %.2fMHz\n", + DebugF("Setting clock %.2fMHz, closest is %.2fMHz\n", (double)data->block->PixelClock / 1000000.0, (double)clock / 1000000.0); -#endif if (clock) data->block->PixelClock = clock; data->mode |= (1 << 11); diff --git a/xorg-server/hw/xfree86/vbe/vbeModes.h b/xorg-server/hw/xfree86/vbe/vbeModes.h index c28cdaa37..447798709 100644 --- a/xorg-server/hw/xfree86/vbe/vbeModes.h +++ b/xorg-server/hw/xfree86/vbe/vbeModes.h @@ -67,24 +67,24 @@ typedef struct _VbeModeInfoData { #define V_MODETYPE_VGA 0x02 #define V_MODETYPE_BAD 0x04 -extern int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe, +extern _X_EXPORT int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock *vbe, int *flags24, int modeTypes); -extern DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, +extern _X_EXPORT DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int modeTypes); -extern void VBESetModeNames(DisplayModePtr pMode); -extern void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); +extern _X_EXPORT void VBESetModeNames(DisplayModePtr pMode); +extern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); /* * Note: These are alternatives to the standard helpers. They should * usually just wrap the standard helpers. */ -extern int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, +extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); -extern void VBEPrintModes(ScrnInfoPtr scrp); +extern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp); #endif /* VBE_MODES_H */ diff --git a/xorg-server/hw/xfree86/vgahw/Makefile.in b/xorg-server/hw/xfree86/vgahw/Makefile.in index 37c6b68f6..cdd7468b5 100644 --- a/xorg-server/hw/xfree86/vgahw/Makefile.in +++ b/xorg-server/hw/xfree86/vgahw/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/vgahw DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,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@ @@ -123,9 +128,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@ @@ -154,7 +162,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@ @@ -163,9 +173,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@ @@ -204,12 +218,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@ @@ -229,7 +244,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@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,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@ @@ -292,6 +306,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@ @@ -316,7 +331,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@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,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@ diff --git a/xorg-server/hw/xfree86/vgahw/vgaCmap.c b/xorg-server/hw/xfree86/vgahw/vgaCmap.c index 44043c6c7..5bd38b468 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaCmap.c +++ b/xorg-server/hw/xfree86/vgahw/vgaCmap.c @@ -36,8 +36,7 @@ #include "xf86.h" #include "vgaHW.h" -#define _XF86DGA_SERVER_ -#include <X11/extensions/xf86dgastr.h> +#include <X11/extensions/xf86dgaproto.h> #include "dgaproc.h" @@ -277,8 +276,8 @@ vgaUninstallColormap(pmap) if ( pmap != miInstalledMaps[pmap->pScreen->myNum] ) return; - defColormap = (ColormapPtr) LookupIDByType( pmap->pScreen->defColormap, - RT_COLORMAP); + dixLookupResourceByType((pointer *)&defColormap, pmap->pScreen->defColormap, + RT_COLORMAP, serverClient, DixInstallAccess); if (defColormap == miInstalledMaps[pmap->pScreen->myNum]) return; diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.c b/xorg-server/hw/xfree86/vgahw/vgaHW.c index ccbd19574..025dde2da 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaHW.c +++ b/xorg-server/hw/xfree86/vgahw/vgaHW.c @@ -793,7 +793,7 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->FontInfo1) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ - slowbcopy_tobus(hwp->FontInfo1, hwp->Base, FONT_AMOUNT); + xf86SlowBcopy(hwp->FontInfo1, hwp->Base, FONT_AMOUNT); } #endif @@ -801,7 +801,7 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->FontInfo2) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ - slowbcopy_tobus(hwp->FontInfo2, hwp->Base, FONT_AMOUNT); + xf86SlowBcopy(hwp->FontInfo2, hwp->Base, FONT_AMOUNT); } #endif @@ -809,10 +809,10 @@ vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) if (hwp->TextInfo) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ - slowbcopy_tobus(hwp->TextInfo, hwp->Base, TEXT_AMOUNT); + xf86SlowBcopy(hwp->TextInfo, hwp->Base, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ - slowbcopy_tobus((unsigned char *)hwp->TextInfo + TEXT_AMOUNT, + xf86SlowBcopy((unsigned char *)hwp->TextInfo + TEXT_AMOUNT, hwp->Base, TEXT_AMOUNT); } #endif @@ -971,24 +971,24 @@ vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save) if (hwp->FontInfo1 || (hwp->FontInfo1 = xalloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ - slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); } #endif /* SAVE_FONT1 */ #if SAVE_FONT2 if (hwp->FontInfo2 || (hwp->FontInfo2 = xalloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ - slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); } #endif /* SAVE_FONT2 */ #if SAVE_TEXT if (hwp->TextInfo || (hwp->TextInfo = xalloc(2 * TEXT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ - slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); + xf86SlowBcopy(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ - slowbcopy_frombus(hwp->Base, + xf86SlowBcopy(hwp->Base, (unsigned char *)hwp->TextInfo + TEXT_AMOUNT, TEXT_AMOUNT); } #endif /* SAVE_TEXT */ @@ -1025,32 +1025,24 @@ vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save) for (i = 0; i < save->numCRTC; i++) { save->CRTC[i] = hwp->readCrtc(hwp, i); -#ifdef DEBUG - ErrorF("CRTC[0x%02x] = 0x%02x\n", i, save->CRTC[i]); -#endif + DebugF("CRTC[0x%02x] = 0x%02x\n", i, save->CRTC[i]); } hwp->enablePalette(hwp); for (i = 0; i < save->numAttribute; i++) { save->Attribute[i] = hwp->readAttr(hwp, i); -#ifdef DEBUG - ErrorF("Attribute[0x%02x] = 0x%02x\n", i, save->Attribute[i]); -#endif + DebugF("Attribute[0x%02x] = 0x%02x\n", i, save->Attribute[i]); } hwp->disablePalette(hwp); for (i = 0; i < save->numGraphics; i++) { save->Graphics[i] = hwp->readGr(hwp, i); -#ifdef DEBUG - ErrorF("Graphics[0x%02x] = 0x%02x\n", i, save->Graphics[i]); -#endif + DebugF("Graphics[0x%02x] = 0x%02x\n", i, save->Graphics[i]); } for (i = 1; i < save->numSequencer; i++) { save->Sequencer[i] = hwp->readSeq(hwp, i); -#ifdef DEBUG - ErrorF("Sequencer[0x%02x] = 0x%02x\n", i, save->Sequencer[i]); -#endif + DebugF("Sequencer[0x%02x] = 0x%02x\n", i, save->Sequencer[i]); } } @@ -1088,18 +1080,16 @@ vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save) hwp->writeDacReadAddr(hwp, 0x00); for (i = 0; i < 6; i++) { save->DAC[i] = hwp->readDacData(hwp); -#ifdef DEBUG switch (i % 3) { case 0: - ErrorF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); + DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: - ErrorF("0x%02x, ", save->DAC[i]); + DebugF("0x%02x, ", save->DAC[i]); break; case 2: - ErrorF("0x%02x\n", save->DAC[i]); + DebugF("0x%02x\n", save->DAC[i]); } -#endif } /* @@ -1131,18 +1121,16 @@ vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save) for (i = 6; i < 768; i++) { save->DAC[i] = hwp->readDacData(hwp); DACDelay(hwp); -#ifdef DEBUG switch (i % 3) { case 0: - ErrorF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); + DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: - ErrorF("0x%02x, ", save->DAC[i]); + DebugF("0x%02x, ", save->DAC[i]); break; case 2: - ErrorF("0x%02x\n", save->DAC[i]); + DebugF("0x%02x\n", save->DAC[i]); } -#endif } } @@ -1772,9 +1760,7 @@ vgaHWMapMem(ScrnInfoPtr scrp) * XXX This is not correct but we do it * for now. */ -#ifdef DEBUG - ErrorF("Mapping VGAMem\n"); -#endif + DebugF("Mapping VGAMem\n"); hwp->Base = xf86MapDomainMemory(scr_index, VIDMEM_MMIO_32BIT, hwp->dev, hwp->MapPhys, hwp->MapSize); return hwp->Base != NULL; @@ -1790,15 +1776,13 @@ vgaHWUnmapMem(ScrnInfoPtr scrp) if (hwp->Base == NULL) return; -#ifdef DEBUG - ErrorF("Unmapping VGAMem\n"); -#endif + DebugF("Unmapping VGAMem\n"); xf86UnMapVidMem(scr_index, hwp->Base, hwp->MapSize); hwp->Base = NULL; } int -vgaHWGetIndex() +vgaHWGetIndex(void) { return vgaHWPrivateIndex; } @@ -1999,6 +1983,13 @@ vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) } } -DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void) { return vgaHWddc1SetSpeed; } +DDC1SetSpeedProc +vgaHWddc1SetSpeedWeak(void) +{ + return vgaHWddc1SetSpeed; +} -SaveScreenProcPtr vgaHWSaveScreenWeak(void) { return vgaHWSaveScreen; } +SaveScreenProcPtr vgaHWSaveScreenWeak(void) +{ + return vgaHWSaveScreen; +} diff --git a/xorg-server/hw/xfree86/vgahw/vgaHW.h b/xorg-server/hw/xfree86/vgahw/vgaHW.h index a38ea7559..7e63492d8 100644 --- a/xorg-server/hw/xfree86/vgahw/vgaHW.h +++ b/xorg-server/hw/xfree86/vgahw/vgaHW.h @@ -25,10 +25,9 @@ #include "xf86DDC.h" #include "globals.h" -#define DPMS_SERVER -#include <X11/extensions/dpms.h> +#include <X11/extensions/dpmsconst.h> -extern int vgaHWGetIndex(void); +extern _X_EXPORT int vgaHWGetIndex(void); /* * access macro @@ -192,45 +191,45 @@ typedef struct _vgaHWRec { typedef void vgaHWProtectProc(ScrnInfoPtr, Bool); typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool); -void vgaHWSetStdFuncs(vgaHWPtr hwp); -void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); -void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); -vgaHWProtectProc *vgaHWProtectWeak(void); -Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); -void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); -vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void); -void vgaHWSeqReset(vgaHWPtr hwp, Bool start); -void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore); -void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags); -void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save); -void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); -Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); -Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, +extern _X_EXPORT void vgaHWSetStdFuncs(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); +extern _X_EXPORT void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); +extern _X_EXPORT vgaHWProtectProc *vgaHWProtectWeak(void); +extern _X_EXPORT Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); +extern _X_EXPORT void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); +extern _X_EXPORT vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void); +extern _X_EXPORT void vgaHWSeqReset(vgaHWPtr hwp, Bool start); +extern _X_EXPORT void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore); +extern _X_EXPORT void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags); +extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save); +extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); +extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); +extern _X_EXPORT Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, int numGraphics, int numAttribute); -Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); -Bool vgaHWGetHWRec(ScrnInfoPtr scrp); -void vgaHWFreeHWRec(ScrnInfoPtr scrp); -Bool vgaHWMapMem(ScrnInfoPtr scrp); -void vgaHWUnmapMem(ScrnInfoPtr scrp); -void vgaHWGetIOBase(vgaHWPtr hwp); -void vgaHWLock(vgaHWPtr hwp); -void vgaHWUnlock(vgaHWPtr hwp); -void vgaHWEnable(vgaHWPtr hwp); -void vgaHWDisable(vgaHWPtr hwp); -void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); -Bool vgaHWHandleColormaps(ScreenPtr pScreen); -void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed); -CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, +extern _X_EXPORT Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); +extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp); +extern _X_EXPORT Bool vgaHWMapMem(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWUnmapMem(ScrnInfoPtr scrp); +extern _X_EXPORT void vgaHWGetIOBase(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWLock(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWUnlock(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWEnable(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWDisable(vgaHWPtr hwp); +extern _X_EXPORT void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); +extern _X_EXPORT Bool vgaHWHandleColormaps(ScreenPtr pScreen); +extern _X_EXPORT void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed); +extern _X_EXPORT CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); -CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, +extern _X_EXPORT CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); -Bool vgaHWAllocDefaultRegs(vgaRegPtr regp); +extern _X_EXPORT Bool vgaHWAllocDefaultRegs(vgaRegPtr regp); -DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void); -SaveScreenProcPtr vgaHWSaveScreenWeak(void); +extern _X_EXPORT DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void); +extern _X_EXPORT SaveScreenProcPtr vgaHWSaveScreenWeak(void); #endif /* _VGAHW_H */ diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.am b/xorg-server/hw/xfree86/x86emu/Makefile.am index acd249c7f..987ea8bd7 100644 --- a/xorg-server/hw/xfree86/x86emu/Makefile.am +++ b/xorg-server/hw/xfree86/x86emu/Makefile.am @@ -1,6 +1,6 @@ -noinst_LIBRARIES = libx86emu.a +noinst_LTLIBRARIES = libx86emu.la -libx86emu_a_SOURCES = debug.c \ +libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ diff --git a/xorg-server/hw/xfree86/x86emu/Makefile.in b/xorg-server/hw/xfree86/x86emu/Makefile.in index 2de47a3c8..3ea8f4404 100644 --- a/xorg-server/hw/xfree86/x86emu/Makefile.in +++ b/xorg-server/hw/xfree86/x86emu/Makefile.in @@ -37,8 +37,11 @@ host_triplet = @host@ subdir = hw/xfree86/x86emu 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 @@ -48,17 +51,15 @@ 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 = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -libx86emu_a_AR = $(AR) $(ARFLAGS) -libx86emu_a_LIBADD = -am_libx86emu_a_OBJECTS = debug.$(OBJEXT) decode.$(OBJEXT) \ - fpu.$(OBJEXT) ops2.$(OBJEXT) ops.$(OBJEXT) prim_ops.$(OBJEXT) \ - sys.$(OBJEXT) -libx86emu_a_OBJECTS = $(am_libx86emu_a_OBJECTS) +LTLIBRARIES = $(noinst_LTLIBRARIES) +libx86emu_la_LIBADD = +am_libx86emu_la_OBJECTS = debug.lo decode.lo fpu.lo ops2.lo ops.lo \ + prim_ops.lo sys.lo +libx86emu_la_OBJECTS = $(am_libx86emu_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -69,8 +70,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libx86emu_a_SOURCES) -DIST_SOURCES = $(libx86emu_a_SOURCES) +SOURCES = $(libx86emu_la_SOURCES) +DIST_SOURCES = $(libx86emu_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -79,6 +80,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@ @@ -99,9 +101,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@ @@ -130,7 +135,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@ @@ -139,9 +146,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@ @@ -180,12 +191,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@ @@ -205,7 +217,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@ @@ -215,6 +226,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -228,11 +240,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@ @@ -268,6 +279,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@ @@ -292,7 +304,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@ @@ -315,6 +326,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -346,14 +358,16 @@ 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@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -noinst_LIBRARIES = libx86emu.a -libx86emu_a_SOURCES = debug.c \ +noinst_LTLIBRARIES = libx86emu.la +libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ @@ -412,12 +426,16 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libx86emu.a: $(libx86emu_a_OBJECTS) $(libx86emu_a_DEPENDENCIES) - -rm -f libx86emu.a - $(libx86emu_a_AR) libx86emu.a $(libx86emu_a_OBJECTS) $(libx86emu_a_LIBADD) - $(RANLIB) libx86emu.a +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libx86emu.la: $(libx86emu_la_OBJECTS) $(libx86emu_la_DEPENDENCIES) + $(LINK) $(libx86emu_la_OBJECTS) $(libx86emu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -425,13 +443,13 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim_ops.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim_ops.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -544,7 +562,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-am -all-am: Makefile $(LIBRARIES) +all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am @@ -573,7 +591,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -645,7 +663,7 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstLIBRARIES ctags distclean \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ diff --git a/xorg-server/hw/xfree86/x86emu/sys.c b/xorg-server/hw/xfree86/x86emu/sys.c index e15fb0931..34d29db56 100644 --- a/xorg-server/hw/xfree86/x86emu/sys.c +++ b/xorg-server/hw/xfree86/x86emu/sys.c @@ -45,6 +45,7 @@ #include "x86emu/regs.h" #include "x86emu/debug.h" #include "x86emu/prim_ops.h" +#include "../common/compiler.h" #ifndef NO_SYS_HEADERS #include <string.h> #endif @@ -53,164 +54,6 @@ X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */ X86EMU_intrFuncs _X86EMU_intrTab[256]; -/*----------------------------- Implementation ----------------------------*/ -#if defined(__alpha__) || defined(__alpha) -/* to cope with broken egcs-1.1.2 :-(((( */ - -#define ALPHA_UALOADS -/* - * inline functions to do unaligned accesses - * from linux/include/asm-alpha/unaligned.h - */ - -/* - * EGCS 1.1 knows about arbitrary unaligned loads. Define some - * packed structures to talk about such things with. - */ - -#if defined(__GNUC__) -struct __una_u64 { unsigned long x __attribute__((packed)); }; -struct __una_u32 { unsigned int x __attribute__((packed)); }; -struct __una_u16 { unsigned short x __attribute__((packed)); }; -#endif - -static __inline__ unsigned long ldq_u(unsigned long * r11) -{ -#if defined(__GNUC__) - const struct __una_u64 *ptr = (const struct __una_u64 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extql %0,%2,%0\n\t" - "extqh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(7+(char *) r11))); - return r1 | r2; -#endif -} - -static __inline__ unsigned long ldl_u(unsigned int * r11) -{ -#if defined(__GNUC__) - const struct __una_u32 *ptr = (const struct __una_u32 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extll %0,%2,%0\n\t" - "extlh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(3+(char *) r11))); - return r1 | r2; -#endif -} - -static __inline__ unsigned long ldw_u(unsigned short * r11) -{ -#if defined(__GNUC__) - const struct __una_u16 *ptr = (const struct __una_u16 *) r11; - return ptr->x; -#else - unsigned long r1,r2; - __asm__("ldq_u %0,%3\n\t" - "ldq_u %1,%4\n\t" - "extwl %0,%2,%0\n\t" - "extwh %1,%2,%1" - :"=&r" (r1), "=&r" (r2) - :"r" (r11), - "m" (*r11), - "m" (*(const unsigned long *)(1+(char *) r11))); - return r1 | r2; -#endif -} - -/* - * Elemental unaligned stores - */ - -static __inline__ void stq_u(unsigned long r5, unsigned long * r11) -{ -#if defined(__GNUC__) - struct __una_u64 *ptr = (struct __una_u64 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "insqh %6,%7,%5\n\t" - "insql %6,%7,%4\n\t" - "mskqh %3,%7,%3\n\t" - "mskql %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(7+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} - -static __inline__ void stl_u(unsigned long r5, unsigned int * r11) -{ -#if defined(__GNUC__) - struct __una_u32 *ptr = (struct __una_u32 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inslh %6,%7,%5\n\t" - "insll %6,%7,%4\n\t" - "msklh %3,%7,%3\n\t" - "mskll %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(3+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} - -static __inline__ void stw_u(unsigned long r5, unsigned short * r11) -{ -#if defined(__GNUC__) - struct __una_u16 *ptr = (struct __una_u16 *) r11; - ptr->x = r5; -#else - unsigned long r1,r2,r3,r4; - - __asm__("ldq_u %3,%1\n\t" - "ldq_u %2,%0\n\t" - "inswh %6,%7,%5\n\t" - "inswl %6,%7,%4\n\t" - "mskwh %3,%7,%3\n\t" - "mskwl %2,%7,%2\n\t" - "bis %3,%5,%3\n\t" - "bis %2,%4,%2\n\t" - "stq_u %3,%1\n\t" - "stq_u %2,%0" - :"=m" (*r11), - "=m" (*(unsigned long *)(1+(char *) r11)), - "=&r" (r1), "=&r" (r2), "=&r" (r3), "=&r" (r4) - :"r" (r5), "r" (r11)); -#endif -} -#endif - /**************************************************************************** PARAMETERS: addr - Emulator memory address to read @@ -262,13 +105,7 @@ u16 X86API rdw( } else #endif -#if defined(ALPHA_UALOADS) val = ldw_u((u16*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - val = uldw((u16*)(M.mem_base + addr)); -#else - val = *(u16*)(M.mem_base + addr); -#endif DB( if (DEBUG_MEM_TRACE()) printk("%#08x 2 -> %#x\n", addr, val);) return val; @@ -301,13 +138,7 @@ u32 X86API rdl( } else #endif -#if defined(ALPHA_UALOADS) val = ldl_u((u32*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - val = uldl((u32*)(M.mem_base + addr)); -#else - val = *(u32*)(M.mem_base + addr); -#endif DB( if (DEBUG_MEM_TRACE()) printk("%#08x 4 -> %#x\n", addr, val);) return val; @@ -359,13 +190,7 @@ DB( if (DEBUG_MEM_TRACE()) } else #endif -#if defined(ALPHA_UALOADS) stw_u(val,(u16*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - ustw(val,(u16*)(M.mem_base + addr)); -#else - *(u16*)(M.mem_base + addr) = val; -#endif } /**************************************************************************** @@ -395,13 +220,7 @@ DB( if (DEBUG_MEM_TRACE()) } else #endif -#if defined(ALPHA_UALOADS) stl_u(val,(u32*)(M.mem_base + addr)); -#elif defined(IA64_UALOADS) - ustl(val,(u32*)(M.mem_base + addr)); -#else - *(u32*)(M.mem_base + addr) = val; -#endif } /**************************************************************************** diff --git a/xorg-server/hw/xfree86/xaa/Makefile.in b/xorg-server/hw/xfree86/xaa/Makefile.in index e57a4e759..6d1bcbea8 100644 --- a/xorg-server/hw/xfree86/xaa/Makefile.in +++ b/xorg-server/hw/xfree86/xaa/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/xaa DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -123,6 +127,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@ @@ -143,9 +148,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@ @@ -174,7 +182,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@ @@ -183,9 +193,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@ @@ -224,12 +238,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@ @@ -249,7 +264,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@ @@ -259,6 +273,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -272,11 +287,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@ @@ -312,6 +326,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@ @@ -336,7 +351,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@ @@ -359,6 +373,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -390,7 +405,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@ diff --git a/xorg-server/hw/xfree86/xaa/xaa.h b/xorg-server/hw/xfree86/xaa/xaa.h index d6ccc31e2..7db6b95d5 100644 --- a/xorg-server/hw/xfree86/xaa/xaa.h +++ b/xorg-server/hw/xfree86/xaa/xaa.h @@ -1379,22 +1379,22 @@ typedef struct _XAAInfoRec { #define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE -Bool +extern _X_EXPORT Bool XAAInit( ScreenPtr pScreen, XAAInfoRecPtr infoRec ); -XAAInfoRecPtr XAACreateInfoRec(void); +extern _X_EXPORT XAAInfoRecPtr XAACreateInfoRec(void); -void +extern _X_EXPORT void XAADestroyInfoRec( XAAInfoRecPtr infoRec ); typedef void (*DepthChangeFuncPtr) (ScrnInfoPtr pScrn, int depth); -Bool +extern _X_EXPORT Bool XAAInitDualFramebufferOverlay( ScreenPtr pScreen, DepthChangeFuncPtr callback diff --git a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c index 9dbd00f3c..9b124670d 100644 --- a/xorg-server/hw/xfree86/xaa/xaaBitOrder.c +++ b/xorg-server/hw/xfree86/xaa/xaaBitOrder.c @@ -4,7 +4,7 @@ #endif #include <X11/Xmd.h> -CARD32 XAAReverseBitOrder(CARD32 v); +#include "xaalocal.h" CARD32 XAAReverseBitOrder(CARD32 v) diff --git a/xorg-server/hw/xfree86/xaa/xaaCpyArea.c b/xorg-server/hw/xfree86/xaa/xaaCpyArea.c index 6c991e100..6a898cd5f 100644 --- a/xorg-server/hw/xfree86/xaa/xaaCpyArea.c +++ b/xorg-server/hw/xfree86/xaa/xaaCpyArea.c @@ -252,7 +252,7 @@ XAADoImageRead( } -void +void XAAScreenToScreenBitBlt( ScrnInfoPtr pScrn, int nbox, diff --git a/xorg-server/hw/xfree86/xaa/xaaCpyWin.c b/xorg-server/hw/xfree86/xaa/xaaCpyWin.c index ecdc9a3be..31c421e65 100644 --- a/xorg-server/hw/xfree86/xaa/xaaCpyWin.c +++ b/xorg-server/hw/xfree86/xaa/xaaCpyWin.c @@ -21,7 +21,7 @@ Written by Harm Hanemaayer (H.Hanemaayer@inter.nl.net). */ -void +void XAACopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, diff --git a/xorg-server/hw/xfree86/xaa/xaaFillArc.c b/xorg-server/hw/xfree86/xaa/xaaFillArc.c index d3ebc22fc..d83922ce0 100644 --- a/xorg-server/hw/xfree86/xaa/xaaFillArc.c +++ b/xorg-server/hw/xfree86/xaa/xaaFillArc.c @@ -161,11 +161,7 @@ XAAFillArcSliceSolid(DrawablePtr pDraw, GCPtr pGC, xArc *arc) void -XAAPolyFillArcSolid(pDraw, pGC, narcs, parcs) - DrawablePtr pDraw; - GCPtr pGC; - int narcs; - xArc *parcs; +XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) { register xArc *arc; register int i; diff --git a/xorg-server/hw/xfree86/xaa/xaaFillRect.c b/xorg-server/hw/xfree86/xaa/xaaFillRect.c index 55a30bbd6..0b83ef3ee 100644 --- a/xorg-server/hw/xfree86/xaa/xaaFillRect.c +++ b/xorg-server/hw/xfree86/xaa/xaaFillRect.c @@ -587,7 +587,7 @@ XAAFillColor8x8PatternRects( | Cache Blits | \***************/ -void +void XAAFillCacheBltRects( ScrnInfoPtr pScrn, int rop, @@ -709,7 +709,7 @@ XAAFillCacheBltRects( -void +void XAAFillCacheExpandRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -812,7 +812,7 @@ WriteColumn( src = pSrc + (yoff * srcwidth); - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); if((infoRec->ImageWriteFlags & CPU_TRANSFER_PAD_QWORD) && ((dwords * h) & 0x01)) { @@ -873,7 +873,7 @@ WriteColumn( } } -void +void XAAFillImageWriteRects( ScrnInfoPtr pScrn, int rop, diff --git a/xorg-server/hw/xfree86/xaa/xaaImage.c b/xorg-server/hw/xfree86/xaa/xaaImage.c index 910c7e1e2..4933beea3 100644 --- a/xorg-server/hw/xfree86/xaa/xaaImage.c +++ b/xorg-server/hw/xfree86/xaa/xaaImage.c @@ -92,7 +92,7 @@ XAAWritePixmap32To24( int trans ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn); - int count, dwords = ((w * 3) + 3) >> 2; + int count, dwords = bytes_to_int32(w * 3); CARD32 *src, *dst; Bool PlusOne = FALSE; @@ -172,7 +172,7 @@ XAAWritePixmap32To24( } -void +void XAAWritePixmap ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -227,7 +227,7 @@ XAAWritePixmap ( BAD_ALIGNMENT: - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); if((infoRec->ImageWriteFlags & CPU_TRANSFER_PAD_QWORD) && ((dwords * h) & 0x01)) { @@ -305,7 +305,7 @@ BAD_ALIGNMENT: } -void +void XAAWritePixmapScanline ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -351,7 +351,7 @@ XAAWritePixmapScanline ( BAD_ALIGNMENT: - dwords = ((w * Bpp) + 3) >> 2; + dwords = bytes_to_int32(w * Bpp); (*infoRec->SetupForScanlineImageWrite)( pScrn, rop, planemask, trans, bpp, depth); diff --git a/xorg-server/hw/xfree86/xaa/xaaInit.c b/xorg-server/hw/xfree86/xaa/xaaInit.c index 8d3833e5a..2ce2d9085 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInit.c +++ b/xorg-server/hw/xfree86/xaa/xaaInit.c @@ -65,7 +65,7 @@ DevPrivateKey XAAGetPixmapKey(void) { static Bool SwitchedOut = FALSE; XAAInfoRecPtr -XAACreateInfoRec() +XAACreateInfoRec(void) { XAAInfoRecPtr infoRec; @@ -76,7 +76,7 @@ XAACreateInfoRec() return infoRec; } -void +void XAADestroyInfoRec(XAAInfoRecPtr infoRec) { if(!infoRec) return; @@ -94,7 +94,7 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec) } -Bool +Bool XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; diff --git a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c index 3b397dc4a..157325e4b 100644 --- a/xorg-server/hw/xfree86/xaa/xaaInitAccel.c +++ b/xorg-server/hw/xfree86/xaa/xaaInitAccel.c @@ -528,7 +528,9 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) #define XAAMSG(s) do { if (serverGeneration == 1) xf86ErrorF(s); } while (0) if((infoRec->Flags & OFFSCREEN_PIXMAPS) && HaveScreenToScreenCopy && - xf86IsOptionSet(options, XAAOPT_HAS_DUMB_INVERTED_OPTION_SENSE)) + xf86ReturnOptValBool(options, + XAAOPT_HAS_DUMB_INVERTED_OPTION_SENSE, + FALSE)) { XAAMSG("\tOffscreen Pixmaps\n"); } else { diff --git a/xorg-server/hw/xfree86/xaa/xaaLineMisc.c b/xorg-server/hw/xfree86/xaa/xaaLineMisc.c index cefb59a8e..6cef4bcd5 100644 --- a/xorg-server/hw/xfree86/xaa/xaaLineMisc.c +++ b/xorg-server/hw/xfree86/xaa/xaaLineMisc.c @@ -15,7 +15,7 @@ #include "xaalocal.h" -void +void XAASolidHorVertLineAsRects( ScrnInfoPtr pScrn, int x, int y, int len, int dir @@ -29,7 +29,7 @@ XAASolidHorVertLineAsRects( } -void +void XAASolidHorVertLineAsTwoPoint( ScrnInfoPtr pScrn, int x, int y, int len, int dir @@ -44,7 +44,7 @@ XAASolidHorVertLineAsTwoPoint( (*infoRec->SubsequentSolidTwoPointLine)(pScrn, x, y, x, y + len, 0); } -void +void XAASolidHorVertLineAsBresenham( ScrnInfoPtr pScrn, int x, int y, int len, int dir diff --git a/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c b/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c index 556650fb0..7431ba2a0 100644 --- a/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c +++ b/xorg-server/hw/xfree86/xaa/xaaNonTEGlyph.c @@ -37,7 +37,7 @@ /* if the backing rectangle and text are of the same dimensions then we can draw in one pass */ -void +void #ifdef TRIPLE_BITS EXPNAME(XAANonTEGlyphRenderer3)( #else @@ -90,7 +90,7 @@ EXPNAME(XAANonTEGlyphRenderer)( #ifndef FIXEDBASE /* Scanline version of above gets built for LSBFIRST and MSBFIRST */ -void +void #ifdef TRIPLE_BITS EXPNAME(XAANonTEGlyphRendererScanline3)( #else diff --git a/xorg-server/hw/xfree86/xaa/xaaOverlay.c b/xorg-server/hw/xfree86/xaa/xaaOverlay.c index 273183e10..2956a3dbf 100644 --- a/xorg-server/hw/xfree86/xaa/xaaOverlay.c +++ b/xorg-server/hw/xfree86/xaa/xaaOverlay.c @@ -112,7 +112,7 @@ XAASetColorKey8_32( SET_SYNC_FLAG(infoRec); } -void +void XAASetupOverlay8_32Planar(ScreenPtr pScreen) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); diff --git a/xorg-server/hw/xfree86/xaa/xaaPCache.c b/xorg-server/hw/xfree86/xaa/xaaPCache.c index d05aaf22c..7e3011bd5 100644 --- a/xorg-server/hw/xfree86/xaa/xaaPCache.c +++ b/xorg-server/hw/xfree86/xaa/xaaPCache.c @@ -630,7 +630,7 @@ GOT_EM: } -void +void XAAInitPixmapCache( ScreenPtr pScreen, RegionPtr areas, @@ -1556,7 +1556,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) } else funcNo = 2; pad = BitmapBytePad(pCache->w * bpp); - dwords = pad >> 2; + dwords = bytes_to_int32(pad); dstPtr = data = (unsigned char*)xalloc(pad * pCache->h); srcPtr = (unsigned char*)pPix->devPrivate.ptr; @@ -1658,7 +1658,10 @@ XAACachePlanarMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) } XAACachePlanarMonoStippleProc -XAAGetCachePlanarMonoStipple(void) { return XAACachePlanarMonoStipple; } +XAAGetCachePlanarMonoStipple(void) +{ + return XAACachePlanarMonoStipple; +} XAACacheInfoPtr XAACacheStipple(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg, int bg) @@ -1840,7 +1843,7 @@ XAACacheColor8x8Pattern(ScrnInfoPtr pScrn, PixmapPtr pPix, int fg, int bg) } -void +void XAAWriteBitmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1854,7 +1857,7 @@ XAAWriteBitmapToCache( 0, fg, bg, GXcopy, ~0); } -void +void XAAWriteBitmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1892,7 +1895,7 @@ XAAWriteBitmapToCacheLinear( } -void +void XAAWritePixmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1908,7 +1911,7 @@ XAAWritePixmapToCache( -void +void XAAWritePixmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1952,7 +1955,7 @@ XAAWritePixmapToCacheLinear( } -void +void XAAWriteMono8x8PatternToCache( ScrnInfoPtr pScrn, XAACacheInfoPtr pCache @@ -1994,7 +1997,7 @@ XAAWriteMono8x8PatternToCache( xfree(data); } -void +void XAAWriteColor8x8PatternToCache( ScrnInfoPtr pScrn, PixmapPtr pPix, @@ -2323,7 +2326,7 @@ static int RotateMasksY[4] = { 0xFFFFFFFF, 0x00FFFFFF, 0x0000FFFF, 0x000000FF }; -void +void XAARotateMonoPattern( int *pat0, int *pat1, int xorg, int yorg, diff --git a/xorg-server/hw/xfree86/xaa/xaaPict.c b/xorg-server/hw/xfree86/xaa/xaaPict.c index 784c649a4..e059d3d65 100644 --- a/xorg-server/hw/xfree86/xaa/xaaPict.c +++ b/xorg-server/hw/xfree86/xaa/xaaPict.c @@ -75,12 +75,18 @@ XAAGetPixelFromRGBA ( gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *pixel |= ( blue >> (16 - bbits)) << bshift; *pixel |= ( red >> (16 - rbits)) << rshift; @@ -116,12 +122,18 @@ XAAGetRGBAFromPixel( gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; - } + } else if(PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { + bshift = PICT_FORMAT_BPP(format) - bbits; + gshift = bshift - gbits; + rshift = gshift - rbits; + ashift = 0; + } else + return FALSE; *red = ((pixel >> rshift ) & ((1 << rbits) - 1)) << (16 - rbits); while(rbits < 16) { diff --git a/xorg-server/hw/xfree86/xaa/xaaSpans.c b/xorg-server/hw/xfree86/xaa/xaaSpans.c index 7d0943d72..46d6d0740 100644 --- a/xorg-server/hw/xfree86/xaa/xaaSpans.c +++ b/xorg-server/hw/xfree86/xaa/xaaSpans.c @@ -396,7 +396,7 @@ XAARenderPixmapCopySpans( \****************/ -void +void XAAFillSolidSpans( ScrnInfoPtr pScrn, int fg, int rop, @@ -432,7 +432,7 @@ XAAFillSolidSpans( \***************/ -void +void XAAFillMono8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -491,7 +491,7 @@ XAAFillMono8x8PatternSpansScreenOrigin( } -void +void XAAFillMono8x8PatternSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -559,7 +559,7 @@ XAAFillMono8x8PatternSpans( \****************/ -void +void XAAFillColor8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -605,7 +605,7 @@ XAAFillColor8x8PatternSpansScreenOrigin( } -void +void XAAFillColor8x8PatternSpans( ScrnInfoPtr pScrn, int rop, @@ -654,7 +654,7 @@ XAAFillColor8x8PatternSpans( \*****************/ -void +void XAAFillCacheBltSpans( ScrnInfoPtr pScrn, int rop, @@ -713,7 +713,7 @@ XAAFillCacheBltSpans( \****************/ -void +void XAAFillCacheExpandSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, diff --git a/xorg-server/hw/xfree86/xaa/xaaStipple.c b/xorg-server/hw/xfree86/xaa/xaaStipple.c index 0dd8e9fcf..c1d6f8ab4 100644 --- a/xorg-server/hw/xfree86/xaa/xaaStipple.c +++ b/xorg-server/hw/xfree86/xaa/xaaStipple.c @@ -105,7 +105,7 @@ unsigned int XAAShiftMasks[32] = { #endif -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillColorExpandRects3)( #else @@ -241,7 +241,7 @@ SECOND_PASS: -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillColorExpandSpans3)( #else @@ -352,7 +352,7 @@ SECOND_PASS: #ifndef FIXEDBASE -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillScanlineColorExpandRects3)( #else @@ -465,7 +465,7 @@ SECOND_PASS: SET_SYNC_FLAG(infoRec); } -void +void #ifdef TRIPLE_BITS EXPNAME(XAAFillScanlineColorExpandSpans3)( #else diff --git a/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c b/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c index cb60266ea..41e638e5c 100644 --- a/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c +++ b/xorg-server/hw/xfree86/xaa/xaaTEGlyph.c @@ -143,7 +143,7 @@ GlyphScanlineFuncPtr *glyph_get_scanline_func(void) { /* This gets built for MSBFIRST or LSBFIRST with FIXEDBASE or not. A total of 4 versions */ -void +void EXPNAME(XAATEGlyphRenderer)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -239,7 +239,7 @@ THE_END: ********************************************************************/ -void +void EXPNAME(XAATEGlyphRenderer3)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -340,7 +340,7 @@ THE_END: #ifndef FIXEDBASE /* Scanline version of above gets built for LSBFIRST and MSBFIRST */ -void +void EXPNAME(XAATEGlyphRendererScanline)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -415,7 +415,7 @@ THE_END: SET_SYNC_FLAG(infoRec); } -void +void EXPNAME(XAATEGlyphRendererScanline3)( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, diff --git a/xorg-server/hw/xfree86/xaa/xaaTables.c b/xorg-server/hw/xfree86/xaa/xaaTables.c index 829527dd6..c7fa28af3 100644 --- a/xorg-server/hw/xfree86/xaa/xaaTables.c +++ b/xorg-server/hw/xfree86/xaa/xaaTables.c @@ -1,4 +1,4 @@ - +#include "xaalocal.h" /* * This is a table of 24-bit values, indexed with an 8-bit byte value, then * expands each bit to three consecutive bits. This is required for color diff --git a/xorg-server/hw/xfree86/xaa/xaaWrapper.h b/xorg-server/hw/xfree86/xaa/xaaWrapper.h index a141d8421..f554741c6 100644 --- a/xorg-server/hw/xfree86/xaa/xaaWrapper.h +++ b/xorg-server/hw/xfree86/xaa/xaaWrapper.h @@ -4,7 +4,7 @@ typedef void (*SyncFunc)(ScreenPtr); -Bool xaaSetupWrapper(ScreenPtr pScreen, +extern _X_EXPORT Bool xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *func); #endif diff --git a/xorg-server/hw/xfree86/xaa/xaalocal.h b/xorg-server/hw/xfree86/xaa/xaalocal.h index 69a59050c..5e3d373c6 100644 --- a/xorg-server/hw/xfree86/xaa/xaalocal.h +++ b/xorg-server/hw/xfree86/xaa/xaalocal.h @@ -97,18 +97,18 @@ typedef struct _XAAPixmap { } XAAPixmapRec, *XAAPixmapPtr; -Bool +extern _X_EXPORT Bool XAACreateGC( GCPtr pGC ); -Bool +extern _X_EXPORT Bool XAAInitAccel( ScreenPtr pScreen, XAAInfoRecPtr infoRec ); -RegionPtr +extern _X_EXPORT RegionPtr XAABitBlt( DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -123,7 +123,7 @@ XAABitBlt( unsigned long bitPlane ); -void +extern _X_EXPORT void XAAScreenToScreenBitBlt( ScrnInfoPtr pScrn, int nbox, @@ -135,7 +135,7 @@ XAAScreenToScreenBitBlt( unsigned int planemask ); -void +extern _X_EXPORT void XAADoBitBlt( DrawablePtr pSrc, DrawablePtr pDst, @@ -144,7 +144,7 @@ XAADoBitBlt( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAADoImageWrite( DrawablePtr pSrc, DrawablePtr pDst, @@ -153,7 +153,7 @@ XAADoImageWrite( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAADoImageRead( DrawablePtr pSrc, DrawablePtr pDst, @@ -162,7 +162,7 @@ XAADoImageRead( DDXPointPtr pptSrc ); -void +extern _X_EXPORT void XAACopyWindow( WindowPtr pWin, DDXPointRec ptOldOrg, @@ -170,7 +170,7 @@ XAACopyWindow( ); -RegionPtr +extern _X_EXPORT RegionPtr XAACopyArea( DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, @@ -183,56 +183,56 @@ XAACopyArea( int dsty ); -void +extern _X_EXPORT void XAAValidateCopyArea( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePutImage( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateCopyPlane( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePushPixels( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateFillSpans( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePolyGlyphBlt( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidateImageGlyphBlt( GCPtr pGC, unsigned long changes, DrawablePtr pDraw ); -void +extern _X_EXPORT void XAAValidatePolylines( GCPtr pGC, unsigned long changes, @@ -240,7 +240,7 @@ XAAValidatePolylines( ); -RegionPtr +extern _X_EXPORT RegionPtr XAACopyPlaneColorExpansion( DrawablePtr pSrc, DrawablePtr pDst, @@ -255,7 +255,7 @@ XAACopyPlaneColorExpansion( ); -void +extern _X_EXPORT void XAAPushPixelsSolidColorExpansion( GCPtr pGC, PixmapPtr pBitMap, @@ -266,7 +266,7 @@ XAAPushPixelsSolidColorExpansion( int yOrg ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -278,7 +278,7 @@ XAAWriteBitmapColorExpandMSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -290,7 +290,7 @@ XAAWriteBitmapColorExpand3MSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -302,7 +302,7 @@ XAAWriteBitmapColorExpandMSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -314,7 +314,7 @@ XAAWriteBitmapColorExpand3MSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -326,7 +326,7 @@ XAAWriteBitmapColorExpandLSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -338,7 +338,7 @@ XAAWriteBitmapColorExpand3LSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpandLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -350,7 +350,7 @@ XAAWriteBitmapColorExpandLSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapColorExpand3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -363,7 +363,7 @@ XAAWriteBitmapColorExpand3LSBFirst ( ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -375,7 +375,7 @@ XAAWriteBitmapScanlineColorExpandMSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -387,7 +387,7 @@ XAAWriteBitmapScanlineColorExpand3MSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -399,7 +399,7 @@ XAAWriteBitmapScanlineColorExpandMSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -411,7 +411,7 @@ XAAWriteBitmapScanlineColorExpand3MSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -423,7 +423,7 @@ XAAWriteBitmapScanlineColorExpandLSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -435,7 +435,7 @@ XAAWriteBitmapScanlineColorExpand3LSBFirst ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpandLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -447,7 +447,7 @@ XAAWriteBitmapScanlineColorExpandLSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWriteBitmapScanlineColorExpand3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -459,7 +459,7 @@ XAAWriteBitmapScanlineColorExpand3LSBFirstFixedBase ( unsigned int planemask ); -void +extern _X_EXPORT void XAAWritePixmap ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -471,7 +471,7 @@ XAAWritePixmap ( int bpp, int depth ); -void +extern _X_EXPORT void XAAWritePixmapScanline ( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -486,7 +486,7 @@ XAAWritePixmapScanline ( typedef void (*ClipAndRenderRectsFunc)(GCPtr, int, BoxPtr, int, int); -void +extern _X_EXPORT void XAAClipAndRenderRects( GCPtr pGC, ClipAndRenderRectsFunc func, @@ -499,7 +499,7 @@ XAAClipAndRenderRects( typedef void (*ClipAndRenderSpansFunc)(GCPtr, int, DDXPointPtr, int*, int, int, int); -void +extern _X_EXPORT void XAAClipAndRenderSpans( GCPtr pGC, DDXPointPtr ppt, @@ -512,7 +512,7 @@ XAAClipAndRenderSpans( ); -void +extern _X_EXPORT void XAAFillSolidRects( ScrnInfoPtr pScrn, int fg, int rop, @@ -521,7 +521,7 @@ XAAFillSolidRects( BoxPtr pBox ); -void +extern _X_EXPORT void XAAFillMono8x8PatternRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -532,7 +532,7 @@ XAAFillMono8x8PatternRects( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillMono8x8PatternRectsScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -544,7 +544,7 @@ XAAFillMono8x8PatternRectsScreenOrigin( ); -void +extern _X_EXPORT void XAAFillColor8x8PatternRectsScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -555,7 +555,7 @@ XAAFillColor8x8PatternRectsScreenOrigin( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillColor8x8PatternRects( ScrnInfoPtr pScrn, int rop, @@ -566,7 +566,7 @@ XAAFillColor8x8PatternRects( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillCacheBltRects( ScrnInfoPtr pScrn, int rop, @@ -577,7 +577,7 @@ XAAFillCacheBltRects( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAFillCacheExpandRects( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -588,7 +588,7 @@ XAAFillCacheExpandRects( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillImageWriteRects( ScrnInfoPtr pScrn, int rop, @@ -599,7 +599,7 @@ XAAFillImageWriteRects( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAPolyFillRect( DrawablePtr pDraw, GCPtr pGC, @@ -608,7 +608,7 @@ XAAPolyFillRect( ); -void +extern _X_EXPORT void XAATEGlyphRendererMSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -616,7 +616,7 @@ XAATEGlyphRendererMSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3MSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -624,7 +624,7 @@ XAATEGlyphRenderer3MSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -632,7 +632,7 @@ XAATEGlyphRendererMSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -640,7 +640,7 @@ XAATEGlyphRenderer3MSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererLSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -649,7 +649,7 @@ XAATEGlyphRendererLSBFirstFixedBase ( ); -void +extern _X_EXPORT void XAATEGlyphRenderer3LSBFirstFixedBase ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -657,7 +657,7 @@ XAATEGlyphRenderer3LSBFirstFixedBase ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -665,7 +665,7 @@ XAATEGlyphRendererLSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRenderer3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -674,7 +674,7 @@ XAATEGlyphRenderer3LSBFirst ( ); -void +extern _X_EXPORT void XAATEGlyphRendererScanlineMSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -682,7 +682,7 @@ XAATEGlyphRendererScanlineMSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanline3MSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -690,7 +690,7 @@ XAATEGlyphRendererScanline3MSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanlineLSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -698,7 +698,7 @@ XAATEGlyphRendererScanlineLSBFirst ( int fg, int bg, int rop, unsigned planemask ); -void +extern _X_EXPORT void XAATEGlyphRendererScanline3LSBFirst ( ScrnInfoPtr pScrn, int x, int y, int w, int h, int skipleft, int startline, @@ -707,28 +707,28 @@ XAATEGlyphRendererScanline3LSBFirst ( ); -extern CARD32 *(*XAAGlyphScanlineFuncMSBFirstFixedBase[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncMSBFirstFixedBase[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncMSBFirst[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncMSBFirst[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncLSBFirstFixedBase[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncLSBFirstFixedBase[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -extern CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])( +extern _X_EXPORT CARD32 *(*XAAGlyphScanlineFuncLSBFirst[32])( CARD32 *base, unsigned int **glyphp, int line, int nglyph, int width ); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void); -GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirstFixedBase(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncMSBFirst(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirstFixedBase(void); +extern _X_EXPORT GlyphScanlineFuncPtr *XAAGetGlyphScanlineFuncLSBFirst(void); -void +extern _X_EXPORT void XAAFillColorExpandRectsLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -739,7 +739,7 @@ XAAFillColorExpandRectsLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -750,7 +750,7 @@ XAAFillColorExpandRects3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsLSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -761,7 +761,7 @@ XAAFillColorExpandRectsLSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3LSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -772,7 +772,7 @@ XAAFillColorExpandRects3LSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -783,7 +783,7 @@ XAAFillColorExpandRectsMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -794,7 +794,7 @@ XAAFillColorExpandRects3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRectsMSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -805,7 +805,7 @@ XAAFillColorExpandRectsMSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandRects3MSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -816,7 +816,7 @@ XAAFillColorExpandRects3MSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRectsLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -827,7 +827,7 @@ XAAFillScanlineColorExpandRectsLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRects3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -838,7 +838,7 @@ XAAFillScanlineColorExpandRects3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRectsMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -849,7 +849,7 @@ XAAFillScanlineColorExpandRectsMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandRects3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -860,7 +860,7 @@ XAAFillScanlineColorExpandRects3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -873,7 +873,7 @@ XAAFillColorExpandSpansLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -886,7 +886,7 @@ XAAFillColorExpandSpans3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansLSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -899,7 +899,7 @@ XAAFillColorExpandSpansLSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3LSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -912,7 +912,7 @@ XAAFillColorExpandSpans3LSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -925,7 +925,7 @@ XAAFillColorExpandSpansMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -938,7 +938,7 @@ XAAFillColorExpandSpans3MSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpansMSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -951,7 +951,7 @@ XAAFillColorExpandSpansMSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillColorExpandSpans3MSBFirstFixedBase( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -964,7 +964,7 @@ XAAFillColorExpandSpans3MSBFirstFixedBase( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpansLSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -977,7 +977,7 @@ XAAFillScanlineColorExpandSpansLSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpans3LSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -990,7 +990,7 @@ XAAFillScanlineColorExpandSpans3LSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAPutImage( DrawablePtr pDraw, GCPtr pGC, @@ -1004,7 +1004,7 @@ XAAPutImage( char *pImage ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpansMSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1017,7 +1017,7 @@ XAAFillScanlineColorExpandSpansMSBFirst( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillScanlineColorExpandSpans3MSBFirst( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1031,32 +1031,32 @@ XAAFillScanlineColorExpandSpans3MSBFirst( ); -extern CARD32 *(*XAAStippleScanlineFuncMSBFirstFixedBase[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncMSBFirstFixedBase[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncMSBFirst[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncMSBFirst[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncLSBFirstFixedBase[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncLSBFirstFixedBase[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -extern CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])( +extern _X_EXPORT CARD32 *(*XAAStippleScanlineFuncLSBFirst[6])( CARD32* base, CARD32* src, int offset, int width, int dwords ); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void); -StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncMSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFuncLSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3MSBFirst(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirstFixedBase(void); +extern _X_EXPORT StippleScanlineProcPtr *XAAGetStippleScanlineFunc3LSBFirst(void); -int +extern _X_EXPORT int XAAPolyText8TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1065,7 +1065,7 @@ XAAPolyText8TEColorExpansion( char *chars ); -int +extern _X_EXPORT int XAAPolyText16TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1074,7 +1074,7 @@ XAAPolyText16TEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageText8TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1083,7 +1083,7 @@ XAAImageText8TEColorExpansion( char *chars ); -void +extern _X_EXPORT void XAAImageText16TEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1092,7 +1092,7 @@ XAAImageText16TEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageGlyphBltTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1102,7 +1102,7 @@ XAAImageGlyphBltTEColorExpansion( pointer pglyphBase ); -void +extern _X_EXPORT void XAAPolyGlyphBltTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1113,7 +1113,7 @@ XAAPolyGlyphBltTEColorExpansion( ); -int +extern _X_EXPORT int XAAPolyText8NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1122,7 +1122,7 @@ XAAPolyText8NonTEColorExpansion( char *chars ); -int +extern _X_EXPORT int XAAPolyText16NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1131,7 +1131,7 @@ XAAPolyText16NonTEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageText8NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1140,7 +1140,7 @@ XAAImageText8NonTEColorExpansion( char *chars ); -void +extern _X_EXPORT void XAAImageText16NonTEColorExpansion( DrawablePtr pDraw, GCPtr pGC, @@ -1149,7 +1149,7 @@ XAAImageText16NonTEColorExpansion( unsigned short *chars ); -void +extern _X_EXPORT void XAAImageGlyphBltNonTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1159,7 +1159,7 @@ XAAImageGlyphBltNonTEColorExpansion( pointer pglyphBase ); -void +extern _X_EXPORT void XAAPolyGlyphBltNonTEColorExpansion( DrawablePtr pDrawable, GCPtr pGC, @@ -1170,7 +1170,7 @@ XAAPolyGlyphBltNonTEColorExpansion( ); -void XAANonTEGlyphRenderer( +extern _X_EXPORT void XAANonTEGlyphRenderer( ScrnInfoPtr pScrn, int x, int y, int n, NonTEGlyphPtr glyphs, @@ -1179,7 +1179,7 @@ void XAANonTEGlyphRenderer( unsigned int planemask ); -void +extern _X_EXPORT void XAAFillSolidSpans( ScrnInfoPtr pScrn, int fg, int rop, @@ -1189,7 +1189,7 @@ XAAFillSolidSpans( int *pwidth, int fSorted ); -void +extern _X_EXPORT void XAAFillMono8x8PatternSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1201,7 +1201,7 @@ XAAFillMono8x8PatternSpans( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillMono8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1213,7 +1213,7 @@ XAAFillMono8x8PatternSpansScreenOrigin( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillColor8x8PatternSpansScreenOrigin( ScrnInfoPtr pScrn, int rop, @@ -1225,7 +1225,7 @@ XAAFillColor8x8PatternSpansScreenOrigin( int xorigin, int yorigin ); -void +extern _X_EXPORT void XAAFillColor8x8PatternSpans( ScrnInfoPtr pScrn, int rop, @@ -1237,7 +1237,7 @@ XAAFillColor8x8PatternSpans( int xorigin, int yorigin ); -void +extern _X_EXPORT void XAAFillCacheBltSpans( ScrnInfoPtr pScrn, int rop, @@ -1250,7 +1250,7 @@ XAAFillCacheBltSpans( int xorg, int yorg ); -void +extern _X_EXPORT void XAAFillCacheExpandSpans( ScrnInfoPtr pScrn, int fg, int bg, int rop, @@ -1263,7 +1263,7 @@ XAAFillCacheExpandSpans( PixmapPtr pPix ); -void +extern _X_EXPORT void XAAFillSpans( DrawablePtr pDrawable, GC *pGC, @@ -1274,14 +1274,14 @@ XAAFillSpans( ); -void +extern _X_EXPORT void XAAInitPixmapCache( ScreenPtr pScreen, RegionPtr areas, pointer data ); -void +extern _X_EXPORT void XAAWriteBitmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1290,7 +1290,7 @@ XAAWriteBitmapToCache( int fg, int bg ); -void +extern _X_EXPORT void XAAWriteBitmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1299,7 +1299,7 @@ XAAWriteBitmapToCacheLinear( int fg, int bg ); -void +extern _X_EXPORT void XAAWritePixmapToCache( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1308,7 +1308,7 @@ XAAWritePixmapToCache( int bpp, int depth ); -void +extern _X_EXPORT void XAAWritePixmapToCacheLinear( ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -1317,26 +1317,26 @@ XAAWritePixmapToCacheLinear( int bpp, int depth ); -void +extern _X_EXPORT void XAASolidHorVertLineAsRects( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAASolidHorVertLineAsTwoPoint( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAASolidHorVertLineAsBresenham( ScrnInfoPtr pScrn, int x, int y, int len, int dir ); -void +extern _X_EXPORT void XAAPolyRectangleThinSolid( DrawablePtr pDrawable, GCPtr pGC, @@ -1345,7 +1345,7 @@ XAAPolyRectangleThinSolid( ); -void +extern _X_EXPORT void XAAPolylinesWideSolid ( DrawablePtr pDrawable, GCPtr pGC, @@ -1354,7 +1354,7 @@ XAAPolylinesWideSolid ( DDXPointPtr pPts ); -void +extern _X_EXPORT void XAAFillPolygonSolid( DrawablePtr pDrawable, GCPtr pGC, @@ -1364,7 +1364,7 @@ XAAFillPolygonSolid( DDXPointPtr ptsIn ); -void +extern _X_EXPORT void XAAFillPolygonStippled( DrawablePtr pDrawable, GCPtr pGC, @@ -1375,7 +1375,7 @@ XAAFillPolygonStippled( ); -void +extern _X_EXPORT void XAAFillPolygonTiled( DrawablePtr pDrawable, GCPtr pGC, @@ -1386,7 +1386,7 @@ XAAFillPolygonTiled( ); -int +extern _X_EXPORT int XAAIsEasyPolygon( DDXPointPtr ptsIn, int count, @@ -1397,7 +1397,7 @@ XAAIsEasyPolygon( int shape ); -void +extern _X_EXPORT void XAAFillPolygonHelper( ScrnInfoPtr pScrn, DDXPointPtr ptsIn, @@ -1413,7 +1413,7 @@ XAAFillPolygonHelper( XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAAPolySegment( DrawablePtr pDrawable, GCPtr pGC, @@ -1421,7 +1421,7 @@ XAAPolySegment( xSegment *pSeg ); -void +extern _X_EXPORT void XAAPolyLines( DrawablePtr pDrawable, GCPtr pGC, @@ -1430,7 +1430,7 @@ XAAPolyLines( DDXPointPtr pptInit ); -void +extern _X_EXPORT void XAAPolySegmentDashed( DrawablePtr pDrawable, GCPtr pGC, @@ -1438,7 +1438,7 @@ XAAPolySegmentDashed( xSegment *pSeg ); -void +extern _X_EXPORT void XAAPolyLinesDashed( DrawablePtr pDrawable, GCPtr pGC, @@ -1448,44 +1448,44 @@ XAAPolyLinesDashed( ); -void +extern _X_EXPORT void XAAWriteMono8x8PatternToCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache); -void +extern _X_EXPORT void XAAWriteColor8x8PatternToCache( ScrnInfoPtr pScrn, PixmapPtr pPix, XAACacheInfoPtr pCache ); -void +extern _X_EXPORT void XAARotateMonoPattern( int *pat0, int *pat1, int xoffset, int yoffset, Bool msbfirst ); -void XAAComputeDash(GCPtr pGC); +extern _X_EXPORT void XAAComputeDash(GCPtr pGC); -void XAAMoveDWORDS_FixedBase( +extern _X_EXPORT void XAAMoveDWORDS_FixedBase( register CARD32* dest, register CARD32* src, register int dwords ); -void XAAMoveDWORDS_FixedSrc( +extern _X_EXPORT void XAAMoveDWORDS_FixedSrc( register CARD32* dest, register CARD32* src, register int dwords ); -void XAAMoveDWORDS( +extern _X_EXPORT void XAAMoveDWORDS( register CARD32* dest, register CARD32* src, register int dwords ); -int +extern _X_EXPORT int XAAGetRectClipBoxes( GCPtr pGC, BoxPtr pboxClippedBase, @@ -1493,54 +1493,54 @@ XAAGetRectClipBoxes( xRectangle *prectInit ); -void +extern _X_EXPORT void XAASetupOverlay8_32Planar(ScreenPtr); -void +extern _X_EXPORT void XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheTile(ScrnInfoPtr Scrn, PixmapPtr pPix); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACachePlanarMonoStipple(ScrnInfoPtr Scrn, PixmapPtr pPix); typedef XAACacheInfoPtr (*XAACachePlanarMonoStippleProc)(ScrnInfoPtr, PixmapPtr); -XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void); +extern _X_EXPORT XAACachePlanarMonoStippleProc XAAGetCachePlanarMonoStipple(void); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheStipple(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheMono8x8Pattern(ScrnInfoPtr Scrn, int pat0, int pat1); -XAACacheInfoPtr +extern _X_EXPORT XAACacheInfoPtr XAACacheColor8x8Pattern(ScrnInfoPtr Scrn, PixmapPtr pPix, int fg, int bg); -void +extern _X_EXPORT void XAATileCache(ScrnInfoPtr pScrn, XAACacheInfoPtr pCache, int w, int h); -void XAAClosePixmapCache(ScreenPtr pScreen); +extern _X_EXPORT void XAAClosePixmapCache(ScreenPtr pScreen); void XAAInvalidatePixmapCache(ScreenPtr pScreen); -Bool XAACheckStippleReducibility(PixmapPtr pPixmap); -Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono); +extern _X_EXPORT Bool XAACheckStippleReducibility(PixmapPtr pPixmap); +extern _X_EXPORT Bool XAACheckTileReducibility(PixmapPtr pPixmap, Bool checkMono); -int XAAStippledFillChooser(GCPtr pGC); -int XAAOpaqueStippledFillChooser(GCPtr pGC); -int XAATiledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAAStippledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAAOpaqueStippledFillChooser(GCPtr pGC); +extern _X_EXPORT int XAATiledFillChooser(GCPtr pGC); -void XAAMoveInOffscreenPixmaps(ScreenPtr pScreen); -void XAAMoveOutOffscreenPixmaps(ScreenPtr pScreen); -void XAARemoveAreaCallback(FBAreaPtr area); -void XAAMoveOutOffscreenPixmap(PixmapPtr pPix); -Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec); +extern _X_EXPORT void XAAMoveInOffscreenPixmaps(ScreenPtr pScreen); +extern _X_EXPORT void XAAMoveOutOffscreenPixmaps(ScreenPtr pScreen); +extern _X_EXPORT void XAARemoveAreaCallback(FBAreaPtr area); +extern _X_EXPORT void XAAMoveOutOffscreenPixmap(PixmapPtr pPix); +extern _X_EXPORT Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec); #ifdef RENDER -void +extern _X_EXPORT void XAAComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -1555,7 +1555,7 @@ XAAComposite (CARD8 op, CARD16 height); -Bool +extern _X_EXPORT Bool XAADoComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, @@ -1570,7 +1570,7 @@ XAADoComposite (CARD8 op, CARD16 height); -void +extern _X_EXPORT void XAAGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1581,7 +1581,7 @@ XAAGlyphs (CARD8 op, GlyphListPtr list, GlyphPtr *glyphs); -Bool +extern _X_EXPORT Bool XAADoGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, @@ -1595,7 +1595,7 @@ XAADoGlyphs (CARD8 op, /* helpers */ -void +extern _X_EXPORT void XAA_888_plus_PICT_a8_to_8888 ( CARD32 color, CARD8 *alphaPtr, /* in bytes */ @@ -1606,7 +1606,7 @@ XAA_888_plus_PICT_a8_to_8888 ( int height ); -Bool +extern _X_EXPORT Bool XAAGetRGBAFromPixel( CARD32 pixel, CARD16 *red, @@ -1617,7 +1617,7 @@ XAAGetRGBAFromPixel( ); -Bool +extern _X_EXPORT Bool XAAGetPixelFromRGBA ( CARD32 *pixel, CARD16 red, @@ -1630,18 +1630,18 @@ XAAGetPixelFromRGBA ( #endif /* XXX should be static */ -extern GCOps XAAFallbackOps; -extern GCOps *XAAGetFallbackOps(void); -extern GCFuncs XAAGCFuncs; -extern DevPrivateKey XAAGetScreenKey(void); -extern DevPrivateKey XAAGetGCKey(void); -extern DevPrivateKey XAAGetPixmapKey(void); +extern _X_EXPORT GCOps XAAFallbackOps; +extern _X_EXPORT GCOps *XAAGetFallbackOps(void); +extern _X_EXPORT GCFuncs XAAGCFuncs; +extern _X_EXPORT DevPrivateKey XAAGetScreenKey(void); +extern _X_EXPORT DevPrivateKey XAAGetGCKey(void); +extern _X_EXPORT DevPrivateKey XAAGetPixmapKey(void); -extern unsigned int XAAShiftMasks[32]; +extern _X_EXPORT unsigned int XAAShiftMasks[32]; -extern unsigned int byte_expand3[256], byte_reversed_expand3[256]; +extern _X_EXPORT unsigned int byte_expand3[256], byte_reversed_expand3[256]; -CARD32 XAAReverseBitOrder(CARD32 data); +extern _X_EXPORT CARD32 XAAReverseBitOrder(CARD32 data); #define GET_XAASCREENPTR_FROM_SCREEN(pScreen)\ dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()) diff --git a/xorg-server/hw/xfree86/xaa/xaarop.h b/xorg-server/hw/xfree86/xaa/xaarop.h index 548993c49..edfd75aec 100644 --- a/xorg-server/hw/xfree86/xaa/xaarop.h +++ b/xorg-server/hw/xfree86/xaa/xaarop.h @@ -294,18 +294,18 @@ #define NO_SRC_ROP(rop) \ ((rop == GXnoop) || (rop == GXset) || (rop == GXclear) || (rop == GXinvert)) -int XAAHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop); -int XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop); +extern _X_EXPORT int XAAHelpSolidROP(ScrnInfoPtr pScrn, int *fg, int pm, int *rop); +extern _X_EXPORT int XAAHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, int pm, int *rop); /* XXX These four should be static, but it breaks the 6.7.0 ABI. */ -extern int XAACopyROP[16]; -extern int XAACopyROP_PM[16]; -extern int XAAPatternROP[16]; -extern int XAAPatternROP_PM[16]; +extern _X_EXPORT int XAACopyROP[16]; +extern _X_EXPORT int XAACopyROP_PM[16]; +extern _X_EXPORT int XAAPatternROP[16]; +extern _X_EXPORT int XAAPatternROP_PM[16]; -extern int XAAGetCopyROP(int i); -extern int XAAGetCopyROP_PM(int i); -extern int XAAGetPatternROP(int i); -extern int XAAGetPatternROP_PM(int i); +extern _X_EXPORT int XAAGetCopyROP(int i); +extern _X_EXPORT int XAAGetCopyROP_PM(int i); +extern _X_EXPORT int XAAGetPatternROP(int i); +extern _X_EXPORT int XAAGetPatternROP_PM(int i); #endif /* _XAAROP_H */ diff --git a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in index ff09fa56e..e1f401fde 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in +++ b/xorg-server/hw/xfree86/xf8_16bpp/Makefile.in @@ -39,8 +39,11 @@ subdir = hw/xfree86/xf8_16bpp DIST_COMMON = $(sdk_HEADERS) $(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 @@ -50,7 +53,8 @@ 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 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; @@ -103,6 +107,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@ @@ -123,9 +128,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@ @@ -154,7 +162,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@ @@ -163,9 +173,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@ @@ -204,12 +218,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@ @@ -229,7 +244,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@ @@ -239,6 +253,7 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ +Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -252,11 +267,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@ @@ -292,6 +306,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@ @@ -316,7 +331,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@ @@ -339,6 +353,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -370,7 +385,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@ diff --git a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h b/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h index 3a3a68da7..b6ab955f3 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h +++ b/xorg-server/hw/xfree86/xf8_16bpp/cfb8_16.h @@ -4,9 +4,9 @@ * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the @@ -14,10 +14,11 @@ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ #ifndef _CFB8_16_H @@ -28,7 +29,7 @@ /* this has to stay misnamed for ABI reasons */ -_X_EXPORT Bool +extern _X_EXPORT Bool cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8, int xsize, int ysize, int dpix, int dpiy, int width16, int width8); diff --git a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c b/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c index 1a739b040..6a4529ae8 100644 --- a/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c +++ b/xorg-server/hw/xfree86/xf8_16bpp/xf8_16module.c @@ -4,9 +4,9 @@ * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation - * on the rights to use, copy, modify, merge, publish, distribute, sub - * license, and/or sell copies of the Software, and to permit persons to whom - * the Software is furnished to do so, subject to the following conditions: + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the @@ -14,10 +14,11 @@ * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_XORG_CONFIG_H @@ -34,7 +35,7 @@ #include "fboverlay.h" #include "cfb8_16.h" -_X_EXPORT Bool +Bool cfb8_16ScreenInit(ScreenPtr pScreen, pointer pbits16, pointer pbits8, int xsize, int ysize, int dpix, int dpiy, int width16, int width8) diff --git a/xorg-server/hw/xfree86/xorgconf.cpp b/xorg-server/hw/xfree86/xorgconf.cpp index acf90f13f..d880180ae 100644 --- a/xorg-server/hw/xfree86/xorgconf.cpp +++ b/xorg-server/hw/xfree86/xorgconf.cpp @@ -1,4 +1,3 @@ -XCOMM $XdotOrg$ XCOMM XCOMM Copyright (c) 1994-1998 by The XFree86 Project, Inc. XCOMM @@ -29,15 +28,15 @@ XCOMM $XConsortium: XF86Conf.cpp /main/22 1996/10/23 11:43:51 kaleb $ XCOMM ********************************************************************** XCOMM This is a sample configuration file only, intended to illustrate -XCOMM what a config file might look like. Refer to the XF86Config(4/5) -XCOMM man page for details about the format of this file. This man page -XCOMM is installed as MANPAGE +XCOMM what a config file might look like. Refer to the __xconfigfile__(__filemansuffix__) +XCOMM man page for details about the format of this file. XCOMM ********************************************************************** -XCOMM The ordering of sections is not important in version 4.0 and later. +XCOMM The ordering of sections is not important in XFree86 4.0 and later, +XCOMM nor in any Xorg release. XCOMM ********************************************************************** -XCOMM Files section. This allows default font and rgb paths to be set +XCOMM Files section. This allows default font and module paths to be set XCOMM ********************************************************************** Section "Files" @@ -98,18 +97,18 @@ XCOMM provide a better stack trace in the core dump to aid in debugging XCOMM Option "NoTrapSignals" -XCOMM Uncomment this to disable the <Crtl><Alt><Fn> VT switch sequence +XCOMM Uncomment this to disable the <Ctrl><Alt><Fn> VT switch sequence XCOMM (where n is 1 through 12). This allows clients to receive these key XCOMM events. XCOMM Option "DontVTSwitch" -XCOMM Uncomment this to disable the <Crtl><Alt><BS> server abort sequence -XCOMM This allows clients to receive this key event. +XCOMM Uncomment this to enable the <Ctrl><Alt><BS> server abort sequence +XCOMM The default allows clients to receive this key event. -XCOMM Option "DontZap" +XCOMM Option "DontZap" "false" -XCOMM Uncomment this to disable the <Crtl><Alt><KP_+>/<KP_-> mode switching +XCOMM Uncomment this to disable the <Ctrl><Alt><KP_+>/<KP_-> mode switching XCOMM sequences. This allows clients to receive these key events. XCOMM Option "DontZoom" @@ -148,14 +147,6 @@ XCOMM the driver supports it. Option "suspend time" "30" Option "off time" "60" -XCOMM On some platform the server needs to estimate the sizes of PCI -XCOMM memory and pio ranges. This is done by assuming that PCI ranges -XCOMM don't overlap. Some broken BIOSes tend to set ranges of inactive -XCOMM devices wrong. Here one can adjust how aggressive the assumptions -XCOMM should be. Default is 0. - -XCOMM Option "EstimateSizesAggresively" "0" - EndSection XCOMM ********************************************************************** @@ -218,7 +209,7 @@ XCOMM Option "XkbOptions" "ctrl:swapcaps" XCOMM These are the default XKB settings for xorg XCOMM XCOMM Option "XkbRules" "xorg" -XCOMM Option "XkbModel" "pc101" +XCOMM Option "XkbModel" "pc105" XCOMM Option "XkbLayout" "us" XCOMM Option "XkbVariant" "" XCOMM Option "XkbOptions" "" |