summaryrefslogtreecommitdiff
path: root/driver/xf86-video-i740/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2012-08-16 16:17:29 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2012-08-16 16:17:29 +0000
commit9e1675946704f47e596277657427aa6706073935 (patch)
tree89bdfae028f6cb64f9d94afc99c1c7df986754cd /driver/xf86-video-i740/src
parentb6db87897aa2871e146535b5f11b298bb38978d7 (diff)
Update to xf86-video-i740 1.3.4
Diffstat (limited to 'driver/xf86-video-i740/src')
-rw-r--r--driver/xf86-video-i740/src/Makefile.am1
-rw-r--r--driver/xf86-video-i740/src/Makefile.in366
-rw-r--r--driver/xf86-video-i740/src/compat-api.h99
-rw-r--r--driver/xf86-video-i740/src/i740.h9
-rw-r--r--driver/xf86-video-i740/src/i740_accel.c13
-rw-r--r--driver/xf86-video-i740/src/i740_cursor.c4
-rw-r--r--driver/xf86-video-i740/src/i740_dga.c27
-rw-r--r--driver/xf86-video-i740/src/i740_driver.c65
-rw-r--r--driver/xf86-video-i740/src/i740_video.c18
9 files changed, 427 insertions, 175 deletions
diff --git a/driver/xf86-video-i740/src/Makefile.am b/driver/xf86-video-i740/src/Makefile.am
index 6f084aa25..0e447b870 100644
--- a/driver/xf86-video-i740/src/Makefile.am
+++ b/driver/xf86-video-i740/src/Makefile.am
@@ -29,6 +29,7 @@ i740_drv_la_LDFLAGS = -module -avoid-version
i740_drv_ladir = @moduledir@/drivers
i740_drv_la_SOURCES = \
+ compat-api.h \
i740_accel.c \
i740_cursor.c \
i740_dga.c \
diff --git a/driver/xf86-video-i740/src/Makefile.in b/driver/xf86-video-i740/src/Makefile.in
index 9e5906faa..280348fb6 100644
--- a/driver/xf86-video-i740/src/Makefile.in
+++ b/driver/xf86-video-i740/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.2 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,103 @@ 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)$(i740_drv_ladir)"
-i740_drv_laLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(i740_drv_la_LTLIBRARIES)
i740_drv_la_LIBADD =
am_i740_drv_la_OBJECTS = i740_accel.lo i740_cursor.lo i740_dga.lo \
i740_driver.lo i740_i2c.lo i740_io.lo i740_video.lo
i740_drv_la_OBJECTS = $(am_i740_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 =
+i740_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(i740_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 = $(i740_drv_la_SOURCES)
DIST_SOURCES = $(i740_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,6 +203,7 @@ FGREP = @FGREP@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
+INSTALL = @INSTALL@
INSTALL_CMD = @INSTALL_CMD@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
@@ -150,13 +220,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@
@@ -168,6 +237,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@
@@ -183,13 +253,13 @@ VERSION = @VERSION@
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@
@@ -201,6 +271,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@
@@ -229,8 +300,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
@@ -242,6 +317,7 @@ i740_drv_la_LTLIBRARIES = i740_drv.la
i740_drv_la_LDFLAGS = -module -avoid-version
i740_drv_ladir = @moduledir@/drivers
i740_drv_la_SOURCES = \
+ compat-api.h \
i740_accel.c \
i740_cursor.c \
i740_dga.c \
@@ -263,14 +339,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 \
@@ -288,35 +364,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-i740_drv_laLTLIBRARIES: $(i740_drv_la_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(i740_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(i740_drv_ladir)"
- @list='$(i740_drv_la_LTLIBRARIES)'; for p in $$list; do \
+ @list='$(i740_drv_la_LTLIBRARIES)'; test -n "$(i740_drv_ladir)" || list=; \
+ list2=; for p in $$list; do \
if test -f $$p; then \
- f=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=install $(i740_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(i740_drv_ladir)/$$f'"; \
- $(LIBTOOL) --mode=install $(i740_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(i740_drv_ladir)/$$f"; \
+ list2="$$list2 $$p"; \
else :; fi; \
- done
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(i740_drv_ladir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(i740_drv_ladir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(i740_drv_ladir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(i740_drv_ladir)"; \
+ }
uninstall-i740_drv_laLTLIBRARIES:
@$(NORMAL_UNINSTALL)
- @set -x; list='$(i740_drv_la_LTLIBRARIES)'; for p in $$list; do \
- p=$(am__strip_dir) \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(i740_drv_ladir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(i740_drv_ladir)/$$p"; \
+ @list='$(i740_drv_la_LTLIBRARIES)'; test -n "$(i740_drv_ladir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(i740_drv_ladir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(i740_drv_ladir)/$$f"; \
done
clean-i740_drv_laLTLIBRARIES:
-test -z "$(i740_drv_la_LTLIBRARIES)" || rm -f $(i740_drv_la_LTLIBRARIES)
- @list='$(i740_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
-i740_drv.la: $(i740_drv_la_OBJECTS) $(i740_drv_la_DEPENDENCIES)
- $(LINK) -rpath $(i740_drv_ladir) $(i740_drv_la_LDFLAGS) $(i740_drv_la_OBJECTS) $(i740_drv_la_LIBADD) $(LIBS)
+ @list='$(i740_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}; \
+ }
+i740_drv.la: $(i740_drv_la_OBJECTS) $(i740_drv_la_DEPENDENCIES) $(EXTRA_i740_drv_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(i740_drv_la_LINK) -rpath $(i740_drv_ladir) $(i740_drv_la_OBJECTS) $(i740_drv_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -333,25 +417,25 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i740_video.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
@@ -359,82 +443,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
@@ -443,7 +544,7 @@ check: check-am
all-am: Makefile $(LTLIBRARIES)
installdirs:
for dir in "$(DESTDIR)$(i740_drv_ladir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -455,16 +556,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"
@@ -478,7 +585,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
@@ -486,18 +593,38 @@ dvi-am:
html: html-am
+html-am:
+
info: info-am
info-am:
install-data-am: install-i740_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
@@ -518,20 +645,25 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-i740_drv_laLTLIBRARIES uninstall-info-am
+uninstall-am: uninstall-i740_drv_laLTLIBRARIES
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-i740_drv_laLTLIBRARIES clean-libtool 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-i740_drv_laLTLIBRARIES install-info \
- install-info-am install-man 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-i740_drv_laLTLIBRARIES \
- uninstall-info-am
+ clean-i740_drv_laLTLIBRARIES clean-libtool 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-i740_drv_laLTLIBRARIES install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am 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-i740_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.
diff --git a/driver/xf86-video-i740/src/compat-api.h b/driver/xf86-video-i740/src/compat-api.h
new file mode 100644
index 000000000..6bc946fd6
--- /dev/null
+++ b/driver/xf86-video-i740/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-i740/src/i740.h b/driver/xf86-video-i740/src/i740.h
index 7da7ebc44..3723e57a0 100644
--- a/driver/xf86-video-i740/src/i740.h
+++ b/driver/xf86-video-i740/src/i740.h
@@ -43,9 +43,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "i740_reg.h"
#include "i740_macros.h"
+#ifdef HAVE_XAA_H
#include "xaa.h"
+#endif
#include "xf86Cursor.h"
+#include "compat-api.h"
/* Globals */
/* Memory mapped register access macros */
#define INREG8(addr) *(volatile CARD8 *)(pI740->MMIOBase + (addr))
@@ -106,7 +109,9 @@ typedef struct _I740Rec {
int HasSGRAM;
I740RegRec SavedReg;
I740RegRec ModeReg;
+#ifdef HAVE_XAA_H
XAAInfoRecPtr AccelInfoRec;
+#endif
xf86CursorInfoPtr CursorInfoRec;
FBAreaPtr CursorData;
CloseScreenProcPtr CloseScreen;
@@ -151,8 +156,8 @@ void I740SetPIOAccess(I740Ptr pI740);
void I740SetMMIOAccess(I740Ptr pI740);
void I740InitVideo(ScreenPtr pScreen);
-Bool I740SwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
-void I740AdjustFrame(int scrnIndex, int x, int y, int flags);
+Bool I740SwitchMode(SWITCH_MODE_ARGS_DECL);
+void I740AdjustFrame(ADJUST_FRAME_ARGS_DECL);
Bool I740_I2CInit(ScrnInfoPtr pScrn);
diff --git a/driver/xf86-video-i740/src/i740_accel.c b/driver/xf86-video-i740/src/i740_accel.c
index 81c7565a6..de06e07ab 100644
--- a/driver/xf86-video-i740/src/i740_accel.c
+++ b/driver/xf86-video-i740/src/i740_accel.c
@@ -44,12 +44,12 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86Pci.h"
#include "xf86PciInfo.h"
-#include "xaa.h"
#include "vgaHW.h"
#include "xf86xv.h"
#include "i740.h"
+#ifdef HAVE_XAA_H
static unsigned int i740Rop[16] = {
0x00, /* GXclear */
0x88, /* GXand */
@@ -115,6 +115,7 @@ static void I740SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
int x, int y, int w, int h,
int skipleft);
#endif
+#endif
/*
* The following function sets up the supported acceleration. Call it
* from the FbInit() function in the SVGA driver, or before ScreenInit
@@ -122,8 +123,9 @@ static void I740SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
*/
Bool
I740AccelInit(ScreenPtr pScreen) {
+#ifdef HAVE_XAA_H
XAAInfoRecPtr infoPtr;
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
I740Ptr pI740 = I740PTR(pScrn);
pI740->AccelInfoRec = infoPtr = XAACreateInfoRec();
@@ -192,8 +194,13 @@ I740AccelInit(ScreenPtr pScreen) {
#endif
#endif
return XAAInit(pScreen, infoPtr);
+#else
+ return FALSE;
+#endif
}
+#ifdef HAVE_XAA_H
+
static void
I740SyncPIO(ScrnInfoPtr pScrn) {
WAIT_ENGINE_IDLE_PIO();
@@ -396,3 +403,5 @@ I740SubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn, int x, int y,
OUTREG(LP_FIFO, (h << 16) | (w * pI740->cpp));
}
#endif
+
+#endif
diff --git a/driver/xf86-video-i740/src/i740_cursor.c b/driver/xf86-video-i740/src/i740_cursor.c
index b61fc5ba8..8c8cc8f21 100644
--- a/driver/xf86-video-i740/src/i740_cursor.c
+++ b/driver/xf86-video-i740/src/i740_cursor.c
@@ -61,7 +61,7 @@ I740CursorInit(ScreenPtr pScreen)
xf86CursorInfoPtr infoPtr;
FBAreaPtr fbarea;
- pScrn = xf86Screens[pScreen->myNum];
+ pScrn = xf86ScreenToScrn(pScreen);
pI740 = I740PTR(pScrn);
pI740->CursorInfoRec = infoPtr = xf86CreateCursorInfoRec();
if (!infoPtr) return FALSE;
@@ -117,7 +117,7 @@ I740UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) {
ScrnInfoPtr pScrn;
I740Ptr pI740;
- pScrn = xf86Screens[pScreen->myNum];
+ pScrn = xf86ScreenToScrn(pScreen);
pI740 = I740PTR(pScrn);
if (pScrn->currentMode->Flags&V_DBLSCAN)
return FALSE;
diff --git a/driver/xf86-video-i740/src/i740_dga.c b/driver/xf86-video-i740/src/i740_dga.c
index 8fac94614..532d614ee 100644
--- a/driver/xf86-video-i740/src/i740_dga.c
+++ b/driver/xf86-video-i740/src/i740_dga.c
@@ -30,11 +30,12 @@
#include "xf86_OSproc.h"
#include "xf86Pci.h"
#include "xf86PciInfo.h"
-#include "xaa.h"
-#include "xaalocal.h"
#include "vgaHW.h"
#include "xf86xv.h"
#include "i740.h"
+#ifdef HAVE_XAA_H
+#include "xaalocal.h"
+#endif
#include "dgaproc.h"
#include "i740_dga.h"
@@ -43,12 +44,13 @@ static Bool I740_SetMode(ScrnInfoPtr, DGAModePtr);
static void I740_Sync(ScrnInfoPtr);
static int I740_GetViewport(ScrnInfoPtr);
static void I740_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
static void I740_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void I740_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
#if 0
static void I740_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long);
#endif
-
+#endif
static DGAFunctionRec I740DGAFuncs = {
I740_OpenFramebuffer,
NULL,
@@ -56,6 +58,7 @@ static DGAFunctionRec I740DGAFuncs = {
I740_SetViewport,
I740_GetViewport,
I740_Sync,
+#ifdef HAVE_XAA_H
I740_FillRect,
I740_BlitRect,
#if 0
@@ -63,11 +66,14 @@ static DGAFunctionRec I740DGAFuncs = {
#else
NULL
#endif
+#else
+ NULL, NULL, NULL
+#endif
};
Bool I740DGAInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
I740Ptr pI740 = I740PTR(pScrn);
DGAModePtr modes = NULL, newmodes = NULL, currentMode;
DisplayModePtr pMode, firstMode;
@@ -91,8 +97,10 @@ Bool I740DGAInit(ScreenPtr pScreen)
currentMode->mode = pMode;
currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE;
+#ifdef HAVE_XAA_H
if(pI740->AccelInfoRec)
currentMode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
+#endif
if(pMode->Flags & V_DBLSCAN)
currentMode->flags |= DGA_DOUBLESCAN;
if(pMode->Flags & V_INTERLACE)
@@ -145,8 +153,8 @@ static Bool I740_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
if(!pMode) { /* restore the original mode */
if(pI740->DGAactive) {
pScrn->currentMode = I740SavedDGAModes[index];
- I740SwitchMode(index, pScrn->currentMode, 0);
- I740AdjustFrame(index, 0, 0, 0);
+ I740SwitchMode(SWITCH_MODE_ARGS(pScrn, pScrn->currentMode));
+ I740AdjustFrame(ADJUST_FRAME_ARGS(pScrn, 0, 0));
pI740->DGAactive = FALSE;
}
} else {
@@ -155,7 +163,7 @@ static Bool I740_SetMode(ScrnInfoPtr pScrn, DGAModePtr pMode)
pI740->DGAactive = TRUE;
}
- I740SwitchMode(index, pMode->mode, 0);
+ I740SwitchMode(SWITCH_MODE_ARGS(pScrn, pMode->mode));
}
return TRUE;
@@ -173,7 +181,7 @@ static void I740_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
I740Ptr pI740 = I740PTR(pScrn);
vgaHWPtr hwp = VGAHWPTR(pScrn);
- I740AdjustFrame(pScrn->pScreen->myNum, x, y, flags);
+ I740AdjustFrame(ADJUST_FRAME_ARGS(pScrn, x, y));
/* wait for retrace */
while((hwp->readST01(hwp) & 0x08));
@@ -182,6 +190,7 @@ static void I740_SetViewport(ScrnInfoPtr pScrn, int x, int y, int flags)
pI740->DGAViewportStatus = 0;
}
+#ifdef HAVE_XAA_H
static void I740_FillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, unsigned long color)
{
I740Ptr pI740 = I740PTR(pScrn);
@@ -219,7 +228,7 @@ static void I740_BlitRect(
SET_SYNC_FLAG(pI740->AccelInfoRec);
}
}
-
+#endif
#if 0
static void I740_BlitTransRect(ScrnInfoPtr pScrn,
int srcx, int srcy,
diff --git a/driver/xf86-video-i740/src/i740_driver.c b/driver/xf86-video-i740/src/i740_driver.c
index d819ad934..1c8219885 100644
--- a/driver/xf86-video-i740/src/i740_driver.c
+++ b/driver/xf86-video-i740/src/i740_driver.c
@@ -107,25 +107,25 @@ static Bool I740Probe(DriverPtr drv, int flags);
static Bool I740PreInit(ScrnInfoPtr pScrn, int flags);
/* Initialize a screen */
-static Bool I740ScreenInit(int Index, ScreenPtr pScreen, int argc, char **argv);
+static Bool I740ScreenInit(SCREEN_INIT_ARGS_DECL);
/* Enter from a virtual terminal */
-static Bool I740EnterVT(int scrnIndex, int flags);
+static Bool I740EnterVT(VT_FUNC_ARGS_DECL);
/* Leave to a virtual terminal */
-static void I740LeaveVT(int scrnIndex, int flags);
+static void I740LeaveVT(VT_FUNC_ARGS_DECL);
/* Close down each screen we initialized */
-static Bool I740CloseScreen(int scrnIndex, ScreenPtr pScreen);
+static Bool I740CloseScreen(CLOSE_SCREEN_ARGS_DECL);
/* Change screensaver state */
static Bool I740SaveScreen(ScreenPtr pScreen, int mode);
/* Cleanup server private data */
-static void I740FreeScreen(int scrnIndex, int flags);
+static void I740FreeScreen(FREE_SCREEN_ARGS_DECL);
/* Check if a mode is valid on the hardware */
-static ModeStatus I740ValidMode(int scrnIndex, DisplayModePtr mode,
+static ModeStatus I740ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode,
Bool verbose, int flags);
/* Switch to various Display Power Management System levels */
@@ -675,7 +675,7 @@ I740PreInit(ScrnInfoPtr pScrn, int flags) {
if (I740_I2CInit(pScrn))
{
xf86MonPtr MonInfo;
- if ((MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex,pI740->rc_i2c))) {
+ if ((MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn),pI740->rc_i2c))) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "DDC Monitor info: %p\n",
MonInfo);
xf86PrintEDID( MonInfo );
@@ -1471,13 +1471,13 @@ I740LoadPalette24(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors,
}
static Bool
-I740ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
+I740ScreenInit(SCREEN_INIT_ARGS_DECL) {
ScrnInfoPtr pScrn;
vgaHWPtr hwp;
I740Ptr pI740;
VisualPtr visual;
- pScrn = xf86Screens[pScreen->myNum];
+ pScrn = xf86ScreenToScrn(pScreen);
pI740 = I740PTR(pScrn);
hwp = VGAHWPTR(pScrn);
@@ -1494,7 +1494,7 @@ I740ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
if (!I740ModeInit(pScrn, pScrn->currentMode)) return FALSE;
I740SaveScreen(pScreen, SCREEN_SAVER_ON);
- I740AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ I740AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
miClearVisualTypes();
@@ -1515,7 +1515,7 @@ I740ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
return FALSE;
break;
default:
- xf86DrvMsg(scrnIndex, X_ERROR,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Internal error: invalid bpp (%d) in I740ScrnInit\n",
pScrn->bitsPerPixel);
return FALSE;
@@ -1608,20 +1608,17 @@ I740ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) {
}
Bool
-I740SwitchMode(int scrnIndex, DisplayModePtr mode, int flags) {
- ScrnInfoPtr pScrn;
-
- pScrn=xf86Screens[scrnIndex];
+I740SwitchMode(SWITCH_MODE_ARGS_DECL) {
+ SCRN_INFO_PTR(arg);
return I740ModeInit(pScrn, mode);
}
void
-I740AdjustFrame(int scrnIndex, int x, int y, int flags) {
- ScrnInfoPtr pScrn;
+I740AdjustFrame(ADJUST_FRAME_ARGS_DECL) {
+ SCRN_INFO_PTR(arg);
int Base;
vgaHWPtr hwp;
- pScrn = xf86Screens[scrnIndex];
hwp = VGAHWPTR(pScrn);
Base = (y * pScrn->displayWidth + x) >> 2;
@@ -1652,34 +1649,32 @@ I740AdjustFrame(int scrnIndex, int x, int y, int flags) {
}
static Bool
-I740EnterVT(int scrnIndex, int flags) {
- ScrnInfoPtr pScrn;
+I740EnterVT(VT_FUNC_ARGS_DECL) {
+ SCRN_INFO_PTR(arg);
- pScrn = xf86Screens[scrnIndex];
if (!I740ModeInit(pScrn, pScrn->currentMode)) return FALSE;
- I740AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0);
+ I740AdjustFrame(ADJUST_FRAME_ARGS(pScrn, pScrn->frameX0, pScrn->frameY0));
return TRUE;
}
static void
-I740LeaveVT(int scrnIndex, int flags) {
- ScrnInfoPtr pScrn;
+I740LeaveVT(VT_FUNC_ARGS_DECL) {
+ SCRN_INFO_PTR(arg);
vgaHWPtr hwp;
- pScrn = xf86Screens[scrnIndex];
hwp=VGAHWPTR(pScrn);
I740Restore(pScrn);
vgaHWLock(hwp);
}
static Bool
-I740CloseScreen(int scrnIndex, ScreenPtr pScreen)
+I740CloseScreen(CLOSE_SCREEN_ARGS_DECL)
{
ScrnInfoPtr pScrn;
vgaHWPtr hwp;
I740Ptr pI740;
- pScrn = xf86Screens[scrnIndex];
+ pScrn = xf86ScreenToScrn(pScreen);
hwp = VGAHWPTR(pScrn);
pI740 = I740PTR(pScrn);
@@ -1690,30 +1685,34 @@ I740CloseScreen(int scrnIndex, ScreenPtr pScreen)
I740UnmapMem(pScrn);
vgaHWUnmapMem(pScrn);
+#ifdef HAVE_XAA_H
if (pI740->AccelInfoRec)
XAADestroyInfoRec(pI740->AccelInfoRec);
pI740->AccelInfoRec=0;
+#endif
if (pI740->CursorInfoRec)
xf86DestroyCursorInfoRec(pI740->CursorInfoRec);
pI740->CursorInfoRec=0;
pScrn->vtSema=FALSE;
pScreen->CloseScreen = pI740->CloseScreen;
- return (*pScreen->CloseScreen)(scrnIndex, pScreen);
+ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS);
}
static void
-I740FreeScreen(int scrnIndex, int flags) {
- I740FreeRec(xf86Screens[scrnIndex]);
+I740FreeScreen(FREE_SCREEN_ARGS_DECL) {
+ SCRN_INFO_PTR(arg);
+ I740FreeRec(pScrn);
if (xf86LoaderCheckSymbol("vgaHWFreeHWRec"))
- vgaHWFreeHWRec(xf86Screens[scrnIndex]);
+ vgaHWFreeHWRec(pScrn);
}
static ModeStatus
-I740ValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags) {
+I740ValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
+ SCRN_INFO_PTR(arg);
if (mode->Flags & V_INTERLACE) {
if (verbose) {
- xf86DrvMsg(scrnIndex, X_PROBED,
+ xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Removing interlaced mode \"%s\"\n",
mode->name);
}
diff --git a/driver/xf86-video-i740/src/i740_video.c b/driver/xf86-video-i740/src/i740_video.c
index ca60dedb2..fc2d137c3 100644
--- a/driver/xf86-video-i740/src/i740_video.c
+++ b/driver/xf86-video-i740/src/i740_video.c
@@ -67,8 +67,6 @@
#include "xf86xv.h"
#include <X11/extensions/Xv.h>
-#include "xaa.h"
-#include "xaalocal.h"
#include "dixstruct.h"
#include "fourcc.h"
@@ -600,7 +598,7 @@ static FBLinearPtr I740AllocateMemory(ScrnInfoPtr pScrn, FBLinearPtr linear, int
xf86FreeOffscreenLinear(linear);
}
- pScreen = screenInfo.screens[pScrn->scrnIndex];
+ pScreen = xf86ScrnToScreen(pScrn);
new_linear = xf86AllocateOffscreenLinear(pScreen, size, 4, NULL, NULL, NULL);
@@ -830,10 +828,10 @@ static int I740QueryImageAttributes(ScrnInfoPtr pScrn, int id, unsigned short *w
return size;
}
-static void I740BlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask)
+static void I740BlockHandler(BLOCKHANDLER_ARGS_DECL)
{
- ScreenPtr pScreen = screenInfo.screens[i];
- ScrnInfoPtr pScrn = xf86Screens[i];
+ SCREEN_PTR(arg);
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
I740Ptr pI740 = I740PTR(pScrn);
I740PortPrivPtr pPriv = GET_PORT_PRIVATE(pScrn);
@@ -841,7 +839,7 @@ static void I740BlockHandler(int i, pointer blockData, pointer pTimeout, pointer
pScreen->BlockHandler = pI740->BlockHandler;
- (*pScreen->BlockHandler) (i, blockData, pTimeout, pReadmask);
+ (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS);
pScreen->BlockHandler = I740BlockHandler;
@@ -1124,7 +1122,7 @@ static void I740InitOffscreenImages(ScreenPtr pScreen)
{
XF86OffscreenImagePtr offscreenImages;
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "I740InitOffscreenImages entered\n"); /* ### */
}
@@ -1171,7 +1169,7 @@ static XF86VideoAdaptorPtr I740SetupImageVideo(ScreenPtr pScreen)
{15, TrueColor}, {16, TrueColor}, {24, TrueColor}, {8, PseudoColor}
};
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
I740Ptr pI740 = I740PTR(pScrn);
XF86VideoAdaptorPtr adapt;
I740PortPrivPtr pPriv;
@@ -1240,7 +1238,7 @@ static XF86VideoAdaptorPtr I740SetupImageVideo(ScreenPtr pScreen)
void I740InitVideo(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
XF86VideoAdaptorPtr newAdaptor = NULL;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "I740InitVideo entered\n"); /* ### */