diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-09-08 16:08:26 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-09-08 16:08:26 +0000 |
commit | 581dd7ebfee7a6df24e8ad9e117201006e3a0485 (patch) | |
tree | 8c3c5ed3505e175c9aa2ea41e314f1bb861a5117 /driver/xf86-video-s3virge/src | |
parent | 0824b89d056c3a405f921fa02623729773b8efe8 (diff) |
Update xf86-video-s3virge to 1.10.6
Diffstat (limited to 'driver/xf86-video-s3virge/src')
-rw-r--r-- | driver/xf86-video-s3virge/src/Makefile.am | 1 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/Makefile.in | 367 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/compat-api.h | 99 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v.h | 14 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_accel.c | 13 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_dga.c | 21 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_driver.c | 77 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_hwcurs.c | 2 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_shadow.c | 6 | ||||
-rw-r--r-- | driver/xf86-video-s3virge/src/s3v_xv.c | 4 |
10 files changed, 424 insertions, 180 deletions
diff --git a/driver/xf86-video-s3virge/src/Makefile.am b/driver/xf86-video-s3virge/src/Makefile.am index 998b29240..6aafc83cf 100644 --- a/driver/xf86-video-s3virge/src/Makefile.am +++ b/driver/xf86-video-s3virge/src/Makefile.am @@ -29,6 +29,7 @@ s3virge_drv_la_LDFLAGS = -module -avoid-version s3virge_drv_ladir = @moduledir@/drivers s3virge_drv_la_SOURCES = \ + compat-api.h \ newmmio.h \ regs3v.h \ s3v_accel.c \ diff --git a/driver/xf86-video-s3virge/src/Makefile.in b/driver/xf86-video-s3virge/src/Makefile.in index f08fd6d85..dfb079bf9 100644 --- a/driver/xf86-video-s3virge/src/Makefile.in +++ b/driver/xf86-video-s3virge/src/Makefile.in @@ -1,8 +1,8 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile.in generated by automake 1.12.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -34,18 +34,32 @@ # 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. -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = ${SHELL} $(install_sh) -c -m 644 -install_sh_PROGRAM = ${SHELL} $(install_sh) -c -install_sh_SCRIPT = ${SHELL} $(install_sh) -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : @@ -57,48 +71,104 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(install_sh) -d +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = 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 = `echo $$p | sed -e 's|^.*/||'`; +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' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(s3virge_drv_ladir)" -s3virge_drv_laLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(s3virge_drv_la_LTLIBRARIES) s3virge_drv_la_LIBADD = am_s3virge_drv_la_OBJECTS = s3v_accel.lo s3v_dac.lo s3v_dga.lo \ s3v_driver.lo s3v_hwcurs.lo s3v_i2c.lo s3v_shadow.lo s3v_xv.lo s3virge_drv_la_OBJECTS = $(am_s3virge_drv_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +s3virge_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(s3virge_drv_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles +am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(s3virge_drv_la_SOURCES) DIST_SOURCES = $(s3virge_drv_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APP_MAN_DIR = @APP_MAN_DIR@ @@ -134,8 +204,7 @@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ GREP = @GREP@ -HAVE_XEXTPROTO_71_FALSE = @HAVE_XEXTPROTO_71_FALSE@ -HAVE_XEXTPROTO_71_TRUE = @HAVE_XEXTPROTO_71_TRUE@ +INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ @@ -152,13 +221,12 @@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ @@ -170,6 +238,7 @@ 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@ @@ -187,13 +256,13 @@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ -XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@ -XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ @@ -205,6 +274,7 @@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -233,8 +303,12 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ # this is obnoxious: # -module lets us name the module exactly how we want @@ -246,6 +320,7 @@ s3virge_drv_la_LTLIBRARIES = s3virge_drv.la s3virge_drv_la_LDFLAGS = -module -avoid-version s3virge_drv_ladir = @moduledir@/drivers s3virge_drv_la_SOURCES = \ + compat-api.h \ newmmio.h \ regs3v.h \ s3v_accel.c \ @@ -270,14 +345,14 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -295,35 +370,43 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): install-s3virge_drv_laLTLIBRARIES: $(s3virge_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(s3virge_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(s3virge_drv_ladir)" - @list='$(s3virge_drv_la_LTLIBRARIES)'; for p in $$list; do \ + @list='$(s3virge_drv_la_LTLIBRARIES)'; test -n "$(s3virge_drv_ladir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(s3virge_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(s3virge_drv_ladir)/$$f'"; \ - $(LIBTOOL) --mode=install $(s3virge_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(s3virge_drv_ladir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(s3virge_drv_ladir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(s3virge_drv_ladir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(s3virge_drv_ladir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(s3virge_drv_ladir)"; \ + } uninstall-s3virge_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(s3virge_drv_la_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(s3virge_drv_ladir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(s3virge_drv_ladir)/$$p"; \ + @list='$(s3virge_drv_la_LTLIBRARIES)'; test -n "$(s3virge_drv_ladir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(s3virge_drv_ladir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(s3virge_drv_ladir)/$$f"; \ done clean-s3virge_drv_laLTLIBRARIES: -test -z "$(s3virge_drv_la_LTLIBRARIES)" || rm -f $(s3virge_drv_la_LTLIBRARIES) - @list='$(s3virge_drv_la_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 -s3virge_drv.la: $(s3virge_drv_la_OBJECTS) $(s3virge_drv_la_DEPENDENCIES) - $(LINK) -rpath $(s3virge_drv_ladir) $(s3virge_drv_la_LDFLAGS) $(s3virge_drv_la_OBJECTS) $(s3virge_drv_la_LIBADD) $(LIBS) + @list='$(s3virge_drv_la_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +s3virge_drv.la: $(s3virge_drv_la_OBJECTS) $(s3virge_drv_la_DEPENDENCIES) $(EXTRA_s3virge_drv_la_DEPENDENCIES) + $(AM_V_CCLD)$(s3virge_drv_la_LINK) -rpath $(s3virge_drv_ladir) $(s3virge_drv_la_OBJECTS) $(s3virge_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -341,25 +424,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/s3v_xv.Plo@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: -@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -367,82 +450,99 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -distclean-libtool: - -rm -f libtool -uninstall-info-am: - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @@ -451,7 +551,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(s3virge_drv_ladir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -463,16 +563,22 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -486,7 +592,7 @@ distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ - distclean-libtool distclean-tags + distclean-tags dvi: dvi-am @@ -494,18 +600,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-s3virge_drv_laLTLIBRARIES +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -526,21 +652,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-info-am uninstall-s3virge_drv_laLTLIBRARIES +uninstall-am: uninstall-s3virge_drv_laLTLIBRARIES + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-s3virge_drv_laLTLIBRARIES 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-exec \ - install-exec-am install-info install-info-am install-man \ - install-s3virge_drv_laLTLIBRARIES 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-info-am \ + clean-libtool clean-s3virge_drv_laLTLIBRARIES cscopelist 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-s3virge_drv_laLTLIBRARIES \ + 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-s3virge_drv_laLTLIBRARIES + # 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/driver/xf86-video-s3virge/src/compat-api.h b/driver/xf86-video-s3virge/src/compat-api.h new file mode 100644 index 000000000..6bc946fd6 --- /dev/null +++ b/driver/xf86-video-s3virge/src/compat-api.h @@ -0,0 +1,99 @@ +/* + * Copyright 2012 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 + * 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 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. + * + * Author: Dave Airlie <airlied@redhat.com> + */ + +/* this file provides API compat between server post 1.13 and pre it, + it should be reused inside as many drivers as possible */ +#ifndef COMPAT_API_H +#define COMPAT_API_H + +#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR +#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] +#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p +#endif + +#ifndef XF86_HAS_SCRN_CONV +#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] +#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] +#endif + +#ifndef XF86_SCRN_INTERFACE + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen + +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags +#define ADJUST_FRAME_ARGS(arg, x, y) (arg)->scrnIndex, x, y, 0 + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags +#define SWITCH_MODE_ARGS(arg, m) (arg)->scrnIndex, m, 0 + +#define FREE_SCREEN_ARGS_DECL int arg, int flags + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS pScrn->scrnIndex, 0 + +#define XF86_SCRN_ARG(x) ((x)->scrnIndex) +#else +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) + +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv + +#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask +#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask + +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS pScreen + +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define ADJUST_FRAME_ARGS(arg, x, y) arg, x, y + +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode +#define SWITCH_MODE_ARGS(arg, m) arg, m + +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS pScrn + +#define XF86_SCRN_ARG(x) (x) + +#endif + +#endif diff --git a/driver/xf86-video-s3virge/src/s3v.h b/driver/xf86-video-s3virge/src/s3v.h index 0a5c7a9b4..8427d2536 100644 --- a/driver/xf86-video-s3virge/src/s3v.h +++ b/driver/xf86-video-s3virge/src/s3v.h @@ -60,8 +60,11 @@ in this Software without prior written authorization from the XFree86 Project. #include "fb.h" /* Drivers using the XAA interface ... */ +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" +#endif +#include "xf86fbman.h" #include "xf86cmap.h" #include "xf86i2c.h" @@ -71,6 +74,7 @@ in this Software without prior written authorization from the XFree86 Project. #include <X11/extensions/Xv.h> #include "fourcc.h" +#include "compat-api.h" #ifndef _S3V_VGAHWMMIO_H #define _S3V_VGAHWMMIO_H @@ -275,8 +279,10 @@ typedef struct tagS3VRec { /* Pointer used to save wrapped */ /* CloseScreen function. */ CloseScreenProcPtr CloseScreen; +#ifdef HAVE_XAA_H /* XAA info Rec */ XAAInfoRecPtr AccelInfoRec; +#endif /* PCI info vars. */ pciVideoPtr PciInfo; #ifndef XSERVER_LIBPCIACCESS @@ -297,7 +303,7 @@ typedef struct tagS3VRec { int rotate; unsigned char * ShadowPtr; int ShadowPitch; - void (*PointerMoved)(int index, int x, int y); + void (*PointerMoved)(SCRN_ARG_TYPE arg, int x, int y); /* Used by ViRGE driver, but generic -end- */ @@ -392,14 +398,14 @@ void S3VWaitDummy(S3VPtr ps3v); extern Bool S3VHWCursorInit(ScreenPtr pScreen); /* s3v_driver.c */ -void S3VAdjustFrame(int scrnIndex, int x, int y, int flags); -Bool S3VSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); +void S3VAdjustFrame(ADJUST_FRAME_ARGS_DECL); +Bool S3VSwitchMode(SWITCH_MODE_ARGS_DECL); /* s3v_dga.c */ Bool S3VDGAInit(ScreenPtr pScreen); /* in s3v_shadow.c */ -void s3vPointerMoved(int index, int x, int y); +void s3vPointerMoved(SCRN_ARG_TYPE index, int x, int y); void s3vRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox); void s3vRefreshArea8(ScrnInfoPtr pScrn, int num, BoxPtr pbox); void s3vRefreshArea16(ScrnInfoPtr pScrn, int num, BoxPtr pbox); diff --git a/driver/xf86-video-s3virge/src/s3v_accel.c b/driver/xf86-video-s3virge/src/s3v_accel.c index 7837e4ad4..587ce9750 100644 --- a/driver/xf86-video-s3virge/src/s3v_accel.c +++ b/driver/xf86-video-s3virge/src/s3v_accel.c @@ -34,11 +34,11 @@ in this Software without prior written authorization from the XFree86 Project. #include "miline.h" /* fb includes are in s3v.h */ -#include "xaalocal.h" #include "xaarop.h" #include "servermd.h" /* LOG2_BYTES_PER_SCANLINE_PAD */ +#ifdef HAVE_XAA_H static void S3VWriteMask(CARD32*, int); static void S3VEngineReset(ScrnInfoPtr pScrn); @@ -75,13 +75,14 @@ static void S3VPolylinesThinSolidWrapper(DrawablePtr, GCPtr, int, int, static void S3VPolySegmentThinSolidWrapper(DrawablePtr, GCPtr, int, xSegment*); #endif static void S3VNopAllCmdSets(ScrnInfoPtr pScrn); - +#endif Bool S3VAccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3VPtr ps3v = S3VPTR(pScrn); BoxRec AvailFBArea; @@ -232,9 +233,11 @@ S3VAccelInit(ScreenPtr pScreen) infoPtr->maxOffPixHeight = 2048; return (XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } - Bool S3VAccelInit32(ScreenPtr pScreen) { @@ -537,6 +540,7 @@ S3VWriteMask( return; } +#ifdef HAVE_XAA_H /************************\ | Solid Filled Rects | @@ -967,6 +971,7 @@ S3VSubsequentSolidHorVertLinePlaneMask( S3VWriteMask((CARD32*)ps3v->MapBaseDense, dwords); } +#endif void S3VWaitFifoGX2(S3VPtr ps3v, int slots ) diff --git a/driver/xf86-video-s3virge/src/s3v_dga.c b/driver/xf86-video-s3virge/src/s3v_dga.c index ecf857185..0e603cf59 100644 --- a/driver/xf86-video-s3virge/src/s3v_dga.c +++ b/driver/xf86-video-s3virge/src/s3v_dga.c @@ -62,8 +62,6 @@ in this Software without prior written authorization from the XFree86 Project. #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xaa.h" -#include "xaalocal.h" #include "s3v.h" #include "dgaproc.h" @@ -74,8 +72,10 @@ static Bool S3V_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, static Bool S3V_SetMode(ScrnInfoPtr, DGAModePtr); static int S3V_GetViewport(ScrnInfoPtr); static void S3V_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void S3V_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void S3V_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); +#endif /* dummy... */ @@ -87,8 +87,12 @@ DGAFunctionRec S3V_DGAFuncs = { S3V_SetViewport, S3V_GetViewport, S3VAccelSync, +#ifdef HAVE_XAA_H S3V_FillRect, S3V_BlitRect, +#else + NULL, NULL, +#endif NULL /* dummy... MGA_BlitTransRect */ }; @@ -97,7 +101,7 @@ DGAFunctionRec S3V_DGAFuncs = { Bool S3VDGAInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3VPtr ps3v = S3VPTR(pScrn); DGAModePtr modes = NULL, newmodes = NULL, currentMode; DisplayModePtr pMode, firstMode; @@ -135,8 +139,10 @@ SECOND_PASS: currentMode->mode = pMode; currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if(!ps3v->NoAccel) currentMode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT; +#endif if(pMode->Flags & V_DBLSCAN) currentMode->flags |= DGA_DOUBLESCAN; if(pMode->Flags & V_INTERLACE) @@ -239,7 +245,7 @@ S3V_SetMode( pScrn->displayWidth = OldDisplayWidth[index]; - S3VSwitchMode(index, pScrn->currentMode, 0); + S3VSwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode)); ps3v->DGAactive = FALSE; } else { if(!ps3v->DGAactive) { /* save the old parameters */ @@ -251,7 +257,7 @@ S3V_SetMode( pScrn->displayWidth = pMode->bytesPerScanline / (pMode->bitsPerPixel >> 3); - S3VSwitchMode(index, pMode->mode, 0); + S3VSwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode)); } return TRUE; @@ -276,10 +282,11 @@ S3V_SetViewport( ){ S3VPtr ps3v = S3VPTR(pScrn); - S3VAdjustFrame(pScrn->pScreen->myNum, x, y, flags); + S3VAdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y)); ps3v->DGAViewportStatus = 0; /* MGAAdjustFrame loops until finished */ } +#ifdef HAVE_XAA_H static void S3V_FillRect ( ScrnInfoPtr pScrn, @@ -315,7 +322,7 @@ S3V_BlitRect( SET_SYNC_FLAG(ps3v->AccelInfoRec); } } - +#endif static Bool diff --git a/driver/xf86-video-s3virge/src/s3v_driver.c b/driver/xf86-video-s3virge/src/s3v_driver.c index 7064b1e08..654884c00 100644 --- a/driver/xf86-video-s3virge/src/s3v_driver.c +++ b/driver/xf86-video-s3virge/src/s3v_driver.c @@ -91,34 +91,32 @@ static void S3VIdentify(int flags); static Bool S3VProbe(DriverPtr drv, int flags); static Bool S3VPreInit(ScrnInfoPtr pScrn, int flags); -static Bool S3VEnterVT(int scrnIndex, int flags); -static void S3VLeaveVT(int scrnIndex, int flags); +static Bool S3VEnterVT(VT_FUNC_ARGS_DECL); +static void S3VLeaveVT(VT_FUNC_ARGS_DECL); static void S3VSave (ScrnInfoPtr pScrn); static void S3VWriteMode (ScrnInfoPtr pScrn, vgaRegPtr, S3VRegPtr); static void S3VSaveSTREAMS(ScrnInfoPtr pScrn, unsigned int *streams); static void S3VRestoreSTREAMS(ScrnInfoPtr pScrn, unsigned int *streams); static void S3VDisableSTREAMS(ScrnInfoPtr pScrn); -static Bool S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv); -static int S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen); +static Bool S3VScreenInit(SCREEN_INIT_ARGS_DECL); +static int S3VInternalScreenInit(ScrnInfoPtr pScrn, ScreenPtr pScreen); static void S3VPrintRegs(ScrnInfoPtr); -static ModeStatus S3VValidMode(int index, DisplayModePtr mode, Bool verbose, int flags); +static ModeStatus S3VValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags); static Bool S3VMapMem(ScrnInfoPtr pScrn); static void S3VUnmapMem(ScrnInfoPtr pScrn); static Bool S3VModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); -static Bool S3VCloseScreen(int scrnIndex, ScreenPtr pScreen); +static Bool S3VCloseScreen(CLOSE_SCREEN_ARGS_DECL); static Bool S3VSaveScreen(ScreenPtr pScreen, int mode); static void S3VInitSTREAMS(ScrnInfoPtr pScrn, unsigned int *streams, DisplayModePtr mode); -/* s3v.h - static void S3VAdjustFrame(int scrnIndex, int x, int y, int flags); */ -/* s3v.h - static Bool S3VSwitchMode(int scrnIndex, DisplayModePtr mode, int flags); */ static void S3VLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies, LOCO *colors, VisualPtr pVisual); static void S3VDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); -static Bool S3Vddc1(int scrnIndex); -static Bool S3Vddc2(int scrnIndex); +static Bool S3Vddc1(ScrnInfoPtr pScrn); +static Bool S3Vddc2(ScrnInfoPtr pScrn); static unsigned int S3Vddc1Read(ScrnInfoPtr pScrn); static void S3VProbeDDC(ScrnInfoPtr pScrn, int index); @@ -934,8 +932,8 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags) if ((ps3v->pVbe) && ((pMon = xf86PrintEDID(vbeDoEDID(ps3v->pVbe, NULL))) != NULL)) xf86SetDDCproperties(pScrn,pMon); - else if (!S3Vddc1(pScrn->scrnIndex)) { - S3Vddc2(pScrn->scrnIndex); + else if (!S3Vddc1(pScrn)) { + S3Vddc2(pScrn); } } if (ps3v->pVbe) { @@ -1386,9 +1384,9 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags) /* Mandatory */ static Bool -S3VEnterVT(int scrnIndex, int flags) +S3VEnterVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); /* ScreenPtr pScreen = xf86Screens[scrnIndex]->pScreen; */ /*vgaHWPtr hwp = VGAHWPTR(pScrn);*/ @@ -1415,9 +1413,9 @@ S3VEnterVT(int scrnIndex, int flags) /* Mandatory */ static void -S3VLeaveVT(int scrnIndex, int flags) +S3VLeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); vgaHWPtr hwp = VGAHWPTR(pScrn); S3VPtr ps3v = S3VPTR(pScrn); vgaRegPtr vgaSavePtr = &hwp->SavedReg; @@ -2319,7 +2317,7 @@ S3VUnmapMem(ScrnInfoPtr pScrn) /* This gets called at the start of each server generation */ static Bool -S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) +S3VScreenInit(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScrn; S3VPtr ps3v; @@ -2327,7 +2325,7 @@ S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) PVERB5(" S3VScreenInit\n"); /* First get the ScrnInfoRec */ - pScrn = xf86Screens[pScreen->myNum]; + pScrn = xf86ScreenToScrn(pScreen); /* Get S3V rec */ ps3v = S3VPTR(pScrn); /* Map MMIO regs and framebuffer */ @@ -2383,7 +2381,7 @@ S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) return FALSE; } - ret = S3VInternalScreenInit(scrnIndex, pScreen); + ret = S3VInternalScreenInit(pScrn, pScreen); if (!ret) return FALSE; @@ -2503,17 +2501,13 @@ S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* Common init routines needed in EnterVT and ScreenInit */ static int -S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen) +S3VInternalScreenInit(ScrnInfoPtr pScrn, ScreenPtr pScreen) { int ret = TRUE; - ScrnInfoPtr pScrn; S3VPtr ps3v; int width, height, displayWidth; unsigned char* FBStart; - /* First get the ScrnInfoRec */ - pScrn = xf86Screens[pScreen->myNum]; - ps3v = S3VPTR(pScrn); displayWidth = pScrn->displayWidth; @@ -2551,7 +2545,7 @@ S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen) displayWidth, pScrn->bitsPerPixel); break; default: - xf86DrvMsg(scrnIndex, X_ERROR, + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) in S3VScreenInit\n", pScrn->bitsPerPixel); ret = FALSE; @@ -2566,9 +2560,9 @@ S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen) /* Checks if a mode is suitable for the selected chipset. */ static ModeStatus -S3VValidMode(int index, DisplayModePtr mode, Bool verbose, int flags) +S3VValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) { - ScrnInfoPtr pScrn = xf86Screens[index]; + SCRN_INFO_PTR(arg); if ((pScrn->bitsPerPixel + 7)/8 * mode->HDisplay > 4095) return MODE_VIRTUAL_X; @@ -3276,7 +3270,7 @@ S3VModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) /* needed, etc. */ S3VWriteMode( pScrn, vganew, new ); /* Adjust the viewport */ - S3VAdjustFrame(pScrn->scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + S3VAdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0)); return TRUE; } @@ -3291,9 +3285,9 @@ S3VModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) /* Mandatory */ static Bool -S3VCloseScreen(int scrnIndex, ScreenPtr pScreen) +S3VCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); vgaHWPtr hwp = VGAHWPTR(pScrn); S3VPtr ps3v = S3VPTR(pScrn); vgaRegPtr vgaSavePtr = &hwp->SavedReg; @@ -3308,8 +3302,10 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen) S3VUnmapMem(pScrn); } +#ifdef HAVE_XAA_H if (ps3v->AccelInfoRec) XAADestroyInfoRec(ps3v->AccelInfoRec); +#endif if (ps3v->DGAModes) free(ps3v->DGAModes); @@ -3317,7 +3313,7 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen) pScreen->CloseScreen = ps3v->CloseScreen; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); + return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } @@ -3431,9 +3427,9 @@ S3VInitSTREAMS(ScrnInfoPtr pScrn, unsigned int *streams, DisplayModePtr mode) */ void -S3VAdjustFrame(int scrnIndex, int x, int y, int flags) +S3VAdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); vgaHWPtr hwp = VGAHWPTR(pScrn); S3VPtr ps3v = S3VPTR(pScrn); int Base; @@ -3481,9 +3477,10 @@ S3VAdjustFrame(int scrnIndex, int x, int y, int flags) /* Usually mandatory */ Bool -S3VSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +S3VSwitchMode(SWITCH_MODE_ARGS_DECL) { - return S3VModeInit(xf86Screens[scrnIndex], mode); + SCRN_INFO_PTR(arg); + return S3VModeInit(pScrn, mode); } @@ -3764,9 +3761,8 @@ S3Vddc1Read(ScrnInfoPtr pScrn) } static Bool -S3Vddc1(int scrnIndex) +S3Vddc1(ScrnInfoPtr pScrn) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; S3VPtr ps3v = S3VPTR(pScrn); CARD32 tmp; Bool success = FALSE; @@ -3777,7 +3773,7 @@ S3Vddc1(int scrnIndex) OUTREG(DDC_REG,(tmp | 0x12)); if ((pMon = xf86PrintEDID( - xf86DoEDID_DDC1(scrnIndex,vgaHWddc1SetSpeedWeak(), + xf86DoEDID_DDC1(XF86_SCRN_ARG(pScrn),vgaHWddc1SetSpeedWeak(), S3Vddc1Read))) != NULL) success = TRUE; xf86SetDDCproperties(pScrn,pMon); @@ -3788,9 +3784,8 @@ S3Vddc1(int scrnIndex) } static Bool -S3Vddc2(int scrnIndex) +S3Vddc2(ScrnInfoPtr pScrn) { - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; S3VPtr ps3v = S3VPTR(pScrn); if ( xf86LoadSubModule(pScrn, "i2c") ) { @@ -3798,7 +3793,7 @@ S3Vddc2(int scrnIndex) CARD32 tmp = (INREG(DDC_REG)); OUTREG(DDC_REG,(tmp | 0x13)); xf86SetDDCproperties(pScrn,xf86PrintEDID( - xf86DoEDID_DDC2(pScrn->scrnIndex,ps3v->I2C))); + xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn),ps3v->I2C))); OUTREG(DDC_REG,tmp); return TRUE; } diff --git a/driver/xf86-video-s3virge/src/s3v_hwcurs.c b/driver/xf86-video-s3virge/src/s3v_hwcurs.c index 58e8fd9d1..d435565eb 100644 --- a/driver/xf86-video-s3virge/src/s3v_hwcurs.c +++ b/driver/xf86-video-s3virge/src/s3v_hwcurs.c @@ -232,7 +232,7 @@ S3VSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) Bool S3VHWCursorInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3VPtr ps3v = S3VPTR(pScrn); xf86CursorInfoPtr infoPtr; diff --git a/driver/xf86-video-s3virge/src/s3v_shadow.c b/driver/xf86-video-s3virge/src/s3v_shadow.c index 82b763fa5..eec8916b0 100644 --- a/driver/xf86-video-s3virge/src/s3v_shadow.c +++ b/driver/xf86-video-s3virge/src/s3v_shadow.c @@ -94,9 +94,9 @@ s3vRefreshArea(ScrnInfoPtr pScrn, int num, BoxPtr pbox) } void -s3vPointerMoved(int index, int x, int y) +s3vPointerMoved(SCRN_ARG_TYPE arg, int x, int y) { - ScrnInfoPtr pScrn = xf86Screens[index]; + SCRN_INFO_PTR(arg); S3VPtr ps3v = S3VPTR(pScrn); int newX, newY; @@ -108,7 +108,7 @@ s3vPointerMoved(int index, int x, int y) newY = pScrn->pScreen->width - x - 1; } - (*ps3v->PointerMoved)(index, newX, newY); + (*ps3v->PointerMoved)(arg, newX, newY); } void diff --git a/driver/xf86-video-s3virge/src/s3v_xv.c b/driver/xf86-video-s3virge/src/s3v_xv.c index 2466789a5..3c9d474bf 100644 --- a/driver/xf86-video-s3virge/src/s3v_xv.c +++ b/driver/xf86-video-s3virge/src/s3v_xv.c @@ -105,7 +105,7 @@ int S3VQueryXvCapable(ScrnInfoPtr pScrn) void S3VInitVideo(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; S3VPtr ps3v = S3VPTR(pScrn); @@ -346,7 +346,7 @@ S3VAllocAdaptor(ScrnInfoPtr pScrn) static XF86VideoAdaptorPtr S3VSetupImageVideoOverlay(ScreenPtr pScreen) { - ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); S3VPtr ps3v = S3VPTR(pScrn); XF86VideoAdaptorPtr adapt; |