diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-12-16 23:04:19 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-12-16 23:04:19 +0000 |
commit | e04fd7d8357e76c4d3ddbf872029a5db170c2487 (patch) | |
tree | 3cb5381b211255409a68a427a6e0284c67fc04bb /driver | |
parent | 2b459fdd6e5cca9c9094bae17f2165fe21175db1 (diff) |
Update to xf86-video-geode 2.11.14
Diffstat (limited to 'driver')
106 files changed, 19520 insertions, 20895 deletions
diff --git a/driver/xf86-video-geode/ChangeLog b/driver/xf86-video-geode/ChangeLog index da33ff616..0e08c5186 100644 --- a/driver/xf86-video-geode/ChangeLog +++ b/driver/xf86-video-geode/ChangeLog @@ -1,3 +1,249 @@ +commit a96a4e28a079499b18b441f0b6c05c50dd86ead6 +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Sun Nov 25 11:12:58 2012 +0200 + + Geode 2.11.14 + + This release restores compatibility with xserver-1.13, cairo-1.12 and gtk-3: + + * Fix building with new xserver-1.13 (Maarten Lankhorst) + + Implement xserver-1.13 API changes. + + Make XAA support optional (dropped as of xserver-1.13). + * Implement solid source pictures acceleration for cairo-1.12 (Mart Raudsepp) + * Fix EXA Composite implementation in the LX component (Mart Raudsepp) + Restores icon and text rendering for GNOME 3 fallback mode. + + This release also improves compatibility with non-Linux/non-32-bit hardware: + * Fix compiling on 64-bit hosts (Dave Airlie) + * Fix compiling on non-Linux platforms (Martin-Éric Racine) + + VALIDATION PLATFORMS + * Debian (X server 1.7.7) on Artec DBE61. + * Debian (X server 1.12.14) on FIC ION603A. + * Fedora (X server 1.13) on OLPC XO-1. + +commit cec433840fde8be3ee6b8ce916b416f44d15a794 +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Sat Nov 24 12:02:32 2012 +0200 + + pre-release whitespace cleanup using ../modular/x-indent-all.sh + +commit 4e6f1e68344d52cd80f85843a2a9830add042a34 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Nov 20 09:14:31 2012 +0200 + + NEWS: Release notes for 2.11.14 + +commit a02c099af60c96b440edcc2b0afbd0be0b349ee8 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Nov 20 08:30:13 2012 +0200 + + NEWS: Fix placement order of 2.11.10 NEWS compared to others + +commit 45ca66ee73bfe04a7ac17e2086f2e5d20bfa93e9 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Sat Nov 17 23:51:39 2012 +0200 + + lx_exa: Improvements to negative srcX/Y PictOpSrc/Over operations + + Adds handling of negative srcX or srcY coordinates, which is used by gtk3 + GtkTrayIcon implementation via cairo for centering icons on top of the + destination area. + + For now just handle the drawing within source pixmap bounds in these + cases, as full handling of the out of bound zero-vector for PictOpSrc + seems to require bigger refactoring, which is not suitable for the + impending stable release. + The approach implemented here should result in correct rendering for + PictOpOver (as out of bounds with non-repeat mode ends up meaning + transparency). For PictOpSrc no black borders are rendered where + appropriate, but before this approach, no source pixmap would even be + rendered at all, so it should be a net improvement for the upcoming + release, while fixing the gtk3 icons in GNOME3 fallback. + + The completely out of bounds special case check didn't work correctly for + negative srcX or srcY because exaScratch.srcWidth/Height are unsigned + types, so the negative srcX or srcY got casted to unsigned, which resulted + in a big number, so srcX >= 0 was always true (but GCC managed to not warn + of the implicit signedness cast). + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=51360 + +commit a46486b05f4674fc17f36947c97bc281c1d00d26 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Oct 23 11:40:11 2012 +0300 + + lx_exa: Implement solid pictures support as source with a mask + + cairo-1.12 uses solid pictures instead of 1x1R pixmaps in glyph rendering + paths, so accelerate it. + In addition to acceleration, it avoids a bug in xserver-1.13.0 and earlier + which causes visible misrendering for fallback path, making cairo-1.12 a + viable and desired choice on GeodeLX systems. + Quick benchmarking suggests a 4-12% win in cairo-traces. + +commit 85f25321661b24324d9e8fb6415abc0fda12436d +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Oct 23 11:35:18 2012 +0300 + + lx_exa: Remove unused srcPixmap member from exaScratch + + Became redundant with commit 32a927b8e6 + +commit 5cfd7591b2f6ccb57d698738faa3fa800088f972 +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Tue Oct 2 18:05:55 2012 +0300 + + Clarified the copyright and license of src/geode_msr.c src/geode_blend.h + + Debian's 'licensecheck' tool showed these two files to have unspecified + copyright and license. Git log clarifies that these had been created by + Jordan Crouse when he was still at AMD, so their stock copyright notice + was copied as-is from other files in src/ + +commit 65d9954ef61b7e22252d38cc81db710a8ec0b22b +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Sep 18 08:43:51 2012 +0300 + + lx_exa: Downgrade src/dst format warnings to fallbacks to not spam the log + + We don't support 10bit wide color channels, BGRA and other types, which mainly + cause these fallbacks. The ErrorF's were unwarranted, these are just fallbacks + as any other, so don't output these warnings without GEODE_TRACE_FALL. + +commit 5f7797cadeaf8a28612b9d0c394f8507eb687c34 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Tue Sep 18 08:41:53 2012 +0300 + + lx_exa: Fix crash with solid fills on PictOpAdd operations + + lx_check_composite has many special checks for PictOpAdd to return + successfully early, but these were done even earlier than the check + for solid fills. This resulted in lx_prepare_composite assuming + the source pixmap exists, which is not the case with solid fills. + Move the solid fill fallback checks before the others, so we are + guaranteed to always have a source pixmap in PrepareComposite and + Composite and don't crash trying to access a NULL pointer. + + Also move up the mask check to do less checks in the PictOpAdd logic. + +commit 4a20e8ac285cfe8a033f771ac8df25f873db9908 +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Wed Aug 29 12:53:00 2012 +0300 + + NEWS: add information about releases since 2.11.9 + + ...and flip the location of the recent src/Makefile.am addition. + +commit 0e64b1252c51e380f72f6ff0bdb6836a6e27071d +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Thu Aug 9 18:59:03 2012 +0300 + + src/Makefile.am: added missing compat-api.h to geode_drv_la_SOURCES + +commit 86a879a1ec9771c45b0bffb18f7fd13854b1e84a +Author: Mart Raudsepp <leio@gentoo.org> +Date: Thu Jul 26 10:28:22 2012 +0300 + + configure: Make the new XAA checks work, and other improvements + + commit 68646c31 added XAA checks were too early, when XORG_CFLAGS isn't + declared yet, so it got never enabled. Move the block after xorg-server + pkg-config checks, which declare XORG_CFLAGS. + Change configure to fail if --enable-xaa is explicitly requested, but + XAA headers are not found. + Other tweaks for more autoconf-ism. + + Signed-off-by: Mart Raudsepp <leio@gentoo.org> + +commit a83fcb6f84995dc50b8adffc27e264a663fbd606 +Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> +Date: Sat Jul 21 12:36:51 2012 +0200 + + Initial stab at converting geode to new X1.13 API + + Preparing to compile geode on X 1.13 + All compiler errors are gone as far as I can tell, + but I lack the hardware to verify it works as well. + +commit 68646c3119a69a8391a49f2d565672d73829e2c9 +Author: Maarten Lankhorst <maarten.lankhorst@canonical.com> +Date: Sat Jul 21 12:36:17 2012 +0200 + + Allow building on Xservers without XAA + +commit cb0e67bbc019b170194b3b51e2a47fca8d3aeac1 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Wed Jul 25 07:23:35 2012 +0300 + + lx_exa: Fix EXA minor version checks + + The old version of just checking for EXA_MINOR_VERSION >= 2 would + stop working if ever EXA gets a new major version, as minor would be + reset to 0, and start unexpectedly working again when minor gets bumped + gradually up to 2 again. + Other drivers also assume that a new major would still have the vfunc we use. + +commit dc0dbd41745f99dcd9ca3fda05acf5a5f11a6960 +Author: Mart Raudsepp <leio@gentoo.org> +Date: Wed Jul 25 04:44:18 2012 +0300 + + Fix an unused variable warning in geode_driver.c + + geode_driver.c:372:9: warning: variable 'cpu_detected' set but not used [-Wunused-but-set-variable] + Was used only in a DEBUGMSG, which has since been made not do anything ever, so just kill + it completely, as the debug message wasn't useful anyway. + +commit 1ed67d70ac9d3afd9b372c311aaf7b77e38b3e21 +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Wed Jul 11 15:50:28 2012 +0300 + + Whitespace cleanup using ../modular/x-indent.sh + +commit b9afafec0a26eaec49e7f0ff08297c2bb795a9c2 +Author: Dave Airlie <airlied@redhat.com> +Date: Tue Apr 3 11:08:09 2012 +0100 + + geode: fix compile on x86-64 in tinderbox. + + geode_ddc.c: In function 'GeodeI2CInit': + geode_ddc.c:158: error: cast to pointer from integer of different size + + Signed-off-by: Dave Airlie <airlied@redhat.com> + +commit 048c67d6f351083741ef68e94a278a445c16436d +Author: Martin-Éric Racine <martin-eric.racine@iki.fi> +Date: Mon Jan 2 17:49:10 2012 +0200 + + z4l.c: drop unnecessary #include linux/types.h + + On hybrid platforms, such as Debian GNU/KFreeBSD, that support V4L2 + and yet without providing the full complement of Linux headers, ZTV + fails to compile because of this missing header. + + Given how removing this header does not adversely affect compiling, + plus it might improve portability, we went ahead and removed it. + + Nonetheless, as observed by Gaetan Nadon, z4l.c includes code that + explicitly disables the module on any OS other than Linux: + + LoaderGetOS(&osname, NULL, NULL, NULL); + + if (osname == NULL || strcmp(osname, "linux") != 0) { + if (errmaj) + *errmaj = LDR_BADOS; + if (errmin) + *errmin = 0; + + return NULL; + } + + Still, in the interest of OS neutrality, we decided to leave recent + autoconf magic in place and to let OS vendors figure out how to get + the module loaded on non-Linux OS themselves. Patches are welcome. + + Signed-off-by: Martin-Éric Racine <martin-eric.racine@iki.fi> + commit e420d7956afceeb41f20179cedc28d46aebdb29f Author: Martin-Éric Racine <martin-eric.racine@iki.fi> Date: Mon Dec 26 22:13:22 2011 +0200 diff --git a/driver/xf86-video-geode/Makefile.in b/driver/xf86-video-geode/Makefile.in index f3d26567c..40d7727eb 100644 --- a/driver/xf86-video-geode/Makefile.in +++ b/driver/xf86-video-geode/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. @@ -33,18 +33,32 @@ # ADAM JACKSON 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. -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 = : @@ -55,47 +69,101 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure COPYING ChangeLog INSTALL NEWS TODO \ config.guess config.sub depcomp install-sh ltmain.sh missing -subdir = . 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) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(SHELL) $(install_sh) -d + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +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 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best +DIST_TARGETS = dist-bzip2 dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print 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@ @@ -106,8 +174,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ -BUILD_ZTV_FALSE = @BUILD_ZTV_FALSE@ -BUILD_ZTV_TRUE = @BUILD_ZTV_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -132,6 +198,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@ @@ -149,13 +216,12 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M32_CFLAGS = @M32_CFLAGS@ 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@ @@ -167,6 +233,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@ PANEL_CPPFLAGS = @PANEL_CPPFLAGS@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -185,11 +252,13 @@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ +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 +270,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 +299,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@ SUBDIRS = src MAINTAINERCLEANFILES = ChangeLog INSTALL EXTRA_DIST = autogen.sh @@ -238,21 +312,21 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ @@ -268,21 +342,20 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) + $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ @@ -296,17 +369,16 @@ clean-libtool: -rm -rf .libs _libs distclean-libtool: - -rm -f libtool -uninstall-info-am: + -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -315,7 +387,11 @@ $(RECURSIVE_TARGETS): done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -323,51 +399,23 @@ $(RECURSIVE_TARGETS): else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -375,14 +423,14 @@ ID: $(HEADERS) $(SOURCES) $(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: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ @@ -394,83 +442,124 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(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: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(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" + +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist-recursive cscopelist + +cscopelist: cscopelist-recursive $(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 + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - @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; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @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 - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -478,35 +567,44 @@ distdir: $(DISTFILES) $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -514,24 +612,31 @@ dist dist-all: distdir distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -552,14 +657,24 @@ distcheck: dist && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -590,16 +705,22 @@ install-am: all-am installcheck: installcheck-recursive 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" @@ -621,18 +742,38 @@ dvi-am: html: html-recursive +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -653,24 +794,29 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-libtool clean-recursive \ - ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ - dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-libtool \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck 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-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ - tags tags-recursive uninstall uninstall-am uninstall-info-am +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool cscope cscopelist \ + cscopelist-recursive ctags ctags-recursive dist dist-all \ + dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck 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-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am .PHONY: ChangeLog INSTALL @@ -682,6 +828,7 @@ ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL + # 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-geode/NEWS b/driver/xf86-video-geode/NEWS index 1b50f882e..088f9f3cd 100644 --- a/driver/xf86-video-geode/NEWS +++ b/driver/xf86-video-geode/NEWS @@ -1,3 +1,91 @@ +Geode 2.11.14 (2012-11-25) +========================== +Better compatibility with xserver-1.13, cairo-1.12 and gtk3: + + * Fix building on Xservers without XAA (Maarten Lankhorst) + xserver-1.13 dropped XAA acceleration method, as it does not accel + anything important used on modern desktops. + The geode driver now supports configuring whether to include XAA + support - by default it is automatically disabled with newest + xservers that do not support it, but can be explicitly disabled for + older xservers as well if desired (particularly for LX deployments). + XAA support remains in place for the time being for older xservers, + as the EXA support for GX2 GPUs is of unknown quality and speed. + + * Fix building with new xserver-1.13 API (Maarten Lankhorst) + xserver-1.13 changed API, including moving various global symbols + behind function calls, to better support multiple switchable graphics + cards and hotplugged (USB) graphics cards. Work done to support both + pre-1.13 and 1.13+ APIs in other drivers is reused to bring the same + support to the Geode driver. + + * Implement solid source pictures acceleration (Mart Raudsepp) + cairo-1.12 uses these extensively for text rendering, instead of 1x1 + repeating images that cairo-1.10 used and we already accelerate. + Without acceleration, in addition to being slow, we'd hit a fallback + handling bug in EXA with xserver older than 1.13.1, which results in + very visible text corruption in many instances. + + * Handle negative srcX and srcY parameters better in EXA Composite + operations, used via the RENDER extension (Mart Raudsepp) + Handling of source picture coordinates outside actual source pixmap + area is still subpar and ignoring spec in some corner cases, but + a more specific case is improved to provide correct results in more + situations. In particular this fixes GtkTrayIcon drawing via cairo as + used by gtk3, specifically as seen in GNOME3 fallback desktop. + Previously no icon was drawn at all if the icon needed centering to the + drawing area, which in the end is achieved via a negative srcX/srcY. + https://bugs.freedesktop.org/show_bug.cgi?id=51360 + + * Fix builds for exotic and/or non-target platforms (Dave Airlie) + + * Clarify the copyright of older AMD commits (Martin-Éric Racine) + +VALIDATION PLATFORMS + * Debian (X server 1.7.7) on Artec DBE61 and Hercules EC-800. + * Debian (X server 1.12.14) on FIC ION603A. + * Fedora (X server 1.13) on OLPC XO-1. + +Geode 2.11.13 (2011-12-26) +========================== +This release mainly features a complete overhaul of the building scripts plus +a cleanup of deprecated macros. The key benefit is that this Geode driver can +finally build on FreeBSD and on other platforms not offering V4L2 support and +that it can also build on a 64-bit host using its 32-bit personality. + +Support for the Video Input Port (VIP) feature of the Geode LX found in 'ztv' +is now documented and the source code saw the removal of deprecated Linux 2.4 +backward compatibility code. Compiling is skipped on platforms without V4L2. + +Configuration for laptops featuring WXGA resolutions is finally documented. + +Setting the GEODE_TRACE_FALL macro now enables composite operation tracing on +this driver. This can be used to profile the performance during development. + +Fixes to keep this driver compilable on recent X servers are also included. + +VALIDATION PLATFORMS +* Debian (X server 1.7.7) on Artec DBE61 and Hercules EC-800. +* Ubuntu (X server 1.10.4) on FIC ION603A. + +Geode 2.11.12 (2011-02-13) +========================== +This release drops the "linux/videodev.h" include in z4l.c because +V4L1 support was dropped as of Linux kernel 2.6.38, and it fixes +packed overlay offscreen allocations. + +Geode 2.11.11 (2010-12-27) +========================== +This release restores code compatibility down to X server 1.4, it fixes +compilation under 1.9.99 and newer, and it improves handling of gamma +correction in video vs graphics + +Geode 2.11.10 (2010-11-09) +========================== +This release migrates deprecated xalloc/xrealloc/xfree/xcalloc calls +to malloc/realloc/free/calloc, fixes several DCON-specific issues, +improves mode validation and adds support for one WXGA resolution. + Geode 2.11.9 (2010-08-23) ========================= We are pleased to announce this maintenance release of xf86-video-geode. diff --git a/driver/xf86-video-geode/aclocal.m4 b/driver/xf86-video-geode/aclocal.m4 index d12baad45..c23695108 100644 --- a/driver/xf86-video-geode/aclocal.m4 +++ b/driver/xf86-video-geode/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- +# generated automatically by aclocal 1.12.3 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. # This file 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. @@ -11,6 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, @@ -8756,7 +8764,7 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8766,26 +8774,43 @@ fi[]dnl # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.12' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.12.3], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) +[AM_AUTOMAKE_VERSION([1.12.3])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -8804,7 +8829,7 @@ AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -8830,24 +8855,24 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file 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. -# serial 7 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' @@ -8861,17 +8886,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file 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. -# serial 8 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -8881,7 +8903,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -8894,11 +8916,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -8906,8 +8930,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -8925,6 +8950,16 @@ AC_CACHE_CHECK([dependency style of $depcc], if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -8936,34 +8971,49 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -8996,7 +9046,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -9006,69 +9056,85 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file 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. -#serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -9077,7 +9143,7 @@ done # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -9087,15 +9153,12 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file 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. -# serial 12 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -9111,16 +9174,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl +[AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi fi # test whether we have cygpath @@ -9136,48 +9203,85 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], +[$0: two- and three-arguments forms are deprecated. For more info, see: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +dnl Support for Objective C++ was only introduced in Autoconf 2.65, +dnl but we still cater to Autoconf 2.62. +m4_ifdef([AC_PROG_OBJCXX], +[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl ]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header @@ -9188,18 +9292,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX], # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. +_am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $1 | $1:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9210,17 +9315,22 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # # This file 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. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -9237,27 +9347,36 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file 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. -# serial 4 - +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl + AC_SUBST([MAINT])dnl ] ) @@ -9265,14 +9384,12 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file 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. -# serial 3 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -9280,7 +9397,7 @@ AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -9290,24 +9407,24 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -9317,15 +9434,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2012 Free Software Foundation, Inc. # # This file 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. -# serial 4 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -9333,112 +9447,54 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(SHELL) $(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file 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. -# serial 3 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- @@ -9446,7 +9502,150 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file 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. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# +# This file 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. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -9454,40 +9653,55 @@ AC_DEFUN([_AM_IF_OPTION], # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) +# Copyright (C) 2006-2012 Free Software Foundation, Inc. +# +# This file 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. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2012 Free Software Foundation, Inc. # # This file 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. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -9498,10 +9712,11 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) @@ -9509,7 +9724,7 @@ AC_MSG_CHECKING([how to create a $1 tar archive]) _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. +# Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in @@ -9609,7 +9824,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.16.1]) +m4_define([vers_have], [1.16.2]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -10628,6 +10843,39 @@ AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_unit_tests]) ]) # XORG_ENABLE_UNIT_TESTS +# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) +# ------------------------------------------------------ +# Minimum version: 1.17.0 +# +# This macro enables a builder to enable/disable integration testing +# It makes no assumption about the test cases' implementation +# Test cases may or may not use Automake "Support for test suites" +# +# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support +# usually requires less dependencies and may be built and run under less +# stringent environments than integration tests. +# +# Interface to module: +# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests +# enable_integration_tests: used in configure.ac for additional configuration +# --enable-integration-tests: 'yes' user instructs the module to build tests +# 'no' user instructs the module not to build tests +# parm1: specify the default value, yes or no. +# +AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ +AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) +m4_define([_defopt], m4_default([$1], [auto])) +AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], + [Enable building integration test cases (default: ]_defopt[)]), + [enable_integration_tests=$enableval], + [enable_integration_tests=]_defopt) +m4_undefine([_defopt]) +AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], + [test "x$enable_integration_tests" != xno]) +AC_MSG_CHECKING([whether to build unit test cases]) +AC_MSG_RESULT([$enable_integration_tests]) +]) # XORG_ENABLE_INTEGRATION_TESTS + # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.13.0 @@ -10638,6 +10886,10 @@ AC_MSG_RESULT([$enable_unit_tests]) # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # +# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit +# test support usually requires less dependencies and may be built and run under +# less stringent environments than integration tests. +# # Interface to module: # HAVE_GLIB: used in makefiles to conditionally build targets # with_glib: used in configure.ac to know if GLib has been found @@ -10996,12 +11248,20 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) # # Checks for various brands of compilers and sets flags as appropriate: # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" +# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" # clang compiler - sets CLANGCC to "yes" # Intel compiler - sets INTELCC to "yes" # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" # AC_DEFUN([XORG_COMPILER_BRAND], [ -AC_REQUIRE([AC_PROG_CC_C99]) +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + ], + [C++], [ + AC_REQUIRE([AC_PROG_CXX]) + ] +) AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) @@ -11021,54 +11281,77 @@ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) # -Werror=unused-command-line-argument # AC_DEFUN([XORG_TESTSET_CFLAG], [ -AC_REQUIRE([AC_PROG_CC_C99]) m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) -xorg_testset_save_CFLAGS="$CFLAGS" +AC_LANG_COMPILER_REQUIRE + +AC_LANG_CASE( + [C], [ + AC_REQUIRE([AC_PROG_CC_C99]) + define([PREFIX], [C]) + define([CACHE_PREFIX], [cc]) + define([COMPILER], [$CC]) + ], + [C++], [ + define([PREFIX], [CXX]) + define([CACHE_PREFIX], [cxx]) + define([COMPILER], [$CXX]) + ] +) -if test "x$xorg_testset_unknown_warning_option" = "x" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" - AC_MSG_CHECKING([if $CC supports -Werror=unknown-warning-option]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], - [xorg_testset_unknown_warning_option=yes], - [xorg_testset_unknown_warning_option=no]) - AC_MSG_RESULT([$xorg_testset_unknown_warning_option]) - CFLAGS="$xorg_testset_save_CFLAGS" +[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" + +if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) + [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" +if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then + if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - AC_MSG_CHECKING([if $CC supports -Werror=unused-command-line-argument]) - AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], - [xorg_testset_unused_command_line_argument=yes], - [xorg_testset_unused_command_line_argument=no]) - AC_MSG_RESULT([$xorg_testset_unused_command_line_argument]) - CFLAGS="$xorg_testset_save_CFLAGS" + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" + AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], + [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) + [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" + PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS ]flag[" + PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" - AC_MSG_CHECKING([if $CC supports ]flag[]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], - [supported=yes], [supported=no]) - AC_MSG_RESULT([$supported]) - CFLAGS="$xorg_testset_save_CFLAGS" +dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname + AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) + cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) + AC_CACHE_VAL($cacheid, + [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], + [eval $cacheid=yes], + [eval $cacheid=no])]) + + PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" + eval supported=\$$cacheid + AC_MSG_RESULT([$supported]) if test "$supported" = "yes" ; then $1="$$1 ]flag[" found="yes" @@ -11081,13 +11364,13 @@ m4_foreach([flag], m4_cdr($@), [ # --------------- # Minimum version: 1.16.0 # -# Defines BASE_CFLAGS to contain a set of command line arguments supported -# by the selected compiler which do NOT alter the generated code. These -# arguments will cause the compiler to print various warnings during -# compilation AND turn a conservative set of warnings into errors. +# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line +# arguments supported by the selected compiler which do NOT alter the generated +# code. These arguments will cause the compiler to print various warnings +# during compilation AND turn a conservative set of warnings into errors. # -# The set of flags supported by BASE_CFLAGS will grow in future -# versions of util-macros as options are added to new compilers. +# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in +# future versions of util-macros as options are added to new compilers. # AC_DEFUN([XORG_COMPILER_FLAGS], [ AC_REQUIRE([XORG_COMPILER_BRAND]) @@ -11098,76 +11381,88 @@ AC_ARG_ENABLE(selective-werror, [SELECTIVE_WERROR=$enableval], [SELECTIVE_WERROR=yes]) +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then - BASE_CFLAGS="-v" + [BASE_]PREFIX[FLAGS]="-v" else - BASE_CFLAGS="" + [BASE_]PREFIX[FLAGS]="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wall]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-arith]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wstrict-prototypes]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-prototypes]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-declarations]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnested-externs]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wbad-function-cast]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wformat=2], [-Wformat]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wold-style-definition]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdeclaration-after-statement]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) + +AC_LANG_CASE( + [C], [ + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) + XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) + ] +) # This chunk adds additional warnings that could catch undesired effects. -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wunused]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wuninitialized]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wshadow]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-qual]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-noreturn]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-format-attribute]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wredundant-decls]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op]) -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses]) -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # Turn some warnings into errors, so we don't accidently get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=nonnull]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=init-self]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=main]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=missing-braces]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=sequence-point]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=trigraphs]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=array-bounds]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=write-strings]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=address]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION else AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wimplicit]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wnonnull]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Winit-self]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmain]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wmissing-braces]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wsequence-point]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wreturn-type]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wtrigraphs]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Warray-bounds]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wwrite-strings]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Waddress]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wint-to-pointer-cast]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wpointer-to-int-cast]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) +XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) fi -AC_SUBST([BASE_CFLAGS]) +AC_SUBST([BASE_]PREFIX[FLAGS]) ]) # XORG_COMPILER_FLAGS # XORG_CWARNFLAGS @@ -11185,11 +11480,15 @@ AC_SUBST([BASE_CFLAGS]) AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_REQUIRE([XORG_COMPILER_BRAND]) -CWARNFLAGS="$BASE_CFLAGS" -if test "x$GCC" = xyes ; then - CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" -fi -AC_SUBST(CWARNFLAGS) +AC_LANG_CASE( + [C], [ + CWARNFLAGS="$BASE_CFLAGS" + if test "x$GCC" = xyes ; then + CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" + fi + AC_SUBST(CWARNFLAGS) + ] +) ]) # XORG_CWARNFLAGS # XORG_STRICT_OPTION @@ -11199,7 +11498,7 @@ AC_SUBST(CWARNFLAGS) # Add configure option to enable strict compilation flags, such as treating # warnings as fatal errors. # If --enable-strict-compilation is passed to configure, adds strict flags to -# $BASE_CFLAGS and the deprecated $CWARNFLAGS. +# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. # # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or # when strict compilation is unconditionally desired. @@ -11212,21 +11511,30 @@ AC_ARG_ENABLE(strict-compilation, [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) -STRICT_CFLAGS="" -XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-pedantic]) -XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror], [-errwarn]) +AC_LANG_CASE( + [C], [ + define([PREFIX], [C]) + ], + [C++], [ + define([PREFIX], [CXX]) + ] +) + +[STRICT_]PREFIX[FLAGS]="" +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. -XORG_TESTSET_CFLAG([STRICT_CFLAGS], [-Werror=attributes]) +XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) if test "x$STRICT_COMPILE" = "xyes"; then - BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" - CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" + [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" + AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) fi -AC_SUBST([STRICT_CFLAGS]) -AC_SUBST([BASE_CFLAGS]) -AC_SUBST([CWARNFLAGS]) +AC_SUBST([STRICT_]PREFIX[FLAGS]) +AC_SUBST([BASE_]PREFIX[FLAGS]) +AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) ]) # XORG_STRICT_OPTION # XORG_DEFAULT_OPTIONS diff --git a/driver/xf86-video-geode/config.guess b/driver/xf86-video-geode/config.guess index 917bbc50f..aa04f04bd 100755 --- a/driver/xf86-video-geode/config.guess +++ b/driver/xf86-video-geode/config.guess @@ -1,9 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2005-07-08' +timestamp='2012-06-17' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -16,9 +17,7 @@ timestamp='2005-07-08' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -26,16 +25,16 @@ timestamp='2005-07-08' # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner <per@bothner.com>. -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to <config-patches@gnu.org> and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -55,7 +54,8 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -106,7 +106,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -143,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -160,6 +160,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -168,7 +169,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -178,7 +179,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -199,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -206,8 +211,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; macppc:MirBSD:*:*) - echo powerppc-unknown-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} @@ -218,7 +226,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -264,7 +272,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -290,7 +301,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -319,14 +330,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -370,23 +400,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -456,8 +486,8 @@ EOF echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -470,7 +500,7 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -527,7 +557,7 @@ EOF echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[45]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -570,52 +600,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> + #define _HPUX_SOURCE + #include <stdlib.h> + #include <unistd.h> - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -635,7 +665,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -706,22 +736,22 @@ EOF exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -745,14 +775,14 @@ EOF exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -764,27 +794,48 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; - i*:MINGW*:*) + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -794,7 +845,7 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:*) + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) @@ -814,17 +865,68 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-gnu + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi + fi + exit ;; + avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -835,63 +937,33 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + padre:Linux:*:*) + echo sparc-unknown-linux-gnu exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level @@ -901,14 +973,17 @@ EOF *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -916,68 +991,18 @@ EOF sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <features.h> - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -985,11 +1010,11 @@ EOF echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1006,7 +1031,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1021,7 +1046,7 @@ EOF fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1049,10 +1074,13 @@ EOF exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1087,8 +1115,18 @@ EOF /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1101,7 +1139,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1121,10 +1159,10 @@ EOF echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm @@ -1150,11 +1188,11 @@ EOF exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1164,6 +1202,9 @@ EOF BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1173,6 +1214,15 @@ EOF SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; @@ -1182,7 +1232,16 @@ EOF *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in - *86) UNAME_PROCESSOR=i686 ;; + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1198,7 +1257,10 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1243,13 +1305,13 @@ EOF echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1261,6 +1323,15 @@ EOF i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1283,11 +1354,11 @@ main () #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif @@ -1421,9 +1492,9 @@ This script, last modified $timestamp, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD and - http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub + http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD If the version you run ($0) is already up to date, please send the following data and any information you think might be diff --git a/driver/xf86-video-geode/config.h.in b/driver/xf86-video-geode/config.h.in index 77efbf893..2f79ad454 100644 --- a/driver/xf86-video-geode/config.h.in +++ b/driver/xf86-video-geode/config.h.in @@ -35,6 +35,9 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the <xaa.h> header file. */ +#undef HAVE_XAA_H + /* xextproto 7.1 available */ #undef HAVE_XEXTPROTO_71 @@ -57,6 +60,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/driver/xf86-video-geode/config.sub b/driver/xf86-video-geode/config.sub index 1c366dfde..aa2cf19b8 100755 --- a/driver/xf86-video-geode/config.sub +++ b/driver/xf86-video-geode/config.sub @@ -1,9 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2005-07-08' +timestamp='2012-06-17' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -20,9 +21,7 @@ timestamp='2005-07-08' # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see <http://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -31,13 +30,16 @@ timestamp='2005-07-08' # Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -71,7 +73,8 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -119,11 +122,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ - kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -146,10 +156,13 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -164,13 +177,17 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -187,6 +204,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -204,6 +225,12 @@ case $os in -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -228,23 +255,32 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | epiphany \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ @@ -257,35 +293,65 @@ case $basic_machine in | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ - | ms1 \ + | moxie \ + | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m32c) - basic_machine=$basic_machine-unknown + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -301,29 +367,36 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* | m32rle-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ @@ -336,30 +409,38 @@ case $basic_machine in | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ - | ms1-* \ + | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; - m32c-*) + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -377,7 +458,7 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -423,6 +504,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -431,10 +516,35 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -463,8 +573,8 @@ case $basic_machine in basic_machine=craynv-cray os=-unicosmp ;; - cr16c) - basic_machine=cr16c-unknown + cr16 | cr16-*) + basic_machine=cr16-unknown os=-elf ;; crds | unos) @@ -502,6 +612,10 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp @@ -617,7 +731,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -656,6 +769,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -667,10 +788,17 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -696,10 +824,21 @@ case $basic_machine in basic_machine=i386-pc os=-msdos ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -764,6 +903,12 @@ case $basic_machine in np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -794,6 +939,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -803,6 +956,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -832,9 +991,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -859,6 +1019,10 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -885,6 +1049,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -896,6 +1064,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -917,6 +1088,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -973,17 +1147,9 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -1052,6 +1218,9 @@ case $basic_machine in xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1060,6 +1229,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1098,10 +1271,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sparc | sparcv8 | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1145,9 +1318,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1168,27 +1344,31 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1227,7 +1407,7 @@ case $os in -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1276,7 +1456,7 @@ case $os in -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1318,6 +1498,11 @@ case $os in -zvmoe) os=-zvmoe ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; -none) ;; *) @@ -1340,6 +1525,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1349,9 +1540,21 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1370,13 +1573,13 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1401,7 +1604,7 @@ case $basic_machine in *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) @@ -1506,7 +1709,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/driver/xf86-video-geode/configure b/driver/xf86-video-geode/configure index 0c5ee49f9..33c5cabe9 100755 --- a/driver/xf86-video-geode/configure +++ b/driver/xf86-video-geode/configure @@ -1,20 +1,22 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for xf86-video-geode 2.11.13. +# Generated by GNU Autoconf 2.69 for xf86-video-geode 2.11.14. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode>. # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -22,23 +24,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -46,7 +40,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -57,7 +57,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -80,13 +80,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -96,15 +89,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -116,12 +110,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -133,348 +131,354 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : else - exitcode=1 - echo positional parameters were not saved. + exitcode=1; echo positional parameters were not saved. fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } - -( test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" )) || { (exit 1); exit 1; } -") 2> /dev/null; then - : + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -( - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )) || { (exit 1); exit 1; } - -_ASEOF -}; then - break fi - fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -fi -fi +} # as_fn_mkdir_p +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -491,9 +495,12 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -502,29 +509,18 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -539,49 +535,29 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -589,14 +565,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - SHELL=${CONFIG_SHELL-/bin/sh} -exec 7<&0 </dev/null 6>&1 +test -n "$DJDIR" || exec 7<&0 </dev/null +exec 6>&1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -611,14 +587,14 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xf86-video-geode' PACKAGE_TARNAME='xf86-video-geode' -PACKAGE_VERSION='2.11.13' -PACKAGE_STRING='xf86-video-geode 2.11.13' +PACKAGE_VERSION='2.11.14' +PACKAGE_STRING='xf86-video-geode 2.11.14' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode' +PACKAGE_URL='http://www.x.org/wiki/GeodeDriver' ac_unique_file="Makefile.am" # Factoring default headers for most tests. @@ -657,147 +633,156 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -MAINTAINER_MODE_TRUE -MAINTAINER_MODE_FALSE -MAINT -LIBTOOL -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -SED -GREP -EGREP -FGREP -LD -DUMPBIN -ac_ct_DUMPBIN -NM -LN_S -OBJDUMP -DLLTOOL -AR -ac_ct_AR -RANLIB -MANIFEST_TOOL -DSYMUTIL -NMEDIT -LIPO -OTOOL -OTOOL64 -CPP -BASE_CFLAGS -CWARNFLAGS -STRICT_CFLAGS -CHANGELOG_CMD -PKG_CONFIG -INSTALL_CMD -APP_MAN_SUFFIX -LIB_MAN_SUFFIX -FILE_MAN_SUFFIX -MISC_MAN_SUFFIX -DRIVER_MAN_SUFFIX -ADMIN_MAN_SUFFIX -APP_MAN_DIR -LIB_MAN_DIR -FILE_MAN_DIR -MISC_MAN_DIR -DRIVER_MAN_DIR -ADMIN_MAN_DIR -XORG_MAN_PAGE -MAN_SUBSTS -AM_DEFAULT_VERBOSITY -moduledir -PANEL_CPPFLAGS -BUILD_ZTV_TRUE -BUILD_ZTV_FALSE -M32_CFLAGS -XORG_CFLAGS -XORG_LIBS -XEXT_CFLAGS -XEXT_LIBS -PCIACCESS_CFLAGS -PCIACCESS_LIBS +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS LIBOBJS -LTLIBOBJS' +PCIACCESS_LIBS +PCIACCESS_CFLAGS +XEXT_LIBS +XEXT_CFLAGS +XORG_LIBS +XORG_CFLAGS +M32_CFLAGS +BUILD_ZTV_FALSE +BUILD_ZTV_TRUE +PANEL_CPPFLAGS +moduledir +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +MAN_SUBSTS +XORG_MAN_PAGE +ADMIN_MAN_DIR +DRIVER_MAN_DIR +MISC_MAN_DIR +FILE_MAN_DIR +LIB_MAN_DIR +APP_MAN_DIR +ADMIN_MAN_SUFFIX +DRIVER_MAN_SUFFIX +MISC_MAN_SUFFIX +FILE_MAN_SUFFIX +LIB_MAN_SUFFIX +APP_MAN_SUFFIX +INSTALL_CMD +PKG_CONFIG +CHANGELOG_CMD +STRICT_CFLAGS +CWARNFLAGS +BASE_CFLAGS +CPP +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +RANLIB +ac_ct_AR +AR +DLLTOOL +OBJDUMP +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -812,9 +797,11 @@ with_sysroot enable_libtool_lock enable_selective_werror enable_strict_compilation +enable_silent_rules with_xorg_module_dir enable_geodegx_panel enable_ztv +enable_xaa ' ac_precious_vars='build_alias host_alias @@ -894,8 +881,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -940,8 +928,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -967,8 +954,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1172,8 +1158,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1189,8 +1174,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1220,17 +1204,17 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1239,7 +1223,7 @@ Try \`$0 --help' for more information." >&2 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1247,16 +1231,14 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1278,8 +1260,7 @@ do [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1293,8 +1274,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1309,11 +1288,9 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1352,13 +1329,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1384,7 +1359,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-video-geode 2.11.13 to adapt to many kinds of systems. +\`configure' configures xf86-video-geode 2.11.14 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1398,7 +1373,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1455,7 +1430,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-video-geode 2.11.13:";; + short | recursive ) echo "Configuration of xf86-video-geode 2.11.14:";; esac cat <<\_ACEOF @@ -1463,14 +1438,17 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-selective-werror Turn off selective compiler errors. (default: @@ -1478,9 +1456,13 @@ Optional Features: --enable-strict-compilation Enable all warnings from compiler and make them errors (default: disabled) + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --disable-geodegx-panel Disable support for flatpanels with the Geode GX --enable-ztv Enable Video For Linux based ZTV driver (default: auto-detected) + --enable-xaa Enable legacy X Acceleration Architecture (XAA) + [default=auto] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1492,7 +1474,7 @@ Optional Packages: (or the compiler's sysroot if not specified). --with-xorg-module-dir=DIR Default xorg module directory - [default=$libdir/xorg/modules] + [[default=$libdir/xorg/modules]] Some influential environment variables: CC C compiler command @@ -1500,7 +1482,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> LIBS libraries to pass to the linker, e.g. -l<library> - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor PKG_CONFIG path to pkg-config utility @@ -1517,6 +1499,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode>. +xf86-video-geode home page: <http://www.x.org/wiki/GeodeDriver>. _ACEOF ac_status=$? fi @@ -1579,22 +1562,423 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-video-geode configure 2.11.13 -generated by GNU Autoconf 2.62 +xf86-video-geode configure 2.11.14 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case <limits.h> declares $2. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func + +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. +ac_fn_c_check_decl () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_decl + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ----------------------------------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode ## +## ----------------------------------------------------------------------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-video-geode $as_me 2.11.13, which was -generated by GNU Autoconf 2.62. Invocation command line was +It was created by xf86-video-geode $as_me 2.11.14, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1630,8 +2014,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1668,9 +2052,9 @@ do ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1686,13 +2070,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1704,11 +2088,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1717,13 +2099,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1742,11 +2124,9 @@ $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -1759,11 +2139,9 @@ _ASBOX echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -1777,11 +2155,9 @@ _ASBOX fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -1795,46 +2171,53 @@ _ASBOX exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -1845,19 +2228,23 @@ fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; @@ -1865,7 +2252,7 @@ $as_echo "$as_me: loading cache $cache_file" >&6;} esac fi else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1880,11 +2267,11 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; @@ -1894,17 +2281,17 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac @@ -1916,41 +2303,20 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1980,9 +2346,7 @@ for ac_dir in . "$srcdir"/.; do fi done if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -1996,7 +2360,8 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Initialize Automake -am__api_version="1.9" +am__api_version='1.12' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -2011,10 +2376,10 @@ am__api_version="1.9" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -2022,11 +2387,11 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -2034,7 +2399,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2063,7 +2428,7 @@ case $as_dir/ in ;; esac -done + done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir @@ -2079,7 +2444,7 @@ fi INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. @@ -2090,6 +2455,73 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2103,56 +2535,181 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" else - mkdir_p='$(SHELL) $(install_sh) -d' + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -2163,24 +2720,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2188,11 +2745,11 @@ fi test -n "$AWK" && break done -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -2200,7 +2757,7 @@ SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2210,11 +2767,11 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2228,12 +2785,14 @@ else fi rmdir .tst 2>/dev/null -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -2248,7 +2807,7 @@ fi # Define the identity of the package. PACKAGE='xf86-video-geode' - VERSION='2.11.13' + VERSION='2.11.14' cat >>confdefs.h <<_ACEOF @@ -2276,138 +2835,37 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> +# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> +mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi - { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } - - -if test $USE_MAINTAINER_MODE = yes; then + if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else @@ -2421,7 +2879,7 @@ fi # Initialize libtool # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -2453,7 +2911,7 @@ fi case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -2478,35 +2936,27 @@ ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2522,28 +2972,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2580,7 +3026,7 @@ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:$LINENO: checking how to print strings" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ @@ -2607,11 +3053,11 @@ func_echo_all () } case "$ECHO" in - printf*) { $as_echo "$as_me:$LINENO: result: printf" >&5 + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:$LINENO: result: print -r" >&5 + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:$LINENO: result: cat" >&5 + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac @@ -2636,54 +3082,53 @@ ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -2692,7 +3137,6 @@ else fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -2701,9 +3145,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2714,24 +3158,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2741,9 +3185,9 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2754,24 +3198,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2780,12 +3224,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2798,9 +3238,9 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2811,24 +3251,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2838,9 +3278,9 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2852,18 +3292,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2882,10 +3322,10 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2897,9 +3337,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -2910,24 +3350,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2941,9 +3381,9 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -2954,24 +3394,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -2984,12 +3424,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2999,55 +3435,37 @@ fi fi -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3063,8 +3481,8 @@ ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3080,17 +3498,17 @@ do done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3107,7 +3525,7 @@ do # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3126,80 +3544,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3214,30 +3593,83 @@ for ac_file in conftest.exe conftest conftest.*; do esac done else - { { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <stdio.h> +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3249,17 +3681,17 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3272,29 +3704,23 @@ else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3308,37 +3734,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes @@ -3347,20 +3752,16 @@ else fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3371,35 +3772,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3410,36 +3787,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3450,42 +3803,17 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS @@ -3502,23 +3830,18 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3570,32 +3893,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3606,17 +3906,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3626,17 +3928,18 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then +if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3654,6 +3957,11 @@ else if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3665,34 +3973,49 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message @@ -3716,13 +4039,11 @@ else fi fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3733,9 +4054,9 @@ else fi -{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -3743,7 +4064,7 @@ else ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - $as_unset ac_script || ac_script= + { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -3752,10 +4073,10 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -3772,7 +4093,7 @@ case `"$ac_path_SED" --version 2>&1` in $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" @@ -3787,19 +4108,17 @@ esac $ac_path_SED_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -3817,9 +4136,9 @@ Xsed="$SED -e 1s/^X//" -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -3830,10 +4149,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -3850,7 +4169,7 @@ case `"$ac_path_GREP" --version 2>&1` in $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3865,26 +4184,24 @@ esac $ac_path_GREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -3898,10 +4215,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -3918,7 +4235,7 @@ case `"$ac_path_EGREP" --version 2>&1` in $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3933,12 +4250,10 @@ esac $ac_path_EGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -3946,14 +4261,14 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -3967,10 +4282,10 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -3987,7 +4302,7 @@ case `"$ac_path_FGREP" --version 2>&1` in $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" @@ -4002,12 +4317,10 @@ esac $ac_path_FGREP_found && break 3 done done -done + done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -4015,7 +4328,7 @@ fi fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -4041,7 +4354,7 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then +if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no @@ -4050,7 +4363,7 @@ fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) @@ -4080,13 +4393,13 @@ $as_echo_n "checking for ld used by $CC... " >&6; } ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -4117,18 +4430,16 @@ fi LD="$lt_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:$LINENO: result: $LD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 -$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -4141,7 +4452,7 @@ case `$LD -v 2>&1 </dev/null` in ;; esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -4153,9 +4464,9 @@ with_gnu_ld=$lt_cv_prog_gnu_ld -{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -4202,7 +4513,7 @@ else : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" @@ -4216,9 +4527,9 @@ else do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -4229,24 +4540,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4260,9 +4571,9 @@ if test -z "$DUMPBIN"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -4273,24 +4584,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4303,12 +4614,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -4336,9 +4643,9 @@ test -z "$NM" && NM=nm -{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" @@ -4356,24 +4663,24 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -4501,10 +4808,10 @@ else fi if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:$LINENO: result: none" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -4518,7 +4825,7 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} -{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no @@ -4528,17 +4835,17 @@ xsi_shell=no && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes -{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } -{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes -{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } @@ -4573,9 +4880,9 @@ esac -{ $as_echo "$as_me:$LINENO: checking how to convert $build file names to $host format" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if test "${lt_cv_to_host_file_cmd+set}" = set; then +if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -4613,16 +4920,16 @@ esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:$LINENO: result: $lt_cv_to_host_file_cmd" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:$LINENO: checking how to convert $build file names to toolchain format" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if test "${lt_cv_to_tool_file_cmd+set}" = set; then +if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. @@ -4640,21 +4947,21 @@ esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:$LINENO: result: $lt_cv_to_tool_file_cmd" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then +if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in @@ -4688,9 +4995,9 @@ esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -4701,24 +5008,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4728,9 +5035,9 @@ if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -4741,24 +5048,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -4767,12 +5074,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -4791,9 +5094,9 @@ test -z "$OBJDUMP" && OBJDUMP=objdump -{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -4993,7 +5296,7 @@ tpf*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= @@ -5038,9 +5341,9 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -5051,24 +5354,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5078,9 +5381,9 @@ if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -5091,24 +5394,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5117,12 +5420,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -5142,9 +5441,9 @@ test -z "$DLLTOOL" && DLLTOOL=dlltool -{ $as_echo "$as_me:$LINENO: checking how to associate runtime and link libraries" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if test "${lt_cv_sharedlib_from_linklib_cmd+set}" = set; then +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' @@ -5169,7 +5468,7 @@ cygwin* | mingw* | pw32* | cegcc*) esac fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -5186,9 +5485,9 @@ if test -n "$ac_tool_prefix"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -5199,24 +5498,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:$LINENO: result: $AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5230,9 +5529,9 @@ if test -z "$AR"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -5243,24 +5542,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5273,12 +5572,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -5298,17 +5593,13 @@ fi -{ $as_echo "$as_me:$LINENO: checking for archiver @FILE support" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } -if test "${lt_cv_ar_at_file+set}" = set; then +if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5319,56 +5610,33 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { (eval echo "$as_me:$LINENO: \"$lt_ar_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a - { (eval echo "$as_me:$LINENO: \"$lt_ar_try\"") >&5 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ar_at_file" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then @@ -5386,9 +5654,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -5399,24 +5667,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5426,9 +5694,9 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -5439,24 +5707,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5465,12 +5733,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -5489,9 +5753,9 @@ test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -5502,24 +5766,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5529,9 +5793,9 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -5542,24 +5806,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -5568,12 +5832,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5662,9 +5922,9 @@ compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -5782,18 +6042,18 @@ void nm_test_func(void){} int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s "$nlist"; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -5858,11 +6118,11 @@ _LT_EOF lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext}; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -5896,10 +6156,10 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:$LINENO: result: failed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else - { $as_echo "$as_me:$LINENO: result: ok" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi @@ -5936,11 +6196,11 @@ fi -{ $as_echo "$as_me:$LINENO: checking for sysroot" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then +if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no @@ -5960,15 +6220,13 @@ case ${with_sysroot} in #( no|'') ;; #( *) - { $as_echo "$as_me:$LINENO: result: ${with_sysroot}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } - { { $as_echo "$as_me:$LINENO: error: The sysroot must be an absolute path." >&5 -$as_echo "$as_me: error: The sysroot must be an absolute path." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:$LINENO: result: ${lt_sysroot:-no}" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } @@ -5976,7 +6234,7 @@ $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then +if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi @@ -5988,11 +6246,11 @@ case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" @@ -6007,11 +6265,11 @@ ia64-*-hpux*) *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) @@ -6045,11 +6303,11 @@ x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in @@ -6098,9 +6356,9 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -6109,11 +6367,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6124,38 +6378,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_cc_needs_belf=no + lt_cv_cc_needs_belf=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6163,7 +6392,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf @@ -6173,11 +6402,11 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in @@ -6213,9 +6442,9 @@ need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_MANIFEST_TOOL+set}" = set; then +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then @@ -6226,24 +6455,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:$LINENO: result: $MANIFEST_TOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6253,9 +6482,9 @@ if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_MANIFEST_TOOL+set}" = set; then +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then @@ -6266,24 +6495,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_MANIFEST_TOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6292,12 +6521,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -6307,9 +6532,9 @@ else fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:$LINENO: checking if $MANIFEST_TOOL is a manifest tool" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if test "${lt_cv_path_mainfest_tool+set}" = set; then +if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no @@ -6321,7 +6546,7 @@ else fi rm -f conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_mainfest_tool" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: @@ -6337,9 +6562,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -6350,24 +6575,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6377,9 +6602,9 @@ if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -6390,24 +6615,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6416,12 +6641,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -6433,9 +6654,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -6446,24 +6667,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6473,9 +6694,9 @@ if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -6486,24 +6707,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6512,12 +6733,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -6529,9 +6746,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -6542,24 +6759,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:$LINENO: result: $LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6569,9 +6786,9 @@ if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -6582,24 +6799,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6608,12 +6825,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -6625,9 +6838,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -6638,24 +6851,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6665,9 +6878,9 @@ if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -6678,24 +6891,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6704,12 +6917,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -6721,9 +6930,9 @@ fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -6734,24 +6943,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6761,9 +6970,9 @@ if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -6774,24 +6983,24 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -6800,12 +7009,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -6840,9 +7045,9 @@ fi - { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no @@ -6873,23 +7078,19 @@ else rm -f conftest.* fi fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -6900,47 +7101,22 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_ld_exported_symbols_list=no + lt_cv_ld_exported_symbols_list=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:$LINENO: checking for -force_load linker flag" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } -if test "${lt_cv_ld_force_load+set}" = set; then +if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no @@ -6970,7 +7146,7 @@ _LT_EOF rm -rf conftest.dSYM fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_force_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) @@ -7012,14 +7188,14 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -7034,11 +7210,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -7047,78 +7219,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -7130,7 +7258,7 @@ fi else ac_cv_prog_CPP=$CPP fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes @@ -7141,11 +7269,7 @@ do # <limits.h> exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include <limits.h> @@ -7154,85 +7278,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -7242,16 +7321,12 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> #include <stdarg.h> @@ -7266,48 +7341,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <string.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -7317,18 +7367,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdlib.h> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -7338,14 +7384,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <ctype.h> #include <stdlib.h> @@ -7372,117 +7414,33 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -7492,61 +7450,13 @@ fi done - for ac_header in dlfcn.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_DLFCN_H 1 _ACEOF fi @@ -7568,7 +7478,7 @@ done # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then +if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -7601,7 +7511,7 @@ fi # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then +if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -7632,7 +7542,7 @@ test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then +if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -7718,9 +7628,9 @@ if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:$LINENO: checking for objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -7733,7 +7643,7 @@ else fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir @@ -7796,9 +7706,9 @@ test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7849,10 +7759,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -7862,9 +7772,9 @@ fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:$LINENO: checking for file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -7915,10 +7825,10 @@ fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -8000,9 +7910,9 @@ if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -8035,7 +7945,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then @@ -8362,14 +8272,14 @@ case $host_os in ;; esac -{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if test "${lt_cv_prog_compiler_pic+set}" = set; then +if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic @@ -8377,9 +8287,9 @@ lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -8412,7 +8322,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then @@ -8441,9 +8351,9 @@ fi # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -8469,7 +8379,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then @@ -8484,9 +8394,9 @@ fi - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8531,7 +8441,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8539,9 +8449,9 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -8586,7 +8496,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } @@ -8595,7 +8505,7 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* @@ -8603,10 +8513,10 @@ $as_echo_n "checking if we can lock with hard links... " >&6; } touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:$LINENO: result: $hard_links" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then - { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi @@ -8619,7 +8529,7 @@ fi - { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= @@ -9104,14 +9014,10 @@ _LT_EOF if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else - if test "${lt_cv_aix_libpath_+set}" = set; then + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9122,27 +9028,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9156,16 +9042,9 @@ $as_echo "$ac_try_echo") >&5 if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi @@ -9188,14 +9067,10 @@ fi if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else - if test "${lt_cv_aix_libpath_+set}" = set; then + if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9206,27 +9081,7 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -9240,16 +9095,9 @@ $as_echo "$ac_try_echo") >&5 if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi @@ -9486,9 +9334,9 @@ fi # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:$LINENO: checking if $CC understands -b" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } -if test "${lt_cv_prog_compiler__b+set}" = set; then +if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no @@ -9514,7 +9362,7 @@ else LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler__b" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then @@ -9555,56 +9403,27 @@ fi # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:$LINENO: checking whether the $host_os linker accepts -exported_symbol" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if test "${lt_cv_irix_exported_symbol+set}" = set; then +if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - lt_cv_irix_exported_symbol=no + lt_cv_irix_exported_symbol=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_irix_exported_symbol" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' @@ -9863,7 +9682,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; } fi fi -{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no @@ -9900,19 +9719,19 @@ x|xyes) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if test "${lt_cv_archive_cmds_need_lc+set}" = set; then +if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } 2>conftest.err; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext @@ -9926,11 +9745,11 @@ else libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= - if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else @@ -9943,7 +9762,7 @@ else $RM conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; @@ -10103,7 +9922,7 @@ esac - { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then @@ -10595,7 +10414,7 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu) shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if test "${lt_cv_shlibpath_overrides_runpath+set}" = set; then + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no @@ -10603,11 +10422,7 @@ else save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -10618,41 +10433,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then +if ac_fn_c_try_link "$LINENO"; then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi - -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -10868,7 +10655,7 @@ uts4*) dynamic_linker=no ;; esac -{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no @@ -10975,7 +10762,7 @@ fi - { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || @@ -11000,7 +10787,7 @@ else # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || @@ -11045,18 +10832,14 @@ else darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11074,43 +10857,18 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -11123,106 +10881,18 @@ fi ;; *) - { $as_echo "$as_me:$LINENO: checking for shl_load" >&5 -$as_echo_n "checking for shl_load... " >&6; } -if test "${ac_cv_func_shl_load+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define shl_load innocuous_shl_load - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shl_load (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef shl_load - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shl_load || defined __stub___shl_load -choke me -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shl_load=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shl_load=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 -$as_echo "$ac_cv_func_shl_load" >&6; } -if test $ac_cv_func_shl_load = yes; then + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else - { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11240,145 +10910,32 @@ return shl_load (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_shl_load=no + ac_cv_lib_dld_shl_load=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test $ac_cv_lib_dld_shl_load = yes; then +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else - { $as_echo "$as_me:$LINENO: checking for dlopen" >&5 -$as_echo_n "checking for dlopen... " >&6; } -if test "${ac_cv_func_dlopen+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen. - For example, HP-UX 11i <limits.h> declares gettimeofday. */ -#define dlopen innocuous_dlopen - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char dlopen (); below. - Prefer <limits.h> to <assert.h> if __STDC__ is defined, since - <limits.h> exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - -#undef dlopen - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_dlopen || defined __stub___dlopen -choke me -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_dlopen=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_dlopen=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 -$as_echo "$ac_cv_func_dlopen" >&6; } -if test $ac_cv_func_dlopen = yes; then + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11396,57 +10953,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_dlopen=no + ac_cv_lib_dl_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test $ac_cv_lib_dl_dlopen = yes; then +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else - { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11464,57 +10992,28 @@ return dlopen (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_svld_dlopen=no + ac_cv_lib_svld_dlopen=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test $ac_cv_lib_svld_dlopen = yes; then +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else - { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -11532,43 +11031,18 @@ return dld_link (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dld_dld_link=no + ac_cv_lib_dld_dld_link=no fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test $ac_cv_lib_dld_dld_link = yes; then +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -11607,9 +11081,9 @@ fi save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11687,11 +11161,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11708,14 +11182,14 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -11793,11 +11267,11 @@ int main () return status; } _LT_EOF - if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in @@ -11814,7 +11288,7 @@ rm -fr conftest* fi -{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi @@ -11853,12 +11327,12 @@ fi striplib= old_striplib= -{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough @@ -11867,15 +11341,15 @@ else if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac @@ -11893,12 +11367,12 @@ fi # Report which library types will actually be built - { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no @@ -11919,14 +11393,14 @@ $as_echo_n "checking whether to build shared libraries... " >&6; } fi ;; esac - { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } - { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:$LINENO: result: $enable_static" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } @@ -11976,18 +11450,14 @@ CC="$lt_save_CC" - { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then +if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <stdarg.h> #include <stdbool.h> @@ -12126,35 +11596,12 @@ main () return 0; } _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done @@ -12165,193 +11612,41 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c99" != xno; then : +fi -{ $as_echo "$as_me:$LINENO: checking whether __clang__ is declared" >&5 -$as_echo_n "checking whether __clang__ is declared... " >&6; } -if test "${ac_cv_have_decl___clang__+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __clang__ - (void) __clang__; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___clang__=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_have_decl___clang__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___clang__" >&5 -$as_echo "$ac_cv_have_decl___clang__" >&6; } -if test $ac_cv_have_decl___clang__ = yes; then +ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" +if test "x$ac_cv_have_decl___clang__" = xyes; then : CLANGCC="yes" else CLANGCC="no" fi -{ $as_echo "$as_me:$LINENO: checking whether __INTEL_COMPILER is declared" >&5 -$as_echo_n "checking whether __INTEL_COMPILER is declared... " >&6; } -if test "${ac_cv_have_decl___INTEL_COMPILER+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __INTEL_COMPILER - (void) __INTEL_COMPILER; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___INTEL_COMPILER=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___INTEL_COMPILER=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___INTEL_COMPILER" >&5 -$as_echo "$ac_cv_have_decl___INTEL_COMPILER" >&6; } -if test $ac_cv_have_decl___INTEL_COMPILER = yes; then +ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" +if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then : INTELCC="yes" else INTELCC="no" fi -{ $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 -$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } -if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -#ifndef __SUNPRO_C - (void) __SUNPRO_C; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl___SUNPRO_C=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_have_decl___SUNPRO_C=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 -$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } -if test $ac_cv_have_decl___SUNPRO_C = yes; then +ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" +if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then : SUNCC="yes" else SUNCC="no" @@ -12364,9 +11659,9 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in @@ -12379,14 +11674,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12394,10 +11689,10 @@ esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12407,9 +11702,9 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in @@ -12422,14 +11717,14 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS ;; @@ -12437,10 +11732,10 @@ esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @@ -12449,12 +11744,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -12466,13 +11757,13 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi @@ -12484,13 +11775,16 @@ fi # Check whether --enable-selective-werror was given. -if test "${enable_selective_werror+set}" = set; then +if test "${enable_selective_werror+set}" = set; then : enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval else SELECTIVE_WERROR=yes fi + + + # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then BASE_CFLAGS="-v" @@ -12504,96 +11798,64 @@ fi + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -12610,13 +11872,13 @@ found="no" CFLAGS="$CFLAGS -Wall" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wall" >&5 -$as_echo_n "checking if $CC supports -Wall... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wall" >&5 +$as_echo_n "checking if $CC supports-Wall... " >&6; } + cacheid=xorg_cv_cc_flag__Wall + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -12627,42 +11889,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wall" found="yes" @@ -12675,96 +11916,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -12781,13 +11990,13 @@ found="no" CFLAGS="$CFLAGS -Wpointer-arith" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wpointer-arith" >&5 -$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-arith" >&5 +$as_echo_n "checking if $CC supports-Wpointer-arith... " >&6; } + cacheid=xorg_cv_cc_flag__Wpointer_arith + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -12798,42 +12007,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith" found="yes" @@ -12846,96 +12034,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -12950,15 +12106,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wstrict-prototypes" + CFLAGS="$CFLAGS -Wmissing-declarations" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wstrict-prototypes" >&5 -$as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-declarations" >&5 +$as_echo_n "checking if $CC supports-Wmissing-declarations... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_declarations + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -12969,44 +12125,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" found="yes" fi fi @@ -13017,96 +12152,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -13121,15 +12224,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wmissing-prototypes" + CFLAGS="$CFLAGS -Wformat=2" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-prototypes" >&5 -$as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat=2" >&5 +$as_echo_n "checking if $CC supports-Wformat=2... " >&6; } + cacheid=xorg_cv_cc_flag__Wformat_2 + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -13140,149 +12243,27 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" + BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" found="yes" fi fi - - - - - - -xorg_testset_save_CFLAGS="$CFLAGS" - -if test "x$xorg_testset_unknown_warning_option" = "x" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 -$as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int i; -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } - CFLAGS="$xorg_testset_save_CFLAGS" -fi - -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" - fi - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 -$as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int i; -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } - CFLAGS="$xorg_testset_save_CFLAGS" -fi - -found="no" - if test $found = "no" ; then if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" @@ -13292,15 +12273,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wmissing-declarations" + CFLAGS="$CFLAGS -Wformat" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-declarations" >&5 -$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wformat" >&5 +$as_echo_n "checking if $CC supports-Wformat... " >&6; } + cacheid=xorg_cv_cc_flag__Wformat + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -13311,44 +12292,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" + BASE_CFLAGS="$BASE_CFLAGS -Wformat" found="yes" fi fi @@ -13359,96 +12319,66 @@ $as_echo "$supported" >&6; } + + + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -13463,15 +12393,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wnested-externs" + CFLAGS="$CFLAGS -Wstrict-prototypes" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wnested-externs" >&5 -$as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wstrict-prototypes" >&5 +$as_echo_n "checking if $CC supports-Wstrict-prototypes... " >&6; } + cacheid=xorg_cv_cc_flag__Wstrict_prototypes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -13482,44 +12412,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" + BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" found="yes" fi fi @@ -13530,96 +12439,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -13634,15 +12511,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wbad-function-cast" + CFLAGS="$CFLAGS -Wmissing-prototypes" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wbad-function-cast" >&5 -$as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-prototypes" >&5 +$as_echo_n "checking if $CC supports-Wmissing-prototypes... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_prototypes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -13653,44 +12530,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" found="yes" fi fi @@ -13701,96 +12557,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -13805,15 +12629,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wformat=2" + CFLAGS="$CFLAGS -Wnested-externs" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wformat=2" >&5 -$as_echo_n "checking if $CC supports -Wformat=2... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnested-externs" >&5 +$as_echo_n "checking if $CC supports-Wnested-externs... " >&6; } + cacheid=xorg_cv_cc_flag__Wnested_externs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -13824,117 +12648,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" + BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" found="yes" fi fi - if test $found = "no" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unknown-warning-option" - fi - if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then - CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - fi - CFLAGS="$CFLAGS -Wformat" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wformat" >&5 -$as_echo_n "checking if $CC supports -Wformat... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int i; -int -main () -{ - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - supported=no -fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } - CFLAGS="$xorg_testset_save_CFLAGS" - if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wformat" - found="yes" - fi - fi @@ -13944,94 +12685,54 @@ $as_echo "$supported" >&6; } xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14046,15 +12747,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wold-style-definition" + CFLAGS="$CFLAGS -Wbad-function-cast" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wold-style-definition" >&5 -$as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wbad-function-cast" >&5 +$as_echo_n "checking if $CC supports-Wbad-function-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wbad_function_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14065,44 +12766,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" + BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" found="yes" fi fi @@ -14113,96 +12793,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14217,15 +12865,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wdeclaration-after-statement" + CFLAGS="$CFLAGS -Wold-style-definition" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5 -$as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wold-style-definition" >&5 +$as_echo_n "checking if $CC supports-Wold-style-definition... " >&6; } + cacheid=xorg_cv_cc_flag__Wold_style_definition + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14236,51 +12884,36 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" + BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" found="yes" fi fi -# This chunk adds additional warnings that could catch undesired effects. + + + + + + + @@ -14288,94 +12921,54 @@ $as_echo "$supported" >&6; } xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14390,15 +12983,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wunused" + CFLAGS="$CFLAGS -Wdeclaration-after-statement" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wunused" >&5 -$as_echo_n "checking if $CC supports -Wunused... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wdeclaration-after-statement" >&5 +$as_echo_n "checking if $CC supports-Wdeclaration-after-statement... " >&6; } + cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14409,44 +13002,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wunused" + BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" found="yes" fi fi @@ -14455,98 +13027,70 @@ $as_echo "$supported" >&6; } +# This chunk adds additional warnings that could catch undesired effects. + + + + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14561,15 +13105,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wuninitialized" + CFLAGS="$CFLAGS -Wunused" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wuninitialized" >&5 -$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wunused" >&5 +$as_echo_n "checking if $CC supports-Wunused... " >&6; } + cacheid=xorg_cv_cc_flag__Wunused + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14580,44 +13124,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" + BASE_CFLAGS="$BASE_CFLAGS -Wunused" found="yes" fi fi @@ -14628,96 +13151,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14732,15 +13223,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wshadow" + CFLAGS="$CFLAGS -Wuninitialized" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wshadow" >&5 -$as_echo_n "checking if $CC supports -Wshadow... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wuninitialized" >&5 +$as_echo_n "checking if $CC supports-Wuninitialized... " >&6; } + cacheid=xorg_cv_cc_flag__Wuninitialized + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14751,44 +13242,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wshadow" + BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" found="yes" fi fi @@ -14799,96 +13269,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -14903,15 +13341,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wcast-qual" + CFLAGS="$CFLAGS -Wshadow" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wcast-qual" >&5 -$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wshadow" >&5 +$as_echo_n "checking if $CC supports-Wshadow... " >&6; } + cacheid=xorg_cv_cc_flag__Wshadow + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -14922,44 +13360,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual" + BASE_CFLAGS="$BASE_CFLAGS -Wshadow" found="yes" fi fi @@ -14970,96 +13387,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -15074,15 +13459,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wmissing-noreturn" + CFLAGS="$CFLAGS -Wcast-qual" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-noreturn" >&5 -$as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wcast-qual" >&5 +$as_echo_n "checking if $CC supports-Wcast-qual... " >&6; } + cacheid=xorg_cv_cc_flag__Wcast_qual + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15093,44 +13478,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" + BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual" found="yes" fi fi @@ -15141,96 +13505,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -15245,15 +13577,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wmissing-format-attribute" + CFLAGS="$CFLAGS -Wmissing-noreturn" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-format-attribute" >&5 -$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-noreturn" >&5 +$as_echo_n "checking if $CC supports-Wmissing-noreturn... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_noreturn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15264,44 +13596,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" found="yes" fi fi @@ -15312,96 +13623,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -15416,15 +13695,15 @@ found="no" CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi - CFLAGS="$CFLAGS -Wredundant-decls" + CFLAGS="$CFLAGS -Wmissing-format-attribute" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wredundant-decls" >&5 -$as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-format-attribute" >&5 +$as_echo_n "checking if $CC supports-Wmissing-format-attribute... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_format_attribute + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15435,44 +13714,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then - BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls" + BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" found="yes" fi fi @@ -15482,9 +13740,9 @@ $as_echo "$supported" >&6; } # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wlogical-op]) -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wparentheses]) -# XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wcast-align]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) +# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # Turn some warnings into errors, so we don't accidently get successful builds # when there are problems that should be fixed. @@ -15495,96 +13753,64 @@ if test "x$SELECTIVE_WERROR" = "xyes" ; then + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -15601,13 +13827,13 @@ found="no" CFLAGS="$CFLAGS -Werror=implicit" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=implicit" >&5 -$as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=implicit" >&5 +$as_echo_n "checking if $CC supports-Werror=implicit... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_implicit + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15618,42 +13844,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit" found="yes" @@ -15671,13 +13876,13 @@ $as_echo "$supported" >&6; } CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" - { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 -$as_echo_n "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 +$as_echo_n "checking if $CC supports-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } + cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15688,42 +13893,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" found="yes" @@ -15736,96 +13920,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -15842,13 +13994,13 @@ found="no" CFLAGS="$CFLAGS -Werror=nonnull" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=nonnull" >&5 -$as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=nonnull" >&5 +$as_echo_n "checking if $CC supports-Werror=nonnull... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_nonnull + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -15859,42 +14011,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull" found="yes" @@ -15907,96 +14038,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16013,13 +14112,13 @@ found="no" CFLAGS="$CFLAGS -Werror=init-self" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=init-self" >&5 -$as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=init-self" >&5 +$as_echo_n "checking if $CC supports-Werror=init-self... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_init_self + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16030,42 +14129,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self" found="yes" @@ -16078,96 +14156,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16184,13 +14230,13 @@ found="no" CFLAGS="$CFLAGS -Werror=main" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=main" >&5 -$as_echo_n "checking if $CC supports -Werror=main... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=main" >&5 +$as_echo_n "checking if $CC supports-Werror=main... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_main + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16201,42 +14247,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=main" found="yes" @@ -16249,96 +14274,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16355,13 +14348,13 @@ found="no" CFLAGS="$CFLAGS -Werror=missing-braces" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=missing-braces" >&5 -$as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=missing-braces" >&5 +$as_echo_n "checking if $CC supports-Werror=missing-braces... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_missing_braces + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16372,42 +14365,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces" found="yes" @@ -16420,96 +14392,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16526,13 +14466,13 @@ found="no" CFLAGS="$CFLAGS -Werror=sequence-point" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=sequence-point" >&5 -$as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=sequence-point" >&5 +$as_echo_n "checking if $CC supports-Werror=sequence-point... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_sequence_point + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16543,42 +14483,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point" found="yes" @@ -16591,96 +14510,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16697,13 +14584,13 @@ found="no" CFLAGS="$CFLAGS -Werror=return-type" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=return-type" >&5 -$as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=return-type" >&5 +$as_echo_n "checking if $CC supports-Werror=return-type... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_return_type + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16714,42 +14601,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type" found="yes" @@ -16767,13 +14633,13 @@ $as_echo "$supported" >&6; } CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" - { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 -$as_echo_n "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 +$as_echo_n "checking if $CC supports-errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } + cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16784,42 +14650,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" found="yes" @@ -16832,96 +14677,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -16938,13 +14751,13 @@ found="no" CFLAGS="$CFLAGS -Werror=trigraphs" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=trigraphs" >&5 -$as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=trigraphs" >&5 +$as_echo_n "checking if $CC supports-Werror=trigraphs... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_trigraphs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -16955,42 +14768,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs" found="yes" @@ -17003,96 +14795,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -17109,13 +14869,13 @@ found="no" CFLAGS="$CFLAGS -Werror=array-bounds" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=array-bounds" >&5 -$as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=array-bounds" >&5 +$as_echo_n "checking if $CC supports-Werror=array-bounds... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_array_bounds + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17126,42 +14886,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds" found="yes" @@ -17174,96 +14913,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -17280,13 +14987,13 @@ found="no" CFLAGS="$CFLAGS -Werror=write-strings" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=write-strings" >&5 -$as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=write-strings" >&5 +$as_echo_n "checking if $CC supports-Werror=write-strings... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_write_strings + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17297,42 +15004,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings" found="yes" @@ -17345,96 +15031,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -17451,13 +15105,13 @@ found="no" CFLAGS="$CFLAGS -Werror=address" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=address" >&5 -$as_echo_n "checking if $CC supports -Werror=address... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=address" >&5 +$as_echo_n "checking if $CC supports-Werror=address... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_address + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17468,42 +15122,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=address" found="yes" @@ -17516,96 +15149,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -17622,13 +15223,13 @@ found="no" CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=int-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=int-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports-Werror=int-to-pointer-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17639,42 +15240,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast" found="yes" @@ -17692,13 +15272,13 @@ $as_echo "$supported" >&6; } CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" - { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 -$as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION" >&5 +$as_echo_n "checking if $CC supports-errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } + cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17709,42 +15289,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" found="yes" @@ -17757,96 +15316,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -17863,13 +15390,13 @@ found="no" CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=pointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=pointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports-Werror=pointer-to-int-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -17880,42 +15407,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast" found="yes" @@ -17924,103 +15430,71 @@ $as_echo "$supported" >&6; } # Also -errwarn=E_BAD_PTR_INT_COMBINATION else -{ $as_echo "$as_me:$LINENO: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 $as_echo "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18037,13 +15511,13 @@ found="no" CFLAGS="$CFLAGS -Wimplicit" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wimplicit" >&5 -$as_echo_n "checking if $CC supports -Wimplicit... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wimplicit" >&5 +$as_echo_n "checking if $CC supports-Wimplicit... " >&6; } + cacheid=xorg_cv_cc_flag__Wimplicit + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18054,42 +15528,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wimplicit" found="yes" @@ -18102,96 +15555,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18208,13 +15629,13 @@ found="no" CFLAGS="$CFLAGS -Wnonnull" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wnonnull" >&5 -$as_echo_n "checking if $CC supports -Wnonnull... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wnonnull" >&5 +$as_echo_n "checking if $CC supports-Wnonnull... " >&6; } + cacheid=xorg_cv_cc_flag__Wnonnull + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18225,42 +15646,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnonnull" found="yes" @@ -18273,96 +15673,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18379,13 +15747,13 @@ found="no" CFLAGS="$CFLAGS -Winit-self" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Winit-self" >&5 -$as_echo_n "checking if $CC supports -Winit-self... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Winit-self" >&5 +$as_echo_n "checking if $CC supports-Winit-self... " >&6; } + cacheid=xorg_cv_cc_flag__Winit_self + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18396,42 +15764,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Winit-self" found="yes" @@ -18444,96 +15791,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18550,13 +15865,13 @@ found="no" CFLAGS="$CFLAGS -Wmain" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmain" >&5 -$as_echo_n "checking if $CC supports -Wmain... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmain" >&5 +$as_echo_n "checking if $CC supports-Wmain... " >&6; } + cacheid=xorg_cv_cc_flag__Wmain + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18567,42 +15882,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmain" found="yes" @@ -18615,96 +15909,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18721,13 +15983,13 @@ found="no" CFLAGS="$CFLAGS -Wmissing-braces" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wmissing-braces" >&5 -$as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wmissing-braces" >&5 +$as_echo_n "checking if $CC supports-Wmissing-braces... " >&6; } + cacheid=xorg_cv_cc_flag__Wmissing_braces + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18738,42 +16000,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces" found="yes" @@ -18786,96 +16027,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -18892,13 +16101,13 @@ found="no" CFLAGS="$CFLAGS -Wsequence-point" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wsequence-point" >&5 -$as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wsequence-point" >&5 +$as_echo_n "checking if $CC supports-Wsequence-point... " >&6; } + cacheid=xorg_cv_cc_flag__Wsequence_point + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -18909,42 +16118,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point" found="yes" @@ -18957,96 +16145,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19063,13 +16219,13 @@ found="no" CFLAGS="$CFLAGS -Wreturn-type" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wreturn-type" >&5 -$as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wreturn-type" >&5 +$as_echo_n "checking if $CC supports-Wreturn-type... " >&6; } + cacheid=xorg_cv_cc_flag__Wreturn_type + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19080,42 +16236,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type" found="yes" @@ -19128,96 +16263,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19234,13 +16337,13 @@ found="no" CFLAGS="$CFLAGS -Wtrigraphs" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wtrigraphs" >&5 -$as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wtrigraphs" >&5 +$as_echo_n "checking if $CC supports-Wtrigraphs... " >&6; } + cacheid=xorg_cv_cc_flag__Wtrigraphs + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19251,42 +16354,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs" found="yes" @@ -19299,96 +16381,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19405,13 +16455,13 @@ found="no" CFLAGS="$CFLAGS -Warray-bounds" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Warray-bounds" >&5 -$as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Warray-bounds" >&5 +$as_echo_n "checking if $CC supports-Warray-bounds... " >&6; } + cacheid=xorg_cv_cc_flag__Warray_bounds + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19422,42 +16472,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds" found="yes" @@ -19470,96 +16499,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19576,13 +16573,13 @@ found="no" CFLAGS="$CFLAGS -Wwrite-strings" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wwrite-strings" >&5 -$as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wwrite-strings" >&5 +$as_echo_n "checking if $CC supports-Wwrite-strings... " >&6; } + cacheid=xorg_cv_cc_flag__Wwrite_strings + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19593,42 +16590,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings" found="yes" @@ -19641,96 +16617,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19747,13 +16691,13 @@ found="no" CFLAGS="$CFLAGS -Waddress" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Waddress" >&5 -$as_echo_n "checking if $CC supports -Waddress... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Waddress" >&5 +$as_echo_n "checking if $CC supports-Waddress... " >&6; } + cacheid=xorg_cv_cc_flag__Waddress + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19764,42 +16708,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Waddress" found="yes" @@ -19812,96 +16735,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -19918,13 +16809,13 @@ found="no" CFLAGS="$CFLAGS -Wint-to-pointer-cast" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wint-to-pointer-cast" >&5 -$as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wint-to-pointer-cast" >&5 +$as_echo_n "checking if $CC supports-Wint-to-pointer-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -19935,42 +16826,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast" found="yes" @@ -19983,96 +16853,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -20089,13 +16927,13 @@ found="no" CFLAGS="$CFLAGS -Wpointer-to-int-cast" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Wpointer-to-int-cast" >&5 -$as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Wpointer-to-int-cast" >&5 +$as_echo_n "checking if $CC supports-Wpointer-to-int-cast... " >&6; } + cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -20106,42 +16944,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast" found="yes" @@ -20156,10 +16973,13 @@ fi -CWARNFLAGS="$BASE_CFLAGS" -if test "x$GCC" = xyes ; then - CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" -fi + + CWARNFLAGS="$BASE_CFLAGS" + if test "x$GCC" = xyes ; then + CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" + fi + + @@ -20167,109 +16987,81 @@ fi # Check whether --enable-strict-compilation was given. -if test "${enable_strict_compilation+set}" = set; then +if test "${enable_strict_compilation+set}" = set; then : enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval else STRICT_COMPILE=no fi + + + + STRICT_CFLAGS="" + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -20286,13 +17078,13 @@ found="no" CFLAGS="$CFLAGS -pedantic" - { $as_echo "$as_me:$LINENO: checking if $CC supports -pedantic" >&5 -$as_echo_n "checking if $CC supports -pedantic... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-pedantic" >&5 +$as_echo_n "checking if $CC supports-pedantic... " >&6; } + cacheid=xorg_cv_cc_flag__pedantic + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -20303,42 +17095,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -pedantic" found="yes" @@ -20351,96 +17122,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -20457,13 +17196,13 @@ found="no" CFLAGS="$CFLAGS -Werror" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror" >&5 -$as_echo_n "checking if $CC supports -Werror... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror" >&5 +$as_echo_n "checking if $CC supports-Werror... " >&6; } + cacheid=xorg_cv_cc_flag__Werror + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -20474,42 +17213,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror" found="yes" @@ -20527,13 +17245,13 @@ $as_echo "$supported" >&6; } CFLAGS="$CFLAGS -errwarn" - { $as_echo "$as_me:$LINENO: checking if $CC supports -errwarn" >&5 -$as_echo_n "checking if $CC supports -errwarn... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-errwarn" >&5 +$as_echo_n "checking if $CC supports-errwarn... " >&6; } + cacheid=xorg_cv_cc_flag__errwarn + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -20544,42 +17262,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -errwarn" found="yes" @@ -20595,96 +17292,64 @@ $as_echo "$supported" >&6; } + + + + + + + + xorg_testset_save_CFLAGS="$CFLAGS" -if test "x$xorg_testset_unknown_warning_option" = "x" ; then +if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unknown-warning-option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unknown_warning_option=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unknown_warning_option=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unknown_warning_option=no + xorg_cv_cc_flag_unknown_warning_option=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unknown_warning_option" >&5 -$as_echo "$xorg_testset_unknown_warning_option" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 +$as_echo "$xorg_cv_cc_flag_unknown_warning_option" >&6; } + xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi -if test "x$xorg_testset_unused_command_line_argument" = "x" ; then - if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then +if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then + if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=unused-command-line-argument" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - xorg_testset_unused_command_line_argument=yes +if ac_fn_c_try_compile "$LINENO"; then : + xorg_cv_cc_flag_unused_command_line_argument=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - xorg_testset_unused_command_line_argument=no + xorg_cv_cc_flag_unused_command_line_argument=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $xorg_testset_unused_command_line_argument" >&5 -$as_echo "$xorg_testset_unused_command_line_argument" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 +$as_echo "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } + xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi @@ -20701,13 +17366,13 @@ found="no" CFLAGS="$CFLAGS -Werror=attributes" - { $as_echo "$as_me:$LINENO: checking if $CC supports -Werror=attributes" >&5 -$as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports-Werror=attributes" >&5 +$as_echo_n "checking if $CC supports-Werror=attributes... " >&6; } + cacheid=xorg_cv_cc_flag__Werror_attributes + if eval \${$cacheid+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int @@ -20718,42 +17383,21 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - supported=yes +if ac_fn_c_try_link "$LINENO"; then : + eval $cacheid=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - supported=no + eval $cacheid=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $supported" >&5 -$as_echo "$supported" >&6; } + CFLAGS="$xorg_testset_save_CFLAGS" + eval supported=\$$cacheid + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 +$as_echo "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" found="yes" @@ -20901,13 +17545,50 @@ MAN_SUBSTS="\ -AM_DEFAULT_VERBOSITY=1 +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' # Checks for programs. # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then +if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -20938,14 +17619,13 @@ fi - # ----------------------------------------------------------------------------- # Configuration options # ----------------------------------------------------------------------------- # Define a configure option for an alternate input module directory # Check whether --with-xorg-module-dir was given. -if test "${with_xorg_module_dir+set}" = set; then +if test "${with_xorg_module_dir+set}" = set; then : withval=$with_xorg_module_dir; moduledir="$withval" else moduledir="$libdir/xorg/modules" @@ -20955,7 +17635,7 @@ fi # Define a configure option to enable/disable lcd panel support # Check whether --enable-geodegx-panel was given. -if test "${enable_geodegx_panel+set}" = set; then +if test "${enable_geodegx_panel+set}" = set; then : enableval=$enable_geodegx_panel; else PANEL_CPPFLAGS=-DPNL_SUP @@ -20965,7 +17645,7 @@ fi # Define a configure option to enable/disable ztv # Check whether --enable-ztv was given. -if test "${enable_ztv+set}" = set; then +if test "${enable_ztv+set}" = set; then : enableval=$enable_ztv; ztv=$enableval else ztv=auto @@ -20973,150 +17653,12 @@ fi # Check for Video4Linux Version 2 (V4L2) availability - for ac_header in linux/videodev2.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## ----------------------------------------------------------------------------------------------- ## -## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode ## -## ----------------------------------------------------------------------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -if test `eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` = yes; then +do : + ac_fn_c_check_header_mongrel "$LINENO" "linux/videodev2.h" "ac_cv_header_linux_videodev2_h" "$ac_includes_default" +if test "x$ac_cv_header_linux_videodev2_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_LINUX_VIDEODEV2_H 1 _ACEOF v4l2=yes else @@ -21129,17 +17671,13 @@ if test "x$ztv" != "xno" ; then if test "x$v4l2" = "xno" ; then if test "x$ztv" = "xyes" ; then # User really wants ztv but V4L2 is not found - { { $as_echo "$as_me:$LINENO: error: ZTV driver requested, but videodev2.h not found." >&5 -$as_echo "$as_me: error: ZTV driver requested, but videodev2.h not found." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ZTV driver requested, but videodev2.h not found." "$LINENO" 5 fi else BUILD_ZTV=yes fi fi - - -if test "x$BUILD_ZTV" = xyes; then + if test "x$BUILD_ZTV" = xyes; then BUILD_ZTV_TRUE= BUILD_ZTV_FALSE='#' else @@ -21154,13 +17692,9 @@ case $host_cpu in if test "x$GCC" = xyes ; then SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -m32" - { $as_echo "$as_me:$LINENO: checking if $CC supports the -m32 Intel/AMD option" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports the -m32 Intel/AMD option" >&5 $as_echo_n "checking if $CC supports the -m32 Intel/AMD option... " >&6; } - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <unistd.h> @@ -21171,34 +17705,13 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : m32_support=yes; M32_CFLAGS=-m32 else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - m32_support=no + m32_support=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:$LINENO: result: $m32_support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $m32_support" >&5 $as_echo "$m32_support" >&6; } CFLAGS="$SAVE_CFLAGS" fi @@ -21211,11 +17724,7 @@ esac SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" @@ -21231,37 +17740,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - _EXT_CHECK=no + _EXT_CHECK=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking if RANDR is defined" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RANDR is defined" >&5 $as_echo_n "checking if RANDR is defined... " >&6; } - { $as_echo "$as_me:$LINENO: result: $_EXT_CHECK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES randrproto" @@ -21271,11 +17759,7 @@ $as_echo "$_EXT_CHECK" >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" @@ -21291,37 +17775,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - _EXT_CHECK=no + _EXT_CHECK=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking if RENDER is defined" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RENDER is defined" >&5 $as_echo_n "checking if RENDER is defined... " >&6; } - { $as_echo "$as_me:$LINENO: result: $_EXT_CHECK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES renderproto" @@ -21331,11 +17794,7 @@ $as_echo "$_EXT_CHECK" >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" @@ -21351,37 +17810,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - _EXT_CHECK=no + _EXT_CHECK=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking if XV is defined" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XV is defined" >&5 $as_echo_n "checking if XV is defined... " >&6; } - { $as_echo "$as_me:$LINENO: result: $_EXT_CHECK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES videoproto" @@ -21391,11 +17829,7 @@ $as_echo "$_EXT_CHECK" >&6; } SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "xorg-server.h" @@ -21411,37 +17845,16 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - _EXT_CHECK=no + _EXT_CHECK=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" - { $as_echo "$as_me:$LINENO: checking if DPMSExtension is defined" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DPMSExtension is defined" >&5 $as_echo_n "checking if DPMSExtension is defined... " >&6; } - { $as_echo "$as_me:$LINENO: result: $_EXT_CHECK" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES xextproto" @@ -21451,7 +17864,7 @@ $as_echo "$_EXT_CHECK" >&6; } # Obtain compiler/linker options for the Geode driver dependencies pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for XORG" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG" >&5 $as_echo_n "checking for XORG... " >&6; } if test -n "$PKG_CONFIG"; then @@ -21459,11 +17872,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server xproto fontsproto \$REQUIRED_MODULES\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server xproto fontsproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes @@ -21477,11 +17890,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XORG_LIBS="$XORG_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-server xproto fontsproto \$REQUIRED_MODULES\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server xproto fontsproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server xproto fontsproto $REQUIRED_MODULES") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server xproto fontsproto $REQUIRED_MODULES" 2>/dev/null` else pkg_failed=yes @@ -21508,18 +17921,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$XORG_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (xorg-server xproto fontsproto $REQUIRED_MODULES) were not met: - -$XORG_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables XORG_CFLAGS -and XORG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (xorg-server xproto fontsproto $REQUIRED_MODULES) were not met: + as_fn_error $? "Package requirements (xorg-server xproto fontsproto $REQUIRED_MODULES) were not met: $XORG_PKG_ERRORS @@ -21529,20 +17931,11 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables XORG_CFLAGS and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } +" "$LINENO" 5 elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables XORG_CFLAGS -and XORG_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -21551,18 +17944,17 @@ and XORG_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details" "$LINENO" 5; } else XORG_CFLAGS=$pkg_cv_XORG_CFLAGS XORG_LIBS=$pkg_cv_XORG_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for XEXT" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } if test -n "$PKG_CONFIG"; then @@ -21570,11 +17962,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_XEXT_CFLAGS=`$PKG_CONFIG --cflags "xextproto >= 7.0.99.1" 2>/dev/null` else pkg_failed=yes @@ -21588,11 +17980,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XEXT_LIBS="$XEXT_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xextproto >= 7.0.99.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "xextproto >= 7.0.99.1") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_XEXT_LIBS=`$PKG_CONFIG --libs "xextproto >= 7.0.99.1" 2>/dev/null` else pkg_failed=yes @@ -21619,7 +18011,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$XEXT_PKG_ERRORS" >&5 - { $as_echo "$as_me:$LINENO: result: no" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_XEXTPROTO_71="no" elif test $pkg_failed = untried; then @@ -21627,73 +18019,69 @@ elif test $pkg_failed = untried; then else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XEXTPROTO_71="yes"; -cat >>confdefs.h <<\_ACEOF -#define HAVE_XEXTPROTO_71 1 -_ACEOF +$as_echo "#define HAVE_XEXTPROTO_71 1" >>confdefs.h fi -# Checks for libpciaccess support. -SAVE_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" -{ $as_echo "$as_me:$LINENO: checking whether XSERVER_LIBPCIACCESS is declared" >&5 -$as_echo_n "checking whether XSERVER_LIBPCIACCESS is declared... " >&6; } -if test "${ac_cv_have_decl_XSERVER_LIBPCIACCESS+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include "xorg-server.h" +# Define a configure option to enable/disable XAA support; +# handles unavailability of XAA since xserver-1.13 +# Check whether --enable-xaa was given. +if test "${enable_xaa+set}" = set; then : + enableval=$enable_xaa; +fi -int -main () -{ -#ifndef XSERVER_LIBPCIACCESS - (void) XSERVER_LIBPCIACCESS; -#endif - ; - return 0; -} +if test "x$enable_xaa" != "xno"; then : + + save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + CFLAGS=$XORG_CFLAGS + CPPFLAGS="$XORG_CFLAGS" + for ac_header in xaa.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "xaa.h" "ac_cv_header_xaa_h" "$ac_includes_default" +if test "x$ac_cv_header_xaa_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_XAA_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_have_decl_XSERVER_LIBPCIACCESS=yes + have_XAA=yes else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + have_XAA=no +fi + +done + + CFLAGS=$save_CFLAGS + CPPFLAGS=$save_CPPFLAGS + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include XAA support" >&5 +$as_echo_n "checking whether to include XAA support... " >&6; } + +if test "x$have_XAA" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + if test "x$enable_xaa" = "xyes"; then : + as_fn_error $? "XAA requested but not found (perhaps building against xserver-1.13 or newer?)" "$LINENO" 5 +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } - ac_cv_have_decl_XSERVER_LIBPCIACCESS=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&5 -$as_echo "$ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&6; } -if test $ac_cv_have_decl_XSERVER_LIBPCIACCESS = yes; then + +# Checks for libpciaccess support. +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" +ac_fn_c_check_decl "$LINENO" "XSERVER_LIBPCIACCESS" "ac_cv_have_decl_XSERVER_LIBPCIACCESS" "#include \"xorg-server.h\" +" +if test "x$ac_cv_have_decl_XSERVER_LIBPCIACCESS" = xyes; then : XSERVER_LIBPCIACCESS=yes else XSERVER_LIBPCIACCESS=no @@ -21704,7 +18092,7 @@ CPPFLAGS="$SAVE_CPPFLAGS" if test "x$XSERVER_LIBPCIACCESS" = xyes; then pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for PCIACCESS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 $as_echo_n "checking for PCIACCESS... " >&6; } if test -n "$PKG_CONFIG"; then @@ -21712,11 +18100,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.8.0" 2>/dev/null` else pkg_failed=yes @@ -21730,11 +18118,11 @@ if test -n "$PKG_CONFIG"; then pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.8.0" 2>/dev/null` else pkg_failed=yes @@ -21761,7 +18149,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$PCIACCESS_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (pciaccess >= 0.8.0) were not met: + as_fn_error $? "Package requirements (pciaccess >= 0.8.0) were not met: $PCIACCESS_PKG_ERRORS @@ -21771,21 +18159,11 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (pciaccess >= 0.8.0) were not met: - -$PCIACCESS_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables PCIACCESS_CFLAGS -and PCIACCESS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } +" "$LINENO" 5 elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -21794,22 +18172,11 @@ and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables PCIACCESS_CFLAGS -and PCIACCESS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +See \`config.log' for more details" "$LINENO" 5; } else PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi @@ -21845,13 +18212,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -21859,8 +18226,8 @@ $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -21882,12 +18249,23 @@ $as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi @@ -21901,56 +18279,62 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_ZTV_TRUE}" && test -z "${BUILD_ZTV_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_ZTV\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_ZTV\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"BUILD_ZTV\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -21960,17 +18344,18 @@ cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which @@ -21978,23 +18363,15 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - as_nl=' ' export as_nl @@ -22002,7 +18379,13 @@ export as_nl as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else @@ -22013,7 +18396,7 @@ else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; - case $arg in + case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; @@ -22036,13 +18419,6 @@ if test "${PATH_SEPARATOR+set}" != set; then } fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - # IFS # We need space, tab and new line, in precisely that order. Quoting is @@ -22052,15 +18428,16 @@ fi IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -22072,12 +18449,16 @@ if test "x$as_myself" = x; then fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' @@ -22089,7 +18470,89 @@ export LC_ALL LANGUAGE=C export LANGUAGE -# Required to use basename. +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -22103,8 +18566,12 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ @@ -22124,76 +18591,25 @@ $as_echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then @@ -22208,49 +18624,85 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -22260,13 +18712,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-video-geode $as_me 2.11.13, which was -generated by GNU Autoconf 2.62. Invocation command line was +This file was extended by xf86-video-geode $as_me 2.11.14, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -22279,6 +18737,15 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" @@ -22289,19 +18756,22 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] + --file=FILE[:TEMPLATE] instantiate the configuration file FILE - --header=FILE[:TEMPLATE] + --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: @@ -22313,22 +18783,25 @@ $config_headers Configuration commands: $config_commands -Report bugs to <bug-autoconf@gnu.org>." +Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode>. +xf86-video-geode home page: <http://www.x.org/wiki/GeodeDriver>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -xf86-video-geode config.status 2.11.13 -configured by $0, generated by GNU Autoconf 2.62, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +xf86-video-geode config.status 2.11.14 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF @@ -22339,11 +18812,16 @@ ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -22357,27 +18835,29 @@ do ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -22385,11 +18865,10 @@ Try \`$0 --help' for more information." >&2 ac_cs_silent=: ;; # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -22406,7 +18885,7 @@ fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -22723,9 +19202,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -22748,26 +19225,24 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -22775,7 +19250,13 @@ $debug || if test -n "$CONFIG_FILES"; then -ac_cr='
' +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' @@ -22783,7 +19264,7 @@ else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -22792,23 +19273,18 @@ _ACEOF echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -22816,7 +19292,7 @@ done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -22830,7 +19306,7 @@ s/'"$ac_delim"'$// t delim :nl h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p @@ -22844,7 +19320,7 @@ s/.\{148\}// t nl :delim h -s/\(.\{148\}\).*/\1/ +s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p @@ -22864,7 +19340,7 @@ t delim rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -22896,23 +19372,29 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -22924,7 +19406,7 @@ fi # test -n "$CONFIG_FILES" # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -22936,13 +19418,11 @@ _ACEOF # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -23008,9 +19488,9 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 } split(mac1, mac2, "(") #) macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". - prefix = substr(line, 1, index(line, defundef) - 1) print prefix "define", macro P[macro] D[macro] next } else { @@ -23018,7 +19498,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { - print "/*", line, "*/" + print "/*", prefix defundef, macro, "*/" next } } @@ -23027,9 +19507,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -23042,9 +19520,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -23063,7 +19539,7 @@ $as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -23072,12 +19548,10 @@ $as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't @@ -23088,7 +19562,7 @@ $as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. @@ -23100,10 +19574,8 @@ $as_echo "$as_me: creating $ac_file" >&6;} esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -23131,47 +19603,7 @@ $as_echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in @@ -23217,13 +19649,17 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - ac_sed_dataroot=' /datarootdir/ { p @@ -23233,12 +19669,11 @@ ac_sed_dataroot=' /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' +/@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -23248,7 +19683,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF @@ -23273,29 +19708,27 @@ s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -23304,44 +19737,39 @@ $as_echo "$as_me: error: could not create $ac_file" >&2;} if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - "$ac_file" | "$ac_file":* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -23361,24 +19789,35 @@ $as_echo X"$ac_file" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ @@ -23401,28 +19840,26 @@ $as_echo X"$mf" | q } s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ @@ -23445,51 +19882,12 @@ $as_echo X"$file" | q } s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" done -done +} ;; "libtool":C) @@ -24111,7 +20509,7 @@ else fi if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:$LINENO: WARNING: Unable to substitute extended shell functions in $ofile" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi @@ -24126,15 +20524,12 @@ fi done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -24155,10 +20550,10 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff --git a/driver/xf86-video-geode/configure.ac b/driver/xf86-video-geode/configure.ac index 2c810a248..4e9e83af2 100644 --- a/driver/xf86-video-geode/configure.ac +++ b/driver/xf86-video-geode/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ(2.59) AC_INIT([xf86-video-geode], - [2.11.13], + [2.11.14], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver%2Fgeode], [xf86-video-geode], [http://www.x.org/wiki/GeodeDriver]) @@ -128,6 +128,33 @@ PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") +# Define a configure option to enable/disable XAA support; +# handles unavailability of XAA since xserver-1.13 +AC_ARG_ENABLE(xaa, + AS_HELP_STRING([--enable-xaa], + [Enable legacy X Acceleration Architecture (XAA) [default=auto]])) + +AS_IF([test "x$enable_xaa" != "xno"], + [ + save_CFLAGS=$CFLAGS + save_CPPFLAGS=$CPPFLAGS + CFLAGS=$XORG_CFLAGS + CPPFLAGS="$XORG_CFLAGS" + AC_CHECK_HEADERS([xaa.h], have_XAA=yes, have_XAA=no) + CFLAGS=$save_CFLAGS + CPPFLAGS=$save_CPPFLAGS +]) + +AC_MSG_CHECKING([whether to include XAA support]) + +AS_IF([test "x$have_XAA" = "xyes"], + [AC_MSG_RESULT([yes])], + [AS_IF([test "x$enable_xaa" = "xyes"], + [AC_MSG_ERROR([XAA requested but not found (perhaps building against xserver-1.13 or newer?)])], + [AC_MSG_RESULT([no]) + ]) +]) + # Checks for libpciaccess support. SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" diff --git a/driver/xf86-video-geode/depcomp b/driver/xf86-video-geode/depcomp index 04701da53..0544c6835 100755 --- a/driver/xf86-video-geode/depcomp +++ b/driver/xf86-video-geode/depcomp @@ -1,9 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2005-07-09.11 +scriptversion=2012-07-12.20; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,9 +16,7 @@ scriptversion=2005-07-09.11 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -29,7 +27,7 @@ scriptversion=2005-07-09.11 case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -41,11 +39,11 @@ as side-effects. Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. @@ -58,6 +56,12 @@ EOF ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -86,12 +90,48 @@ if test "$depmode" = dashXmstdout; then depmode=dashmstdout fi +cygpath_u="cygpath -u -f -" +if test "$depmode" = msvcmsys; then + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" stat=$? if test $stat -eq 0; then : else @@ -127,20 +167,21 @@ gcc) ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -172,20 +213,17 @@ sgi) # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile + tr "$nl" ' ' >> "$depfile" + echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile + >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -195,40 +233,51 @@ sgi) rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u "$@" -M fi stat=$? - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - if test $stat -eq 0; then : else - rm -f "$tmpdepfile" + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -239,23 +288,26 @@ aix) ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -264,6 +316,85 @@ icc) exit $stat fi rm -f "$depfile" + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. + # Do two passes, one to just change these to + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" + rm -f "$tmpdepfile" + ;; + +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using '\' : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'` + tmpdepfile="$base.d" + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir="$base.d-lock" + trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0 ; do + # mkdir is a portable test-and-set. + if mkdir $lockdir 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rm -rf $lockdir + break + else + ## the lock is being held by a different process, + ## wait until the winning process is done or we timeout + while test -d $lockdir && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to @@ -276,11 +407,56 @@ icc) rm -f "$tmpdepfile" ;; +hp2) + # The "hp" stanza above does not work with aCC (C++) and HP's ia64 + # compilers, which have integrated preprocessors. The correct option + # to use with these is +Maked; it writes dependencies to a file named + # 'foo.d', which lands next to the object file, wherever that + # happens to be. + # Much of this is similar to the tru64 case; see comments there. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir.libs/$base.d + "$@" -Wc,+Maked + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + "$@" +Maked + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" + do + test -f "$tmpdepfile" && break + done + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. + sed -ne '2,${ + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" "$tmpdepfile2" + ;; + tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -288,13 +464,13 @@ tru64) if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to + # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and + # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is @@ -326,14 +502,59 @@ tru64) done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -345,13 +566,13 @@ dashmstdout) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -371,15 +592,14 @@ dashmstdout) done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -396,38 +616,46 @@ makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift - cleared=no - for arg in "$@"; do + cleared=no eat=no + for arg + do case $cleared in no) set ""; shift cleared=yes ;; esac + if test $eat = yes; then + eat=no + continue + fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. + -arch) + eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done - obj_suffix="`echo $object | sed 's/^.*\././'`" + obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -441,13 +669,13 @@ cpp) # Remove the call to Libtool. if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do + while test "X$1" != 'X--mode=compile'; do shift done shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -479,13 +707,27 @@ cpp) msvisualcpp) # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. + # always write the preprocessed file to stdout. "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test "X$1" != 'X--mode=compile'; do + shift + done + shift + fi + IFS=" " for arg do case "$arg" in + -o) + shift + ;; + $object) + shift + ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift @@ -498,16 +740,23 @@ msvisualcpp) ;; esac done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + "$@" -E 2>/dev/null | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; +msvcmsys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + none) exec "$@" ;; @@ -526,5 +775,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/driver/xf86-video-geode/install-sh b/driver/xf86-video-geode/install-sh index 4d4a9519e..377bb8687 100755 --- a/driver/xf86-video-geode/install-sh +++ b/driver/xf86-video-geode/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2005-05-14.22 +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,42 +35,72 @@ scriptversion=2005-05-14.22 # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. + +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. + +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" +posix_mkdir= + +# Desired mode of installed file. +mode=0755 -chmodcmd="$chmodprog 0755" -chowncmd= chgrpcmd= -stripcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" +stripcmd= + src= dst= dir_arg= -dstarg= +dst_arg= + +copy_on_change=false no_target_directory= -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... @@ -80,108 +110,148 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. + --help display this help and exit. + --version display version info and exit. + + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG " -while test -n "$1"; do +while test $# -ne 0; do case $1 in - -c) shift - continue;; + -c) ;; + + -C) copy_on_change=true;; - -d) dir_arg=true - shift - continue;; + -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; + shift;; --help) echo "$usage"; exit $?;; - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift - shift - continue;; + shift;; - -s) stripcmd=$stripprog - shift - continue;; + -s) stripcmd=$stripprog;; - -t) dstarg=$2 - shift - shift - continue;; + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true - shift - continue;; + -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done + --) shift break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; esac + shift done -if test -z "$1"; then +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src ;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? else + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. @@ -190,71 +260,194 @@ do exit 1 fi - if test -z "$dstarg"; then + if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac + dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 + echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi - dst=$dst/`basename "$src"` + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? fi fi - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - # Make sure that the destination directory exists. + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac - pathcomp= + eval "$initialize_posix_glob" - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi - pathcomp=$pathcomp/ - done + fi fi if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else - dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ @@ -262,10 +455,9 @@ do # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -273,51 +465,63 @@ do # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi done -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/driver/xf86-video-geode/missing b/driver/xf86-video-geode/missing index 894e786e1..9a5564823 100755 --- a/driver/xf86-video-geode/missing +++ b/driver/xf86-video-geode/missing @@ -1,10 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2005-06-08.21 +scriptversion=2012-01-06.18; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -18,9 +17,7 @@ scriptversion=2005-06-08.21 # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program. If not, see <http://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -28,13 +25,15 @@ scriptversion=2005-06-08.21 # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' -# In the cases where this matters, `missing' is being run in the +# In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac @@ -44,7 +43,7 @@ fi msg="missing on your system" -case "$1" in +case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= @@ -65,7 +64,7 @@ case "$1" in echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: @@ -74,17 +73,20 @@ Options: --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c + aclocal touch file 'aclocal.m4' + autoconf touch file 'configure' + autoheader touch file 'config.h.in' + autom4te touch the output file, or create a stub one + automake touch all 'Makefile.in' files + bison create 'y.tab.[ch]', if possible, from existing .[ch] + flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c + lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + yacc create 'y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? @@ -96,37 +98,35 @@ Send bug reports to <bug-automake@gnu.org>." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect -# the program). -case "$1" in - lex|yacc) +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) # Not GNU programs, they don't have --version. ;; - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether + # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi @@ -135,36 +135,36 @@ esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. -case "$1" in +case $program in aclocal*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from +WARNING: '$1' is $msg. You should only need it if + you modified 'acinclude.m4' or '${configure_ac}'. You might want + to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; - autoconf) + autoconf*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU +WARNING: '$1' is $msg. You should only need it if + you modified '${configure_ac}'. You might want to install the + Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; - autoheader) + autoheader*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them +WARNING: '$1' is $msg. You should only need it if + you modified 'acconfig.h' or '${configure_ac}'. You might want + to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do - case "$f" in + case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; @@ -175,25 +175,25 @@ WARNING: \`$1' is $msg. You should only need it if automake*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. +WARNING: '$1' is $msg. You should only need it if + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. + You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; - autom4te) + autom4te*) echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. +WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU + You can get '$1' as part of Autoconf from any GNU archive site." - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else @@ -207,93 +207,97 @@ WARNING: \`$1' is needed, but is $msg. fi ;; - bison|yacc) + bison*|yacc*) echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package +WARNING: '$1' $msg. You should only need it if + you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." + Bison from any GNU archive site." rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi - if [ ! -f y.tab.h ]; then + if test ! -f y.tab.h; then echo >y.tab.h fi - if [ ! -f y.tab.c ]; then + if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; - lex|flex) + lex*|flex*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package +WARNING: '$1' is $msg. You should only need it if + you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." + Flex from any GNU archive site." rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then + if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi - if [ ! -f lex.yy.c ]; then + if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; - help2man) + help2man*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if +WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." + Help2man package in order for those modifications to take + effect. You can get Help2man from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" - exit 1 + exit $? fi ;; - makeinfo) + makeinfo*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file +WARNING: '$1' is $msg. You should only need it if + you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." + call might also be the consequence of using a buggy 'make' (AIX, + DU, IRIX). You might want to install the Texinfo package or + the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi @@ -303,49 +307,14 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. +WARNING: '$1' is needed, and is $msg. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, + proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." + some other package would contain this missing '$1' program." exit 1 ;; esac @@ -356,5 +325,6 @@ exit 0 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/driver/xf86-video-geode/src/Makefile.am b/driver/xf86-video-geode/src/Makefile.am index a45a094bf..aeab815a1 100644 --- a/driver/xf86-video-geode/src/Makefile.am +++ b/driver/xf86-video-geode/src/Makefile.am @@ -42,6 +42,7 @@ geode_drv_ladir = $(moduledir)/drivers geode_drv_la_SOURCES = \ cimarron.c \ cim_dev.h \ + compat-api.h \ durango.c \ geode_blend.h \ geode_common.c \ diff --git a/driver/xf86-video-geode/src/Makefile.in b/driver/xf86-video-geode/src/Makefile.in index 98e63a3df..74441c67d 100644 --- a/driver/xf86-video-geode/src/Makefile.in +++ b/driver/xf86-video-geode/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. @@ -40,18 +40,32 @@ # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. -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 = : @@ -63,22 +77,44 @@ 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)$(geode_drv_ladir)" -geode_drv_laLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(geode_drv_la_LTLIBRARIES) geode_drv_la_LIBADD = am_geode_drv_la_OBJECTS = cimarron.lo durango.lo geode_common.lo \ @@ -88,27 +124,60 @@ am_geode_drv_la_OBJECTS = cimarron.lo durango.lo geode_common.lo \ lx_driver.lo lx_exa.lo lx_memory.lo lx_output.lo lx_panel.lo \ lx_video.lo panel.lo geode_drv_la_OBJECTS = $(am_geode_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 = +geode_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(geode_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 = $(geode_drv_la_SOURCES) DIST_SOURCES = $(geode_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@ @@ -119,8 +188,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ -BUILD_ZTV_FALSE = @BUILD_ZTV_FALSE@ -BUILD_ZTV_TRUE = @BUILD_ZTV_TRUE@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -145,6 +212,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@ @@ -162,13 +230,12 @@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ M32_CFLAGS = @M32_CFLAGS@ 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@ @@ -180,6 +247,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@ PANEL_CPPFLAGS = @PANEL_CPPFLAGS@ PATH_SEPARATOR = @PATH_SEPARATOR@ @@ -198,11 +266,13 @@ XEXT_LIBS = @XEXT_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_LIBS = @XORG_LIBS@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ +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@ @@ -214,6 +284,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@ @@ -242,8 +313,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@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/cim \ -I$(top_srcdir)/src/gfx \ @@ -260,6 +335,7 @@ geode_drv_ladir = $(moduledir)/drivers geode_drv_la_SOURCES = \ cimarron.c \ cim_dev.h \ + compat-api.h \ durango.c \ geode_blend.h \ geode_common.c \ @@ -369,14 +445,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 \ @@ -394,35 +470,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-geode_drv_laLTLIBRARIES: $(geode_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(geode_drv_ladir)" || $(mkdir_p) "$(DESTDIR)$(geode_drv_ladir)" - @list='$(geode_drv_la_LTLIBRARIES)'; for p in $$list; do \ + @list='$(geode_drv_la_LTLIBRARIES)'; test -n "$(geode_drv_ladir)" || list=; \ + list2=; for p in $$list; do \ if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(geode_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(geode_drv_ladir)/$$f'"; \ - $(LIBTOOL) --mode=install $(geode_drv_laLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(geode_drv_ladir)/$$f"; \ + list2="$$list2 $$p"; \ else :; fi; \ - done + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(geode_drv_ladir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(geode_drv_ladir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(geode_drv_ladir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(geode_drv_ladir)"; \ + } uninstall-geode_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(geode_drv_la_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(geode_drv_ladir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(geode_drv_ladir)/$$p"; \ + @list='$(geode_drv_la_LTLIBRARIES)'; test -n "$(geode_drv_ladir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(geode_drv_ladir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(geode_drv_ladir)/$$f"; \ done clean-geode_drv_laLTLIBRARIES: -test -z "$(geode_drv_la_LTLIBRARIES)" || rm -f $(geode_drv_la_LTLIBRARIES) - @list='$(geode_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 -geode_drv.la: $(geode_drv_la_OBJECTS) $(geode_drv_la_DEPENDENCIES) - $(LINK) -rpath $(geode_drv_ladir) $(geode_drv_la_LDFLAGS) $(geode_drv_la_OBJECTS) $(geode_drv_la_LIBADD) $(LIBS) + @list='$(geode_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}; \ + } +geode_drv.la: $(geode_drv_la_OBJECTS) $(geode_drv_la_DEPENDENCIES) $(EXTRA_geode_drv_la_DEPENDENCIES) + $(AM_V_CCLD)$(geode_drv_la_LINK) -rpath $(geode_drv_ladir) $(geode_drv_la_OBJECTS) $(geode_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -455,25 +539,25 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panel.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 @@ -481,83 +565,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) - $(mkdir_p) $(distdir)/cim $(distdir)/cim/doc $(distdir)/gfx $(distdir)/panel - @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 @@ -566,7 +666,7 @@ check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(geode_drv_ladir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am @@ -578,16 +678,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" @@ -601,7 +707,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 @@ -609,18 +715,38 @@ dvi-am: html: html-am +html-am: + info: info-am info-am: install-data-am: install-geode_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 @@ -641,20 +767,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-geode_drv_laLTLIBRARIES uninstall-info-am +uninstall-am: uninstall-geode_drv_laLTLIBRARIES + +.MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-geode_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-geode_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-geode_drv_laLTLIBRARIES \ - uninstall-info-am + clean-geode_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-geode_drv_laLTLIBRARIES 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-geode_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-geode/src/cim/cim_defs.h b/driver/xf86-video-geode/src/cim/cim_defs.h index eea2f4943..9084a076a 100644 --- a/driver/xf86-video-geode/src/cim/cim_defs.h +++ b/driver/xf86-video-geode/src/cim/cim_defs.h @@ -284,7 +284,6 @@ #elif CIMARRON_MSR_HOOKS - #define MSR_READ(msr_reg, device_add, data64_ptr) \ { \ unsigned long addr, val1, val2; \ @@ -311,7 +310,7 @@ } #endif -#endif /* #ifdef CIMARRON_INCLUDE_MSR_MACROS */ +#endif /* #ifdef CIMARRON_INCLUDE_MSR_MACROS */ /*-----------------------------------------------------------------*/ /* STRING MACROS */ @@ -518,7 +517,7 @@ #endif -#endif /* #ifdef CIMARRON_INCLUDE_STRING_MACROS */ +#endif /* #ifdef CIMARRON_INCLUDE_STRING_MACROS */ /*----------------------------------------------------------------- * WRITE_COMMAND_STRING8 @@ -585,14 +584,11 @@ void cim_outd(unsigned short port, unsigned long data) { _asm { - pushf mov eax, data mov dx, port out dx, eax popf} -} - +pushf mov eax, data mov dx, port out dx, eax popf}} /*------------------------------------------- * IND * Reads one DWORD from a single I/O address. *-------------------------------------------*/ - #define IND(port) cim_ind(port) unsigned long cim_ind(unsigned short port) @@ -600,8 +596,7 @@ cim_ind(unsigned short port) unsigned long data; _asm { - pushf mov dx, port in eax, dx mov data, eax popf} - return data; + pushf mov dx, port in eax, dx mov data, eax popf} return data; } /*------------------------------------------- @@ -614,14 +609,11 @@ void cim_outw(unsigned short port, unsigned short data) { _asm { - pushf mov ax, data mov dx, port out dx, ax popf} -} - +pushf mov ax, data mov dx, port out dx, ax popf}} /*------------------------------------------- * INW * Reads one WORD from a single I/O address. *-------------------------------------------*/ - #define INW(port) cim_inw(port) unsigned short cim_inw(unsigned short port) @@ -629,8 +621,7 @@ cim_inw(unsigned short port) unsigned short data; _asm { - pushf mov dx, port in ax, dx mov data, ax popf} - return data; + pushf mov dx, port in ax, dx mov data, ax popf} return data; } /*------------------------------------------- @@ -643,14 +634,11 @@ void cim_outb(unsigned short port, unsigned char data) { _asm { - pushf mov al, data mov dx, port out dx, al popf} -} - +pushf mov al, data mov dx, port out dx, al popf}} /*------------------------------------------- * INB * Reads one BYTE from a single I/O address. *-------------------------------------------*/ - #define INB(port) cim_inb(port) unsigned char cim_inb(unsigned short port) @@ -658,8 +646,7 @@ cim_inb(unsigned short port) unsigned char data; _asm { - pushf mov dx, port in al, dx mov data, al popf} - return data; + pushf mov dx, port in al, dx mov data, al popf} return data; } #elif CIMARRON_IO_ABSTRACTED_ASM @@ -753,9 +740,9 @@ cim_outb(unsigned short port, unsigned char data) #endif -#endif /* CIMARRON_INCLUDE_IO_MACROS */ +#endif /* CIMARRON_INCLUDE_IO_MACROS */ -extern void (*cim_rdmsr)(unsigned long, unsigned long *, unsigned long *); -extern void (*cim_wrmsr)(unsigned long, unsigned long, unsigned long); +extern void (*cim_rdmsr) (unsigned long, unsigned long *, unsigned long *); +extern void (*cim_wrmsr) (unsigned long, unsigned long, unsigned long); #endif diff --git a/driver/xf86-video-geode/src/cim/cim_df.c b/driver/xf86-video-geode/src/cim/cim_df.c index f81b74004..d3c11497f 100644 --- a/driver/xf86-video-geode/src/cim/cim_df.c +++ b/driver/xf86-video-geode/src/cim/cim_df.c @@ -49,7 +49,7 @@ df_set_crt_enable(int crt_output) case DF_CRT_DISABLE: config &= ~(DF_DCFG_DIS_EN | DF_DCFG_HSYNC_EN | - DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN); + DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN); misc |= DF_DAC_POWER_DOWN; break; @@ -58,7 +58,7 @@ df_set_crt_enable(int crt_output) case DF_CRT_ENABLE: config |= (DF_DCFG_DIS_EN | DF_DCFG_HSYNC_EN | - DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN); + DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN); misc &= ~(DF_DAC_POWER_DOWN | DF_ANALOG_POWER_DOWN); break; @@ -67,7 +67,7 @@ df_set_crt_enable(int crt_output) case DF_CRT_STANDBY: config = (config & ~(DF_DCFG_DIS_EN | DF_DCFG_HSYNC_EN | - DF_DCFG_DAC_BL_EN)) | DF_DCFG_VSYNC_EN; + DF_DCFG_DAC_BL_EN)) | DF_DCFG_VSYNC_EN; misc |= DF_DAC_POWER_DOWN; break; @@ -76,7 +76,7 @@ df_set_crt_enable(int crt_output) case DF_CRT_SUSPEND: config = (config & ~(DF_DCFG_DIS_EN | DF_DCFG_VSYNC_EN | - DF_DCFG_DAC_BL_EN)) | DF_DCFG_HSYNC_EN; + DF_DCFG_DAC_BL_EN)) | DF_DCFG_HSYNC_EN; misc |= DF_DAC_POWER_DOWN; break; @@ -121,7 +121,7 @@ df_set_panel_enable(int enable) int df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, - DF_VIDEO_SOURCE_PARAMS * video_source_even) + DF_VIDEO_SOURCE_PARAMS * video_source_even) { unsigned long pitch, ctrl, vcfg; unsigned long lock, vg_line, gcfg; @@ -153,15 +153,15 @@ df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, /* PARAMETER - VIDEO PITCH */ pitch = - (video_source_odd->y_pitch >> 3) | ((video_source_odd-> - uv_pitch >> 3) << 16); + (video_source_odd->y_pitch >> 3) | ((video_source_odd->uv_pitch >> 3) << + 16); /* PARAMETER - VIDEO FORMAT */ gcfg &= ~DC3_GCFG_YUV_420; vcfg &= ~(DF_VCFG_VID_INP_FORMAT | DF_VCFG_4_2_0_MODE); ctrl &= ~(DF_VIDEO_INPUT_IS_RGB | DF_CSC_VIDEO_YUV_TO_RGB | DF_HD_VIDEO | - DF_YUV_CSC_EN); + DF_YUV_CSC_EN); /* SELECT PIXEL ORDERING */ @@ -225,7 +225,7 @@ df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, /* appropriate pitch and clipping the video window. */ vcfg &= ~(DF_VCFG_LINE_SIZE_LOWER_MASK | DF_VCFG_LINE_SIZE_BIT8 | - DF_VCFG_LINE_SIZE_BIT9); + DF_VCFG_LINE_SIZE_BIT9); size = ((video_source_odd->width >> 1) + 7) & 0xFFF8; @@ -286,7 +286,7 @@ df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, int df_set_video_offsets(int even, unsigned long y_offset, - unsigned long u_offset, unsigned long v_offset) + unsigned long u_offset, unsigned long v_offset) { unsigned long lock = READ_REG32(DC3_UNLOCK); @@ -296,7 +296,8 @@ df_set_video_offsets(int even, unsigned long y_offset, WRITE_REG32(DC3_VID_EVEN_Y_ST_OFFSET, y_offset); WRITE_REG32(DC3_VID_EVEN_U_ST_OFFSET, u_offset); WRITE_REG32(DC3_VID_EVEN_V_ST_OFFSET, v_offset); - } else { + } + else { WRITE_REG32(DC3_VID_Y_ST_OFFSET, y_offset); WRITE_REG32(DC3_VID_U_ST_OFFSET, u_offset); WRITE_REG32(DC3_VID_V_ST_OFFSET, v_offset); @@ -317,7 +318,8 @@ df_set_video_offsets(int even, unsigned long y_offset, int df_set_video_scale(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, unsigned long flags) + unsigned long dst_width, unsigned long dst_height, + unsigned long flags) { unsigned long temp, misc; unsigned long scale, gfxscale; @@ -377,14 +379,14 @@ df_set_video_scale(unsigned long src_width, unsigned long src_height, scale = READ_VID32(DF_VIDEO_SCALER); vcfg = READ_VID32(DF_VIDEO_CONFIG); vcfg &= ~(DF_VCFG_LINE_SIZE_LOWER_MASK | DF_VCFG_LINE_SIZE_BIT8 | - DF_VCFG_LINE_SIZE_BIT9); + DF_VCFG_LINE_SIZE_BIT9); if (dst_width < (src_width >> 2)) { src_width >>= 1; WRITE_VID32(DF_VIDEO_SCALER, scale | DF_SCALE_DOUBLE_H_DOWNSCALE); - } else { - WRITE_VID32(DF_VIDEO_SCALER, - scale & ~DF_SCALE_DOUBLE_H_DOWNSCALE); + } + else { + WRITE_VID32(DF_VIDEO_SCALER, scale & ~DF_SCALE_DOUBLE_H_DOWNSCALE); } /* PROGRAM A NEW LINE SIZE */ @@ -416,9 +418,9 @@ df_set_video_scale(unsigned long src_width, unsigned long src_height, WRITE_REG32(DC3_VID_DS_DELTA, downscale); WRITE_VID32(DF_VIDEO_YSCALE, 0x20000); - } else { - WRITE_VID32(DF_VIDEO_YSCALE, - ((0x10000 * src_height) / dst_height)); + } + else { + WRITE_VID32(DF_VIDEO_YSCALE, ((0x10000 * src_height) / dst_height)); } WRITE_REG32(DC3_GENERAL_CFG, gcfg); WRITE_REG32(DC3_UNLOCK, unlock); @@ -431,7 +433,8 @@ df_set_video_scale(unsigned long src_width, unsigned long src_height, if ((READ_VID32(DF_VIDEO_XSCALE) == 0x10000) && (READ_VID32(DF_VIDEO_YSCALE) == 0x10000)) { WRITE_VID32(DF_VIDEO_CONFIG, (temp | DF_VCFG_SC_BYP)); - } else + } + else WRITE_VID32(DF_VIDEO_CONFIG, (temp & ~DF_VCFG_SC_BYP)); return CIM_STATUS_OK; @@ -487,7 +490,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) border_y = vtotal - vblankend; hactive = hblankstart + htotal - hblankend; vactive = vblankstart + vtotal - vblankend; - } else { + } + else { border_x = border_y = 0; } @@ -539,7 +543,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) if (video_window->flags & DF_POSFLAG_INCLUDEBORDER) { border_y_even = vtotal_even - vblankend_even; vactive_even = vblankstart_even + vtotal_even - vblankend_even; - } else + } + else border_y_even = 0; /* @@ -596,7 +601,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) y <<= 1; height += height_even; adjust = border_y + border_y_even; - } else { + } + else { adjust = border_y; if (height_even > height) height = height_even; @@ -605,7 +611,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) if (y > adjust) { y -= adjust; adjust = 0; - } else { + } + else { adjust -= y; if (height > adjust) height -= adjust; @@ -614,7 +621,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) } } - } else { + } + else { y = y_copy; height = height_copy; @@ -671,7 +679,8 @@ df_set_video_position(DF_VIDEO_POSITION * video_window) initread = (initread * xscale) / 0x10000; if (xscale) dst_clip = ((initread & 3) * 0x10000) / xscale; - } else + } + else dst_clip = video_window->dst_clip; /* @@ -745,7 +754,8 @@ df_set_video_filter_coefficients(long taps[][4], int phase256) if (phase256) { WRITE_VID32(DF_VIDEO_SCALER, (scale & ~DF_SCALE_128_PHASES)); defaults = CimarronVideoFilter256; - } else { + } + else { WRITE_VID32(DF_VIDEO_SCALER, (scale | DF_SCALE_128_PHASES)); defaults = CimarronVideoFilter128; } @@ -756,7 +766,8 @@ df_set_video_filter_coefficients(long taps[][4], int phase256) if (!taps) { coeff0 = defaults[i][0]; coeff1 = defaults[i][1]; - } else { + } + else { if (taps[i][1] < 0) coeff0 = -taps[i][1] | 0x8000; else @@ -842,13 +853,15 @@ df_set_video_enable(int enable, unsigned long flags) vg_ckey = READ_REG32(DC3_COLOR_KEY); WRITE_REG32(DC3_COLOR_KEY, (vg_ckey & ~DC3_CLR_KEY_ENABLE)); - } else if (!(READ_VID32(DF_DISPLAY_CONFIG) & DF_DCFG_VG_CK)) { + } + else if (!(READ_VID32(DF_DISPLAY_CONFIG) & DF_DCFG_VG_CK)) { /* OTHERWISE RE-ENABLE COLOR KEYING */ vg_ckey = READ_REG32(DC3_COLOR_KEY); WRITE_REG32(DC3_COLOR_KEY, (vg_ckey | DC3_CLR_KEY_ENABLE)); } - } else { + } + else { WRITE_VID32(DF_VIDEO_CONFIG, (vcfg & ~DF_VCFG_VID_EN)); WRITE_REG32(DC3_GENERAL_CFG, (gcfg & ~DC3_GCFG_VIDE)); @@ -898,7 +911,8 @@ df_set_video_color_key(unsigned long key, unsigned long mask, int graphics) WRITE_VID32(DF_DISPLAY_CONFIG, df_dcfg); WRITE_REG32(DC3_COLOR_KEY, vg_ckey); WRITE_REG32(DC3_COLOR_MASK, (mask & 0xFFFFFF)); - } else { + } + else { /* CHROMA KEY - USE DF HARDWARE */ df_dcfg |= DF_DCFG_VG_CK; @@ -1016,8 +1030,9 @@ df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * cursor_color_key) return CIM_STATUS_INVALIDPARAMS; key = READ_VID32(DF_CURSOR_COLOR_KEY) & DF_CURSOR_COLOR_KEY_ENABLE; - key = key | (cursor_color_key->key & 0xFFFFFF) | (cursor_color_key-> - select_color2 << 24); + key = + key | (cursor_color_key->key & 0xFFFFFF) | (cursor_color_key-> + select_color2 << 24); WRITE_VID32(DF_CURSOR_COLOR_KEY, key); WRITE_VID32(DF_CURSOR_COLOR_MASK, (cursor_color_key->mask & 0xFFFFFF)); @@ -1143,8 +1158,7 @@ df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS * alpha_data) if (yend > (vactive + vadjust)) yend = vactive + vadjust; - WRITE_VID32((DF_ALPHA_YPOS_1 + (window << 5)), - (ystart | (yend << 16))); + WRITE_VID32((DF_ALPHA_YPOS_1 + (window << 5)), (ystart | (yend << 16))); /* SET Y POSITION FOR EVEN FIELD */ @@ -1158,8 +1172,9 @@ df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS * alpha_data) yend = vactive_even + vadjust; WRITE_VID32((DF_VID_ALPHA_Y_EVEN_1 + (window << 3)), - (ystart | (yend << 16))); - } else { + (ystart | (yend << 16))); + } + else { y = y_copy; height = height_copy; vadjust = vtotal - vsyncend + 1; @@ -1170,8 +1185,7 @@ df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS * alpha_data) if (yend > (vactive + vadjust)) yend = vactive + vadjust; - WRITE_VID32((DF_ALPHA_YPOS_1 + (window << 5)), - (ystart | (yend << 16))); + WRITE_VID32((DF_ALPHA_YPOS_1 + (window << 5)), (ystart | (yend << 16))); } /* SET ALPHA X POSITION */ @@ -1200,7 +1214,7 @@ df_configure_alpha_window(int window, DF_ALPHA_REGION_PARAMS * alpha_data) alpha_ctl = READ_VID32(DF_ALPHA_CONTROL_1 + (window << 5)) & DF_ACTRL_WIN_ENABLE; alpha_ctl |= (alpha_data->alpha_value & 0xFF) | DF_ACTRL_LOAD_ALPHA | - (((unsigned long)alpha_data->delta & 0xFF) << 8); + (((unsigned long) alpha_data->delta & 0xFF) << 8); if (alpha_data->flags & DF_ALPHAFLAG_PERPIXELENABLED) alpha_ctl |= DF_ACTRL_PERPIXEL_EN; @@ -1306,7 +1320,7 @@ df_set_output_color_space(int color_space) alpha_ctl = READ_VID32(DF_VID_ALPHA_CONTROL); alpha_ctl &= ~(DF_CSC_GRAPHICS_RGB_TO_YUV | DF_CSC_VIDEO_YUV_TO_RGB | - DF_HD_GRAPHICS | DF_YUV_CSC_EN | DF_ALPHA_DRGB); + DF_HD_GRAPHICS | DF_YUV_CSC_EN | DF_ALPHA_DRGB); /* OUTPUT IS RGB */ /* Enable YUV->RGB CSC if necessary and enable alpha output if */ @@ -1333,7 +1347,8 @@ df_set_output_color_space(int color_space) if (color_space == DF_OUTPUT_HDTV) alpha_ctl |= DF_HD_GRAPHICS; - } else + } + else return CIM_STATUS_INVALIDPARAMS; WRITE_VID32(DF_VID_ALPHA_CONTROL, alpha_ctl); @@ -1376,7 +1391,8 @@ df_set_output_path(int format) panel_pm &= ~DF_PM_PANEL_ON; panel_tim2 |= DF_PMTIM2_TFT_PASSHTHROUGH; output = DF_OUTPUT_PANEL | DF_SIMULTANEOUS_CRT_FP; - } else if (format == DF_DISPLAY_FP || format == DF_DISPLAY_CRT_FP) { + } + else if (format == DF_DISPLAY_FP || format == DF_DISPLAY_CRT_FP) { panel_pm |= DF_PM_PANEL_ON; panel_tim2 &= ~DF_PMTIM2_TFT_PASSHTHROUGH; @@ -1384,7 +1400,8 @@ df_set_output_path(int format) output = DF_OUTPUT_PANEL; else if (format == DF_DISPLAY_CRT_FP) output = DF_OUTPUT_PANEL | DF_SIMULTANEOUS_CRT_FP; - } else { + } + else { switch (format) { case DF_DISPLAY_VOP: output = DF_OUTPUT_VOP; @@ -1479,26 +1496,22 @@ df_save_state(DF_SAVE_RESTORE * df_state) /* READ FILTER COEFFICIENTS */ for (i = 0; i < 512; i++) - df_state->coefficients[i] = - READ_VID32(DF_COEFFICIENT_BASE + (i << 2)); + df_state->coefficients[i] = READ_VID32(DF_COEFFICIENT_BASE + (i << 2)); /* READ ALL DF MSRS */ - msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CAP, - &(df_state->msr_cap)); + msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CAP, &(df_state->msr_cap)); msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CONFIG, - &(df_state->msr_config)); - msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_SMI, - &(df_state->msr_smi)); + &(df_state->msr_config)); + msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_SMI, &(df_state->msr_smi)); msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_ERROR, - &(df_state->msr_error)); + &(df_state->msr_error)); msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_PM, &(df_state->msr_pm)); msr_read64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_DIAG, - &(df_state->msr_diag)); + &(df_state->msr_diag)); msr_read64(MSR_DEVICE_GEODELX_DF, DF_MBD_MSR_DIAG_DF, - &(df_state->msr_df_diag)); - msr_read64(MSR_DEVICE_GEODELX_DF, DF_MSR_PAD_SEL, - &(df_state->msr_pad_sel)); + &(df_state->msr_df_diag)); + msr_read64(MSR_DEVICE_GEODELX_DF, DF_MSR_PAD_SEL, &(df_state->msr_pad_sel)); return CIM_STATUS_OK; } @@ -1521,21 +1534,19 @@ df_restore_state(DF_SAVE_RESTORE * df_state) /* RESTORE DF MSRS */ - msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CAP, - &(df_state->msr_cap)); + msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CAP, &(df_state->msr_cap)); msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CONFIG, - &(df_state->msr_config)); - msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_SMI, - &(df_state->msr_smi)); + &(df_state->msr_config)); + msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_SMI, &(df_state->msr_smi)); msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_ERROR, - &(df_state->msr_error)); + &(df_state->msr_error)); msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_PM, &(df_state->msr_pm)); msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_DIAG, - &(df_state->msr_diag)); + &(df_state->msr_diag)); msr_write64(MSR_DEVICE_GEODELX_DF, DF_MBD_MSR_DIAG_DF, - &(df_state->msr_df_diag)); + &(df_state->msr_df_diag)); msr_write64(MSR_DEVICE_GEODELX_DF, DF_MSR_PAD_SEL, - &(df_state->msr_pad_sel)); + &(df_state->msr_pad_sel)); /* RESTORE ALL DF REGISTERS */ @@ -1584,8 +1595,7 @@ df_restore_state(DF_SAVE_RESTORE * df_state) /* RESTORE FILTER COEFFICIENTS */ for (i = 0; i < 512; i++) - WRITE_VID32(DF_COEFFICIENT_BASE + (i << 2), - df_state->coefficients[i]); + WRITE_VID32(DF_COEFFICIENT_BASE + (i << 2), df_state->coefficients[i]); /* RESTORE DCFG AND VCFG */ @@ -1655,9 +1665,10 @@ df_read_composite_crc(int crc_source) do { line = READ_REG32(DC3_LINE_CNT_STATUS); } while ((line & DC3_LNCNT_EVEN_FIELD) != field || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 10 || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 15); - } else { + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 10 || + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 15); + } + else { /* NON-INTERLACED - EVEN FIELD CRCS ARE INVALID */ if (crc_source & DF_CRC_SOURCE_EVEN) @@ -1670,7 +1681,7 @@ df_read_composite_crc(int crc_source) /* WAIT FOR THE CRC TO BE COMPLETED */ - while (!(READ_VID32(DF_VID_CRC) & 4)) ; + while (!(READ_VID32(DF_VID_CRC) & 4)); crc = READ_VID32(DF_VID_CRC32); @@ -1686,7 +1697,8 @@ df_read_composite_crc(int crc_source) unsigned long df_read_composite_window_crc(unsigned long x, unsigned long y, - unsigned long width, unsigned long height, int source) + unsigned long width, unsigned long height, + int source) { Q_WORD msr_value; unsigned long interlaced; @@ -1709,7 +1721,8 @@ df_read_composite_window_crc(unsigned long x, unsigned long y, vsyncstart = (READ_REG32(DC3_V_SYNC_EVEN) & 0xFFF) + 1; vactive = (READ_REG32(DC3_V_ACTIVE_EVEN) & 0xFFF) + 1; vblankstart = (READ_REG32(DC3_V_BLANK_EVEN) & 0xFFF) + 1; - } else { + } + else { vsyncend = ((READ_REG32(DC3_V_SYNC_TIMING) >> 16) & 0xFFF) + 1; vtotal = ((READ_REG32(DC3_V_ACTIVE_TIMING) >> 16) & 0xFFF) + 1; vsyncstart = (READ_REG32(DC3_V_SYNC_TIMING) & 0xFFF) + 1; @@ -1942,9 +1955,10 @@ df_read_composite_window_crc(unsigned long x, unsigned long y, do { line = READ_REG32(DC3_LINE_CNT_STATUS); } while ((line & DC3_LNCNT_EVEN_FIELD) != field || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 1 || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 5); - } else { + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 1 || + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 5); + } + else { /* NON-INTERLACED - EVEN FIELD CRCS ARE INVALID */ if (source & DF_CRC_SOURCE_EVEN) @@ -1970,11 +1984,11 @@ df_read_composite_window_crc(unsigned long x, unsigned long y, /* DELAY TWO FRAMES */ - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)) ; - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)) ; - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)); + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)); + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); /* VERIFY THAT XSTATE = 11 */ @@ -2033,7 +2047,7 @@ df_read_panel_crc(void) /* WAIT FOR THE CRC TO BE COMPLETED */ - while (!(READ_VID32(DF_PANEL_CRC) & 4)) ; + while (!(READ_VID32(DF_PANEL_CRC) & 4)); return READ_VID32(DF_PANEL_CRC32); } @@ -2076,7 +2090,7 @@ df_get_video_enable(int *enable, unsigned long *flags) int df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS * video_source_odd, - DF_VIDEO_SOURCE_PARAMS * video_source_even) + DF_VIDEO_SOURCE_PARAMS * video_source_even) { unsigned long format, temp; unsigned long size; @@ -2171,7 +2185,8 @@ df_get_video_position(DF_VIDEO_POSITION * video_window) if (READ_REG32(DC3_IRQ_FILT_CTL) & DC3_IRQFILT_INTL_EN) { vsyncend = ((READ_REG32(DC3_V_SYNC_EVEN) >> 16) & 0xFFF) + 1; vtotal = ((READ_REG32(DC3_V_ACTIVE_EVEN) >> 16) & 0xFFF) + 1; - } else { + } + else { vsyncend = ((READ_REG32(DC3_V_SYNC_TIMING) >> 16) & 0xFFF) + 1; vtotal = ((READ_REG32(DC3_V_ACTIVE_TIMING) >> 16) & 0xFFF) + 1; } @@ -2326,7 +2341,8 @@ df_get_video_color_key(unsigned long *key, unsigned long *mask, int *graphics) *graphics = 0; *key = READ_VID32(DF_VIDEO_COLOR_KEY) & 0xFFFFFF; *mask = READ_VID32(DF_VIDEO_COLOR_MASK) & 0xFFFFFF; - } else { + } + else { *graphics = 1; *key = READ_REG32(DC3_COLOR_KEY) & 0xFFFFFF; @@ -2423,7 +2439,7 @@ df_get_video_cursor_color_key_enable(void) int df_get_alpha_window_configuration(int window, - DF_ALPHA_REGION_PARAMS * alpha_data) + DF_ALPHA_REGION_PARAMS * alpha_data) { unsigned long pos, color, alpha_ctl; unsigned long hsyncend, htotal; @@ -2442,7 +2458,8 @@ df_get_alpha_window_configuration(int window, if (READ_REG32(DC3_IRQ_FILT_CTL) & DC3_IRQFILT_INTL_EN) { vtotal = ((READ_REG32(DC3_V_ACTIVE_EVEN) >> 16) & 0xFFF) + 1; vsyncend = ((READ_REG32(DC3_V_SYNC_EVEN) >> 16) & 0xFFF) + 1; - } else { + } + else { vtotal = ((READ_REG32(DC3_V_ACTIVE_TIMING) >> 16) & 0xFFF) + 1; vsyncend = ((READ_REG32(DC3_V_SYNC_TIMING) >> 16) & 0xFFF) + 1; } @@ -2510,8 +2527,8 @@ df_get_alpha_window_configuration(int window, if (alpha_ctl & DF_ACTRL_PERPIXEL_EN) alpha_data->flags |= DF_ALPHAFLAG_PERPIXELENABLED; - delta = (char)((alpha_ctl >> 8) & 0xFF); - alpha_data->delta = (long)delta; + delta = (char) ((alpha_ctl >> 8) & 0xFF); + alpha_data->delta = (long) delta; return CIM_STATUS_OK; } @@ -2579,7 +2596,8 @@ df_get_output_color_space(int *color_space) *color_space = DF_OUTPUT_ARGB; else *color_space = DF_OUTPUT_RGB; - } else { + } + else { *color_space = DF_OUTPUT_SDTV; if (alpha_ctl & DF_HD_GRAPHICS) diff --git a/driver/xf86-video-geode/src/cim/cim_filter.c b/driver/xf86-video-geode/src/cim/cim_filter.c index 87c1bf62e..68e9ae59d 100644 --- a/driver/xf86-video-geode/src/cim/cim_filter.c +++ b/driver/xf86-video-geode/src/cim/cim_filter.c @@ -29,519 +29,519 @@ */ long CimarronVideoFilter256[][2] = { - {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ - {0x10008008, 0x00000008}, /* -8, 4096, 8, 0 */ - {0x10008010, 0x80010011}, /* -16, 4096, 17, -1 */ - {0x10008019, 0x8001001A}, /* -25, 4096, 26, -1 */ - {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ - {0x0FFF8029, 0x8003002D}, /* -41, 4095, 45, -3 */ - {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ - {0x0FFC8038, 0x80040040}, /* -56, 4092, 64, -4 */ - {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ - {0x0FF88047, 0x80050054}, /* -71, 4088, 84, -5 */ - {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ - {0x0FF48055, 0x80070068}, /* -85, 4084, 104, -7 */ - {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ - {0x0FEE8063, 0x8008007D}, /* -99, 4078, 125, -8 */ - {0x0FEA8069, 0x80090088}, /* -105, 4074, 136, -9 */ - {0x0FE78070, 0x800A0093}, /* -112, 4071, 147, -10 */ - {0x0FE28076, 0x800A009E}, /* -118, 4066, 158, -10 */ - {0x0FDD807C, 0x800B00AA}, /* -124, 4061, 170, -11 */ - {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ - {0x0FD48088, 0x800D00C1}, /* -136, 4052, 193, -13 */ - {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ - {0x0FC88093, 0x800E00D9}, /* -147, 4040, 217, -14 */ - {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ - {0x0FBD809E, 0x801000F1}, /* -158, 4029, 241, -16 */ - {0x0FB680A3, 0x801000FD}, /* -163, 4022, 253, -16 */ - {0x0FAF80A8, 0x8011010A}, /* -168, 4015, 266, -17 */ - {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ - {0x0FA180B2, 0x80130124}, /* -178, 4001, 292, -19 */ - {0x0F9980B6, 0x80140131}, /* -182, 3993, 305, -20 */ - {0x0F9280BB, 0x8015013E}, /* -187, 3986, 318, -21 */ - {0x0F8880BF, 0x8015014C}, /* -191, 3976, 332, -21 */ - {0x0F8080C3, 0x80160159}, /* -195, 3968, 345, -22 */ - {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ - {0x0F6E80CB, 0x80180175}, /* -203, 3950, 373, -24 */ - {0x0F6580CF, 0x80190183}, /* -207, 3941, 387, -25 */ - {0x0F5C80D3, 0x801A0191}, /* -211, 3932, 401, -26 */ - {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ - {0x0F4880DA, 0x801C01AE}, /* -218, 3912, 430, -28 */ - {0x0F3D80DD, 0x801D01BD}, /* -221, 3901, 445, -29 */ - {0x0F3280E0, 0x801E01CC}, /* -224, 3890, 460, -30 */ - {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ - {0x0F1C80E6, 0x802001EA}, /* -230, 3868, 490, -32 */ - {0x0F1180E9, 0x802101F9}, /* -233, 3857, 505, -33 */ - {0x0F0480EB, 0x80210208}, /* -235, 3844, 520, -33 */ - {0x0EFA80EF, 0x80230218}, /* -239, 3834, 536, -35 */ - {0x0EEC80F0, 0x80230227}, /* -240, 3820, 551, -35 */ - {0x0EE080F3, 0x80240237}, /* -243, 3808, 567, -36 */ - {0x0ED380F5, 0x80250247}, /* -245, 3795, 583, -37 */ - {0x0EC780F7, 0x80270257}, /* -247, 3783, 599, -39 */ - {0x0EB980F9, 0x80280268}, /* -249, 3769, 616, -40 */ - {0x0EAC80FB, 0x80290278}, /* -251, 3756, 632, -41 */ - {0x0E9E80FD, 0x802A0289}, /* -253, 3742, 649, -42 */ - {0x0E9080FE, 0x802B0299}, /* -254, 3728, 665, -43 */ - {0x0E838100, 0x802D02AA}, /* -256, 3715, 682, -45 */ - {0x0E758102, 0x802E02BB}, /* -258, 3701, 699, -46 */ - {0x0E668103, 0x802F02CC}, /* -259, 3686, 716, -47 */ - {0x0E568104, 0x803002DE}, /* -260, 3670, 734, -48 */ - {0x0E498106, 0x803202EF}, /* -262, 3657, 751, -50 */ - {0x0E398107, 0x80330301}, /* -263, 3641, 769, -51 */ - {0x0E298108, 0x80340313}, /* -264, 3625, 787, -52 */ - {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ - {0x0E0B810A, 0x80370336}, /* -266, 3595, 822, -55 */ - {0x0DFA810A, 0x80380348}, /* -266, 3578, 840, -56 */ - {0x0DEA810B, 0x803A035B}, /* -267, 3562, 859, -58 */ - {0x0DDA810C, 0x803B036D}, /* -268, 3546, 877, -59 */ - {0x0DCA810C, 0x803D037F}, /* -268, 3530, 895, -61 */ - {0x0DB7810B, 0x803E0392}, /* -267, 3511, 914, -62 */ - {0x0DA7810C, 0x804003A5}, /* -268, 3495, 933, -64 */ - {0x0D95810C, 0x804103B8}, /* -268, 3477, 952, -65 */ - {0x0D85810C, 0x804303CA}, /* -268, 3461, 970, -67 */ - {0x0D73810C, 0x804403DD}, /* -268, 3443, 989, -68 */ - {0x0D61810C, 0x804603F1}, /* -268, 3425, 1009, -70 */ - {0x0D50810C, 0x80480404}, /* -268, 3408, 1028, -72 */ - {0x0D3E810C, 0x80490417}, /* -268, 3390, 1047, -73 */ - {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ - {0x0D1B810C, 0x804D043E}, /* -268, 3355, 1086, -77 */ - {0x0D07810B, 0x804E0452}, /* -267, 3335, 1106, -78 */ - {0x0CF5810B, 0x80500466}, /* -267, 3317, 1126, -80 */ - {0x0CE2810A, 0x8052047A}, /* -266, 3298, 1146, -82 */ - {0x0CCF810A, 0x8053048E}, /* -266, 3279, 1166, -83 */ - {0x0CBC8109, 0x805504A2}, /* -265, 3260, 1186, -85 */ - {0x0CA98108, 0x805704B6}, /* -264, 3241, 1206, -87 */ - {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ - {0x0C838107, 0x805B04DF}, /* -263, 3203, 1247, -91 */ - {0x0C6F8106, 0x805C04F3}, /* -262, 3183, 1267, -92 */ - {0x0C5B8105, 0x805E0508}, /* -261, 3163, 1288, -94 */ - {0x0C478104, 0x8060051D}, /* -260, 3143, 1309, -96 */ - {0x0C348103, 0x80620531}, /* -259, 3124, 1329, -98 */ - {0x0C1F8102, 0x80640547}, /* -258, 3103, 1351, -100 */ - {0x0C0C8101, 0x8066055B}, /* -257, 3084, 1371, -102 */ - {0x0BF88100, 0x80680570}, /* -256, 3064, 1392, -104 */ - {0x0BE380FE, 0x806A0585}, /* -254, 3043, 1413, -106 */ - {0x0BCF80FD, 0x806C059A}, /* -253, 3023, 1434, -108 */ - {0x0BBA80FC, 0x806E05B0}, /* -252, 3002, 1456, -110 */ - {0x0BA480F9, 0x807005C5}, /* -249, 2980, 1477, -112 */ - {0x0B8F80F8, 0x807205DB}, /* -248, 2959, 1499, -114 */ - {0x0B7A80F6, 0x807405F0}, /* -246, 2938, 1520, -116 */ - {0x0B6580F5, 0x80760606}, /* -245, 2917, 1542, -118 */ - {0x0B4F80F3, 0x8077061B}, /* -243, 2895, 1563, -119 */ - {0x0B3A80F2, 0x80790631}, /* -242, 2874, 1585, -121 */ - {0x0B2480F0, 0x807B0647}, /* -240, 2852, 1607, -123 */ - {0x0B0F80EE, 0x807D065C}, /* -238, 2831, 1628, -125 */ - {0x0AF980ED, 0x807F0673}, /* -237, 2809, 1651, -127 */ - {0x0AE480EB, 0x80810688}, /* -235, 2788, 1672, -129 */ - {0x0ACE80E9, 0x8084069F}, /* -233, 2766, 1695, -132 */ - {0x0AB980E7, 0x808606B4}, /* -231, 2745, 1716, -134 */ - {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ - {0x0A8D80E4, 0x808A06E1}, /* -228, 2701, 1761, -138 */ - {0x0A7780E2, 0x808C06F7}, /* -226, 2679, 1783, -140 */ - {0x0A6180E0, 0x808E070D}, /* -224, 2657, 1805, -142 */ - {0x0A4B80DE, 0x80910724}, /* -222, 2635, 1828, -145 */ - {0x0A3580DC, 0x8093073A}, /* -220, 2613, 1850, -147 */ - {0x0A1F80DA, 0x80950750}, /* -218, 2591, 1872, -149 */ - {0x0A0880D8, 0x80970767}, /* -216, 2568, 1895, -151 */ - {0x09F280D6, 0x8099077D}, /* -214, 2546, 1917, -153 */ - {0x09DD80D4, 0x809C0793}, /* -212, 2525, 1939, -156 */ - {0x09C680D2, 0x809E07AA}, /* -210, 2502, 1962, -158 */ - {0x09B080D0, 0x80A007C0}, /* -208, 2480, 1984, -160 */ - {0x099980CE, 0x80A207D7}, /* -206, 2457, 2007, -162 */ - {0x098380CB, 0x80A507ED}, /* -203, 2435, 2029, -165 */ - {0x096C80C9, 0x80A70804}, /* -201, 2412, 2052, -167 */ - {0x095680C7, 0x80A9081A}, /* -199, 2390, 2074, -169 */ - {0x094080C5, 0x80AB0830}, /* -197, 2368, 2096, -171 */ - {0x092980C3, 0x80AE0848}, /* -195, 2345, 2120, -174 */ - {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ - {0x08FC80BE, 0x80B20874}, /* -190, 2300, 2164, -178 */ - {0x08E580BC, 0x80B4088B}, /* -188, 2277, 2187, -180 */ - {0x08D080BB, 0x80B708A2}, /* -187, 2256, 2210, -183 */ - {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ - {0x08A380B7, 0x80BB08CF}, /* -183, 2211, 2255, -187 */ - {0x088B80B4, 0x80BC08E5}, /* -180, 2187, 2277, -188 */ - {0x087480B2, 0x80BE08FC}, /* -178, 2164, 2300, -190 */ - {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ - {0x084880AE, 0x80C30929}, /* -174, 2120, 2345, -195 */ - {0x083080AB, 0x80C50940}, /* -171, 2096, 2368, -197 */ - {0x081A80A9, 0x80C70956}, /* -169, 2074, 2390, -199 */ - {0x080480A7, 0x80C9096C}, /* -167, 2052, 2412, -201 */ - {0x07ED80A5, 0x80CB0983}, /* -165, 2029, 2435, -203 */ - {0x07D780A2, 0x80CE0999}, /* -162, 2007, 2457, -206 */ - {0x07C080A0, 0x80D009B0}, /* -160, 1984, 2480, -208 */ - {0x07AA809E, 0x80D209C6}, /* -158, 1962, 2502, -210 */ - {0x0793809C, 0x80D409DD}, /* -156, 1939, 2525, -212 */ - {0x077D8099, 0x80D609F2}, /* -153, 1917, 2546, -214 */ - {0x07668097, 0x80D80A09}, /* -151, 1894, 2569, -216 */ - {0x074F8095, 0x80DA0A20}, /* -149, 1871, 2592, -218 */ - {0x073A8093, 0x80DC0A35}, /* -147, 1850, 2613, -220 */ - {0x07238091, 0x80DE0A4C}, /* -145, 1827, 2636, -222 */ - {0x070C808E, 0x80E00A62}, /* -142, 1804, 2658, -224 */ - {0x06F7808C, 0x80E20A77}, /* -140, 1783, 2679, -226 */ - {0x06E0808A, 0x80E40A8E}, /* -138, 1760, 2702, -228 */ - {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ - {0x06B48086, 0x80E70AB9}, /* -134, 1716, 2745, -231 */ - {0x069E8084, 0x80E90ACF}, /* -132, 1694, 2767, -233 */ - {0x06878081, 0x80EB0AE5}, /* -129, 1671, 2789, -235 */ - {0x0672807F, 0x80ED0AFA}, /* -127, 1650, 2810, -237 */ - {0x065C807D, 0x80EE0B0F}, /* -125, 1628, 2831, -238 */ - {0x0646807B, 0x80F00B25}, /* -123, 1606, 2853, -240 */ - {0x06308079, 0x80F20B3B}, /* -121, 1584, 2875, -242 */ - {0x061A8077, 0x80F30B50}, /* -119, 1562, 2896, -243 */ - {0x06068076, 0x80F50B65}, /* -118, 1542, 2917, -245 */ - {0x05F08074, 0x80F60B7A}, /* -116, 1520, 2938, -246 */ - {0x05DB8072, 0x80F80B8F}, /* -114, 1499, 2959, -248 */ - {0x05C58070, 0x80F90BA4}, /* -112, 1477, 2980, -249 */ - {0x05B1806E, 0x80FC0BB9}, /* -110, 1457, 3001, -252 */ - {0x059B806C, 0x80FD0BCE}, /* -108, 1435, 3022, -253 */ - {0x0586806A, 0x80FE0BE2}, /* -106, 1414, 3042, -254 */ - {0x05718068, 0x81000BF7}, /* -104, 1393, 3063, -256 */ - {0x055C8066, 0x81010C0B}, /* -102, 1372, 3083, -257 */ - {0x05478064, 0x81020C1F}, /* -100, 1351, 3103, -258 */ - {0x05328062, 0x81030C33}, /* -98, 1330, 3123, -259 */ - {0x051D8060, 0x81040C47}, /* -96, 1309, 3143, -260 */ - {0x0508805E, 0x81050C5B}, /* -94, 1288, 3163, -261 */ - {0x04F3805C, 0x81060C6F}, /* -92, 1267, 3183, -262 */ - {0x04E0805B, 0x81070C82}, /* -91, 1248, 3202, -263 */ - {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ - {0x04B68057, 0x81080CA9}, /* -87, 1206, 3241, -264 */ - {0x04A28055, 0x81090CBC}, /* -85, 1186, 3260, -265 */ - {0x048E8053, 0x810A0CCF}, /* -83, 1166, 3279, -266 */ - {0x047A8052, 0x810A0CE2}, /* -82, 1146, 3298, -266 */ - {0x04668050, 0x810B0CF5}, /* -80, 1126, 3317, -267 */ - {0x0451804E, 0x810B0D08}, /* -78, 1105, 3336, -267 */ - {0x043E804D, 0x810C0D1B}, /* -77, 1086, 3355, -268 */ - {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ - {0x04178049, 0x810C0D3E}, /* -73, 1047, 3390, -268 */ - {0x04038048, 0x810C0D51}, /* -72, 1027, 3409, -268 */ - {0x03F08046, 0x810C0D62}, /* -70, 1008, 3426, -268 */ - {0x03DD8044, 0x810C0D73}, /* -68, 989, 3443, -268 */ - {0x03CA8043, 0x810C0D85}, /* -67, 970, 3461, -268 */ - {0x03B78041, 0x810C0D96}, /* -65, 951, 3478, -268 */ - {0x03A48040, 0x810C0DA8}, /* -64, 932, 3496, -268 */ - {0x0391803E, 0x810B0DB8}, /* -62, 913, 3512, -267 */ - {0x0380803D, 0x810C0DC9}, /* -61, 896, 3529, -268 */ - {0x036D803B, 0x810C0DDA}, /* -59, 877, 3546, -268 */ - {0x035B803A, 0x810B0DEA}, /* -58, 859, 3562, -267 */ - {0x03488038, 0x810A0DFA}, /* -56, 840, 3578, -266 */ - {0x03368037, 0x810A0E0B}, /* -55, 822, 3595, -266 */ - {0x03248036, 0x81090E1B}, /* -54, 804, 3611, -265 */ - {0x03128034, 0x81080E2A}, /* -52, 786, 3626, -264 */ - {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ - {0x02EF8032, 0x81060E49}, /* -50, 751, 3657, -262 */ - {0x02DE8030, 0x81040E56}, /* -48, 734, 3670, -260 */ - {0x02CC802F, 0x81030E66}, /* -47, 716, 3686, -259 */ - {0x02BB802E, 0x81020E75}, /* -46, 699, 3701, -258 */ - {0x02AA802D, 0x81000E83}, /* -45, 682, 3715, -256 */ - {0x0299802B, 0x80FE0E90}, /* -43, 665, 3728, -254 */ - {0x0288802A, 0x80FD0E9F}, /* -42, 648, 3743, -253 */ - {0x02778029, 0x80FB0EAD}, /* -41, 631, 3757, -251 */ - {0x02678028, 0x80F90EBA}, /* -40, 615, 3770, -249 */ - {0x02568027, 0x80F70EC8}, /* -39, 598, 3784, -247 */ - {0x02468025, 0x80F50ED4}, /* -37, 582, 3796, -245 */ - {0x02368024, 0x80F30EE1}, /* -36, 566, 3809, -243 */ - {0x02268023, 0x80F00EED}, /* -35, 550, 3821, -240 */ - {0x02188023, 0x80EF0EFA}, /* -35, 536, 3834, -239 */ - {0x02078021, 0x80EB0F05}, /* -33, 519, 3845, -235 */ - {0x01F98021, 0x80E90F11}, /* -33, 505, 3857, -233 */ - {0x01EA8020, 0x80E60F1C}, /* -32, 490, 3868, -230 */ - {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ - {0x01CD801E, 0x80E00F31}, /* -30, 461, 3889, -224 */ - {0x01BE801D, 0x80DD0F3C}, /* -29, 446, 3900, -221 */ - {0x01AF801C, 0x80DA0F47}, /* -28, 431, 3911, -218 */ - {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ - {0x0192801A, 0x80D30F5B}, /* -26, 402, 3931, -211 */ - {0x01848019, 0x80CF0F64}, /* -25, 388, 3940, -207 */ - {0x01768018, 0x80CB0F6D}, /* -24, 374, 3949, -203 */ - {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ - {0x015A8016, 0x80C30F7F}, /* -22, 346, 3967, -195 */ - {0x014D8015, 0x80BF0F87}, /* -21, 333, 3975, -191 */ - {0x013F8015, 0x80BB0F91}, /* -21, 319, 3985, -187 */ - {0x01328014, 0x80B60F98}, /* -20, 306, 3992, -182 */ - {0x01258013, 0x80B20FA0}, /* -19, 293, 4000, -178 */ - {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ - {0x010B8011, 0x80A80FAE}, /* -17, 267, 4014, -168 */ - {0x00FE8010, 0x80A30FB5}, /* -16, 254, 4021, -163 */ - {0x00F28010, 0x809E0FBC}, /* -16, 242, 4028, -158 */ - {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ - {0x00DA800E, 0x80930FC7}, /* -14, 218, 4039, -147 */ - {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ - {0x00C2800D, 0x80880FD3}, /* -13, 194, 4051, -136 */ - {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ - {0x00AB800B, 0x807C0FDC}, /* -11, 171, 4060, -124 */ - {0x009F800A, 0x80760FE1}, /* -10, 159, 4065, -118 */ - {0x0094800A, 0x80700FE6}, /* -10, 148, 4070, -112 */ - {0x00898009, 0x80690FE9}, /* -9, 137, 4073, -105 */ - {0x007E8008, 0x80630FED}, /* -8, 126, 4077, -99 */ - {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ - {0x00698007, 0x80550FF3}, /* -7, 105, 4083, -85 */ - {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ - {0x00558005, 0x80470FF7}, /* -5, 85, 4087, -71 */ - {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ - {0x00418004, 0x80380FFB}, /* -4, 65, 4091, -56 */ - {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ - {0x002E8003, 0x80290FFE}, /* -3, 46, 4094, -41 */ - {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ - {0x001A8001, 0x80191000}, /* -1, 26, 4096, -25 */ - {0x00118001, 0x80101000}, /* -1, 17, 4096, -16 */ - {0x00080000, 0x80081000}, /* 0, 8, 4096, -8 */ + {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ + {0x10008008, 0x00000008}, /* -8, 4096, 8, 0 */ + {0x10008010, 0x80010011}, /* -16, 4096, 17, -1 */ + {0x10008019, 0x8001001A}, /* -25, 4096, 26, -1 */ + {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ + {0x0FFF8029, 0x8003002D}, /* -41, 4095, 45, -3 */ + {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ + {0x0FFC8038, 0x80040040}, /* -56, 4092, 64, -4 */ + {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ + {0x0FF88047, 0x80050054}, /* -71, 4088, 84, -5 */ + {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ + {0x0FF48055, 0x80070068}, /* -85, 4084, 104, -7 */ + {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ + {0x0FEE8063, 0x8008007D}, /* -99, 4078, 125, -8 */ + {0x0FEA8069, 0x80090088}, /* -105, 4074, 136, -9 */ + {0x0FE78070, 0x800A0093}, /* -112, 4071, 147, -10 */ + {0x0FE28076, 0x800A009E}, /* -118, 4066, 158, -10 */ + {0x0FDD807C, 0x800B00AA}, /* -124, 4061, 170, -11 */ + {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ + {0x0FD48088, 0x800D00C1}, /* -136, 4052, 193, -13 */ + {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ + {0x0FC88093, 0x800E00D9}, /* -147, 4040, 217, -14 */ + {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ + {0x0FBD809E, 0x801000F1}, /* -158, 4029, 241, -16 */ + {0x0FB680A3, 0x801000FD}, /* -163, 4022, 253, -16 */ + {0x0FAF80A8, 0x8011010A}, /* -168, 4015, 266, -17 */ + {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ + {0x0FA180B2, 0x80130124}, /* -178, 4001, 292, -19 */ + {0x0F9980B6, 0x80140131}, /* -182, 3993, 305, -20 */ + {0x0F9280BB, 0x8015013E}, /* -187, 3986, 318, -21 */ + {0x0F8880BF, 0x8015014C}, /* -191, 3976, 332, -21 */ + {0x0F8080C3, 0x80160159}, /* -195, 3968, 345, -22 */ + {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ + {0x0F6E80CB, 0x80180175}, /* -203, 3950, 373, -24 */ + {0x0F6580CF, 0x80190183}, /* -207, 3941, 387, -25 */ + {0x0F5C80D3, 0x801A0191}, /* -211, 3932, 401, -26 */ + {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ + {0x0F4880DA, 0x801C01AE}, /* -218, 3912, 430, -28 */ + {0x0F3D80DD, 0x801D01BD}, /* -221, 3901, 445, -29 */ + {0x0F3280E0, 0x801E01CC}, /* -224, 3890, 460, -30 */ + {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ + {0x0F1C80E6, 0x802001EA}, /* -230, 3868, 490, -32 */ + {0x0F1180E9, 0x802101F9}, /* -233, 3857, 505, -33 */ + {0x0F0480EB, 0x80210208}, /* -235, 3844, 520, -33 */ + {0x0EFA80EF, 0x80230218}, /* -239, 3834, 536, -35 */ + {0x0EEC80F0, 0x80230227}, /* -240, 3820, 551, -35 */ + {0x0EE080F3, 0x80240237}, /* -243, 3808, 567, -36 */ + {0x0ED380F5, 0x80250247}, /* -245, 3795, 583, -37 */ + {0x0EC780F7, 0x80270257}, /* -247, 3783, 599, -39 */ + {0x0EB980F9, 0x80280268}, /* -249, 3769, 616, -40 */ + {0x0EAC80FB, 0x80290278}, /* -251, 3756, 632, -41 */ + {0x0E9E80FD, 0x802A0289}, /* -253, 3742, 649, -42 */ + {0x0E9080FE, 0x802B0299}, /* -254, 3728, 665, -43 */ + {0x0E838100, 0x802D02AA}, /* -256, 3715, 682, -45 */ + {0x0E758102, 0x802E02BB}, /* -258, 3701, 699, -46 */ + {0x0E668103, 0x802F02CC}, /* -259, 3686, 716, -47 */ + {0x0E568104, 0x803002DE}, /* -260, 3670, 734, -48 */ + {0x0E498106, 0x803202EF}, /* -262, 3657, 751, -50 */ + {0x0E398107, 0x80330301}, /* -263, 3641, 769, -51 */ + {0x0E298108, 0x80340313}, /* -264, 3625, 787, -52 */ + {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ + {0x0E0B810A, 0x80370336}, /* -266, 3595, 822, -55 */ + {0x0DFA810A, 0x80380348}, /* -266, 3578, 840, -56 */ + {0x0DEA810B, 0x803A035B}, /* -267, 3562, 859, -58 */ + {0x0DDA810C, 0x803B036D}, /* -268, 3546, 877, -59 */ + {0x0DCA810C, 0x803D037F}, /* -268, 3530, 895, -61 */ + {0x0DB7810B, 0x803E0392}, /* -267, 3511, 914, -62 */ + {0x0DA7810C, 0x804003A5}, /* -268, 3495, 933, -64 */ + {0x0D95810C, 0x804103B8}, /* -268, 3477, 952, -65 */ + {0x0D85810C, 0x804303CA}, /* -268, 3461, 970, -67 */ + {0x0D73810C, 0x804403DD}, /* -268, 3443, 989, -68 */ + {0x0D61810C, 0x804603F1}, /* -268, 3425, 1009, -70 */ + {0x0D50810C, 0x80480404}, /* -268, 3408, 1028, -72 */ + {0x0D3E810C, 0x80490417}, /* -268, 3390, 1047, -73 */ + {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ + {0x0D1B810C, 0x804D043E}, /* -268, 3355, 1086, -77 */ + {0x0D07810B, 0x804E0452}, /* -267, 3335, 1106, -78 */ + {0x0CF5810B, 0x80500466}, /* -267, 3317, 1126, -80 */ + {0x0CE2810A, 0x8052047A}, /* -266, 3298, 1146, -82 */ + {0x0CCF810A, 0x8053048E}, /* -266, 3279, 1166, -83 */ + {0x0CBC8109, 0x805504A2}, /* -265, 3260, 1186, -85 */ + {0x0CA98108, 0x805704B6}, /* -264, 3241, 1206, -87 */ + {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ + {0x0C838107, 0x805B04DF}, /* -263, 3203, 1247, -91 */ + {0x0C6F8106, 0x805C04F3}, /* -262, 3183, 1267, -92 */ + {0x0C5B8105, 0x805E0508}, /* -261, 3163, 1288, -94 */ + {0x0C478104, 0x8060051D}, /* -260, 3143, 1309, -96 */ + {0x0C348103, 0x80620531}, /* -259, 3124, 1329, -98 */ + {0x0C1F8102, 0x80640547}, /* -258, 3103, 1351, -100 */ + {0x0C0C8101, 0x8066055B}, /* -257, 3084, 1371, -102 */ + {0x0BF88100, 0x80680570}, /* -256, 3064, 1392, -104 */ + {0x0BE380FE, 0x806A0585}, /* -254, 3043, 1413, -106 */ + {0x0BCF80FD, 0x806C059A}, /* -253, 3023, 1434, -108 */ + {0x0BBA80FC, 0x806E05B0}, /* -252, 3002, 1456, -110 */ + {0x0BA480F9, 0x807005C5}, /* -249, 2980, 1477, -112 */ + {0x0B8F80F8, 0x807205DB}, /* -248, 2959, 1499, -114 */ + {0x0B7A80F6, 0x807405F0}, /* -246, 2938, 1520, -116 */ + {0x0B6580F5, 0x80760606}, /* -245, 2917, 1542, -118 */ + {0x0B4F80F3, 0x8077061B}, /* -243, 2895, 1563, -119 */ + {0x0B3A80F2, 0x80790631}, /* -242, 2874, 1585, -121 */ + {0x0B2480F0, 0x807B0647}, /* -240, 2852, 1607, -123 */ + {0x0B0F80EE, 0x807D065C}, /* -238, 2831, 1628, -125 */ + {0x0AF980ED, 0x807F0673}, /* -237, 2809, 1651, -127 */ + {0x0AE480EB, 0x80810688}, /* -235, 2788, 1672, -129 */ + {0x0ACE80E9, 0x8084069F}, /* -233, 2766, 1695, -132 */ + {0x0AB980E7, 0x808606B4}, /* -231, 2745, 1716, -134 */ + {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ + {0x0A8D80E4, 0x808A06E1}, /* -228, 2701, 1761, -138 */ + {0x0A7780E2, 0x808C06F7}, /* -226, 2679, 1783, -140 */ + {0x0A6180E0, 0x808E070D}, /* -224, 2657, 1805, -142 */ + {0x0A4B80DE, 0x80910724}, /* -222, 2635, 1828, -145 */ + {0x0A3580DC, 0x8093073A}, /* -220, 2613, 1850, -147 */ + {0x0A1F80DA, 0x80950750}, /* -218, 2591, 1872, -149 */ + {0x0A0880D8, 0x80970767}, /* -216, 2568, 1895, -151 */ + {0x09F280D6, 0x8099077D}, /* -214, 2546, 1917, -153 */ + {0x09DD80D4, 0x809C0793}, /* -212, 2525, 1939, -156 */ + {0x09C680D2, 0x809E07AA}, /* -210, 2502, 1962, -158 */ + {0x09B080D0, 0x80A007C0}, /* -208, 2480, 1984, -160 */ + {0x099980CE, 0x80A207D7}, /* -206, 2457, 2007, -162 */ + {0x098380CB, 0x80A507ED}, /* -203, 2435, 2029, -165 */ + {0x096C80C9, 0x80A70804}, /* -201, 2412, 2052, -167 */ + {0x095680C7, 0x80A9081A}, /* -199, 2390, 2074, -169 */ + {0x094080C5, 0x80AB0830}, /* -197, 2368, 2096, -171 */ + {0x092980C3, 0x80AE0848}, /* -195, 2345, 2120, -174 */ + {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ + {0x08FC80BE, 0x80B20874}, /* -190, 2300, 2164, -178 */ + {0x08E580BC, 0x80B4088B}, /* -188, 2277, 2187, -180 */ + {0x08D080BB, 0x80B708A2}, /* -187, 2256, 2210, -183 */ + {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ + {0x08A380B7, 0x80BB08CF}, /* -183, 2211, 2255, -187 */ + {0x088B80B4, 0x80BC08E5}, /* -180, 2187, 2277, -188 */ + {0x087480B2, 0x80BE08FC}, /* -178, 2164, 2300, -190 */ + {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ + {0x084880AE, 0x80C30929}, /* -174, 2120, 2345, -195 */ + {0x083080AB, 0x80C50940}, /* -171, 2096, 2368, -197 */ + {0x081A80A9, 0x80C70956}, /* -169, 2074, 2390, -199 */ + {0x080480A7, 0x80C9096C}, /* -167, 2052, 2412, -201 */ + {0x07ED80A5, 0x80CB0983}, /* -165, 2029, 2435, -203 */ + {0x07D780A2, 0x80CE0999}, /* -162, 2007, 2457, -206 */ + {0x07C080A0, 0x80D009B0}, /* -160, 1984, 2480, -208 */ + {0x07AA809E, 0x80D209C6}, /* -158, 1962, 2502, -210 */ + {0x0793809C, 0x80D409DD}, /* -156, 1939, 2525, -212 */ + {0x077D8099, 0x80D609F2}, /* -153, 1917, 2546, -214 */ + {0x07668097, 0x80D80A09}, /* -151, 1894, 2569, -216 */ + {0x074F8095, 0x80DA0A20}, /* -149, 1871, 2592, -218 */ + {0x073A8093, 0x80DC0A35}, /* -147, 1850, 2613, -220 */ + {0x07238091, 0x80DE0A4C}, /* -145, 1827, 2636, -222 */ + {0x070C808E, 0x80E00A62}, /* -142, 1804, 2658, -224 */ + {0x06F7808C, 0x80E20A77}, /* -140, 1783, 2679, -226 */ + {0x06E0808A, 0x80E40A8E}, /* -138, 1760, 2702, -228 */ + {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ + {0x06B48086, 0x80E70AB9}, /* -134, 1716, 2745, -231 */ + {0x069E8084, 0x80E90ACF}, /* -132, 1694, 2767, -233 */ + {0x06878081, 0x80EB0AE5}, /* -129, 1671, 2789, -235 */ + {0x0672807F, 0x80ED0AFA}, /* -127, 1650, 2810, -237 */ + {0x065C807D, 0x80EE0B0F}, /* -125, 1628, 2831, -238 */ + {0x0646807B, 0x80F00B25}, /* -123, 1606, 2853, -240 */ + {0x06308079, 0x80F20B3B}, /* -121, 1584, 2875, -242 */ + {0x061A8077, 0x80F30B50}, /* -119, 1562, 2896, -243 */ + {0x06068076, 0x80F50B65}, /* -118, 1542, 2917, -245 */ + {0x05F08074, 0x80F60B7A}, /* -116, 1520, 2938, -246 */ + {0x05DB8072, 0x80F80B8F}, /* -114, 1499, 2959, -248 */ + {0x05C58070, 0x80F90BA4}, /* -112, 1477, 2980, -249 */ + {0x05B1806E, 0x80FC0BB9}, /* -110, 1457, 3001, -252 */ + {0x059B806C, 0x80FD0BCE}, /* -108, 1435, 3022, -253 */ + {0x0586806A, 0x80FE0BE2}, /* -106, 1414, 3042, -254 */ + {0x05718068, 0x81000BF7}, /* -104, 1393, 3063, -256 */ + {0x055C8066, 0x81010C0B}, /* -102, 1372, 3083, -257 */ + {0x05478064, 0x81020C1F}, /* -100, 1351, 3103, -258 */ + {0x05328062, 0x81030C33}, /* -98, 1330, 3123, -259 */ + {0x051D8060, 0x81040C47}, /* -96, 1309, 3143, -260 */ + {0x0508805E, 0x81050C5B}, /* -94, 1288, 3163, -261 */ + {0x04F3805C, 0x81060C6F}, /* -92, 1267, 3183, -262 */ + {0x04E0805B, 0x81070C82}, /* -91, 1248, 3202, -263 */ + {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ + {0x04B68057, 0x81080CA9}, /* -87, 1206, 3241, -264 */ + {0x04A28055, 0x81090CBC}, /* -85, 1186, 3260, -265 */ + {0x048E8053, 0x810A0CCF}, /* -83, 1166, 3279, -266 */ + {0x047A8052, 0x810A0CE2}, /* -82, 1146, 3298, -266 */ + {0x04668050, 0x810B0CF5}, /* -80, 1126, 3317, -267 */ + {0x0451804E, 0x810B0D08}, /* -78, 1105, 3336, -267 */ + {0x043E804D, 0x810C0D1B}, /* -77, 1086, 3355, -268 */ + {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ + {0x04178049, 0x810C0D3E}, /* -73, 1047, 3390, -268 */ + {0x04038048, 0x810C0D51}, /* -72, 1027, 3409, -268 */ + {0x03F08046, 0x810C0D62}, /* -70, 1008, 3426, -268 */ + {0x03DD8044, 0x810C0D73}, /* -68, 989, 3443, -268 */ + {0x03CA8043, 0x810C0D85}, /* -67, 970, 3461, -268 */ + {0x03B78041, 0x810C0D96}, /* -65, 951, 3478, -268 */ + {0x03A48040, 0x810C0DA8}, /* -64, 932, 3496, -268 */ + {0x0391803E, 0x810B0DB8}, /* -62, 913, 3512, -267 */ + {0x0380803D, 0x810C0DC9}, /* -61, 896, 3529, -268 */ + {0x036D803B, 0x810C0DDA}, /* -59, 877, 3546, -268 */ + {0x035B803A, 0x810B0DEA}, /* -58, 859, 3562, -267 */ + {0x03488038, 0x810A0DFA}, /* -56, 840, 3578, -266 */ + {0x03368037, 0x810A0E0B}, /* -55, 822, 3595, -266 */ + {0x03248036, 0x81090E1B}, /* -54, 804, 3611, -265 */ + {0x03128034, 0x81080E2A}, /* -52, 786, 3626, -264 */ + {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ + {0x02EF8032, 0x81060E49}, /* -50, 751, 3657, -262 */ + {0x02DE8030, 0x81040E56}, /* -48, 734, 3670, -260 */ + {0x02CC802F, 0x81030E66}, /* -47, 716, 3686, -259 */ + {0x02BB802E, 0x81020E75}, /* -46, 699, 3701, -258 */ + {0x02AA802D, 0x81000E83}, /* -45, 682, 3715, -256 */ + {0x0299802B, 0x80FE0E90}, /* -43, 665, 3728, -254 */ + {0x0288802A, 0x80FD0E9F}, /* -42, 648, 3743, -253 */ + {0x02778029, 0x80FB0EAD}, /* -41, 631, 3757, -251 */ + {0x02678028, 0x80F90EBA}, /* -40, 615, 3770, -249 */ + {0x02568027, 0x80F70EC8}, /* -39, 598, 3784, -247 */ + {0x02468025, 0x80F50ED4}, /* -37, 582, 3796, -245 */ + {0x02368024, 0x80F30EE1}, /* -36, 566, 3809, -243 */ + {0x02268023, 0x80F00EED}, /* -35, 550, 3821, -240 */ + {0x02188023, 0x80EF0EFA}, /* -35, 536, 3834, -239 */ + {0x02078021, 0x80EB0F05}, /* -33, 519, 3845, -235 */ + {0x01F98021, 0x80E90F11}, /* -33, 505, 3857, -233 */ + {0x01EA8020, 0x80E60F1C}, /* -32, 490, 3868, -230 */ + {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ + {0x01CD801E, 0x80E00F31}, /* -30, 461, 3889, -224 */ + {0x01BE801D, 0x80DD0F3C}, /* -29, 446, 3900, -221 */ + {0x01AF801C, 0x80DA0F47}, /* -28, 431, 3911, -218 */ + {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ + {0x0192801A, 0x80D30F5B}, /* -26, 402, 3931, -211 */ + {0x01848019, 0x80CF0F64}, /* -25, 388, 3940, -207 */ + {0x01768018, 0x80CB0F6D}, /* -24, 374, 3949, -203 */ + {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ + {0x015A8016, 0x80C30F7F}, /* -22, 346, 3967, -195 */ + {0x014D8015, 0x80BF0F87}, /* -21, 333, 3975, -191 */ + {0x013F8015, 0x80BB0F91}, /* -21, 319, 3985, -187 */ + {0x01328014, 0x80B60F98}, /* -20, 306, 3992, -182 */ + {0x01258013, 0x80B20FA0}, /* -19, 293, 4000, -178 */ + {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ + {0x010B8011, 0x80A80FAE}, /* -17, 267, 4014, -168 */ + {0x00FE8010, 0x80A30FB5}, /* -16, 254, 4021, -163 */ + {0x00F28010, 0x809E0FBC}, /* -16, 242, 4028, -158 */ + {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ + {0x00DA800E, 0x80930FC7}, /* -14, 218, 4039, -147 */ + {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ + {0x00C2800D, 0x80880FD3}, /* -13, 194, 4051, -136 */ + {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ + {0x00AB800B, 0x807C0FDC}, /* -11, 171, 4060, -124 */ + {0x009F800A, 0x80760FE1}, /* -10, 159, 4065, -118 */ + {0x0094800A, 0x80700FE6}, /* -10, 148, 4070, -112 */ + {0x00898009, 0x80690FE9}, /* -9, 137, 4073, -105 */ + {0x007E8008, 0x80630FED}, /* -8, 126, 4077, -99 */ + {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ + {0x00698007, 0x80550FF3}, /* -7, 105, 4083, -85 */ + {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ + {0x00558005, 0x80470FF7}, /* -5, 85, 4087, -71 */ + {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ + {0x00418004, 0x80380FFB}, /* -4, 65, 4091, -56 */ + {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ + {0x002E8003, 0x80290FFE}, /* -3, 46, 4094, -41 */ + {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ + {0x001A8001, 0x80191000}, /* -1, 26, 4096, -25 */ + {0x00118001, 0x80101000}, /* -1, 17, 4096, -16 */ + {0x00080000, 0x80081000}, /* 0, 8, 4096, -8 */ }; long CimarronVideoFilter128[][2] = { - {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ - {0x10018011, 0x80010011}, /* -17, 4097, 17, -1 */ - {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ - {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ - {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ - {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ - {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ - {0x0FEB806A, 0x80090088}, /* -106, 4075, 136, -9 */ - {0x0FE18076, 0x800A009F}, /* -118, 4065, 159, -10 */ - {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ - {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ - {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ - {0x0FB680A4, 0x801000FE}, /* -164, 4022, 254, -16 */ - {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ - {0x0F9A80B7, 0x80140131}, /* -183, 3994, 305, -20 */ - {0x0F8980C0, 0x8015014C}, /* -192, 3977, 332, -21 */ - {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ - {0x0F6680D0, 0x80190183}, /* -208, 3942, 387, -25 */ - {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ - {0x0F3E80DE, 0x801D01BD}, /* -222, 3902, 445, -29 */ - {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ - {0x0F1180EA, 0x802101FA}, /* -234, 3857, 506, -33 */ - {0x0EF880EE, 0x80220218}, /* -238, 3832, 536, -34 */ - {0x0EDF80F3, 0x80240238}, /* -243, 3807, 568, -36 */ - {0x0EC680F7, 0x80270258}, /* -247, 3782, 600, -39 */ - {0x0EAB80FB, 0x80290279}, /* -251, 3755, 633, -41 */ - {0x0E9080FF, 0x802B029A}, /* -255, 3728, 666, -43 */ - {0x0E748102, 0x802E02BC}, /* -258, 3700, 700, -46 */ - {0x0E588105, 0x803102DE}, /* -261, 3672, 734, -49 */ - {0x0E388107, 0x80330302}, /* -263, 3640, 770, -51 */ - {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ - {0x0DFB810B, 0x80390349}, /* -267, 3579, 841, -57 */ - {0x0DDB810C, 0x803C036D}, /* -268, 3547, 877, -60 */ - {0x0DBA810D, 0x803F0392}, /* -269, 3514, 914, -63 */ - {0x0D98810E, 0x804203B8}, /* -270, 3480, 952, -66 */ - {0x0D74810D, 0x804503DE}, /* -269, 3444, 990, -69 */ - {0x0D50810D, 0x80480405}, /* -269, 3408, 1029, -72 */ - {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ - {0x0D08810C, 0x804F0453}, /* -268, 3336, 1107, -79 */ - {0x0CE3810B, 0x8052047A}, /* -267, 3299, 1146, -82 */ - {0x0CBD810A, 0x805604A3}, /* -266, 3261, 1187, -86 */ - {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ - {0x0C708107, 0x805D04F4}, /* -263, 3184, 1268, -93 */ - {0x0C488105, 0x8061051E}, /* -261, 3144, 1310, -97 */ - {0x0C208103, 0x80640547}, /* -259, 3104, 1351, -100 */ - {0x0BF78100, 0x80680571}, /* -256, 3063, 1393, -104 */ - {0x0BCF80FE, 0x806C059B}, /* -254, 3023, 1435, -108 */ - {0x0BA480FA, 0x807005C6}, /* -250, 2980, 1478, -112 */ - {0x0B7A80F7, 0x807405F1}, /* -247, 2938, 1521, -116 */ - {0x0B4F80F4, 0x8077061C}, /* -244, 2895, 1564, -119 */ - {0x0B2580F1, 0x807C0648}, /* -241, 2853, 1608, -124 */ - {0x0AFA80ED, 0x80800673}, /* -237, 2810, 1651, -128 */ - {0x0ACF80EA, 0x8084069F}, /* -234, 2767, 1695, -132 */ - {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ - {0x0A7880E2, 0x808D06F7}, /* -226, 2680, 1783, -141 */ - {0x0A4C80DF, 0x80910724}, /* -223, 2636, 1828, -145 */ - {0x0A2080DB, 0x80960751}, /* -219, 2592, 1873, -150 */ - {0x09F480D7, 0x809A077D}, /* -215, 2548, 1917, -154 */ - {0x09C780D2, 0x809F07AA}, /* -210, 2503, 1962, -159 */ - {0x099A80CE, 0x80A307D7}, /* -206, 2458, 2007, -163 */ - {0x096D80CA, 0x80A70804}, /* -202, 2413, 2052, -167 */ - {0x094180C6, 0x80AC0831}, /* -198, 2369, 2097, -172 */ - {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ - {0x08E780BE, 0x80B5088C}, /* -190, 2279, 2188, -181 */ - {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ - {0x088C80B5, 0x80BE08E7}, /* -181, 2188, 2279, -190 */ - {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ - {0x083180AC, 0x80C60941}, /* -172, 2097, 2369, -198 */ - {0x080480A7, 0x80CA096D}, /* -167, 2052, 2413, -202 */ - {0x07D780A3, 0x80CE099A}, /* -163, 2007, 2458, -206 */ - {0x07AA809F, 0x80D209C7}, /* -159, 1962, 2503, -210 */ - {0x077D809A, 0x80D709F4}, /* -154, 1917, 2548, -215 */ - {0x07518096, 0x80DB0A20}, /* -150, 1873, 2592, -219 */ - {0x07248091, 0x80DF0A4C}, /* -145, 1828, 2636, -223 */ - {0x06F7808D, 0x80E20A78}, /* -141, 1783, 2680, -226 */ - {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ - {0x069E8084, 0x80EA0AD0}, /* -132, 1694, 2768, -234 */ - {0x06738080, 0x80ED0AFA}, /* -128, 1651, 2810, -237 */ - {0x0647807C, 0x80F10B26}, /* -124, 1607, 2854, -241 */ - {0x061B8077, 0x80F40B50}, /* -119, 1563, 2896, -244 */ - {0x05F18074, 0x80F70B7A}, /* -116, 1521, 2938, -247 */ - {0x05C68070, 0x80FA0BA4}, /* -112, 1478, 2980, -250 */ - {0x059C806C, 0x80FE0BCE}, /* -108, 1436, 3022, -254 */ - {0x05728068, 0x81000BF6}, /* -104, 1394, 3062, -256 */ - {0x05478064, 0x81030C20}, /* -100, 1351, 3104, -259 */ - {0x051E8061, 0x81050C48}, /* -97, 1310, 3144, -261 */ - {0x04F4805D, 0x81070C70}, /* -93, 1268, 3184, -263 */ - {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ - {0x04A38056, 0x810A0CBD}, /* -86, 1187, 3261, -266 */ - {0x047A8052, 0x810B0CE3}, /* -82, 1146, 3299, -267 */ - {0x0453804F, 0x810C0D08}, /* -79, 1107, 3336, -268 */ - {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ - {0x04048048, 0x810D0D51}, /* -72, 1028, 3409, -269 */ - {0x03DE8045, 0x810D0D74}, /* -69, 990, 3444, -269 */ - {0x03B88042, 0x810E0D98}, /* -66, 952, 3480, -270 */ - {0x0393803F, 0x810D0DB9}, /* -63, 915, 3513, -269 */ - {0x036E803C, 0x810C0DDA}, /* -60, 878, 3546, -268 */ - {0x03498039, 0x810B0DFB}, /* -57, 841, 3579, -267 */ - {0x03258036, 0x81090E1A}, /* -54, 805, 3610, -265 */ - {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ - {0x02DE8031, 0x81050E58}, /* -49, 734, 3672, -261 */ - {0x02BC802E, 0x81020E74}, /* -46, 700, 3700, -258 */ - {0x0299802B, 0x80FF0E91}, /* -43, 665, 3729, -255 */ - {0x02788029, 0x80FB0EAC}, /* -41, 632, 3756, -251 */ - {0x02578027, 0x80F70EC7}, /* -39, 599, 3783, -247 */ - {0x02378024, 0x80F30EE0}, /* -36, 567, 3808, -243 */ - {0x02178022, 0x80EE0EF9}, /* -34, 535, 3833, -238 */ - {0x01FA8021, 0x80EA0F11}, /* -33, 506, 3857, -234 */ - {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ - {0x01BE801D, 0x80DE0F3D}, /* -29, 446, 3901, -222 */ - {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ - {0x01848019, 0x80D00F65}, /* -25, 388, 3941, -208 */ - {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ - {0x014D8015, 0x80C00F88}, /* -21, 333, 3976, -192 */ - {0x01328014, 0x80B70F99}, /* -20, 306, 3993, -183 */ - {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ - {0x00FF8010, 0x80A40FB5}, /* -16, 255, 4021, -164 */ - {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ - {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ - {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ - {0x00A0800A, 0x80760FE0}, /* -10, 160, 4064, -118 */ - {0x00898009, 0x806A0FEA}, /* -9, 137, 4074, -106 */ - {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ - {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ - {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ - {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ - {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ - {0x00118001, 0x80111001}, /* -1, 17, 4097, -17 */ - {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ - {0x10018011, 0x80010011}, /* -17, 4097, 17, -1 */ - {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ - {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ - {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ - {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ - {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ - {0x0FEB806A, 0x80090088}, /* -106, 4075, 136, -9 */ - {0x0FE18076, 0x800A009F}, /* -118, 4065, 159, -10 */ - {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ - {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ - {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ - {0x0FB680A4, 0x801000FE}, /* -164, 4022, 254, -16 */ - {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ - {0x0F9A80B7, 0x80140131}, /* -183, 3994, 305, -20 */ - {0x0F8980C0, 0x8015014C}, /* -192, 3977, 332, -21 */ - {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ - {0x0F6680D0, 0x80190183}, /* -208, 3942, 387, -25 */ - {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ - {0x0F3E80DE, 0x801D01BD}, /* -222, 3902, 445, -29 */ - {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ - {0x0F1180EA, 0x802101FA}, /* -234, 3857, 506, -33 */ - {0x0EF880EE, 0x80220218}, /* -238, 3832, 536, -34 */ - {0x0EDF80F3, 0x80240238}, /* -243, 3807, 568, -36 */ - {0x0EC680F7, 0x80270258}, /* -247, 3782, 600, -39 */ - {0x0EAB80FB, 0x80290279}, /* -251, 3755, 633, -41 */ - {0x0E9080FF, 0x802B029A}, /* -255, 3728, 666, -43 */ - {0x0E748102, 0x802E02BC}, /* -258, 3700, 700, -46 */ - {0x0E588105, 0x803102DE}, /* -261, 3672, 734, -49 */ - {0x0E388107, 0x80330302}, /* -263, 3640, 770, -51 */ - {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ - {0x0DFB810B, 0x80390349}, /* -267, 3579, 841, -57 */ - {0x0DDB810C, 0x803C036D}, /* -268, 3547, 877, -60 */ - {0x0DBA810D, 0x803F0392}, /* -269, 3514, 914, -63 */ - {0x0D98810E, 0x804203B8}, /* -270, 3480, 952, -66 */ - {0x0D74810D, 0x804503DE}, /* -269, 3444, 990, -69 */ - {0x0D50810D, 0x80480405}, /* -269, 3408, 1029, -72 */ - {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ - {0x0D08810C, 0x804F0453}, /* -268, 3336, 1107, -79 */ - {0x0CE3810B, 0x8052047A}, /* -267, 3299, 1146, -82 */ - {0x0CBD810A, 0x805604A3}, /* -266, 3261, 1187, -86 */ - {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ - {0x0C708107, 0x805D04F4}, /* -263, 3184, 1268, -93 */ - {0x0C488105, 0x8061051E}, /* -261, 3144, 1310, -97 */ - {0x0C208103, 0x80640547}, /* -259, 3104, 1351, -100 */ - {0x0BF78100, 0x80680571}, /* -256, 3063, 1393, -104 */ - {0x0BCF80FE, 0x806C059B}, /* -254, 3023, 1435, -108 */ - {0x0BA480FA, 0x807005C6}, /* -250, 2980, 1478, -112 */ - {0x0B7A80F7, 0x807405F1}, /* -247, 2938, 1521, -116 */ - {0x0B4F80F4, 0x8077061C}, /* -244, 2895, 1564, -119 */ - {0x0B2580F1, 0x807C0648}, /* -241, 2853, 1608, -124 */ - {0x0AFA80ED, 0x80800673}, /* -237, 2810, 1651, -128 */ - {0x0ACF80EA, 0x8084069F}, /* -234, 2767, 1695, -132 */ - {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ - {0x0A7880E2, 0x808D06F7}, /* -226, 2680, 1783, -141 */ - {0x0A4C80DF, 0x80910724}, /* -223, 2636, 1828, -145 */ - {0x0A2080DB, 0x80960751}, /* -219, 2592, 1873, -150 */ - {0x09F480D7, 0x809A077D}, /* -215, 2548, 1917, -154 */ - {0x09C780D2, 0x809F07AA}, /* -210, 2503, 1962, -159 */ - {0x099A80CE, 0x80A307D7}, /* -206, 2458, 2007, -163 */ - {0x096D80CA, 0x80A70804}, /* -202, 2413, 2052, -167 */ - {0x094180C6, 0x80AC0831}, /* -198, 2369, 2097, -172 */ - {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ - {0x08E780BE, 0x80B5088C}, /* -190, 2279, 2188, -181 */ - {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ - {0x088C80B5, 0x80BE08E7}, /* -181, 2188, 2279, -190 */ - {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ - {0x083180AC, 0x80C60941}, /* -172, 2097, 2369, -198 */ - {0x080480A7, 0x80CA096D}, /* -167, 2052, 2413, -202 */ - {0x07D780A3, 0x80CE099A}, /* -163, 2007, 2458, -206 */ - {0x07AA809F, 0x80D209C7}, /* -159, 1962, 2503, -210 */ - {0x077D809A, 0x80D709F4}, /* -154, 1917, 2548, -215 */ - {0x07518096, 0x80DB0A20}, /* -150, 1873, 2592, -219 */ - {0x07248091, 0x80DF0A4C}, /* -145, 1828, 2636, -223 */ - {0x06F7808D, 0x80E20A78}, /* -141, 1783, 2680, -226 */ - {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ - {0x069E8084, 0x80EA0AD0}, /* -132, 1694, 2768, -234 */ - {0x06738080, 0x80ED0AFA}, /* -128, 1651, 2810, -237 */ - {0x0647807C, 0x80F10B26}, /* -124, 1607, 2854, -241 */ - {0x061B8077, 0x80F40B50}, /* -119, 1563, 2896, -244 */ - {0x05F18074, 0x80F70B7A}, /* -116, 1521, 2938, -247 */ - {0x05C68070, 0x80FA0BA4}, /* -112, 1478, 2980, -250 */ - {0x059C806C, 0x80FE0BCE}, /* -108, 1436, 3022, -254 */ - {0x05728068, 0x81000BF6}, /* -104, 1394, 3062, -256 */ - {0x05478064, 0x81030C20}, /* -100, 1351, 3104, -259 */ - {0x051E8061, 0x81050C48}, /* -97, 1310, 3144, -261 */ - {0x04F4805D, 0x81070C70}, /* -93, 1268, 3184, -263 */ - {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ - {0x04A38056, 0x810A0CBD}, /* -86, 1187, 3261, -266 */ - {0x047A8052, 0x810B0CE3}, /* -82, 1146, 3299, -267 */ - {0x0453804F, 0x810C0D08}, /* -79, 1107, 3336, -268 */ - {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ - {0x04048048, 0x810D0D51}, /* -72, 1028, 3409, -269 */ - {0x03DE8045, 0x810D0D74}, /* -69, 990, 3444, -269 */ - {0x03B88042, 0x810E0D98}, /* -66, 952, 3480, -270 */ - {0x0393803F, 0x810D0DB9}, /* -63, 915, 3513, -269 */ - {0x036E803C, 0x810C0DDA}, /* -60, 878, 3546, -268 */ - {0x03498039, 0x810B0DFB}, /* -57, 841, 3579, -267 */ - {0x03258036, 0x81090E1A}, /* -54, 805, 3610, -265 */ - {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ - {0x02DE8031, 0x81050E58}, /* -49, 734, 3672, -261 */ - {0x02BC802E, 0x81020E74}, /* -46, 700, 3700, -258 */ - {0x0299802B, 0x80FF0E91}, /* -43, 665, 3729, -255 */ - {0x02788029, 0x80FB0EAC}, /* -41, 632, 3756, -251 */ - {0x02578027, 0x80F70EC7}, /* -39, 599, 3783, -247 */ - {0x02378024, 0x80F30EE0}, /* -36, 567, 3808, -243 */ - {0x02178022, 0x80EE0EF9}, /* -34, 535, 3833, -238 */ - {0x01FA8021, 0x80EA0F11}, /* -33, 506, 3857, -234 */ - {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ - {0x01BE801D, 0x80DE0F3D}, /* -29, 446, 3901, -222 */ - {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ - {0x01848019, 0x80D00F65}, /* -25, 388, 3941, -208 */ - {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ - {0x014D8015, 0x80C00F88}, /* -21, 333, 3976, -192 */ - {0x01328014, 0x80B70F99}, /* -20, 306, 3993, -183 */ - {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ - {0x00FF8010, 0x80A40FB5}, /* -16, 255, 4021, -164 */ - {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ - {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ - {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ - {0x00A0800A, 0x80760FE0}, /* -10, 160, 4064, -118 */ - {0x00898009, 0x806A0FEA}, /* -9, 137, 4074, -106 */ - {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ - {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ - {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ - {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ - {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ - {0x00118001, 0x80111001}, /* -1, 17, 4097, -17 */ + {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ + {0x10018011, 0x80010011}, /* -17, 4097, 17, -1 */ + {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ + {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ + {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ + {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ + {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ + {0x0FEB806A, 0x80090088}, /* -106, 4075, 136, -9 */ + {0x0FE18076, 0x800A009F}, /* -118, 4065, 159, -10 */ + {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ + {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ + {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ + {0x0FB680A4, 0x801000FE}, /* -164, 4022, 254, -16 */ + {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ + {0x0F9A80B7, 0x80140131}, /* -183, 3994, 305, -20 */ + {0x0F8980C0, 0x8015014C}, /* -192, 3977, 332, -21 */ + {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ + {0x0F6680D0, 0x80190183}, /* -208, 3942, 387, -25 */ + {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ + {0x0F3E80DE, 0x801D01BD}, /* -222, 3902, 445, -29 */ + {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ + {0x0F1180EA, 0x802101FA}, /* -234, 3857, 506, -33 */ + {0x0EF880EE, 0x80220218}, /* -238, 3832, 536, -34 */ + {0x0EDF80F3, 0x80240238}, /* -243, 3807, 568, -36 */ + {0x0EC680F7, 0x80270258}, /* -247, 3782, 600, -39 */ + {0x0EAB80FB, 0x80290279}, /* -251, 3755, 633, -41 */ + {0x0E9080FF, 0x802B029A}, /* -255, 3728, 666, -43 */ + {0x0E748102, 0x802E02BC}, /* -258, 3700, 700, -46 */ + {0x0E588105, 0x803102DE}, /* -261, 3672, 734, -49 */ + {0x0E388107, 0x80330302}, /* -263, 3640, 770, -51 */ + {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ + {0x0DFB810B, 0x80390349}, /* -267, 3579, 841, -57 */ + {0x0DDB810C, 0x803C036D}, /* -268, 3547, 877, -60 */ + {0x0DBA810D, 0x803F0392}, /* -269, 3514, 914, -63 */ + {0x0D98810E, 0x804203B8}, /* -270, 3480, 952, -66 */ + {0x0D74810D, 0x804503DE}, /* -269, 3444, 990, -69 */ + {0x0D50810D, 0x80480405}, /* -269, 3408, 1029, -72 */ + {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ + {0x0D08810C, 0x804F0453}, /* -268, 3336, 1107, -79 */ + {0x0CE3810B, 0x8052047A}, /* -267, 3299, 1146, -82 */ + {0x0CBD810A, 0x805604A3}, /* -266, 3261, 1187, -86 */ + {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ + {0x0C708107, 0x805D04F4}, /* -263, 3184, 1268, -93 */ + {0x0C488105, 0x8061051E}, /* -261, 3144, 1310, -97 */ + {0x0C208103, 0x80640547}, /* -259, 3104, 1351, -100 */ + {0x0BF78100, 0x80680571}, /* -256, 3063, 1393, -104 */ + {0x0BCF80FE, 0x806C059B}, /* -254, 3023, 1435, -108 */ + {0x0BA480FA, 0x807005C6}, /* -250, 2980, 1478, -112 */ + {0x0B7A80F7, 0x807405F1}, /* -247, 2938, 1521, -116 */ + {0x0B4F80F4, 0x8077061C}, /* -244, 2895, 1564, -119 */ + {0x0B2580F1, 0x807C0648}, /* -241, 2853, 1608, -124 */ + {0x0AFA80ED, 0x80800673}, /* -237, 2810, 1651, -128 */ + {0x0ACF80EA, 0x8084069F}, /* -234, 2767, 1695, -132 */ + {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ + {0x0A7880E2, 0x808D06F7}, /* -226, 2680, 1783, -141 */ + {0x0A4C80DF, 0x80910724}, /* -223, 2636, 1828, -145 */ + {0x0A2080DB, 0x80960751}, /* -219, 2592, 1873, -150 */ + {0x09F480D7, 0x809A077D}, /* -215, 2548, 1917, -154 */ + {0x09C780D2, 0x809F07AA}, /* -210, 2503, 1962, -159 */ + {0x099A80CE, 0x80A307D7}, /* -206, 2458, 2007, -163 */ + {0x096D80CA, 0x80A70804}, /* -202, 2413, 2052, -167 */ + {0x094180C6, 0x80AC0831}, /* -198, 2369, 2097, -172 */ + {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ + {0x08E780BE, 0x80B5088C}, /* -190, 2279, 2188, -181 */ + {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ + {0x088C80B5, 0x80BE08E7}, /* -181, 2188, 2279, -190 */ + {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ + {0x083180AC, 0x80C60941}, /* -172, 2097, 2369, -198 */ + {0x080480A7, 0x80CA096D}, /* -167, 2052, 2413, -202 */ + {0x07D780A3, 0x80CE099A}, /* -163, 2007, 2458, -206 */ + {0x07AA809F, 0x80D209C7}, /* -159, 1962, 2503, -210 */ + {0x077D809A, 0x80D709F4}, /* -154, 1917, 2548, -215 */ + {0x07518096, 0x80DB0A20}, /* -150, 1873, 2592, -219 */ + {0x07248091, 0x80DF0A4C}, /* -145, 1828, 2636, -223 */ + {0x06F7808D, 0x80E20A78}, /* -141, 1783, 2680, -226 */ + {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ + {0x069E8084, 0x80EA0AD0}, /* -132, 1694, 2768, -234 */ + {0x06738080, 0x80ED0AFA}, /* -128, 1651, 2810, -237 */ + {0x0647807C, 0x80F10B26}, /* -124, 1607, 2854, -241 */ + {0x061B8077, 0x80F40B50}, /* -119, 1563, 2896, -244 */ + {0x05F18074, 0x80F70B7A}, /* -116, 1521, 2938, -247 */ + {0x05C68070, 0x80FA0BA4}, /* -112, 1478, 2980, -250 */ + {0x059C806C, 0x80FE0BCE}, /* -108, 1436, 3022, -254 */ + {0x05728068, 0x81000BF6}, /* -104, 1394, 3062, -256 */ + {0x05478064, 0x81030C20}, /* -100, 1351, 3104, -259 */ + {0x051E8061, 0x81050C48}, /* -97, 1310, 3144, -261 */ + {0x04F4805D, 0x81070C70}, /* -93, 1268, 3184, -263 */ + {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ + {0x04A38056, 0x810A0CBD}, /* -86, 1187, 3261, -266 */ + {0x047A8052, 0x810B0CE3}, /* -82, 1146, 3299, -267 */ + {0x0453804F, 0x810C0D08}, /* -79, 1107, 3336, -268 */ + {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ + {0x04048048, 0x810D0D51}, /* -72, 1028, 3409, -269 */ + {0x03DE8045, 0x810D0D74}, /* -69, 990, 3444, -269 */ + {0x03B88042, 0x810E0D98}, /* -66, 952, 3480, -270 */ + {0x0393803F, 0x810D0DB9}, /* -63, 915, 3513, -269 */ + {0x036E803C, 0x810C0DDA}, /* -60, 878, 3546, -268 */ + {0x03498039, 0x810B0DFB}, /* -57, 841, 3579, -267 */ + {0x03258036, 0x81090E1A}, /* -54, 805, 3610, -265 */ + {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ + {0x02DE8031, 0x81050E58}, /* -49, 734, 3672, -261 */ + {0x02BC802E, 0x81020E74}, /* -46, 700, 3700, -258 */ + {0x0299802B, 0x80FF0E91}, /* -43, 665, 3729, -255 */ + {0x02788029, 0x80FB0EAC}, /* -41, 632, 3756, -251 */ + {0x02578027, 0x80F70EC7}, /* -39, 599, 3783, -247 */ + {0x02378024, 0x80F30EE0}, /* -36, 567, 3808, -243 */ + {0x02178022, 0x80EE0EF9}, /* -34, 535, 3833, -238 */ + {0x01FA8021, 0x80EA0F11}, /* -33, 506, 3857, -234 */ + {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ + {0x01BE801D, 0x80DE0F3D}, /* -29, 446, 3901, -222 */ + {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ + {0x01848019, 0x80D00F65}, /* -25, 388, 3941, -208 */ + {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ + {0x014D8015, 0x80C00F88}, /* -21, 333, 3976, -192 */ + {0x01328014, 0x80B70F99}, /* -20, 306, 3993, -183 */ + {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ + {0x00FF8010, 0x80A40FB5}, /* -16, 255, 4021, -164 */ + {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ + {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ + {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ + {0x00A0800A, 0x80760FE0}, /* -10, 160, 4064, -118 */ + {0x00898009, 0x806A0FEA}, /* -9, 137, 4074, -106 */ + {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ + {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ + {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ + {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ + {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ + {0x00118001, 0x80111001}, /* -1, 17, 4097, -17 */ + {0x10000000, 0x00000000}, /* 0, 4096, 0, 0 */ + {0x10018011, 0x80010011}, /* -17, 4097, 17, -1 */ + {0x10008021, 0x80020023}, /* -33, 4096, 35, -2 */ + {0x0FFE8031, 0x80030036}, /* -49, 4094, 54, -3 */ + {0x0FFB8040, 0x8005004A}, /* -64, 4091, 74, -5 */ + {0x0FF6804E, 0x8006005E}, /* -78, 4086, 94, -6 */ + {0x0FF0805C, 0x80070073}, /* -92, 4080, 115, -7 */ + {0x0FEB806A, 0x80090088}, /* -106, 4075, 136, -9 */ + {0x0FE18076, 0x800A009F}, /* -118, 4065, 159, -10 */ + {0x0FD98082, 0x800C00B5}, /* -130, 4057, 181, -12 */ + {0x0FCE808E, 0x800D00CD}, /* -142, 4046, 205, -13 */ + {0x0FC38099, 0x800F00E5}, /* -153, 4035, 229, -15 */ + {0x0FB680A4, 0x801000FE}, /* -164, 4022, 254, -16 */ + {0x0FA880AD, 0x80120117}, /* -173, 4008, 279, -18 */ + {0x0F9A80B7, 0x80140131}, /* -183, 3994, 305, -20 */ + {0x0F8980C0, 0x8015014C}, /* -192, 3977, 332, -21 */ + {0x0F7880C8, 0x80170167}, /* -200, 3960, 359, -23 */ + {0x0F6680D0, 0x80190183}, /* -208, 3942, 387, -25 */ + {0x0F5280D7, 0x801B01A0}, /* -215, 3922, 416, -27 */ + {0x0F3E80DE, 0x801D01BD}, /* -222, 3902, 445, -29 */ + {0x0F2880E4, 0x801F01DB}, /* -228, 3880, 475, -31 */ + {0x0F1180EA, 0x802101FA}, /* -234, 3857, 506, -33 */ + {0x0EF880EE, 0x80220218}, /* -238, 3832, 536, -34 */ + {0x0EDF80F3, 0x80240238}, /* -243, 3807, 568, -36 */ + {0x0EC680F7, 0x80270258}, /* -247, 3782, 600, -39 */ + {0x0EAB80FB, 0x80290279}, /* -251, 3755, 633, -41 */ + {0x0E9080FF, 0x802B029A}, /* -255, 3728, 666, -43 */ + {0x0E748102, 0x802E02BC}, /* -258, 3700, 700, -46 */ + {0x0E588105, 0x803102DE}, /* -261, 3672, 734, -49 */ + {0x0E388107, 0x80330302}, /* -263, 3640, 770, -51 */ + {0x0E1A8109, 0x80360325}, /* -265, 3610, 805, -54 */ + {0x0DFB810B, 0x80390349}, /* -267, 3579, 841, -57 */ + {0x0DDB810C, 0x803C036D}, /* -268, 3547, 877, -60 */ + {0x0DBA810D, 0x803F0392}, /* -269, 3514, 914, -63 */ + {0x0D98810E, 0x804203B8}, /* -270, 3480, 952, -66 */ + {0x0D74810D, 0x804503DE}, /* -269, 3444, 990, -69 */ + {0x0D50810D, 0x80480405}, /* -269, 3408, 1029, -72 */ + {0x0D2C810C, 0x804B042B}, /* -268, 3372, 1067, -75 */ + {0x0D08810C, 0x804F0453}, /* -268, 3336, 1107, -79 */ + {0x0CE3810B, 0x8052047A}, /* -267, 3299, 1146, -82 */ + {0x0CBD810A, 0x805604A3}, /* -266, 3261, 1187, -86 */ + {0x0C968108, 0x805904CB}, /* -264, 3222, 1227, -89 */ + {0x0C708107, 0x805D04F4}, /* -263, 3184, 1268, -93 */ + {0x0C488105, 0x8061051E}, /* -261, 3144, 1310, -97 */ + {0x0C208103, 0x80640547}, /* -259, 3104, 1351, -100 */ + {0x0BF78100, 0x80680571}, /* -256, 3063, 1393, -104 */ + {0x0BCF80FE, 0x806C059B}, /* -254, 3023, 1435, -108 */ + {0x0BA480FA, 0x807005C6}, /* -250, 2980, 1478, -112 */ + {0x0B7A80F7, 0x807405F1}, /* -247, 2938, 1521, -116 */ + {0x0B4F80F4, 0x8077061C}, /* -244, 2895, 1564, -119 */ + {0x0B2580F1, 0x807C0648}, /* -241, 2853, 1608, -124 */ + {0x0AFA80ED, 0x80800673}, /* -237, 2810, 1651, -128 */ + {0x0ACF80EA, 0x8084069F}, /* -234, 2767, 1695, -132 */ + {0x0AA380E6, 0x808806CB}, /* -230, 2723, 1739, -136 */ + {0x0A7880E2, 0x808D06F7}, /* -226, 2680, 1783, -141 */ + {0x0A4C80DF, 0x80910724}, /* -223, 2636, 1828, -145 */ + {0x0A2080DB, 0x80960751}, /* -219, 2592, 1873, -150 */ + {0x09F480D7, 0x809A077D}, /* -215, 2548, 1917, -154 */ + {0x09C780D2, 0x809F07AA}, /* -210, 2503, 1962, -159 */ + {0x099A80CE, 0x80A307D7}, /* -206, 2458, 2007, -163 */ + {0x096D80CA, 0x80A70804}, /* -202, 2413, 2052, -167 */ + {0x094180C6, 0x80AC0831}, /* -198, 2369, 2097, -172 */ + {0x091380C1, 0x80B0085E}, /* -193, 2323, 2142, -176 */ + {0x08E780BE, 0x80B5088C}, /* -190, 2279, 2188, -181 */ + {0x08B980B9, 0x80B908B9}, /* -185, 2233, 2233, -185 */ + {0x088C80B5, 0x80BE08E7}, /* -181, 2188, 2279, -190 */ + {0x085E80B0, 0x80C10913}, /* -176, 2142, 2323, -193 */ + {0x083180AC, 0x80C60941}, /* -172, 2097, 2369, -198 */ + {0x080480A7, 0x80CA096D}, /* -167, 2052, 2413, -202 */ + {0x07D780A3, 0x80CE099A}, /* -163, 2007, 2458, -206 */ + {0x07AA809F, 0x80D209C7}, /* -159, 1962, 2503, -210 */ + {0x077D809A, 0x80D709F4}, /* -154, 1917, 2548, -215 */ + {0x07518096, 0x80DB0A20}, /* -150, 1873, 2592, -219 */ + {0x07248091, 0x80DF0A4C}, /* -145, 1828, 2636, -223 */ + {0x06F7808D, 0x80E20A78}, /* -141, 1783, 2680, -226 */ + {0x06CA8088, 0x80E60AA4}, /* -136, 1738, 2724, -230 */ + {0x069E8084, 0x80EA0AD0}, /* -132, 1694, 2768, -234 */ + {0x06738080, 0x80ED0AFA}, /* -128, 1651, 2810, -237 */ + {0x0647807C, 0x80F10B26}, /* -124, 1607, 2854, -241 */ + {0x061B8077, 0x80F40B50}, /* -119, 1563, 2896, -244 */ + {0x05F18074, 0x80F70B7A}, /* -116, 1521, 2938, -247 */ + {0x05C68070, 0x80FA0BA4}, /* -112, 1478, 2980, -250 */ + {0x059C806C, 0x80FE0BCE}, /* -108, 1436, 3022, -254 */ + {0x05728068, 0x81000BF6}, /* -104, 1394, 3062, -256 */ + {0x05478064, 0x81030C20}, /* -100, 1351, 3104, -259 */ + {0x051E8061, 0x81050C48}, /* -97, 1310, 3144, -261 */ + {0x04F4805D, 0x81070C70}, /* -93, 1268, 3184, -263 */ + {0x04CB8059, 0x81080C96}, /* -89, 1227, 3222, -264 */ + {0x04A38056, 0x810A0CBD}, /* -86, 1187, 3261, -266 */ + {0x047A8052, 0x810B0CE3}, /* -82, 1146, 3299, -267 */ + {0x0453804F, 0x810C0D08}, /* -79, 1107, 3336, -268 */ + {0x042B804B, 0x810C0D2C}, /* -75, 1067, 3372, -268 */ + {0x04048048, 0x810D0D51}, /* -72, 1028, 3409, -269 */ + {0x03DE8045, 0x810D0D74}, /* -69, 990, 3444, -269 */ + {0x03B88042, 0x810E0D98}, /* -66, 952, 3480, -270 */ + {0x0393803F, 0x810D0DB9}, /* -63, 915, 3513, -269 */ + {0x036E803C, 0x810C0DDA}, /* -60, 878, 3546, -268 */ + {0x03498039, 0x810B0DFB}, /* -57, 841, 3579, -267 */ + {0x03258036, 0x81090E1A}, /* -54, 805, 3610, -265 */ + {0x03018033, 0x81070E39}, /* -51, 769, 3641, -263 */ + {0x02DE8031, 0x81050E58}, /* -49, 734, 3672, -261 */ + {0x02BC802E, 0x81020E74}, /* -46, 700, 3700, -258 */ + {0x0299802B, 0x80FF0E91}, /* -43, 665, 3729, -255 */ + {0x02788029, 0x80FB0EAC}, /* -41, 632, 3756, -251 */ + {0x02578027, 0x80F70EC7}, /* -39, 599, 3783, -247 */ + {0x02378024, 0x80F30EE0}, /* -36, 567, 3808, -243 */ + {0x02178022, 0x80EE0EF9}, /* -34, 535, 3833, -238 */ + {0x01FA8021, 0x80EA0F11}, /* -33, 506, 3857, -234 */ + {0x01DC801F, 0x80E40F27}, /* -31, 476, 3879, -228 */ + {0x01BE801D, 0x80DE0F3D}, /* -29, 446, 3901, -222 */ + {0x01A1801B, 0x80D70F51}, /* -27, 417, 3921, -215 */ + {0x01848019, 0x80D00F65}, /* -25, 388, 3941, -208 */ + {0x01688017, 0x80C80F77}, /* -23, 360, 3959, -200 */ + {0x014D8015, 0x80C00F88}, /* -21, 333, 3976, -192 */ + {0x01328014, 0x80B70F99}, /* -20, 306, 3993, -183 */ + {0x01188012, 0x80AD0FA7}, /* -18, 280, 4007, -173 */ + {0x00FF8010, 0x80A40FB5}, /* -16, 255, 4021, -164 */ + {0x00E6800F, 0x80990FC2}, /* -15, 230, 4034, -153 */ + {0x00CE800D, 0x808E0FCD}, /* -13, 206, 4045, -142 */ + {0x00B6800C, 0x80820FD8}, /* -12, 182, 4056, -130 */ + {0x00A0800A, 0x80760FE0}, /* -10, 160, 4064, -118 */ + {0x00898009, 0x806A0FEA}, /* -9, 137, 4074, -106 */ + {0x00748007, 0x805C0FEF}, /* -7, 116, 4079, -92 */ + {0x005F8006, 0x804E0FF5}, /* -6, 95, 4085, -78 */ + {0x004B8005, 0x80400FFA}, /* -5, 75, 4090, -64 */ + {0x00378003, 0x80310FFD}, /* -3, 55, 4093, -49 */ + {0x00238002, 0x80211000}, /* -2, 35, 4096, -33 */ + {0x00118001, 0x80111001}, /* -1, 17, 4097, -17 */ }; diff --git a/driver/xf86-video-geode/src/cim/cim_gp.c b/driver/xf86-video-geode/src/cim/cim_gp.c index 7c4bc5bee..2085d4f65 100644 --- a/driver/xf86-video-geode/src/cim/cim_gp.c +++ b/driver/xf86-video-geode/src/cim/cim_gp.c @@ -89,7 +89,7 @@ gp_set_limit_on_buffer_lead(unsigned long lead) void gp_set_command_buffer_base(unsigned long address, unsigned long start, - unsigned long stop) + unsigned long stop) { Q_WORD msr_value; @@ -262,7 +262,8 @@ gp_declare_blt(unsigned long flags) /* command buffer. */ GP3_WAIT_WRAP(temp); - } else { + } + else { gp3_cmd_header = GP3_BLT_HDR_TYPE; /* WAIT FOR AVAILABLE SPACE */ @@ -274,7 +275,7 @@ gp_declare_blt(unsigned long flags) while (1) { temp = READ_GP32(GP3_CMD_READ); if (((gp3_cmd_current >= temp) - && ((gp3_cmd_current - temp) <= gp3_buffer_lead)) + && ((gp3_cmd_current - temp) <= gp3_buffer_lead)) || ((gp3_cmd_current < temp) && ((gp3_cmd_current + (gp3_cmd_bottom - temp)) <= gp3_buffer_lead))) { @@ -330,7 +331,8 @@ gp_declare_vector(unsigned long flags) /* CHECK WRAP CONDITION */ GP3_WAIT_WRAP(temp); - } else { + } + else { gp3_cmd_header = GP3_VEC_HDR_TYPE; /* WAIT FOR AVAILABLE SPACE */ @@ -344,7 +346,7 @@ gp_declare_vector(unsigned long flags) while (1) { temp = READ_GP32(GP3_CMD_READ); if (((gp3_cmd_current >= temp) - && ((gp3_cmd_current - temp) <= gp3_buffer_lead)) + && ((gp3_cmd_current - temp) <= gp3_buffer_lead)) || ((gp3_cmd_current < temp) && ((gp3_cmd_current + (gp3_cmd_bottom - temp)) <= gp3_buffer_lead))) { @@ -406,7 +408,7 @@ gp_set_raster_operation(unsigned char ROP) /* WRITE THE RASTER MODE REGISTER */ /* This register is in the same location in BLT and vector commands */ - gp3_raster_mode = gp3_bpp | (unsigned long)ROP; + gp3_raster_mode = gp3_bpp | (unsigned long) ROP; WRITE_COMMAND32(GP3_BLT_RASTER_MODE, gp3_raster_mode); /* CHECK IF DESTINATION IS REQUIRED */ @@ -414,7 +416,8 @@ gp_set_raster_operation(unsigned char ROP) if ((ROP & 0x55) ^ ((ROP >> 1) & 0x55)) { gp3_blt_mode = GP3_BM_DST_REQ; gp3_vec_mode = GP3_VM_DST_REQ; - } else { + } + else { gp3_blt_mode = gp3_vec_mode = 0; } } @@ -461,7 +464,7 @@ gp_set_raster_operation(unsigned char ROP) void gp_set_alpha_operation(int alpha_operation, int alpha_type, int channel, - int apply_alpha, unsigned char alpha) + int apply_alpha, unsigned char alpha) { gp3_cmd_header |= GP3_BLT_HDR_RASTER_ENABLE; @@ -470,25 +473,26 @@ gp_set_alpha_operation(int alpha_operation, int alpha_type, int channel, /* also implies that there is no mechanism to detect invalid */ /* parameters. */ - gp3_raster_mode = gp3_bpp | (unsigned long)alpha | - ((unsigned long)apply_alpha << 22) | - ((unsigned long)alpha_operation << 20) | - ((unsigned long)alpha_type << 17) | ((unsigned long)channel << 16); + gp3_raster_mode = gp3_bpp | (unsigned long) alpha | + ((unsigned long) apply_alpha << 22) | + ((unsigned long) alpha_operation << 20) | + ((unsigned long) alpha_type << 17) | ((unsigned long) channel << 16); WRITE_COMMAND32(GP3_BLT_RASTER_MODE, gp3_raster_mode); /* CHECK IF DESTINATION IS REQUIRED */ if ((alpha_operation == CIMGP_ALPHA_TIMES_A && - channel == CIMGP_CHANNEL_A_SOURCE && - alpha_type != CIMGP_CHANNEL_B_ALPHA && - alpha_type != CIMGP_ALPHA_FROM_RGB_B) || + channel == CIMGP_CHANNEL_A_SOURCE && + alpha_type != CIMGP_CHANNEL_B_ALPHA && + alpha_type != CIMGP_ALPHA_FROM_RGB_B) || (alpha_operation == CIMGP_BETA_TIMES_B && - channel == CIMGP_CHANNEL_A_DEST && - alpha_type != CIMGP_CHANNEL_A_ALPHA && - alpha_type != CIMGP_ALPHA_FROM_RGB_A)) { + channel == CIMGP_CHANNEL_A_DEST && + alpha_type != CIMGP_CHANNEL_A_ALPHA && + alpha_type != CIMGP_ALPHA_FROM_RGB_A)) { gp3_blt_mode = 0; - } else + } + else gp3_blt_mode = GP3_BM_DST_REQ; } @@ -518,7 +522,8 @@ gp_set_solid_pattern(unsigned long color) gp3_cmd_header |= GP3_BLT_HDR_PAT_CLR0_ENABLE; WRITE_COMMAND32(GP3_BLT_PAT_COLOR_0, color); - } else { + } + else { gp3_cmd_header |= GP3_VEC_HDR_PAT_CLR0_ENABLE; WRITE_COMMAND32(GP3_VECTOR_PAT_COLOR_0, color); @@ -534,7 +539,8 @@ gp_set_solid_pattern(unsigned long color) void gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, int transparent, int x, int y) + unsigned long data0, unsigned long data1, int transparent, + int x, int y) { /* CHANNEL 3 IS NOT NEEDED FOR MONOCHROME PATTERNS */ @@ -556,16 +562,17 @@ gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, if (gp3_blt) { gp3_cmd_header |= (GP3_BLT_HDR_PAT_CLR0_ENABLE | GP3_BLT_HDR_PAT_CLR1_ENABLE | - GP3_BLT_HDR_PAT_DATA0_ENABLE | GP3_BLT_HDR_PAT_DATA1_ENABLE); + GP3_BLT_HDR_PAT_DATA0_ENABLE | GP3_BLT_HDR_PAT_DATA1_ENABLE); WRITE_COMMAND32(GP3_BLT_PAT_COLOR_0, bgcolor); WRITE_COMMAND32(GP3_BLT_PAT_COLOR_1, fgcolor); WRITE_COMMAND32(GP3_BLT_PAT_DATA_0, data0); WRITE_COMMAND32(GP3_BLT_PAT_DATA_1, data1); - } else { + } + else { gp3_cmd_header |= (GP3_VEC_HDR_PAT_CLR0_ENABLE | GP3_VEC_HDR_PAT_CLR1_ENABLE | - GP3_VEC_HDR_PAT_DATA0_ENABLE | GP3_VEC_HDR_PAT_DATA1_ENABLE); + GP3_VEC_HDR_PAT_DATA0_ENABLE | GP3_VEC_HDR_PAT_DATA1_ENABLE); WRITE_COMMAND32(GP3_VECTOR_PAT_COLOR_0, bgcolor); WRITE_COMMAND32(GP3_VECTOR_PAT_COLOR_1, fgcolor); @@ -575,8 +582,8 @@ gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, /* SAVE PATTERN ORIGIN */ - gp3_pat_origin = ((unsigned long)y << 29) | - (((unsigned long)x & 7) << 26); + gp3_pat_origin = ((unsigned long) y << 29) | + (((unsigned long) x & 7) << 26); } /*--------------------------------------------------------------------------- @@ -592,8 +599,8 @@ gp_set_pattern_origin(int x, int y) { /* SAVE PATTERN ORIGIN */ - gp3_pat_origin = ((unsigned long)y << 29) | - (((unsigned long)x & 7) << 26); + gp3_pat_origin = ((unsigned long) y << 29) | + (((unsigned long) x & 7) << 26); } /*--------------------------------------------------------------------------- @@ -620,9 +627,9 @@ gp_set_color_pattern(unsigned long *pattern, int format, int x, int y) * 4BPP patterns are not supported. */ - gp3_pat_pix_shift = (unsigned long)((format >> 2) & 3); - gp3_pat_format = (((unsigned long)format & 0xF) << 24) | - (((unsigned long)format & 0x10) << 17) | + gp3_pat_pix_shift = (unsigned long) ((format >> 2) & 3); + gp3_pat_format = (((unsigned long) format & 0xF) << 24) | + (((unsigned long) format & 0x10) << 17) | GP3_CH3_COLOR_PAT_ENABLE | GP3_CH3_C3EN; size_dwords = (64 << gp3_pat_pix_shift) >> 2; @@ -641,7 +648,8 @@ gp_set_color_pattern(unsigned long *pattern, int format, int x, int y) /* Same logic as BLT wrapping. */ GP3_WAIT_WRAP(temp); - } else { + } + else { gp3_cmd_header = GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE; /* WAIT FOR AVAILABLE SPACE */ @@ -671,8 +679,8 @@ gp_set_color_pattern(unsigned long *pattern, int format, int x, int y) /* SAVE PATTERN ORIGIN */ - gp3_pat_origin = ((unsigned long)y << 29) | - (((unsigned long)x & 7) << 26); + gp3_pat_origin = ((unsigned long) y << 29) | + (((unsigned long) x & 7) << 26); } /*--------------------------------------------------------------------------- @@ -683,7 +691,7 @@ gp_set_color_pattern(unsigned long *pattern, int format, int x, int y) void gp_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - int transparent) + int transparent) { /* UPDATE RASTER MODE REGISTER IF TRANSPARENT */ @@ -784,7 +792,8 @@ gp_program_lut(unsigned long *colors, int full_lut) /* Same logic as BLT wrapping. */ GP3_WAIT_WRAP(temp); - } else { + } + else { gp3_cmd_header = GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE; /* WAIT FOR AVAILABLE SPACE */ @@ -865,7 +874,8 @@ gp_set_vector_pattern(unsigned long pattern, unsigned long color, int length) /* Same logic as BLT wrapping. */ GP3_WAIT_WRAP(temp); - } else { + } + else { gp3_cmd_header = GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE; /* WAIT FOR AVAILABLE SPACE */ @@ -953,9 +963,9 @@ gp_set_source_format(int format) /* of 3 being a special case for 4BPP data. Clever, yes? Even more */ /* clever, bit 4 indicates BGR ordering. */ - gp3_src_pix_shift = (unsigned long)((format >> 2) & 3); - gp3_src_format = (((unsigned long)format & 0xF) << 24) | - (((unsigned long)format & 0x10) << 18); + gp3_src_pix_shift = (unsigned long) ((format >> 2) & 3); + gp3_src_format = (((unsigned long) format & 0xF) << 24) | + (((unsigned long) format & 0x10) << 18); } /*--------------------------------------------------------------------------- @@ -968,7 +978,7 @@ gp_set_source_format(int format) void gp_pattern_fill(unsigned long dstoffset, unsigned long width, - unsigned long height) + unsigned long height) { unsigned long base_register; @@ -1006,12 +1016,13 @@ gp_pattern_fill(unsigned long dstoffset, unsigned long width, WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, gp3_pat_origin); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoffset & 0x3FFFFF); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format); - } else { + } + else { /* DISABLE CHANNEL 3 AND USE NORMAL PATTERN ORIGINS */ WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); + ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); } /* START THE BLT */ @@ -1042,7 +1053,7 @@ gp_pattern_fill(unsigned long dstoffset, unsigned long width, void gp_screen_to_screen_blt(unsigned long dstoffset, unsigned long srcoffset, - unsigned long width, unsigned long height, int flags) + unsigned long width, unsigned long height, int flags) { unsigned long base; unsigned long ch3_flags = 0; @@ -1102,11 +1113,12 @@ gp_screen_to_screen_blt(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, - GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | - gp3_ch3_bpp | gp3_src_stride | ch3_flags | - ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | - ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); - } else { + GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | + gp3_ch3_bpp | gp3_src_stride | ch3_flags | + ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | + ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + } + else { /* CALCULATE BASE OFFSET REGISTER */ base = ((gp3_fb_base << 24) + dstbase) | @@ -1133,7 +1145,8 @@ gp_screen_to_screen_blt(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoffset); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format | ch3_flags); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); - } else { + } + else { WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoffset | gp3_pat_origin); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); } @@ -1151,7 +1164,6 @@ gp_screen_to_screen_blt(unsigned long dstoffset, unsigned long srcoffset, gp3_cmd_current = gp3_cmd_next; } - /*--------------------------------------------------------------------------- * gp_screen_to_screen_convert * @@ -1162,7 +1174,8 @@ gp_screen_to_screen_blt(unsigned long dstoffset, unsigned long srcoffset, void gp_screen_to_screen_convert(unsigned long dstoffset, unsigned long srcoffset, - unsigned long width, unsigned long height, int nibble) + unsigned long width, unsigned long height, + int nibble) { unsigned long size = ((width << 16) | height); unsigned long ch3_offset = srcoffset & 0x3FFFFF; @@ -1195,14 +1208,15 @@ gp_screen_to_screen_convert(unsigned long dstoffset, unsigned long srcoffset, /* WRITE ALL BLT REGISTERS */ WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - (dstoffset & 0x3FFFFF) | gp3_pat_origin); + (dstoffset & 0x3FFFFF) | gp3_pat_origin); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, ch3_size); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, ch3_offset); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, - GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | gp3_src_format | - ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20) | - ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | gp3_src_stride); + GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | gp3_src_format | + ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20) | + ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | + gp3_src_stride); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); /* START THE BLT */ @@ -1223,8 +1237,8 @@ gp_screen_to_screen_convert(unsigned long dstoffset, unsigned long srcoffset, void gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, unsigned char *data, - long pitch) + unsigned long width, unsigned long height, + unsigned char *data, long pitch) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -1261,16 +1275,17 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND32(GP3_BLT_DST_OFFSET, (dstoffset & 0x3FFFFF)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); - } else { + } + else { WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); + ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); } WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, indent); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, - ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); + ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); WRITE_COMMAND32(GP3_BLT_MODE, gp3_blt_mode | GP3_BM_SRC_HOST); /* START THE BLT */ @@ -1304,12 +1319,13 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -1321,7 +1337,7 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); srcoffset += pitch; cim_cmd_ptr += total_dwords << 2; @@ -1329,7 +1345,8 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - } else { + } + else { /* * Each line will be created as a separate command buffer entry to * allow line-by-line wrapping and to allow simultaneous rendering @@ -1355,13 +1372,15 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -1372,7 +1391,7 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -1393,8 +1412,8 @@ gp_color_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, void gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, - unsigned char *data, long pitch) + unsigned long width, unsigned long height, + unsigned char *data, long pitch) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -1427,7 +1446,8 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, ch3_offset = 0; temp = width * 3; ch3_size = (((temp + 3) >> 2) << 16) | height; - } else { + } + else { ch3_size = size; if (gp3_src_pix_shift == 3) { @@ -1439,7 +1459,8 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, ch3_offset = indent | ((srcx & 1) << 25); temp = ((width + (srcx & 1) + 1) >> 1) + indent; - } else { + } + else { indent = (srcx << gp3_src_pix_shift); srcoffset = (indent & ~3L); indent &= 3; @@ -1467,14 +1488,15 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_BLT_HDR_BASE_OFFSET_ENABLE | GP3_BLT_HDR_BLT_MODE_ENABLE; WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - (dstoffset & 0x3FFFFF) | gp3_pat_origin); + (dstoffset & 0x3FFFFF) | gp3_pat_origin); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, ch3_offset); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, ch3_size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | - gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | + gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) + << 20)); WRITE_COMMAND32(GP3_BLT_MODE, gp3_blt_mode); /* START THE BLT */ @@ -1498,24 +1520,24 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ - WRITE_COMMAND32(4, GP3_CH3_HOST_SOURCE_TYPE | - (total_dwords * height)); + WRITE_COMMAND32(4, GP3_CH3_HOST_SOURCE_TYPE | (total_dwords * height)); while (height--) { /* WRITE DATA */ WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); srcoffset += pitch; cim_cmd_ptr += total_dwords << 2; @@ -1523,7 +1545,8 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - } else { + } + else { /* WRITE DATA LINE BY LINE * Each line will be created as a separate command buffer entry to * allow line-by-line wrapping and to allow simultaneous rendering @@ -1549,13 +1572,15 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -1566,7 +1591,7 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -1589,8 +1614,8 @@ gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, void gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, - unsigned char *data, long pitch) + unsigned long width, unsigned long height, + unsigned char *data, long pitch) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -1622,7 +1647,8 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, ch3_offset = 0; temp = width * 3; ch3_size = (((temp + 3) >> 2) << 16) | height; - } else { + } + else { ch3_size = size; if (gp3_src_pix_shift == 3) { @@ -1634,7 +1660,8 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, ch3_offset = indent | ((srcx & 1) << 25); temp = ((width + (srcx & 1) + 1) >> 1) + indent; - } else { + } + else { indent = (srcx << gp3_src_pix_shift); srcoffset = (indent & ~3L); indent &= 3; @@ -1662,14 +1689,15 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_BLT_HDR_BASE_OFFSET_ENABLE | GP3_BLT_HDR_BLT_MODE_ENABLE; WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - (dstoffset & 0x3FFFFF) | gp3_pat_origin); + (dstoffset & 0x3FFFFF) | gp3_pat_origin); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, ch3_offset); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, ch3_size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | - gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | + gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) + << 20)); WRITE_COMMAND32(GP3_BLT_MODE, gp3_blt_mode); /* START THE BLT */ @@ -1693,25 +1721,26 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ - WRITE_COMMAND32(4, - GP3_CH3_HOST_SOURCE_TYPE | (total_dwords * height)); + WRITE_COMMAND32(4, GP3_CH3_HOST_SOURCE_TYPE | (total_dwords * height)); while (height--) { /* WRITE DATA */ WRITE_CUSTOM_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_CUSTOM_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), + byte_count); srcoffset += pitch; cim_cmd_ptr += total_dwords << 2; @@ -1719,7 +1748,8 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - } else { + } + else { /* WRITE DATA LINE BY LINE * Each line will be created as a separate command buffer entry to * allow line-by-line wrapping and to allow simultaneous rendering @@ -1745,14 +1775,16 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP + | GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -1763,7 +1795,8 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, WRITE_CUSTOM_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_CUSTOM_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), + byte_count); /* UPDATE POINTERS */ @@ -1786,7 +1819,7 @@ gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, void gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset, - unsigned long width, unsigned long height, int degrees) + unsigned long width, unsigned long height, int degrees) { unsigned long sizein, sizeout; unsigned long ch3_flags; @@ -1852,8 +1885,9 @@ gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, sizein); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, srcoffset); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, ch3_flags | gp3_src_format | - ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20) | - ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | gp3_src_stride); + ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20) | + ((gp3_blt_flags & CIMGP_ENABLE_PREFETCH) << 17) | + gp3_src_stride); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); /* START THE BLT */ @@ -1878,8 +1912,8 @@ gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset, void gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, - unsigned char *data, long stride) + unsigned long width, unsigned long height, + unsigned char *data, long stride) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -1918,24 +1952,26 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND32(GP3_BLT_DST_OFFSET, (dstoffset & 0x3FFFFF)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); - } else { + } + else { WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); + ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); } if (gp3_blt_flags & CIMGP_BLTFLAGS_INVERTMONO) { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode | GP3_RM_SOURCE_INVERT); - } else { + gp3_raster_mode | GP3_RM_SOURCE_INVERT); + } + else { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); + gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); } WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, src_value); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, - ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); + ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); WRITE_COMMAND32(GP3_BLT_MODE, - gp3_blt_mode | GP3_BM_SRC_HOST | GP3_BM_SRC_MONO); + gp3_blt_mode | GP3_BM_SRC_HOST | GP3_BM_SRC_MONO); /* START THE BLT */ @@ -1971,12 +2007,13 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -1988,7 +2025,7 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); srcoffset += stride; cim_cmd_ptr += total_dwords << 2; @@ -1996,7 +2033,8 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - } else { + } + else { /* WRITE DATA LINE BY LINE * Each line will be created as a separate command buffer entry to * allow line-by-line wrapping and to allow simultaneous rendering @@ -2022,14 +2060,16 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP + | GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2040,7 +2080,7 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -2060,7 +2100,7 @@ gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, unsigned long srcx, void gp_text_blt(unsigned long dstoffset, unsigned long width, - unsigned long height, unsigned char *data) + unsigned long height, unsigned char *data) { unsigned long temp, dwords_total; unsigned long dword_count, byte_count; @@ -2087,25 +2127,27 @@ gp_text_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND32(GP3_BLT_DST_OFFSET, (dstoffset & 0x3FFFFF)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); - } else { + } + else { WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); + ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); } if (gp3_blt_flags & CIMGP_BLTFLAGS_INVERTMONO) { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode | GP3_RM_SOURCE_INVERT); - } else { + gp3_raster_mode | GP3_RM_SOURCE_INVERT); + } + else { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); + gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); } WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, 0); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, - ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); + ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000))); WRITE_COMMAND32(GP3_BLT_MODE, - gp3_blt_mode | GP3_BM_SRC_HOST | GP3_BM_SRC_BP_MONO); + gp3_blt_mode | GP3_BM_SRC_HOST | GP3_BM_SRC_BP_MONO); /* START THE BLT */ @@ -2129,7 +2171,8 @@ gp_text_blt(unsigned long dstoffset, unsigned long width, byte_count = 0; dwords_total = 2048; size -= 8192; - } else { + } + else { dword_count = (size >> 2); byte_count = (size & 3); dwords_total = (size + 3) >> 2; @@ -2146,14 +2189,15 @@ gp_text_blt(unsigned long dstoffset, unsigned long width, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2164,7 +2208,7 @@ gp_text_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; @@ -2190,8 +2234,8 @@ gp_text_blt(unsigned long dstoffset, unsigned long width, void gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, - unsigned long srcx, unsigned long width, - unsigned long height, int byte_packed) + unsigned long srcx, unsigned long width, + unsigned long height, int byte_packed) { unsigned long base; unsigned long blt_mode; @@ -2234,22 +2278,23 @@ gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_DST_OFFSET, (dstoffset & 0x3FFFFF)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, gp3_pat_format); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); - } else { + } + else { WRITE_COMMAND32(GP3_BLT_DST_OFFSET, - ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); + ((dstoffset & 0x3FFFFF) | gp3_pat_origin)); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, 0); } if (gp3_blt_flags & CIMGP_BLTFLAGS_INVERTMONO) { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode | GP3_RM_SOURCE_INVERT); - } else { + gp3_raster_mode | GP3_RM_SOURCE_INVERT); + } + else { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); + gp3_raster_mode & ~GP3_RM_SOURCE_INVERT); } WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); - WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, - (srcoffset & 0x3FFFFF) | (srcx << 26)); + WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, (srcoffset & 0x3FFFFF) | (srcx << 26)); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size); /* WORKAROUND FOR SIBZ #3744 @@ -2271,8 +2316,7 @@ gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, size1 = ((8 - srcx) << 16) | 1; size2 = ((width + srcx - 8) << 16) | 1; org1 = gp3_pat_origin; - org2 = (org1 & 0xE0000000) | - ((org1 + ((8 - srcx) << 26)) & 0x1C000000); + org2 = (org1 & 0xE0000000) | ((org1 + ((8 - srcx) << 26)) & 0x1C000000); dstoff1 = dstoffset & 0x3FFFFF; dstoff2 = (dstoff1 + 8 - srcx) << gp3_pix_shift; @@ -2282,7 +2326,7 @@ gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, size1); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size1); WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, - (srcoffset & 0x3FFFFF) | (srcx << 26)); + (srcoffset & 0x3FFFFF) | (srcx << 26)); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoff1 | org1); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, org1); WRITE_COMMAND32(GP3_BLT_CMD_HEADER, gp3_cmd_header); @@ -2328,12 +2372,10 @@ gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, GP3_BLT_HDR_WIDHI_ENABLE | GP3_BLT_HDR_BLT_MODE_ENABLE | GP3_BLT_HDR_CH3_OFF_ENABLE | GP3_BLT_HDR_CH3_WIDHI_ENABLE; - WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, - (width << 16) | tempheight); - WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, - (width << 16) | tempheight); + WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, (width << 16) | tempheight); + WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, (width << 16) | tempheight); WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, - (srcoffset & 0x3FFFFF) | (srcx << 26)); + (srcoffset & 0x3FFFFF) | (srcx << 26)); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoff1 | org1); WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, org1); WRITE_COMMAND32(GP3_BLT_CMD_HEADER, gp3_cmd_header); @@ -2393,8 +2435,8 @@ gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, void gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, - unsigned char *data, long stride, int fourbpp) + unsigned long width, unsigned long height, + unsigned char *data, long stride, int fourbpp) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -2430,7 +2472,8 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, ch3_offset = indent | ((srcx & 1) << 25); temp = ((width + (srcx & 1) + 1) >> 1) + indent; - } else { + } + else { depth_flag = GP3_CH3_SRC_8BPP_ALPHA; indent = srcx; srcoffset = (indent & ~3L); @@ -2452,14 +2495,17 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, if (gp3_bpp == GP3_RM_BPPFMT_565) { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | - GP3_RM_ALPHA_TO_RGB | - GP3_RM_ALPHA_A_PLUS_BETA_B | GP3_RM_SELECT_ALPHA_CHAN_3); - } else { + gp3_bpp | + GP3_RM_ALPHA_TO_RGB | + GP3_RM_ALPHA_A_PLUS_BETA_B | + GP3_RM_SELECT_ALPHA_CHAN_3); + } + else { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | - GP3_RM_ALPHA_ALL | - GP3_RM_ALPHA_A_PLUS_BETA_B | GP3_RM_SELECT_ALPHA_CHAN_3); + gp3_bpp | + GP3_RM_ALPHA_ALL | + GP3_RM_ALPHA_A_PLUS_BETA_B | + GP3_RM_SELECT_ALPHA_CHAN_3); } /* WRITE ALL REMAINING REGISTERS */ @@ -2470,8 +2516,9 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, size); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_HST_SRC_ENABLE | - depth_flag | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_HST_SRC_ENABLE | + depth_flag | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << + 20)); WRITE_COMMAND32(GP3_BLT_MODE, gp3_blt_mode | GP3_BM_DST_REQ); /* START THE BLT */ @@ -2500,25 +2547,25 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ - WRITE_COMMAND32(4, - GP3_CH3_HOST_SOURCE_TYPE | (total_dwords * height)); + WRITE_COMMAND32(4, GP3_CH3_HOST_SOURCE_TYPE | (total_dwords * height)); while (height--) { /* WRITE DATA */ WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); srcoffset += stride; cim_cmd_ptr += total_dwords << 2; @@ -2526,7 +2573,8 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, WRITE_GP32(GP3_CMD_WRITE, gp3_cmd_next); gp3_cmd_current = gp3_cmd_next; - } else { + } + else { while (height--) { /* UPDATE THE COMMAND POINTER * The WRITE_COMMANDXX macros use a pointer to the current buffer @@ -2546,14 +2594,16 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP + | GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2564,7 +2614,7 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND_STRING32(8, data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -2584,9 +2634,9 @@ gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, void gp_masked_blt(unsigned long dstoffset, unsigned long width, - unsigned long height, unsigned long mono_srcx, - unsigned long color_srcx, unsigned char *mono_mask, - unsigned char *color_data, long mono_pitch, long color_pitch) + unsigned long height, unsigned long mono_srcx, + unsigned long color_srcx, unsigned char *mono_mask, + unsigned char *color_data, long mono_pitch, long color_pitch) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -2627,9 +2677,9 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, 0); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | - GP3_CH3_SRC_8_8_8_8 | - ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | + GP3_CH3_SRC_8_8_8_8 | + ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); WRITE_COMMAND32(GP3_BLT_MODE, 0); WRITE_COMMAND32(GP3_BLT_CMD_HEADER, gp3_cmd_header); @@ -2657,14 +2707,15 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2675,7 +2726,7 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND_STRING32(8, mono_mask, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), mono_mask, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -2690,8 +2741,8 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, base = ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000)) | ((gp3_fb_base << 14) + (((gp3_scratch_base + - indent) & 0xFFC00000) >> 10)) | (gp3_base_register & - GP3_BASE_OFFSET_CH3MASK); + indent) & 0xFFC00000) >> 10)) | + (gp3_base_register & GP3_BASE_OFFSET_CH3MASK); gp3_cmd_header |= GP3_BLT_HDR_RASTER_ENABLE | GP3_BLT_HDR_STRIDE_ENABLE | GP3_BLT_HDR_DST_OFF_ENABLE | @@ -2707,11 +2758,12 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, */ WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | 0xF0 | GP3_RM_SRC_TRANS | flags); + gp3_bpp | 0xF0 | GP3_RM_SRC_TRANS | flags); WRITE_COMMAND32(GP3_BLT_STRIDE, (total_dwords << 18) | gp3_dst_stride); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoffset & 0x3FFFFF); WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, - ((gp3_scratch_base + indent) & 0x3FFFFF) | ((mono_srcx & 7) << 26)); + ((gp3_scratch_base + + indent) & 0x3FFFFF) | ((mono_srcx & 7) << 26)); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, (width << 16) | height); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, (width << 16) | height); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); @@ -2724,9 +2776,9 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, ch3_offset = 0; size = width * 3; - WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, - (((size + 3) >> 2) << 16) | height); - } else if (gp3_src_pix_shift == 3) { + WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, (((size + 3) >> 2) << 16) | height); + } + else if (gp3_src_pix_shift == 3) { /* CALCULATE INDENT AND SOURCE OFFSET */ indent = (color_srcx >> 1); @@ -2735,7 +2787,8 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, ch3_offset = indent | ((color_srcx & 1) << 25); size = ((width + (color_srcx & 1) + 1) >> 1) + indent; - } else { + } + else { indent = (color_srcx << gp3_src_pix_shift); srcoffset = (indent & ~3L); indent &= 3; @@ -2751,10 +2804,11 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, ch3_offset); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_HST_SRC_ENABLE | - gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_HST_SRC_ENABLE | + gp3_src_format | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) + << 20)); WRITE_COMMAND32(GP3_BLT_MODE, - gp3_blt_mode | GP3_BM_SRC_MONO | GP3_BM_SRC_FB); + gp3_blt_mode | GP3_BM_SRC_MONO | GP3_BM_SRC_FB); /* START THE BLT */ @@ -2777,12 +2831,13 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | - GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_WRAP | + GP3_DATA_LOAD_HDR_ENABLE); + } + else { GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, - GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_TYPE | GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2793,7 +2848,7 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, WRITE_COMMAND_STRING32(8, color_data, srcoffset, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), color_data, - srcoffset + (dword_count << 2), byte_count); + srcoffset + (dword_count << 2), byte_count); /* UPDATE COMMAND BUFFER POINTERS */ /* We do this before writing the monochrome data because otherwise */ @@ -2817,8 +2872,9 @@ gp_masked_blt(unsigned long dstoffset, unsigned long width, void gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, - unsigned long width, unsigned long height, - unsigned long mono_srcx, unsigned char *mono_mask, long mono_pitch) + unsigned long width, unsigned long height, + unsigned long mono_srcx, unsigned char *mono_mask, + long mono_pitch) { unsigned long indent, temp; unsigned long total_dwords, size_dwords; @@ -2859,9 +2915,9 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, 0); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | - GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | - GP3_CH3_SRC_8_8_8_8 | - ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + GP3_CH3_REPLACE_SOURCE | GP3_CH3_HST_SRC_ENABLE | + GP3_CH3_SRC_8_8_8_8 | + ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); WRITE_COMMAND32(GP3_BLT_MODE, 0); WRITE_COMMAND32(GP3_BLT_CMD_HEADER, gp3_cmd_header); @@ -2889,13 +2945,14 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, GP3_WAIT_WRAP(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); - } else { + GP3_DATA_LOAD_HDR_WRAP | GP3_DATA_LOAD_HDR_ENABLE); + } + else { /* WAIT FOR AVAILABLE SPACE */ GP3_WAIT_PRIMITIVE(temp); WRITE_COMMAND32(0, GP3_DATA_LOAD_HDR_TYPE | - GP3_DATA_LOAD_HDR_ENABLE); + GP3_DATA_LOAD_HDR_ENABLE); } /* WRITE DWORD COUNT */ @@ -2906,7 +2963,7 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND_STRING32(8, mono_mask, srcoff, dword_count); WRITE_COMMAND_STRING8(8 + (dword_count << 2), mono_mask, - srcoff + (dword_count << 2), byte_count); + srcoff + (dword_count << 2), byte_count); /* UPDATE POINTERS */ @@ -2921,8 +2978,11 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, base = ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000)) | ((gp3_fb_base << 14) + (((gp3_scratch_base + - indent) & 0xFFC00000) >> 10)) | ((gp3_fb_base << 4) + - ((srcoffset & 0xFFC00000) >> 20)); + indent) & 0xFFC00000) >> 10)) | ((gp3_fb_base + << 4) + + ((srcoffset & + 0xFFC00000) + >> 20)); gp3_cmd_header |= GP3_BLT_HDR_RASTER_ENABLE | GP3_BLT_HDR_STRIDE_ENABLE | GP3_BLT_HDR_DST_OFF_ENABLE | @@ -2938,11 +2998,12 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, */ WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | 0xF0 | GP3_RM_SRC_TRANS | flags); + gp3_bpp | 0xF0 | GP3_RM_SRC_TRANS | flags); WRITE_COMMAND32(GP3_BLT_STRIDE, (total_dwords << 18) | gp3_dst_stride); WRITE_COMMAND32(GP3_BLT_DST_OFFSET, dstoffset & 0x3FFFFF); WRITE_COMMAND32(GP3_BLT_SRC_OFFSET, - ((gp3_scratch_base + indent) & 0x3FFFFF) | ((mono_srcx & 7) << 26)); + ((gp3_scratch_base + + indent) & 0x3FFFFF) | ((mono_srcx & 7) << 26)); WRITE_COMMAND32(GP3_BLT_WID_HEIGHT, (width << 16) | height); WRITE_COMMAND32(GP3_BLT_CH3_WIDHI, (width << 16) | height); WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); @@ -2951,9 +3012,10 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, WRITE_COMMAND32(GP3_BLT_CH3_OFFSET, srcoffset & 0x3FFFFF); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | gp3_ch3_bpp | - gp3_src_stride | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + gp3_src_stride | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) + << 20)); WRITE_COMMAND32(GP3_BLT_MODE, - gp3_blt_mode | GP3_BM_SRC_MONO | GP3_BM_SRC_FB); + gp3_blt_mode | GP3_BM_SRC_MONO | GP3_BM_SRC_FB); /* START THE BLT */ @@ -2974,8 +3036,8 @@ gp_screen_to_screen_masked(unsigned long dstoffset, unsigned long srcoffset, void gp_bresenham_line(unsigned long dstoffset, unsigned short length, - unsigned short initerr, unsigned short axialerr, - unsigned short diagerr, unsigned long flags) + unsigned short initerr, unsigned short axialerr, + unsigned short diagerr, unsigned long flags) { unsigned long base; long offset; @@ -3035,9 +3097,10 @@ gp_bresenham_line(unsigned long dstoffset, unsigned short length, /* 4MB segment we happen to be drawing to. */ WRITE_COMMAND32(GP3_VECTOR_VEC_ERR, - (((unsigned long)axialerr << 16) | (unsigned long)diagerr)); + (((unsigned long) axialerr << 16) | (unsigned long) + diagerr)); WRITE_COMMAND32(GP3_VECTOR_VEC_LEN, - (((unsigned long)length << 16) | (unsigned long)initerr)); + (((unsigned long) length << 16) | (unsigned long) initerr)); WRITE_COMMAND32(GP3_VECTOR_BASE_OFFSET, base); /* CHECK VECTOR PATTERN CASE */ @@ -3059,9 +3122,10 @@ gp_bresenham_line(unsigned long dstoffset, unsigned short length, WRITE_COMMAND32(GP3_VECTOR_DST_OFFSET, dstoffset); WRITE_COMMAND32(GP3_VECTOR_CH3_MODE_STR, - GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | - GP3_CH3_COLOR_PAT_ENABLE | GP3_CH3_SRC_8_8_8_8); - } else { + GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | + GP3_CH3_COLOR_PAT_ENABLE | GP3_CH3_SRC_8_8_8_8); + } + else { /* DISABLE CHANNEL 3 AND USE NORMAL PATTERN ORIGINS */ WRITE_COMMAND32(GP3_VECTOR_CH3_MODE_STR, 0); @@ -3093,16 +3157,15 @@ gp_bresenham_line(unsigned long dstoffset, unsigned short length, */ WRITE_COMMAND32(16, GP3_VEC_HDR_TYPE | GP3_VEC_HDR_VEC_MODE_ENABLE | - GP3_VEC_HDR_VEC_LEN_ENABLE); + GP3_VEC_HDR_VEC_LEN_ENABLE); WRITE_COMMAND32(16 + GP3_VECTOR_MODE, (gp3_vec_mode | flags)); WRITE_COMMAND32(16 + GP3_VECTOR_VEC_LEN, - (1 << 16) | (unsigned long)initerr); + (1 << 16) | (unsigned long) initerr); WRITE_COMMAND32(16 + GP3_VECTOR_COMMAND_SIZE, - GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE); + GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE); WRITE_COMMAND32(20 + GP3_VECTOR_COMMAND_SIZE, 0x100); - WRITE_COMMAND32(24 + GP3_VECTOR_COMMAND_SIZE, - (1 | GP3_LUT_DATA_TYPE)); + WRITE_COMMAND32(24 + GP3_VECTOR_COMMAND_SIZE, (1 | GP3_LUT_DATA_TYPE)); WRITE_COMMAND32(28 + GP3_VECTOR_COMMAND_SIZE, gp3_vec_pat); gp3_cmd_current += 32 + GP3_VECTOR_COMMAND_SIZE; @@ -3118,7 +3181,8 @@ gp_bresenham_line(unsigned long dstoffset, unsigned short length, void gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, - unsigned long y0, unsigned long x1, unsigned long y1, int inclusive) + unsigned long y0, unsigned long x1, unsigned long y1, + int inclusive) { unsigned long base; unsigned long length; @@ -3133,8 +3197,8 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, /* CALCULATE BRESENHAM TERMS */ - dx = (long)x1 - (long)x0; - dy = (long)y1 - (long)y0; + dx = (long) x1 - (long) x0; + dy = (long) y1 - (long) y0; if (dx < 0) dx = -dx; if (dy < 0) @@ -3148,7 +3212,8 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, flags |= CIMGP_POSMAJOR; if (y1 > y0) flags |= CIMGP_POSMINOR; - } else { + } + else { dmaj = dy; dmin = dx; flags = CIMGP_YMAJOR; @@ -3158,9 +3223,9 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, flags |= CIMGP_POSMAJOR; } - axialerr = (unsigned short)(dmin << 1); - diagerr = (unsigned short)((dmin - dmaj) << 1); - initerr = (unsigned short)((dmin << 1) - dmaj); + axialerr = (unsigned short) (dmin << 1); + diagerr = (unsigned short) ((dmin - dmaj) << 1); + initerr = (unsigned short) ((dmin << 1) - dmaj); if (!(flags & CIMGP_POSMINOR)) initerr--; @@ -3221,9 +3286,10 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, /* 4MB segment we happen to be drawing to. */ WRITE_COMMAND32(GP3_VECTOR_VEC_ERR, - (((unsigned long)axialerr << 16) | (unsigned long)diagerr)); + (((unsigned long) axialerr << 16) | (unsigned long) + diagerr)); WRITE_COMMAND32(GP3_VECTOR_VEC_LEN, - (((unsigned long)length << 16) | (unsigned long)initerr)); + (((unsigned long) length << 16) | (unsigned long) initerr)); WRITE_COMMAND32(GP3_VECTOR_BASE_OFFSET, base); /* CHECK VECTOR PATTERN CASE */ @@ -3245,9 +3311,10 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, WRITE_COMMAND32(GP3_VECTOR_DST_OFFSET, dstoffset); WRITE_COMMAND32(GP3_VECTOR_CH3_MODE_STR, - GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | - GP3_CH3_COLOR_PAT_ENABLE | GP3_CH3_SRC_8_8_8_8); - } else { + GP3_CH3_C3EN | GP3_CH3_REPLACE_SOURCE | + GP3_CH3_COLOR_PAT_ENABLE | GP3_CH3_SRC_8_8_8_8); + } + else { /* DISABLE CHANNEL 3 AND USE NORMAL PATTERN ORIGINS */ WRITE_COMMAND32(GP3_VECTOR_CH3_MODE_STR, 0); @@ -3278,16 +3345,15 @@ gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, */ WRITE_COMMAND32(16, GP3_VEC_HDR_TYPE | GP3_VEC_HDR_VEC_MODE_ENABLE | - GP3_VEC_HDR_VEC_LEN_ENABLE); + GP3_VEC_HDR_VEC_LEN_ENABLE); WRITE_COMMAND32(16 + GP3_VECTOR_MODE, (gp3_vec_mode | flags)); WRITE_COMMAND32(16 + GP3_VECTOR_VEC_LEN, - (1 << 16) | (unsigned long)initerr); + (1 << 16) | (unsigned long) initerr); WRITE_COMMAND32(16 + GP3_VECTOR_COMMAND_SIZE, - GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE); + GP3_LUT_HDR_TYPE | GP3_LUT_HDR_DATA_ENABLE); WRITE_COMMAND32(20 + GP3_VECTOR_COMMAND_SIZE, 0x100); - WRITE_COMMAND32(24 + GP3_VECTOR_COMMAND_SIZE, - (1 | GP3_LUT_DATA_TYPE)); + WRITE_COMMAND32(24 + GP3_VECTOR_COMMAND_SIZE, (1 | GP3_LUT_DATA_TYPE)); WRITE_COMMAND32(28 + GP3_VECTOR_COMMAND_SIZE, gp3_vec_pat); gp3_cmd_current += 32 + GP3_VECTOR_COMMAND_SIZE; @@ -3306,7 +3372,7 @@ gp_wait_until_idle(void) unsigned long temp; while (((temp = READ_GP32(GP3_BLT_STATUS)) & GP3_BS_BLT_BUSY) || - !(temp & GP3_BS_CB_EMPTY)) { + !(temp & GP3_BS_CB_EMPTY)) { ; } } @@ -3347,7 +3413,7 @@ gp_test_blt_pending(void) void gp_wait_blt_pending(void) { - while ((READ_GP32(GP3_BLT_STATUS)) & GP3_BS_BLT_PENDING) ; + while ((READ_GP32(GP3_BLT_STATUS)) & GP3_BS_BLT_PENDING); } /*--------------------------------------------------------------------------- @@ -3372,7 +3438,7 @@ gp_save_state(GP_SAVE_RESTORE * gp_state) /* RESET THE READ POINTER */ gp_set_command_buffer_base(gp_state->cmd_base, gp_state->cmd_top, - gp_state->cmd_bottom); + gp_state->cmd_bottom); } /*--------------------------------------------------------------------------- @@ -3389,26 +3455,25 @@ gp_restore_state(GP_SAVE_RESTORE * gp_state) WRITE_GP32(GP3_BASE_OFFSET, gp_state->base_offset); gp_set_command_buffer_base(gp_state->cmd_base, gp_state->cmd_top, - gp_state->cmd_bottom); + gp_state->cmd_bottom); } /* This is identical to gp_antialiased_text, except we support all one pass alpha operations similar to gp_set_alpha_operation */ - void gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, - unsigned long dataoffset, long stride, int operation, - int fourbpp) + unsigned long width, unsigned long height, + unsigned long dataoffset, long stride, int operation, + int fourbpp) { unsigned long indent; unsigned long size = ((width << 16) | height); unsigned long base, depth_flag; base = ((gp3_fb_base << 24) + (dstoffset & 0xFFC00000)) | - ((gp3_fb_base << 4) + (dataoffset >> 20)) | - (gp3_base_register & GP3_BASE_OFFSET_SRCMASK); + ((gp3_fb_base << 4) + (dataoffset >> 20)) | + (gp3_base_register & GP3_BASE_OFFSET_SRCMASK); /* ENABLE ALL RELEVANT REGISTERS */ /* We override the raster mode register to force the */ @@ -3430,7 +3495,8 @@ gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, depth_flag = GP3_CH3_SRC_4BPP_ALPHA; indent = (srcx >> 1) & 3; dataoffset += indent | ((srcx & 1) << 25); - } else { + } + else { depth_flag = GP3_CH3_SRC_8BPP_ALPHA; indent = srcx & 3; dataoffset += indent; @@ -3443,14 +3509,16 @@ gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, if (gp3_bpp == GP3_RM_BPPFMT_565) { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | - GP3_RM_ALPHA_TO_RGB | - ((unsigned long) (operation << 20)) | GP3_RM_SELECT_ALPHA_CHAN_3); - } else { + gp3_bpp | + GP3_RM_ALPHA_TO_RGB | + ((unsigned long) (operation << 20)) | + GP3_RM_SELECT_ALPHA_CHAN_3); + } + else { WRITE_COMMAND32(GP3_BLT_RASTER_MODE, - gp3_bpp | - GP3_RM_ALPHA_ALL | ((unsigned long) (operation << 20)) | - GP3_RM_SELECT_ALPHA_CHAN_3); + gp3_bpp | + GP3_RM_ALPHA_ALL | ((unsigned long) (operation << 20)) | + GP3_RM_SELECT_ALPHA_CHAN_3); } /* WRITE ALL REMAINING REGISTERS */ @@ -3465,7 +3533,8 @@ gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, WRITE_COMMAND32(GP3_BLT_BASE_OFFSET, base); WRITE_COMMAND32(GP3_BLT_CH3_MODE_STR, GP3_CH3_C3EN | (stride & 0xFFFF) | - depth_flag | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << 20)); + depth_flag | ((gp3_blt_flags & CIMGP_BLTFLAGS_PRES_LUT) << + 20)); WRITE_COMMAND32(GP3_BLT_MODE, GP3_BM_DST_REQ); diff --git a/driver/xf86-video-geode/src/cim/cim_init.c b/driver/xf86-video-geode/src/cim/cim_init.c index 71f20b6ec..e80eeb19f 100644 --- a/driver/xf86-video-geode/src/cim/cim_init.c +++ b/driver/xf86-video-geode/src/cim/cim_init.c @@ -43,8 +43,7 @@ CIMARRON_STATIC unsigned long init_video_base = 0x80000900; *---------------------------------------------------------------------------*/ int -init_detect_cpu(unsigned long *cpu_revision, - unsigned long *companion_revision) +init_detect_cpu(unsigned long *cpu_revision, unsigned long *companion_revision) { unsigned long bus, device, i; unsigned long cpu_bus = 0, cpu_device = 0; @@ -74,7 +73,8 @@ init_detect_cpu(unsigned long *cpu_revision, *cpu_revision = CIM_CPU_GEODEGX; else *cpu_revision = CIM_CPU_GEODELX; - } else if (data == PCI_VENDOR_5535 || data == PCI_VENDOR_5536) { + } + else if (data == PCI_VENDOR_5535 || data == PCI_VENDOR_5536) { sb_found = 1; if (data == PCI_VENDOR_5535) *companion_revision = CIM_SB_5535; @@ -97,7 +97,7 @@ init_detect_cpu(unsigned long *cpu_revision, msr_init_table(); if (msr_read64(MSR_DEVICE_GEODELX_GLCP, GLCP_REVID, - &msr_value) != CIM_STATUS_OK) { + &msr_value) != CIM_STATUS_OK) { *cpu_revision = 0; return CIM_STATUS_CPUNOTFOUND; } @@ -106,7 +106,7 @@ init_detect_cpu(unsigned long *cpu_revision, ((msr_value.low & 0x0F) << 16); if (msr_read64(MSR_DEVICE_5535_GLCP, GLCP_REVID, - &msr_value) != CIM_STATUS_OK) { + &msr_value) != CIM_STATUS_OK) { *cpu_revision = 0; return CIM_STATUS_CPUNOTFOUND; } @@ -125,7 +125,8 @@ init_detect_cpu(unsigned long *cpu_revision, if (data == PCI_VENDOR_DEVICE_GEODEGX_VIDEO) { num_bars = 4; break; - } else if (data == PCI_VENDOR_DEVICE_GEODELX_VIDEO) { + } + else if (data == PCI_VENDOR_DEVICE_GEODELX_VIDEO) { num_bars = 5; break; } @@ -194,7 +195,7 @@ init_read_base_addresses(INIT_BASE_ADDRESSES * base_addresses) OUTW(0xAC1C, 0xFC53); OUTW(0xAC1C, 0x0200); - value = (unsigned long)(INW(0xAC1E)) & 0xFE; + value = (unsigned long) (INW(0xAC1E)) & 0xFE; base_addresses->framebuffer_size = value << 20; @@ -217,7 +218,7 @@ init_read_cpu_frequency(unsigned long *cpu_frequency) OUTW(0xAC1C, 0xFC53); OUTW(0xAC1C, 0x1201); - *cpu_frequency = (unsigned long)(INW(0xAC1E)); + *cpu_frequency = (unsigned long) (INW(0xAC1E)); return CIM_STATUS_OK; } diff --git a/driver/xf86-video-geode/src/cim/cim_modes.c b/driver/xf86-video-geode/src/cim/cim_modes.c index 04d7eddc8..f61c0e42e 100644 --- a/driver/xf86-video-geode/src/cim/cim_modes.c +++ b/driver/xf86-video-geode/src/cim/cim_modes.c @@ -35,977 +35,928 @@ static const VG_DISPLAY_MODE CimarronDisplayModes[] = { /* 320 x 240 PANEL */ - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_QVGA, /* QVGA Panel size. */ - 320, 240, /* No scaling. */ - 320, 240, /* 320x240 active */ - 320, 240, /* 320x240 panel */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0140, 0x0148, 0x0162, 0x0180, 0x0188, 0x0190, /* horiz timings */ - 0x00F0, 0x00F4, 0x00F9, 0x00FD, 0x00FF, 0x0104, /* vertical timings */ - (31L << 16) | ((2000L * 65536L) / 10000L), /* freq = 31.2000 MHz */ - } + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_QVGA, /* QVGA Panel size. */ + 320, 240, /* No scaling. */ + 320, 240, /* 320x240 active */ + 320, 240, /* 320x240 panel */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0140, 0x0148, 0x0162, 0x0180, 0x0188, 0x0190, /* horiz timings */ + 0x00F0, 0x00F4, 0x00F9, 0x00FD, 0x00FF, 0x0104, /* vertical timings */ + (31L << 16) | ((2000L * 65536L) / 10000L), /* freq = 31.2000 MHz */ + } , /* 640 x 400 */ - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC, /* negative HSYNC */ - 640, 400, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x280, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horiz timings */ - 0x190, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ - } + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC, /* negative HSYNC */ + 640, 400, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x280, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horiz timings */ + 0x190, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ + } , /* 640x480 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0288, 0x0290, 0x02E8, 0x0318, 0x0320, /* horiz timings */ - 0x01E0, 0x01E8, 0x01EA, 0x01EC, 0x0205, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x0298, 0x02D8, 0x0330, 0x0330, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E2, 0x01E5, 0x01F4, 0x01F4, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (28L << 16) | ((5600L * 65536L) / 10000L), /* freq = 28.560 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0288, 0x0298, 0x02c0, 0x0338, 0x0340, /* horiz timings */ - 0x01e0, 0x01e8, 0x01e9, 0x01ec, 0x0200, 0x0208, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (31L << 16) | ((5000L * 65536L) / 10000L), /* freq = 31.5 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (31L << 16) | ((5000L * 65536L) / 10000L), /* freq = 31.5 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x02B8, 0x02F0, 0x0340, 0x0340, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (36L << 16) | ((0000L * 65536L) / 10000L), /* freq = 36.0 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x02A0, 0x02E0, 0x0340, 0x0340, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FA, 0x01FA, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (37L << 16) | ((8890L * 65536L) / 10000L), /* freq = 37.889 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 640, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x02A8, 0x02E8, 0x0350, 0x0350, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (43L << 16) | ((1630L * 65536L) / 10000L), /* freq = 43.163 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0288, 0x0290, 0x02E8, 0x0318, 0x0320, /* horiz timings */ + 0x01E0, 0x01E8, 0x01EA, 0x01EC, 0x0205, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x0298, 0x02D8, 0x0330, 0x0330, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E2, 0x01E5, 0x01F4, 0x01F4, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (28L << 16) | ((5600L * 65536L) / 10000L), /* freq = 28.560 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0288, 0x0298, 0x02c0, 0x0338, 0x0340, /* horiz timings */ + 0x01e0, 0x01e8, 0x01e9, 0x01ec, 0x0200, 0x0208, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (31L << 16) | ((5000L * 65536L) / 10000L), /* freq = 31.5 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (31L << 16) | ((5000L * 65536L) / 10000L), /* freq = 31.5 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x02B8, 0x02F0, 0x0340, 0x0340, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (36L << 16) | ((0000L * 65536L) / 10000L), /* freq = 36.0 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x02A0, 0x02E0, 0x0340, 0x0340, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FA, 0x01FA, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (37L << 16) | ((8890L * 65536L) / 10000L), /* freq = 37.889 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 640, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x02A8, 0x02E8, 0x0350, 0x0350, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (43L << 16) | ((1630L * 65536L) / 10000L), /* freq = 43.163 MHz */ + } , /* 640 x 480 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 640, 480, /* No scaling. */ - 640, 480, /* 640x480 active */ - 640, 480, /* 640x480 panel */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, /* horiz timings */ - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 640, 480, /* No scaling. */ + 640, 480, /* 640x480 active */ + 640, 480, /* 640x480 panel */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, /* horiz timings */ + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ + } , /* 800x600 */ - {VG_SUPPORTFLAG_56HZ | /* refresh rate = 56 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0338, 0x0380, 0x0400, 0x0400, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025B, 0x0271, 0x0271, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (36L << 16) | ((0000L * 65536L) / 10000L), /* freq = 36.0 MHz */ - } - , - - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0328, 0x0348, 0x03D0, 0x0418, 0x0420, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.00 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0348, 0x0398, 0x0410, 0x0410, /* horiz timings */ - 0x0258, 0x0258, 0x025c, 0x025F, 0x0274, 0x0274, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (45L << 16) | ((7200L * 65536L) / 10000L), /* freq = 45.72 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0358, 0x03D0, 0x0410, 0x0410, /* horiz timings */ - 0x0258, 0x0258, 0x027D, 0x0283, 0x029A, 0x029A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (49L << 16) | ((5000L * 65536L) / 10000L), /* freq = 49.5 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (49L << 16) | ((5000L * 65536L) / 10000L), /* freq = 49.5 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0340, 0x0380, 0x0418, 0x0418, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x0277, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (56L << 16) | ((2500L * 65536L) / 10000L), /* freq = 56.25 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0348, 0x03A0, 0x0420, 0x0420, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0278, 0x0278, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (60L << 16) | ((650L * 65536L) / 10000L), /* freq = 60.065 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - 0, - 800, 600, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0350, 0x03A8, 0x0430, 0x0430, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x027C, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (68L << 16) | ((1790L * 65536L) / 10000L), /* freq = 68.179 MHz */ - } + {VG_SUPPORTFLAG_56HZ | /* refresh rate = 56 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0338, 0x0380, 0x0400, 0x0400, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025B, 0x0271, 0x0271, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (36L << 16) | ((0000L * 65536L) / 10000L), /* freq = 36.0 MHz */ + } + , + + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0328, 0x0348, 0x03D0, 0x0418, 0x0420, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.00 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0348, 0x0398, 0x0410, 0x0410, /* horiz timings */ + 0x0258, 0x0258, 0x025c, 0x025F, 0x0274, 0x0274, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (45L << 16) | ((7200L * 65536L) / 10000L), /* freq = 45.72 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0358, 0x03D0, 0x0410, 0x0410, /* horiz timings */ + 0x0258, 0x0258, 0x027D, 0x0283, 0x029A, 0x029A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (49L << 16) | ((5000L * 65536L) / 10000L), /* freq = 49.5 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (49L << 16) | ((5000L * 65536L) / 10000L), /* freq = 49.5 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0340, 0x0380, 0x0418, 0x0418, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x0277, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (56L << 16) | ((2500L * 65536L) / 10000L), /* freq = 56.25 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0348, 0x03A0, 0x0420, 0x0420, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0278, 0x0278, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (60L << 16) | ((650L * 65536L) / 10000L), /* freq = 60.065 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + 0, + 800, 600, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0350, 0x03A8, 0x0430, 0x0430, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x027C, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (68L << 16) | ((1790L * 65536L) / 10000L), /* freq = 68.179 MHz */ + } , /* 800x600 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 800, 600, /* No scaling. */ - 800, 600, /* 800x600 active. */ - 800, 600, /* 800x600 panel */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x0348, 0x03C8, 0x0420, 0x0420, /* horiz timings */ - 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 800, 600, /* No scaling. */ + 800, 600, /* 800x600 active. */ + 800, 600, /* 800x600 panel */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x0348, 0x03C8, 0x0420, 0x0420, /* horiz timings */ + 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.00 MHz */ + } , /* 1024x768 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, /* horiz timings */ - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0530, 0x0530, /* horiz timings */ - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (75L << 16) | ((0000L * 65536L) / 10000L), /* freq = 75.0 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0438, 0x04A8, 0x0550, 0x0550, /* horiz timings */ - 0x0300, 0x0300, 0x0304, 0x0307, 0x0324, 0x0324, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (78L << 16) | ((7500L * 65536L) / 10000L), /* freq = 78.75 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, /* horiz timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (78L << 16) | ((7500L * 65536L) / 10000L), /* freq = 78.75 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0430, 0x0490, 0x0560, 0x0560, /* horiz timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0328, 0x0328, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (94L << 16) | ((5000L * 65536L) / 10000L), /* freq = 94.50 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0440, 0x04B0, 0x0560, 0x0560, /* horiz timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0329, 0x0329, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (100L << 16) | ((1870L * 65536L) / 10000L), /* freq = 100.187 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1024, 768, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0448, 0x04B8, 0x0570, 0x0570, /* horiz timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x032E, 0x032E, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (113L << 16) | ((3100L * 65536L) / 10000L), /* freq = 113.31 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, /* horiz timings */ + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0530, 0x0530, /* horiz timings */ + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (75L << 16) | ((0000L * 65536L) / 10000L), /* freq = 75.0 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0438, 0x04A8, 0x0550, 0x0550, /* horiz timings */ + 0x0300, 0x0300, 0x0304, 0x0307, 0x0324, 0x0324, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (78L << 16) | ((7500L * 65536L) / 10000L), /* freq = 78.75 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, /* horiz timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (78L << 16) | ((7500L * 65536L) / 10000L), /* freq = 78.75 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0430, 0x0490, 0x0560, 0x0560, /* horiz timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0328, 0x0328, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (94L << 16) | ((5000L * 65536L) / 10000L), /* freq = 94.50 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0440, 0x04B0, 0x0560, 0x0560, /* horiz timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0329, 0x0329, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (100L << 16) | ((1870L * 65536L) / 10000L), /* freq = 100.187 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1024, 768, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0448, 0x04B8, 0x0570, 0x0570, /* horiz timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x032E, 0x032E, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (113L << 16) | ((3100L * 65536L) / 10000L), /* freq = 113.31 MHz */ + } , /* 1024x768 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1024, 768, /* No scaling. */ - 1024, 768, /* 1024x768 active. */ - 1024, 768, /* 1024x768 panel */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, /* horiz timings */ - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1024, 768, /* No scaling. */ + 1024, 768, /* 1024x768 active. */ + 1024, 768, /* 1024x768 panel */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, /* horiz timings */ + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ + } , /* 1152x864 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, /* horiz timings */ - 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (81L << 16) | ((6000L * 65536L) / 10000L), /* freq = 81.60 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C8, 0x0540, 0x0600, 0x0600, /* horiz timings */ - 0x0360, 0x0360, 0x0368, 0x036B, 0x038B, 0x038B, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (97L << 16) | ((5200L * 65536L) / 10000L), /* freq = 97.52 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, /* horiz timings */ - 0x0360, 0x0360, 0x0367, 0x036A, 0x038B, 0x038B, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (101L << 16) | ((4200L * 65536L) / 10000L), /* freq = 101.42 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C0, 0x0540, 0x0640, 0x0640, /* horiz timings */ - 0x0360, 0x0360, 0x0361, 0x0364, 0x0384, 0x0384, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, /* horiz timings */ - 0x0360, 0x0360, 0x0363, 0x0366, 0x038B, 0x038B, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (119L << 16) | ((6500L * 65536L) / 10000L), /* freq = 119.65 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, /* horiz timings */ - 0x0360, 0x0360, 0x0369, 0x036C, 0x0396, 0x0396, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (129L << 16) | ((6000L * 65536L) / 10000L), /* freq = 129.60 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1152, 864, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, /* horiz timings */ - 0x0360, 0x0360, 0x0363, 0x0366, 0x0396, 0x0396, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (144L << 16) | ((0000L * 65536L) / 10000L), /* freq = 144.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, /* horiz timings */ + 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (81L << 16) | ((6000L * 65536L) / 10000L), /* freq = 81.60 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C8, 0x0540, 0x0600, 0x0600, /* horiz timings */ + 0x0360, 0x0360, 0x0368, 0x036B, 0x038B, 0x038B, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (97L << 16) | ((5200L * 65536L) / 10000L), /* freq = 97.52 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, /* horiz timings */ + 0x0360, 0x0360, 0x0367, 0x036A, 0x038B, 0x038B, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (101L << 16) | ((4200L * 65536L) / 10000L), /* freq = 101.42 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C0, 0x0540, 0x0640, 0x0640, /* horiz timings */ + 0x0360, 0x0360, 0x0361, 0x0364, 0x0384, 0x0384, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, /* horiz timings */ + 0x0360, 0x0360, 0x0363, 0x0366, 0x038B, 0x038B, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (119L << 16) | ((6500L * 65536L) / 10000L), /* freq = 119.65 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, /* horiz timings */ + 0x0360, 0x0360, 0x0369, 0x036C, 0x0396, 0x0396, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (129L << 16) | ((6000L * 65536L) / 10000L), /* freq = 129.60 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1152, 864, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, /* horiz timings */ + 0x0360, 0x0360, 0x0363, 0x0366, 0x0396, 0x0396, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (144L << 16) | ((0000L * 65536L) / 10000L), /* freq = 144.00 MHz */ + } , /* 1152x864 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1152, 864, /* No scaling. */ - 1152, 864, /* 1152x864 active. */ - 1152, 864, /* 1152x864 panel. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, /* horiz timings */ - 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (81L << 16) | ((6000L * 65536L) / 10000L), /* freq = 81.60 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1152, 864, /* No scaling. */ + 1152, 864, /* 1152x864 active. */ + 1152, 864, /* 1152x864 panel. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, /* horiz timings */ + 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (81L << 16) | ((6000L * 65536L) / 10000L), /* freq = 81.60 MHz */ + } , /* 1280x1024 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, /* horiz timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ - 0x0400, 0x0400, 0x0406, 0x0409, 0x042F, 0x042F, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (129L << 16) | ((6000L * 65536L) / 10000L), /* freq = 129.60 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ - 0x0400, 0x0400, 0x0407, 0x040A, 0x0431, 0x0431, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (133L << 16) | ((5000L * 65536L) / 10000L), /* freq = 133.50 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0510, 0x05A0, 0x0698, 0x0698, /* horiz timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (135L << 16) | ((0000L * 65536L) / 10000L), /* freq = 135.0 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0540, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x0430, 0x0430, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (157L << 16) | ((5000L * 65536L) / 10000L), /* freq = 157.5 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, /* horiz timings */ - 0x0400, 0x0400, 0x040C, 0x040F, 0x0442, 0x0442, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (172L << 16) | ((8000L * 65536L) / 10000L), /* freq = 172.80 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - 0, - 1280, 1024, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, /* horiz timings */ - 0x0400, 0x0400, 0x0406, 0x0409, 0x0442, 0x0442, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (192L << 16) | ((0000L * 65536L) / 10000L), /* freq = 192.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, /* horiz timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ + 0x0400, 0x0400, 0x0406, 0x0409, 0x042F, 0x042F, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (129L << 16) | ((6000L * 65536L) / 10000L), /* freq = 129.60 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ + 0x0400, 0x0400, 0x0407, 0x040A, 0x0431, 0x0431, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (133L << 16) | ((5000L * 65536L) / 10000L), /* freq = 133.50 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0510, 0x05A0, 0x0698, 0x0698, /* horiz timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (135L << 16) | ((0000L * 65536L) / 10000L), /* freq = 135.0 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0540, 0x05E0, 0x06C0, 0x06C0, /* horiz timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x0430, 0x0430, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (157L << 16) | ((5000L * 65536L) / 10000L), /* freq = 157.5 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, /* horiz timings */ + 0x0400, 0x0400, 0x040C, 0x040F, 0x0442, 0x0442, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (172L << 16) | ((8000L * 65536L) / 10000L), /* freq = 172.80 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + 0, + 1280, 1024, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, /* horiz timings */ + 0x0400, 0x0400, 0x0406, 0x0409, 0x0442, 0x0442, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (192L << 16) | ((0000L * 65536L) / 10000L), /* freq = 192.00 MHz */ + } , /* 1280x1024 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1280, 1024, /* No scaling. */ - 1280, 1024, /* 1280x1024 active. */ - 1280, 1024, /* 1280x1024 panel */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, /* horiz timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1280, 1024, /* No scaling. */ + 1280, 1024, /* 1280x1024 active. */ + 1280, 1024, /* 1280x1024 panel */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, /* horiz timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (108L << 16) | ((0000L * 65536L) / 10000L), /* freq = 108.00 MHz */ + } , /* 1600 x 1200 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (162L << 16) | ((0000L * 65536L) / 10000L), /* freq = 162.0 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (189L << 16) | ((0000L * 65536L) / 10000L), /* freq = 189.0 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x06B0, 0x0760, 0x0880, 0x0880, /* horiz timings */ - 0x04B0, 0x04B0, 0x04BD, 0x04C0, 0x04EF, 0x04EF, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (198L << 16) | ((0000L * 65536L) / 10000L), /* freq = 198.0 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (202L << 16) | ((5000L * 65536L) / 10000L), /* freq = 202.5 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (229L << 16) | ((5000L * 65536L) / 10000L), /* freq = 229.5 MHz */ - } - , - - {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x06C0, 0x0770, 0x08A0, 0x08A0, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04F0, 0x04F0, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (251L << 16) | ((1820L * 65536L) / 10000L), /* freq = 251.182 MHz */ - } - , - - {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1600, 1200, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x06C0, 0x0770, 0x08A0, 0x08A0, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04F7, 0x04F7, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (280L << 16) | ((6400L * 65536L) / 10000L), /* freq = 280.64 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (162L << 16) | ((0000L * 65536L) / 10000L), /* freq = 162.0 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (189L << 16) | ((0000L * 65536L) / 10000L), /* freq = 189.0 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 72 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x06B0, 0x0760, 0x0880, 0x0880, /* horiz timings */ + 0x04B0, 0x04B0, 0x04BD, 0x04C0, 0x04EF, 0x04EF, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (198L << 16) | ((0000L * 65536L) / 10000L), /* freq = 198.0 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (202L << 16) | ((5000L * 65536L) / 10000L), /* freq = 202.5 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (229L << 16) | ((5000L * 65536L) / 10000L), /* freq = 229.5 MHz */ + } + , + + {VG_SUPPORTFLAG_90HZ | /* refresh rate = 90 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x06C0, 0x0770, 0x08A0, 0x08A0, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04F0, 0x04F0, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (251L << 16) | ((1820L * 65536L) / 10000L), /* freq = 251.182 MHz */ + } + , + + {VG_SUPPORTFLAG_100HZ | /* refresh rate = 100 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1600, 1200, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x06C0, 0x0770, 0x08A0, 0x08A0, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04F7, 0x04F7, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (280L << 16) | ((6400L * 65536L) / 10000L), /* freq = 280.64 MHz */ + } , /* 1600 x 1200 PANEL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - VG_MODEFLAG_PANELOUT | /* Panel output. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ - 1600, 1200, /* No scaling. */ - 1600, 1200, /* 1600x1200 Active. */ - 1600, 1200, /* 1600x1200 Panel. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (162L << 16) | ((0000L * 65536L) / 10000L), /* freq = 162.0 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PANEL, /* Panel Mode. */ + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + VG_MODEFLAG_PANELOUT | /* Panel output. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC, /* negative syncs */ + 1600, 1200, /* No scaling. */ + 1600, 1200, /* 1600x1200 Active. */ + 1600, 1200, /* 1600x1200 Panel. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, /* horiz timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (162L << 16) | ((0000L * 65536L) / 10000L), /* freq = 162.0 MHz */ + } , /* 1920x1440 */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1920, 1440, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x0800, 0x08D0, 0x0A28, 0x0A28, /* horiz timings */ - 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05DC, 0x05DC, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (234L << 16) | ((0000L * 65536L) / 10000L), /* freq = 234.0 MHz */ - } - , - - {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1920, 1440, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x0818, 0x08E8, 0x0A50, 0x0A50, /* horiz timings */ - 0x05A0, 0x05A0, 0x05A8, 0x05AB, 0x05E2, 0x05E2, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (278L << 16) | ((4000L * 65536L) / 10000L), /* freq = 278.4 MHz */ - } - , - - {VG_SUPPORTFLAG_72HZ | /* refresh rate = 70 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1920, 1440, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x0818, 0x08E8, 0x0A50, 0x0A50, /* horiz timings */ - 0x05A0, 0x05A0, 0x05A4, 0x05A7, 0x05EB, 0x05EB, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (288L << 16) | ((0000L * 65536L) / 10000L), /* freq = 288.0 MHz */ - } - , - - {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1920, 1440, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x0810, 0x08F0, 0x0A50, 0x0A50, /* horiz timings */ - 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05DC, 0x05DC, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (297L << 16) | ((0000L * 65536L) / 10000L), /* freq = 297.0 MHz */ - } - , - - {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP - | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | - VG_SUPPORTFLAG_32BPP, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - 0, - 1920, 1440, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x0818, 0x08F0, 0x0A60, 0x0A60, /* horiz timings */ - 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05E8, 0x05E8, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings */ - (341L << 16) | ((3490L * 65536L) / 10000L), /* freq = 341.35 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1920, 1440, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x0800, 0x08D0, 0x0A28, 0x0A28, /* horiz timings */ + 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05DC, 0x05DC, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (234L << 16) | ((0000L * 65536L) / 10000L), /* freq = 234.0 MHz */ + } + , + + {VG_SUPPORTFLAG_70HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1920, 1440, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x0818, 0x08E8, 0x0A50, 0x0A50, /* horiz timings */ + 0x05A0, 0x05A0, 0x05A8, 0x05AB, 0x05E2, 0x05E2, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (278L << 16) | ((4000L * 65536L) / 10000L), /* freq = 278.4 MHz */ + } + , + + {VG_SUPPORTFLAG_72HZ | /* refresh rate = 70 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1920, 1440, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x0818, 0x08E8, 0x0A50, 0x0A50, /* horiz timings */ + 0x05A0, 0x05A0, 0x05A4, 0x05A7, 0x05EB, 0x05EB, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (288L << 16) | ((0000L * 65536L) / 10000L), /* freq = 288.0 MHz */ + } + , + + {VG_SUPPORTFLAG_75HZ | /* refresh rate = 75 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1920, 1440, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x0810, 0x08F0, 0x0A50, 0x0A50, /* horiz timings */ + 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05DC, 0x05DC, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (297L << 16) | ((0000L * 65536L) / 10000L), /* freq = 297.0 MHz */ + } + , + + {VG_SUPPORTFLAG_85HZ | /* refresh rate = 85 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP + | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + 0, + 1920, 1440, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x0818, 0x08F0, 0x0A60, 0x0A60, /* horiz timings */ + 0x05A0, 0x05A0, 0x05A1, 0x05A4, 0x05E8, 0x05E8, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings */ + (341L << 16) | ((3490L * 65536L) / 10000L), /* freq = 341.35 MHz */ + } , /*-------------------------------*/ @@ -1014,238 +965,237 @@ static const VG_DISPLAY_MODE CimarronDisplayModes[] = { /* 720 x 480i NTSC */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_NTSC | /* NTSC Mode. */ - VG_SUPPORTFLAG_ADV7171 | VG_SUPPORTFLAG_SAA7127 | - VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_INTERLACED | VG_MODEFLAG_TVOUT | /* Interlaced TV output */ - VG_MODEFLAG_HALFCLOCK | /* DotPLL = 1/2 VOP */ - VG_MODEFLAG_INT_FLICKER, /* Flicker Filter Out */ - 720, 480, /* No downscaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x02D0, 0x02D0, 0x02E1, 0x0320, 0x035A, 0x035A, /* horiz timings */ - 0x00F0, 0x00F0, 0x00F4, 0x00F8, 0x0107, 0x0107, /* vertical timings */ - 0x00F0, 0x00F0, 0x00F4, 0x00F8, 0x0106, 0x0106, /*Even field timings */ - (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ - } - , - - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_NTSC | /* NTSC Mode. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* TFT Output. */ - 640, 480, /* No downscaling. */ - 640, 480, /* 640x480 active. */ - 640, 480, /* 640x480 panel. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0280, 0x0280, 0x0333, 0x0373, 0x03A8, 0x03A8, /* horiz timings */ - 0x01E0, 0x01E0, 0x01F5, 0x01F7, 0x020D, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_NTSC | /* NTSC Mode. */ + VG_SUPPORTFLAG_ADV7171 | VG_SUPPORTFLAG_SAA7127 | + VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_INTERLACED | VG_MODEFLAG_TVOUT | /* Interlaced TV output */ + VG_MODEFLAG_HALFCLOCK | /* DotPLL = 1/2 VOP */ + VG_MODEFLAG_INT_FLICKER, /* Flicker Filter Out */ + 720, 480, /* No downscaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x02D0, 0x02D0, 0x02E1, 0x0320, 0x035A, 0x035A, /* horiz timings */ + 0x00F0, 0x00F0, 0x00F4, 0x00F8, 0x0107, 0x0107, /* vertical timings */ + 0x00F0, 0x00F0, 0x00F4, 0x00F8, 0x0106, 0x0106, /*Even field timings */ + (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ + } + , + + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_NTSC | /* NTSC Mode. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* TFT Output. */ + 640, 480, /* No downscaling. */ + 640, 480, /* 640x480 active. */ + 640, 480, /* 640x480 panel. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0280, 0x0280, 0x0333, 0x0373, 0x03A8, 0x03A8, /* horiz timings */ + 0x01E0, 0x01E0, 0x01F5, 0x01F7, 0x020D, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ + } , /* 800 x 600 NTSC */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_8X6_NTSC | /* 800x600 NTSC. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 800, 600, /* No downscaling. */ - 800, 600, /* 800x600 active. */ - 800, 600, /* 800x600 active. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x03A7, 0x03E7, 0x03F0, 0x03F0, /* horiz timings */ - 0x0258, 0x0258, 0x026A, 0x0272, 0x028A, 0x028A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.000 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_8X6_NTSC | /* 800x600 NTSC. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 800, 600, /* No downscaling. */ + 800, 600, /* 800x600 active. */ + 800, 600, /* 800x600 active. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x03A7, 0x03E7, 0x03F0, 0x03F0, /* horiz timings */ + 0x0258, 0x0258, 0x026A, 0x0272, 0x028A, 0x028A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.000 MHz */ + } , /* 1024 x 768 NTSC */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_10X7_NTSC | /* 1024x768 NTSC. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_AVG_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 1024, 768, /* No downscaling. */ - 1024, 768, /* 1024x768 active. */ - 1024, 768, /* 1024x768 active. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0490, 0x04D0, 0x04E0, 0x04E0, /* horiz timings */ - 0x0300, 0x0300, 0x031B, 0x031D, 0x0339, 0x0339, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_10X7_NTSC | /* 1024x768 NTSC. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_AVG_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 1024, 768, /* No downscaling. */ + 1024, 768, /* 1024x768 active. */ + 1024, 768, /* 1024x768 active. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0490, 0x04D0, 0x04E0, 0x04E0, /* horiz timings */ + 0x0300, 0x0300, 0x031B, 0x031D, 0x0339, 0x0339, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ + } , /* 720 x 576i PAL */ {VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PAL | /* PAL Mode. */ - VG_SUPPORTFLAG_ADV7171 | VG_SUPPORTFLAG_SAA7127 | VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_TVOUT | VG_MODEFLAG_INTERLACED | /* Interlaced TV out. */ - VG_MODEFLAG_HALFCLOCK | /* DotPLL = 1/2 VOP */ - VG_MODEFLAG_INT_FLICKER, /* Flicker Filter Out */ - 720, 576, /* No downscaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x02D0, 0x02D0, 0x02E4, 0x0324, 0x0360, 0x0360, /* horiz timings */ - 0x0120, 0x0120, 0x0123, 0x0127, 0x0139, 0x0139, /* vertical timings */ - 0x0120, 0x0120, 0x0123, 0x0127, 0x0138, 0x0138, /* Even timings */ - (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ - } + VG_SUPPORTFLAG_ADV7171 | VG_SUPPORTFLAG_SAA7127 | VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_TVOUT | VG_MODEFLAG_INTERLACED | /* Interlaced TV out. */ + VG_MODEFLAG_HALFCLOCK | /* DotPLL = 1/2 VOP */ + VG_MODEFLAG_INT_FLICKER, /* Flicker Filter Out */ + 720, 576, /* No downscaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x02D0, 0x02D0, 0x02E4, 0x0324, 0x0360, 0x0360, /* horiz timings */ + 0x0120, 0x0120, 0x0123, 0x0127, 0x0139, 0x0139, /* vertical timings */ + 0x0120, 0x0120, 0x0123, 0x0127, 0x0138, 0x0138, /* Even timings */ + (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ + } , {VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_PAL | /* PAL Mode. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 640, 480, /* No downscaling. */ - 640, 480, /* No mode dimensions. */ - 640, 480, /* 640x480 active. */ - 0, 0, 0, 0, 0, /* 640x480 panel. */ - 0x0280, 0x0280, 0x030F, 0x034F, 0x0360, 0x0360, /* horiz timings */ - 0x01E0, 0x01E0, 0x01F5, 0x01F7, 0x020D, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ - } + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 640, 480, /* No downscaling. */ + 640, 480, /* No mode dimensions. */ + 640, 480, /* 640x480 active. */ + 0, 0, 0, 0, 0, /* 640x480 panel. */ + 0x0280, 0x0280, 0x030F, 0x034F, 0x0360, 0x0360, /* horiz timings */ + 0x01E0, 0x01E0, 0x01F5, 0x01F7, 0x020D, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (25L << 16) | ((1750L * 65536L) / 10000L), /* freq = 25.175 MHz */ + } , /* 800 x 600 PAL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_8X6_PAL | /* 800x600 PAL. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 800, 600, /* No downscaling. */ - 800, 600, /* 800x600 active. */ - 800, 600, /* 800x600 active. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0320, 0x0320, 0x03A7, 0x03E7, 0x03F0, 0x03F0, /* horiz timings */ - 0x0258, 0x0258, 0x0270, 0x0272, 0x028A, 0x028A, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.000 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_8X6_PAL | /* 800x600 PAL. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 800, 600, /* No downscaling. */ + 800, 600, /* 800x600 active. */ + 800, 600, /* 800x600 active. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0320, 0x0320, 0x03A7, 0x03E7, 0x03F0, 0x03F0, /* horiz timings */ + 0x0258, 0x0258, 0x0270, 0x0272, 0x028A, 0x028A, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (40L << 16) | ((0000L * 65536L) / 10000L), /* freq = 40.000 MHz */ + } , /* 1024 x 768 PAL */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_10X7_PAL | /* 1024x768 NTSC. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_AVG_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 1024, 768, /* No downscaling. */ - 1024, 768, /* 1024x768 active. */ - 1024, 768, /* 1024x768 active. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0400, 0x0400, 0x0490, 0x04d0, 0x04e0, 0x04e0, /* horiz timings */ - 0x0300, 0x0300, 0x031b, 0x031d, 0x0339, 0x0339, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_10X7_PAL | /* 1024x768 NTSC. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_AVG_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_NEG_HSYNC | VG_MODEFLAG_NEG_VSYNC | /* negative syncs */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 1024, 768, /* No downscaling. */ + 1024, 768, /* 1024x768 active. */ + 1024, 768, /* 1024x768 active. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0400, 0x0400, 0x0490, 0x04d0, 0x04e0, 0x04e0, /* horiz timings */ + 0x0300, 0x0300, 0x031b, 0x031d, 0x0339, 0x0339, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (65L << 16) | ((0000L * 65536L) / 10000L), /* freq = 65.00 MHz */ + } , /* 720 x 480p HDTV */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_480P | /* 720x480P. */ - VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_TVOUT, /* Progressive TV out. */ - 720, 480, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x02D0, 0x02D0, 0x02E0, 0x0328, 0x035A, 0x035A, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E3, 0x020D, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ - } - , - - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_480P | /* 720x480P. */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 720, 480, /* No scaling. */ - 720, 480, /* 720x480 active. */ - 720, 480, /* 720x480 panel. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x02D0, 0x02D0, 0x02E3, 0x0323, 0x035A, 0x035A, /* horiz timings */ - 0x01E0, 0x01E0, 0x01E4, 0x01EA, 0x020D, 0x020D, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_480P | /* 720x480P. */ + VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_TVOUT, /* Progressive TV out. */ + 720, 480, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x02D0, 0x02D0, 0x02E0, 0x0328, 0x035A, 0x035A, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E3, 0x020D, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ + } + , + + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_480P | /* 720x480P. */ + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_LOW_BAND | /* Low bandwidth mode. */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 720, 480, /* No scaling. */ + 720, 480, /* 720x480 active. */ + 720, 480, /* 720x480 panel. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x02D0, 0x02D0, 0x02E3, 0x0323, 0x035A, 0x035A, /* horiz timings */ + 0x01E0, 0x01E0, 0x01E4, 0x01EA, 0x020D, 0x020D, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (27L << 16) | ((0000L * 65536L) / 10000L), /* freq = 27.0 MHz */ + } , /* 1280x720p HDTV */ {VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_720P | /* 1280x720P */ - VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_TVOUT, /* Progressive TV out */ - 1280, 720, /* No scaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0546, 0x0596, 0x0672, 0x0672, /* horiz timings */ - 0x02D0, 0x02D0, 0x02D3, 0x02D8, 0x02EE, 0x02EE, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* even timings */ - (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ - } + VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_TVOUT, /* Progressive TV out */ + 1280, 720, /* No scaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0546, 0x0596, 0x0672, 0x0672, /* horiz timings */ + 0x02D0, 0x02D0, 0x02D3, 0x02D8, 0x02EE, 0x02EE, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* even timings */ + (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ + } , {VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_720P | /* 1280x720P */ - VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ - VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ - VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ - 1280, 720, /* No scaling. */ - 1280, 720, /* 1280x720 active. */ - 1280, 720, /* 1280x720 panel. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0500, 0x0500, 0x0547, 0x0597, 0x0672, 0x0672, /* horiz timings */ - 0x02D0, 0x02D0, 0x02D4, 0x02D9, 0x02EE, 0x02EE, /* vertical timings */ - 0, 0, 0, 0, 0, 0, /* No even timings. */ - (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ - } + VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, /* TV Mode. */ + VG_MODEFLAG_AVG_BAND | /* Avg bandwidth mode. */ + VG_MODEFLAG_PANELOUT | VG_MODEFLAG_INVERT_SHFCLK, /* Panel output */ + 1280, 720, /* No scaling. */ + 1280, 720, /* 1280x720 active. */ + 1280, 720, /* 1280x720 panel. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0500, 0x0500, 0x0547, 0x0597, 0x0672, 0x0672, /* horiz timings */ + 0x02D0, 0x02D0, 0x02D4, 0x02D9, 0x02EE, 0x02EE, /* vertical timings */ + 0, 0, 0, 0, 0, 0, /* No even timings. */ + (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ + } , /* 1920x1080i HDTV */ - {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ - VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_1080I | /* 1920x1080i Mode. */ - VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_FS454 | - VG_SUPPORTFLAG_TVOUT, - VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ - VG_MODEFLAG_INTERLACED | VG_MODEFLAG_TVOUT | /* Interlaced TV out */ - /* Interlaced addressing */ - VG_MODEFLAG_INT_ADDRESS | VG_MODEFLAG_INVERT_SHFCLK, - 1920, 1080, /* 2:1 downscaling. */ - 0, 0, /* No mode dimensions. */ - 0, 0, /* No panel dimensions. */ - 0, 0, 0, 0, 0, /* No panel registers */ - 0x0780, 0x0780, 0x07AD, 0x0805, 0x0898, 0x0898, /* horiz timings */ - 0x021C, 0x021C, 0x021E, 0x0226, 0x0233, 0x0233, /* vertical timings */ - 0x021C, 0x021C, 0x021E, 0x0226, 0x0232, 0x0232, /*even field timings */ - (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ - } + {VG_SUPPORTFLAG_60HZ | /* refresh rate = 60 */ + VG_SUPPORTFLAG_8BPP | VG_SUPPORTFLAG_12BPP | VG_SUPPORTFLAG_15BPP | VG_SUPPORTFLAG_16BPP | VG_SUPPORTFLAG_24BPP | VG_SUPPORTFLAG_32BPP | VG_SUPPORTFLAG_1080I | /* 1920x1080i Mode. */ + VG_SUPPORTFLAG_ADV7300 | VG_SUPPORTFLAG_FS454 | VG_SUPPORTFLAG_TVOUT, + VG_MODEFLAG_HIGH_BAND | /* High bandwidth mode. */ + VG_MODEFLAG_INTERLACED | VG_MODEFLAG_TVOUT | /* Interlaced TV out */ + /* Interlaced addressing */ + VG_MODEFLAG_INT_ADDRESS | VG_MODEFLAG_INVERT_SHFCLK, + 1920, 1080, /* 2:1 downscaling. */ + 0, 0, /* No mode dimensions. */ + 0, 0, /* No panel dimensions. */ + 0, 0, 0, 0, 0, /* No panel registers */ + 0x0780, 0x0780, 0x07AD, 0x0805, 0x0898, 0x0898, /* horiz timings */ + 0x021C, 0x021C, 0x021E, 0x0226, 0x0233, 0x0233, /* vertical timings */ + 0x021C, 0x021C, 0x021E, 0x0226, 0x0232, 0x0232, /*even field timings */ + (74L << 16) | ((2500L * 65536L) / 10000L), /* freq = 74.25 MHz */ + } , }; @@ -1258,127 +1208,127 @@ static const VG_DISPLAY_MODE CimarronDisplayModes[] = { static const PLL_FREQUENCY CimarronPLLFrequencies[] = { {0x000031AC, (24L << 16) | ((9230L * 65536L) / 10000L)} - , /* 24.9230, - 4,27,13 */ + , /* 24.9230, - 4,27,13 */ {0x0000215D, (25L << 16) | ((1750L * 65536L) / 10000L)} - , /* 25.1750, - 3,22,14 */ + , /* 25.1750, - 3,22,14 */ {0x00001087, (27L << 16) | ((0000L * 65536L) / 10000L)} - , /* 27.0000, - 2, 9, 8 */ + , /* 27.0000, - 2, 9, 8 */ {0x0000216C, (28L << 16) | ((3220L * 65536L) / 10000L)} - , /* 28.3220, - 3,23,13 */ + , /* 28.3220, - 3,23,13 */ {0x0000218D, (28L << 16) | ((5600L * 65536L) / 10000L)} - , /* 28.5600, - 3,25,14 */ + , /* 28.5600, - 3,25,14 */ {0x000010C9, (31L << 16) | ((2000L * 65536L) / 10000L)} - , /* 31.2000, - 2,13,10 */ + , /* 31.2000, - 2,13,10 */ {0x00003147, (31L << 16) | ((5000L * 65536L) / 10000L)} - , /* 31.5000, - 4,21, 8 */ + , /* 31.5000, - 4,21, 8 */ {0x000010A7, (33L << 16) | ((320L * 65536L) / 10000L)} - , /* 33.0320, - 2,11, 8 */ + , /* 33.0320, - 2,11, 8 */ {0x00002159, (35L << 16) | ((1120L * 65536L) / 10000L)} - , /* 35.1120, - 3,22,10 */ + , /* 35.1120, - 3,22,10 */ {0x00004249, (35L << 16) | ((5000L * 65536L) / 10000L)} - , /* 35.5000, - 5,37,10 */ + , /* 35.5000, - 5,37,10 */ {0x00000057, (36L << 16) | ((0000L * 65536L) / 10000L)} - , /* 36.0000, - 1, 6, 8 */ + , /* 36.0000, - 1, 6, 8 */ {0x0000219A, (37L << 16) | ((8890L * 65536L) / 10000L)} - , /* 37.8890, - 3,26,11 */ + , /* 37.8890, - 3,26,11 */ {0x00002158, (39L << 16) | ((1680L * 65536L) / 10000L)} - , /* 39.1680, - 3,22, 9 */ + , /* 39.1680, - 3,22, 9 */ {0x00000045, (40L << 16) | ((0000L * 65536L) / 10000L)} - , /* 40.0000, - 1, 5, 6 */ + , /* 40.0000, - 1, 5, 6 */ {0x00000089, (43L << 16) | ((1630L * 65536L) / 10000L)} - , /* 43.1630, - 1, 9,10 */ + , /* 43.1630, - 1, 9,10 */ {0x000010E7, (44L << 16) | ((9000L * 65536L) / 10000L)} - , /* 44.9000, - 2,15, 8 */ + , /* 44.9000, - 2,15, 8 */ {0x00002136, (45L << 16) | ((7200L * 65536L) / 10000L)} - , /* 45.7200, - 3,20, 7 */ + , /* 45.7200, - 3,20, 7 */ {0x00003207, (49L << 16) | ((5000L * 65536L) / 10000L)} - , /* 49.5000, - 4,33, 8 */ + , /* 49.5000, - 4,33, 8 */ {0x00002187, (50L << 16) | ((0000L * 65536L) / 10000L)} - , /* 50.0000, - 3,25, 8 */ + , /* 50.0000, - 3,25, 8 */ {0x00004286, (56L << 16) | ((2500L * 65536L) / 10000L)} - , /* 56.2500, - 5,41, 7 */ + , /* 56.2500, - 5,41, 7 */ {0x000010E5, (60L << 16) | ((650L * 65536L) / 10000L)} - , /* 60.0650, - 2,15, 6 */ + , /* 60.0650, - 2,15, 6 */ {0x00004214, (65L << 16) | ((0000L * 65536L) / 10000L)} - , /* 65.0000, - 5,34, 5 */ + , /* 65.0000, - 5,34, 5 */ {0x00001105, (68L << 16) | ((1790L * 65536L) / 10000L)} - , /* 68.1790, - 2,17, 6 */ + , /* 68.1790, - 2,17, 6 */ {0x000031E4, (74L << 16) | ((2500L * 65536L) / 10000L)} - , /* 74.2500, - 4,31, 5 */ + , /* 74.2500, - 4,31, 5 */ {0x00003183, (75L << 16) | ((0000L * 65536L) / 10000L)} - , /* 75.0000, - 4,25, 4 */ + , /* 75.0000, - 4,25, 4 */ {0x00004284, (78L << 16) | ((7500L * 65536L) / 10000L)} - , /* 78.7500, - 5,41, 5 */ + , /* 78.7500, - 5,41, 5 */ {0x00001104, (81L << 16) | ((6000L * 65536L) / 10000L)} - , /* 81.6000, - 2,17, 5 */ + , /* 81.6000, - 2,17, 5 */ {0x00006363, (94L << 16) | ((5000L * 65536L) / 10000L)} - , /* 94.5000, - 7,55, 4 */ + , /* 94.5000, - 7,55, 4 */ {0x00005303, (97L << 16) | ((5200L * 65536L) / 10000L)} - , /* 97.5200, - 6,49, 4 */ + , /* 97.5200, - 6,49, 4 */ {0x00002183, (100L << 16) | ((1870L * 65536L) / 10000L)} - , /* 100.187, - 3,25, 4 */ + , /* 100.187, - 3,25, 4 */ {0x00002122, (101L << 16) | ((4200L * 65536L) / 10000L)} - , /* 101.420, - 3,19, 3 */ + , /* 101.420, - 3,19, 3 */ {0x000041B1, (106L << 16) | ((5000L * 65536L) / 10000L)} - , /* 106.50, - 5,28, 2 */ + , /* 106.50, - 5,28, 2 */ {0x00001081, (108L << 16) | ((0000L * 65536L) / 10000L)} - , /* 108.00, - 2, 9, 2 */ + , /* 108.00, - 2, 9, 2 */ {0x00006201, (113L << 16) | ((3100L * 65536L) / 10000L)} - , /* 113.31, - 7,33, 2 */ + , /* 113.31, - 7,33, 2 */ {0x00000041, (119L << 16) | ((6500L * 65536L) / 10000L)} - , /* 119.65, - 1, 5, 2 */ + , /* 119.65, - 1, 5, 2 */ {0x000041A1, (129L << 16) | ((6000L * 65536L) / 10000L)} - , /* 129.60, - 5,27, 2 */ + , /* 129.60, - 5,27, 2 */ {0x00002182, (133L << 16) | ((5000L * 65536L) / 10000L)} - , /* 133.50, - 3,25, 3 */ + , /* 133.50, - 3,25, 3 */ {0x000041B1, (135L << 16) | ((0000L * 65536L) / 10000L)} - , /* 135.00, - 5,28, 2 */ + , /* 135.00, - 5,28, 2 */ {0x00000051, (144L << 16) | ((0000L * 65536L) / 10000L)} - , /* 144.00, - 1, 6, 2 */ + , /* 144.00, - 1, 6, 2 */ {0x000041E1, (148L << 16) | ((5000L * 65536L) / 10000L)} - , /* 148.50, - 5,31, 2 */ + , /* 148.50, - 5,31, 2 */ {0x000062D1, (157L << 16) | ((5000L * 65536L) / 10000L)} - , /* 157.50, - 7,46, 2 */ + , /* 157.50, - 7,46, 2 */ {0x000031A1, (162L << 16) | ((0000L * 65536L) / 10000L)} - , /* 162.00, - 4,27, 2 */ + , /* 162.00, - 4,27, 2 */ {0x00000061, (169L << 16) | ((2030L * 65536L) / 10000L)} - , /* 169.203, - 1, 7, 2 */ + , /* 169.203, - 1, 7, 2 */ {0x00004231, (172L << 16) | ((8000L * 65536L) / 10000L)} - , /* 172.800, - 5,36, 2 */ + , /* 172.800, - 5,36, 2 */ {0x00002151, (175L << 16) | ((5000L * 65536L) / 10000L)} - , /* 175.50, - 3,22, 2 */ + , /* 175.50, - 3,22, 2 */ {0x000052E1, (189L << 16) | ((0000L * 65536L) / 10000L)} - , /* 189.00, - 6,47, 2 */ + , /* 189.00, - 6,47, 2 */ {0x00000071, (192L << 16) | ((0000L * 65536L) / 10000L)} - , /* 192.00, - 1, 8, 2 */ + , /* 192.00, - 1, 8, 2 */ {0x00003201, (198L << 16) | ((0000L * 65536L) / 10000L)} - , /* 198.00, - 4,33, 2 */ + , /* 198.00, - 4,33, 2 */ {0x00004291, (202L << 16) | ((5000L * 65536L) / 10000L)} - , /* 202.50, - 5,42, 2 */ + , /* 202.50, - 5,42, 2 */ {0x00001101, (204L << 16) | ((7500L * 65536L) / 10000L)} - , /* 204.75, - 2,17, 2 */ + , /* 204.75, - 2,17, 2 */ {0x00007481, (218L << 16) | ((2500L * 65536L) / 10000L)} - , /* 218.25, - 8,73, 2 */ + , /* 218.25, - 8,73, 2 */ {0x00004170, (229L << 16) | ((5000L * 65536L) / 10000L)} - , /* 229.50, - 5,24, 1 */ + , /* 229.50, - 5,24, 1 */ {0x00006210, (234L << 16) | ((0000L * 65536L) / 10000L)} - , /* 234.00, - 7,34, 1 */ + , /* 234.00, - 7,34, 1 */ {0x00003140, (251L << 16) | ((1820L * 65536L) / 10000L)} - , /* 251.182, - 4,21, 1 */ + , /* 251.182, - 4,21, 1 */ {0x00006250, (261L << 16) | ((0000L * 65536L) / 10000L)} - , /* 261.00, - 7,38, 1 */ + , /* 261.00, - 7,38, 1 */ {0x000041C0, (278L << 16) | ((4000L * 65536L) / 10000L)} - , /* 278.40, - 5,29, 1 */ + , /* 278.40, - 5,29, 1 */ {0x00005220, (280L << 16) | ((6400L * 65536L) / 10000L)} - , /* 280.64, - 6,35, 1 */ + , /* 280.64, - 6,35, 1 */ {0x00000050, (288L << 16) | ((0000L * 65536L) / 10000L)} - , /* 288.00, - 1, 6, 1 */ + , /* 288.00, - 1, 6, 1 */ {0x000041E0, (297L << 16) | ((0000L * 65536L) / 10000L)} - , /* 297.00, - 5,31, 1 */ + , /* 297.00, - 5,31, 1 */ {0x00002130, (320L << 16) | ((2070L * 65536L) / 10000L)} - , /* 320.207, - 3,20, 1 */ + , /* 320.207, - 3,20, 1 */ {0x00006310, (341L << 16) | ((3490L * 65536L) / 10000L)} - /* 341.349, - 7,50, 1 */ + /* 341.349, - 7,50, 1 */ }; #define NUM_CIMARRON_PLL_FREQUENCIES sizeof(CimarronPLLFrequencies) / \ @@ -1389,519 +1339,519 @@ static const PLL_FREQUENCY CimarronPLLFrequencies[] = { /*-----------------------------------*/ static const unsigned long CimarronHorizontalGraphicsFilter[][2] = { - {0x1284A7D5, 0x000017D5}, /* -43, 297, 296, -43, 5 */ - {0x12A497D7, 0x000013D6}, /* -41, 293, 298, -42, 4 */ - {0x12D48BD7, 0x000013D6}, /* -41, 290, 301, -42, 4 */ - {0x13147FD7, 0x000013D5}, /* -41, 287, 305, -43, 4 */ - {0x133473D8, 0x000013D5}, /* -40, 284, 307, -43, 4 */ - {0x136467D8, 0x000013D5}, /* -40, 281, 310, -43, 4 */ - {0x13945FD8, 0x000013D4}, /* -40, 279, 313, -44, 4 */ - {0x13B453D9, 0x000013D4}, /* -39, 276, 315, -44, 4 */ - {0x13E447D9, 0x000013D4}, /* -39, 273, 318, -44, 4 */ - {0x14143BDA, 0x000013D3}, /* -38, 270, 321, -45, 4 */ - {0x143433DA, 0x000013D3}, /* -38, 268, 323, -45, 4 */ - {0x146427DA, 0x000013D3}, /* -38, 265, 326, -45, 4 */ - {0x14941BDB, 0x000013D2}, /* -37, 262, 329, -46, 4 */ - {0x14C40FDB, 0x000013D2}, /* -37, 259, 332, -46, 4 */ - {0x14F407DA, 0x000017D1}, /* -38, 257, 335, -47, 5 */ - {0x1503FBDC, 0x000013D2}, /* -36, 254, 336, -46, 4 */ - {0x1543F3DB, 0x000017D0}, /* -37, 252, 340, -48, 5 */ - {0x1563E3DD, 0x000013D1}, /* -35, 248, 342, -47, 4 */ - {0x1593D7DD, 0x000013D1}, /* -35, 245, 345, -47, 4 */ - {0x15B3CFDD, 0x000013D1}, /* -35, 243, 347, -47, 4 */ - {0x15E3C3DE, 0x000013D0}, /* -34, 240, 350, -48, 4 */ - {0x1613B7DE, 0x000013D0}, /* -34, 237, 353, -48, 4 */ - {0x1633ABDF, 0x000013D0}, /* -33, 234, 355, -48, 4 */ - {0x16639FDF, 0x000013D0}, /* -33, 231, 358, -48, 4 */ - {0x167397E0, 0x000013D0}, /* -32, 229, 359, -48, 4 */ - {0x16B38BE0, 0x000013CF}, /* -32, 226, 363, -49, 4 */ - {0x16E383DF, 0x000017CE}, /* -33, 224, 366, -50, 5 */ - {0x170373E1, 0x000013CF}, /* -31, 220, 368, -49, 4 */ - {0x17236BE1, 0x000013CF}, /* -31, 218, 370, -49, 4 */ - {0x17435FE2, 0x000013CF}, /* -30, 215, 372, -49, 4 */ - {0x177353E2, 0x000013CF}, /* -30, 212, 375, -49, 4 */ - {0x17B34BE1, 0x000017CD}, /* -31, 210, 379, -51, 5 */ - {0x17C33FE3, 0x000013CE}, /* -29, 207, 380, -50, 4 */ - {0x17F333E3, 0x000013CE}, /* -29, 204, 383, -50, 4 */ - {0x181327E4, 0x000013CE}, /* -28, 201, 385, -50, 4 */ - {0x18431FE3, 0x000017CD}, /* -29, 199, 388, -51, 5 */ - {0x186313E4, 0x000013CE}, /* -28, 196, 390, -50, 4 */ - {0x188307E5, 0x000013CE}, /* -27, 193, 392, -50, 4 */ - {0x18B2FBE5, 0x000013CE}, /* -27, 190, 395, -50, 4 */ - {0x18C2F3E6, 0x000013CE}, /* -26, 188, 396, -50, 4 */ - {0x18F2E7E6, 0x000013CE}, /* -26, 185, 399, -50, 4 */ - {0x1912DBE7, 0x000013CE}, /* -25, 182, 401, -50, 4 */ - {0x1952D3E6, 0x000017CC}, /* -26, 180, 405, -52, 5 */ - {0x1972CBE6, 0x000017CC}, /* -26, 178, 407, -52, 5 */ - {0x1992BFE7, 0x000017CC}, /* -25, 175, 409, -52, 5 */ - {0x19C2B3E7, 0x000017CC}, /* -25, 172, 412, -52, 5 */ - {0x19D2A7E9, 0x000013CD}, /* -23, 169, 413, -51, 4 */ - {0x1A029FE8, 0x000017CC}, /* -24, 167, 416, -52, 5 */ - {0x1A1293E9, 0x000013CE}, /* -23, 164, 417, -50, 4 */ - {0x1A3287EA, 0x000013CE}, /* -22, 161, 419, -50, 4 */ - {0x1A627FE9, 0x000017CD}, /* -23, 159, 422, -51, 5 */ - {0x1A7273EB, 0x000013CE}, /* -21, 156, 423, -50, 4 */ - {0x1AA267EB, 0x000013CE}, /* -21, 153, 426, -50, 4 */ - {0x1AC25FEB, 0x000013CE}, /* -21, 151, 428, -50, 4 */ - {0x1AE253EC, 0x000013CE}, /* -20, 148, 430, -50, 4 */ - {0x1B124BEB, 0x000017CD}, /* -21, 146, 433, -51, 5 */ - {0x1B223FED, 0x000013CE}, /* -19, 143, 434, -50, 4 */ - {0x1B5237EC, 0x000017CD}, /* -20, 141, 437, -51, 5 */ - {0x1B622BED, 0x000013CF}, /* -19, 138, 438, -49, 4 */ - {0x1B821FEE, 0x000013CF}, /* -18, 135, 440, -49, 4 */ - {0x1BA217EE, 0x000013CF}, /* -18, 133, 442, -49, 4 */ - {0x1BC20BEF, 0x000013CF}, /* -17, 130, 444, -49, 4 */ - {0x1BE203EF, 0x000013CF}, /* -17, 128, 446, -49, 4 */ - {0x1C01FBEE, 0x000017CF}, /* -18, 126, 448, -49, 5 */ - {0x1C11EFF0, 0x000013D0}, /* -16, 123, 449, -48, 4 */ - {0x1C41E7EF, 0x000017CF}, /* -17, 121, 452, -49, 5 */ - {0x1C61DFEF, 0x000017CF}, /* -17, 119, 454, -49, 5 */ - {0x1C61D3F1, 0x000013D1}, /* -15, 116, 454, -47, 4 */ - {0x1C91CBF0, 0x000017D0}, /* -16, 114, 457, -48, 5 */ - {0x1CA1BFF2, 0x000013D1}, /* -14, 111, 458, -47, 4 */ - {0x1CC1B3F2, 0x000013D2}, /* -14, 108, 460, -46, 4 */ - {0x1CE1AFF1, 0x000017D1}, /* -15, 107, 462, -47, 5 */ - {0x1CF1A3F3, 0x000013D2}, /* -13, 104, 463, -46, 4 */ - {0x1D1197F3, 0x000013D3}, /* -13, 101, 465, -45, 4 */ - {0x1D3197F2, 0x000013D2}, /* -14, 101, 467, -46, 4 */ - {0x1D518BF3, 0x000013D2}, /* -13, 98, 469, -46, 4 */ - {0x1D6183F3, 0x000013D3}, /* -13, 96, 470, -45, 4 */ - {0x1D817BF3, 0x000013D3}, /* -13, 94, 472, -45, 4 */ - {0x1D916FF4, 0x000013D4}, /* -12, 91, 473, -44, 4 */ - {0x1DB167F4, 0x000013D4}, /* -12, 89, 475, -44, 4 */ - {0x1DC15FF4, 0x000013D5}, /* -12, 87, 476, -43, 4 */ - {0x1DE153F5, 0x000013D5}, /* -11, 84, 478, -43, 4 */ - {0x1DF14BF5, 0x000013D6}, /* -11, 82, 479, -42, 4 */ - {0x1E1143F5, 0x000013D6}, /* -11, 80, 481, -42, 4 */ - {0x1E1137F7, 0x00000FD8}, /* -9, 77, 481, -40, 3 */ - {0x1E3133F6, 0x000013D7}, /* -10, 76, 483, -41, 4 */ - {0x1E412BF6, 0x000013D8}, /* -10, 74, 484, -40, 4 */ - {0x1E611FF7, 0x000013D8}, /* -9, 71, 486, -40, 4 */ - {0x1E7117F7, 0x000013D9}, /* -9, 69, 487, -39, 4 */ - {0x1E810FF7, 0x000013DA}, /* -9, 67, 488, -38, 4 */ - {0x1E9107F8, 0x000013DA}, /* -8, 65, 489, -38, 4 */ - {0x1EA0FFF8, 0x000013DB}, /* -8, 63, 490, -37, 4 */ - {0x1EB0F3F9, 0x00000FDD}, /* -7, 60, 491, -35, 3 */ - {0x1ED0EFF8, 0x000013DC}, /* -8, 59, 493, -36, 4 */ - {0x1EE0E7F9, 0x00000FDD}, /* -7, 57, 494, -35, 3 */ - {0x1EF0DFF9, 0x00000FDE}, /* -7, 55, 495, -34, 3 */ - {0x1F00D7F9, 0x00000FDF}, /* -7, 53, 496, -33, 3 */ - {0x1F10CFFA, 0x00000FDF}, /* -6, 51, 497, -33, 3 */ - {0x1F20C7FA, 0x00000FE0}, /* -6, 49, 498, -32, 3 */ - {0x1F20C3FA, 0x00000FE1}, /* -6, 48, 498, -31, 3 */ - {0x1F30BBFA, 0x00000FE2}, /* -6, 46, 499, -30, 3 */ - {0x1F40AFFB, 0x00000FE3}, /* -5, 43, 500, -29, 3 */ - {0x1F50A7FB, 0x00000FE4}, /* -5, 41, 501, -28, 3 */ - {0x1F60A3FB, 0x00000FE4}, /* -5, 40, 502, -28, 3 */ - {0x1F709BFB, 0x00000FE5}, /* -5, 38, 503, -27, 3 */ - {0x1F7093FC, 0x00000FE6}, /* -4, 36, 503, -26, 3 */ - {0x1F808FFC, 0x00000BE7}, /* -4, 35, 504, -25, 2 */ - {0x1F9087FC, 0x00000BE8}, /* -4, 33, 505, -24, 2 */ - {0x1F9083FC, 0x00000BE9}, /* -4, 32, 505, -23, 2 */ - {0x1FA077FD, 0x00000BEA}, /* -3, 29, 506, -22, 2 */ - {0x1FA073FD, 0x00000BEB}, /* -3, 28, 506, -21, 2 */ - {0x1FB06BFD, 0x00000BEC}, /* -3, 26, 507, -20, 2 */ - {0x1FC063FD, 0x00000BED}, /* -3, 24, 508, -19, 2 */ - {0x1FC05BFE, 0x00000BEE}, /* -2, 22, 508, -18, 2 */ - {0x1FC057FE, 0x00000BEF}, /* -2, 21, 508, -17, 2 */ - {0x1FD053FE, 0x000007F0}, /* -2, 20, 509, -16, 1 */ - {0x1FD04BFE, 0x000007F2}, /* -2, 18, 509, -14, 1 */ - {0x1FE043FE, 0x000007F3}, /* -2, 16, 510, -13, 1 */ - {0x1FE03BFF, 0x000007F4}, /* -1, 14, 510, -12, 1 */ - {0x1FE037FF, 0x000007F5}, /* -1, 13, 510, -11, 1 */ - {0x1FE033FF, 0x000007F6}, /* -1, 12, 510, -10, 1 */ - {0x1FF02BFF, 0x000007F7}, /* -1, 10, 511, -9, 1 */ - {0x1FF027FF, 0x000003F9}, /* -1, 9, 511, -7, 0 */ - {0x1FF01C00, 0x000003FA}, /* 0, 7, 511, -6, 0 */ - {0x1FF01800, 0x000003FB}, /* 0, 6, 511, -5, 0 */ - {0x1FF01400, 0x000003FC}, /* 0, 5, 511, -4, 0 */ - {0x1FF00C00, 0x000003FE}, /* 0, 3, 511, -2, 0 */ - {0x1FF00800, 0x000003FF}, /* 0, 2, 511, -1, 0 */ - {0x1FF00400, 0x00000000}, /* 0, 1, 511, 0, 0 */ - {0x1FFFFC00, 0x00000002}, /* 0, -1, 511, 2, 0 */ - {0x1FFFF800, 0x00000003}, /* 0, -2, 511, 3, 0 */ - {0x1FFFF000, 0x00000005}, /* 0, -4, 511, 5, 0 */ - {0x1FFFEC00, 0x00000006}, /* 0, -5, 511, 6, 0 */ - {0x1FFFE800, 0x00000007}, /* 0, -6, 511, 7, 0 */ - {0x1FFFE400, 0x000FFC09}, /* 0, -7, 511, 9, -1 */ - {0x1FFFDC01, 0x000FFC0A}, /* 1, -9, 511, 10, -1 */ - {0x1FEFDC01, 0x000FFC0B}, /* 1, -9, 510, 11, -1 */ - {0x1FEFD401, 0x000FFC0D}, /* 1, -11, 510, 13, -1 */ - {0x1FEFD001, 0x000FFC0E}, /* 1, -12, 510, 14, -1 */ - {0x1FEFCC01, 0x000FF810}, /* 1, -13, 510, 16, -2 */ - {0x1FDFCC01, 0x000FF811}, /* 1, -13, 509, 17, -2 */ - {0x1FDFC401, 0x000FF813}, /* 1, -15, 509, 19, -2 */ - {0x1FCFC002, 0x000FF814}, /* 2, -16, 508, 20, -2 */ - {0x1FCFB802, 0x000FF816}, /* 2, -18, 508, 22, -2 */ - {0x1FCFB402, 0x000FF418}, /* 2, -19, 508, 24, -3 */ - {0x1FBFB402, 0x000FF419}, /* 2, -19, 507, 25, -3 */ - {0x1FAFB002, 0x000FF41B}, /* 2, -20, 506, 27, -3 */ - {0x1FAFA802, 0x000FF41D}, /* 2, -22, 506, 29, -3 */ - {0x1F9FA802, 0x000FF01F}, /* 2, -22, 505, 31, -4 */ - {0x1F9FA402, 0x000FF020}, /* 2, -23, 505, 32, -4 */ - {0x1F8FA002, 0x000FF022}, /* 2, -24, 504, 34, -4 */ - {0x1F7F9803, 0x000FF024}, /* 3, -26, 503, 36, -4 */ - {0x1F7F9403, 0x000FEC26}, /* 3, -27, 503, 38, -5 */ - {0x1F6F9003, 0x000FEC28}, /* 3, -28, 502, 40, -5 */ - {0x1F5F9003, 0x000FEC29}, /* 3, -28, 501, 41, -5 */ - {0x1F4F8C03, 0x000FEC2B}, /* 3, -29, 500, 43, -5 */ - {0x1F3F8C03, 0x000FE82D}, /* 3, -29, 499, 45, -6 */ - {0x1F2F8803, 0x000FE82F}, /* 3, -30, 498, 47, -6 */ - {0x1F2F8003, 0x000FE831}, /* 3, -32, 498, 49, -6 */ - {0x1F1F7C03, 0x000FE833}, /* 3, -33, 497, 51, -6 */ - {0x1F0F7C03, 0x000FE435}, /* 3, -33, 496, 53, -7 */ - {0x1EFF7803, 0x000FE437}, /* 3, -34, 495, 55, -7 */ - {0x1EEF7403, 0x000FE439}, /* 3, -35, 494, 57, -7 */ - {0x1EDF7004, 0x000FE03B}, /* 4, -36, 493, 59, -8 */ - {0x1EBF7403, 0x000FE43C}, /* 3, -35, 491, 60, -7 */ - {0x1EAF6C04, 0x000FE03F}, /* 4, -37, 490, 63, -8 */ - {0x1E9F6804, 0x000FE041}, /* 4, -38, 489, 65, -8 */ - {0x1E8F6804, 0x000FDC43}, /* 4, -38, 488, 67, -9 */ - {0x1E7F6404, 0x000FDC45}, /* 4, -39, 487, 69, -9 */ - {0x1E6F6004, 0x000FDC47}, /* 4, -40, 486, 71, -9 */ - {0x1E4F6404, 0x000FD849}, /* 4, -39, 484, 73, -10 */ - {0x1E3F6004, 0x000FD84B}, /* 4, -40, 483, 75, -10 */ - {0x1E1F6003, 0x000FDC4D}, /* 3, -40, 481, 77, -9 */ - {0x1E1F5804, 0x000FD450}, /* 4, -42, 481, 80, -11 */ - {0x1DFF5804, 0x000FD452}, /* 4, -42, 479, 82, -11 */ - {0x1DEF5404, 0x000FD454}, /* 4, -43, 478, 84, -11 */ - {0x1DCF5804, 0x000FD056}, /* 4, -42, 476, 86, -12 */ - {0x1DBF5004, 0x000FD059}, /* 4, -44, 475, 89, -12 */ - {0x1D9F5004, 0x000FD05B}, /* 4, -44, 473, 91, -12 */ - {0x1D8F5004, 0x000FCC5D}, /* 4, -44, 472, 93, -13 */ - {0x1D6F5004, 0x000FCC5F}, /* 4, -44, 470, 95, -13 */ - {0x1D5F4804, 0x000FCC62}, /* 4, -46, 469, 98, -13 */ - {0x1D3F4C04, 0x000FC864}, /* 4, -45, 467, 100, -14 */ - {0x1D1F4C04, 0x000FCC65}, /* 4, -45, 465, 101, -13 */ - {0x1CFF4804, 0x000FCC68}, /* 4, -46, 463, 104, -13 */ - {0x1CEF4405, 0x000FC46B}, /* 5, -47, 462, 107, -15 */ - {0x1CCF4804, 0x000FC86C}, /* 4, -46, 460, 108, -14 */ - {0x1CAF4404, 0x000FC86F}, /* 4, -47, 458, 111, -14 */ - {0x1C9F4005, 0x000FC072}, /* 5, -48, 457, 114, -16 */ - {0x1C6F4404, 0x000FC474}, /* 4, -47, 454, 116, -15 */ - {0x1C6F3C05, 0x000FBC77}, /* 5, -49, 454, 119, -17 */ - {0x1C4F3C05, 0x000FBC79}, /* 5, -49, 452, 121, -17 */ - {0x1C1F4004, 0x000FC07B}, /* 4, -48, 449, 123, -16 */ - {0x1C0F3C05, 0x000FB87E}, /* 5, -49, 448, 126, -18 */ - {0x1BEF3C04, 0x000FBC80}, /* 4, -49, 446, 128, -17 */ - {0x1BCF3C04, 0x000FBC82}, /* 4, -49, 444, 130, -17 */ - {0x1BAF3C04, 0x000FB885}, /* 4, -49, 442, 133, -18 */ - {0x1B8F3C04, 0x000FB887}, /* 4, -49, 440, 135, -18 */ - {0x1B6F3C04, 0x000FB48A}, /* 4, -49, 438, 138, -19 */ - {0x1B5F3405, 0x000FB08D}, /* 5, -51, 437, 141, -20 */ - {0x1B2F3804, 0x000FB48F}, /* 4, -50, 434, 143, -19 */ - {0x1B1F3405, 0x000FAC92}, /* 5, -51, 433, 146, -21 */ - {0x1AEF3804, 0x000FB094}, /* 4, -50, 430, 148, -20 */ - {0x1ACF3804, 0x000FAC97}, /* 4, -50, 428, 151, -21 */ - {0x1AAF3804, 0x000FAC99}, /* 4, -50, 426, 153, -21 */ - {0x1A7F3804, 0x000FAC9C}, /* 4, -50, 423, 156, -21 */ - {0x1A6F3405, 0x000FA49F}, /* 5, -51, 422, 159, -23 */ - {0x1A3F3804, 0x000FA8A1}, /* 4, -50, 419, 161, -22 */ - {0x1A1F3804, 0x000FA4A4}, /* 4, -50, 417, 164, -23 */ - {0x1A0F3005, 0x000FA0A7}, /* 5, -52, 416, 167, -24 */ - {0x19DF3404, 0x000FA4A9}, /* 4, -51, 413, 169, -23 */ - {0x19CF3005, 0x000F9CAC}, /* 5, -52, 412, 172, -25 */ - {0x199F3005, 0x000F9CAF}, /* 5, -52, 409, 175, -25 */ - {0x197F3005, 0x000F98B2}, /* 5, -52, 407, 178, -26 */ - {0x195F3005, 0x000F98B4}, /* 5, -52, 405, 180, -26 */ - {0x191F3804, 0x000F9CB6}, /* 4, -50, 401, 182, -25 */ - {0x18FF3804, 0x000F98B9}, /* 4, -50, 399, 185, -26 */ - {0x18CF3804, 0x000F98BC}, /* 4, -50, 396, 188, -26 */ - {0x18BF3804, 0x000F94BE}, /* 4, -50, 395, 190, -27 */ - {0x188F3804, 0x000F94C1}, /* 4, -50, 392, 193, -27 */ - {0x186F3804, 0x000F90C4}, /* 4, -50, 390, 196, -28 */ - {0x184F3405, 0x000F8CC7}, /* 5, -51, 388, 199, -29 */ - {0x181F3804, 0x000F90C9}, /* 4, -50, 385, 201, -28 */ - {0x17FF3804, 0x000F8CCC}, /* 4, -50, 383, 204, -29 */ - {0x17CF3804, 0x000F8CCF}, /* 4, -50, 380, 207, -29 */ - {0x17BF3405, 0x000F84D2}, /* 5, -51, 379, 210, -31 */ - {0x177F3C04, 0x000F88D4}, /* 4, -49, 375, 212, -30 */ - {0x174F3C04, 0x000F88D7}, /* 4, -49, 372, 215, -30 */ - {0x172F3C04, 0x000F84DA}, /* 4, -49, 370, 218, -31 */ - {0x170F3C04, 0x000F84DC}, /* 4, -49, 368, 220, -31 */ - {0x16EF3805, 0x000F7CE0}, /* 5, -50, 366, 224, -33 */ - {0x16BF3C04, 0x000F80E2}, /* 4, -49, 363, 226, -32 */ - {0x167F4004, 0x000F80E5}, /* 4, -48, 359, 229, -32 */ - {0x166F4004, 0x000F7CE7}, /* 4, -48, 358, 231, -33 */ - {0x163F4004, 0x000F7CEA}, /* 4, -48, 355, 234, -33 */ - {0x161F4004, 0x000F78ED}, /* 4, -48, 353, 237, -34 */ - {0x15EF4004, 0x000F78F0}, /* 4, -48, 350, 240, -34 */ - {0x15BF4404, 0x000F74F3}, /* 4, -47, 347, 243, -35 */ - {0x159F4404, 0x000F74F5}, /* 4, -47, 345, 245, -35 */ - {0x156F4404, 0x000F74F8}, /* 4, -47, 342, 248, -35 */ - {0x154F4005, 0x000F6CFC}, /* 5, -48, 340, 252, -37 */ - {0x150F4804, 0x000F70FE}, /* 4, -46, 336, 254, -36 */ - {0x14FF4405, 0x000F6901}, /* 5, -47, 335, 257, -38 */ - {0x14CF4804, 0x000F6D03}, /* 4, -46, 332, 259, -37 */ - {0x149F4804, 0x000F6D06}, /* 4, -46, 329, 262, -37 */ - {0x146F4C04, 0x000F6909}, /* 4, -45, 326, 265, -38 */ - {0x143F4C04, 0x000F690C}, /* 4, -45, 323, 268, -38 */ - {0x141F4C04, 0x000F690E}, /* 4, -45, 321, 270, -38 */ - {0x13EF5004, 0x000F6511}, /* 4, -44, 318, 273, -39 */ - {0x13BF5004, 0x000F6514}, /* 4, -44, 315, 276, -39 */ - {0x139F5004, 0x000F6117}, /* 4, -44, 313, 279, -40 */ - {0x136F5404, 0x000F6119}, /* 4, -43, 310, 281, -40 */ - {0x133F5404, 0x000F611C}, /* 4, -43, 307, 284, -40 */ - {0x131F5404, 0x000F5D1F}, /* 4, -43, 305, 287, -41 */ - {0x12DF5C04, 0x000F5D21}, /* 4, -41, 301, 289, -41 */ - {0x12AF5C04, 0x000F5D24}, /* 4, -41, 298, 292, -41 */ + {0x1284A7D5, 0x000017D5}, /* -43, 297, 296, -43, 5 */ + {0x12A497D7, 0x000013D6}, /* -41, 293, 298, -42, 4 */ + {0x12D48BD7, 0x000013D6}, /* -41, 290, 301, -42, 4 */ + {0x13147FD7, 0x000013D5}, /* -41, 287, 305, -43, 4 */ + {0x133473D8, 0x000013D5}, /* -40, 284, 307, -43, 4 */ + {0x136467D8, 0x000013D5}, /* -40, 281, 310, -43, 4 */ + {0x13945FD8, 0x000013D4}, /* -40, 279, 313, -44, 4 */ + {0x13B453D9, 0x000013D4}, /* -39, 276, 315, -44, 4 */ + {0x13E447D9, 0x000013D4}, /* -39, 273, 318, -44, 4 */ + {0x14143BDA, 0x000013D3}, /* -38, 270, 321, -45, 4 */ + {0x143433DA, 0x000013D3}, /* -38, 268, 323, -45, 4 */ + {0x146427DA, 0x000013D3}, /* -38, 265, 326, -45, 4 */ + {0x14941BDB, 0x000013D2}, /* -37, 262, 329, -46, 4 */ + {0x14C40FDB, 0x000013D2}, /* -37, 259, 332, -46, 4 */ + {0x14F407DA, 0x000017D1}, /* -38, 257, 335, -47, 5 */ + {0x1503FBDC, 0x000013D2}, /* -36, 254, 336, -46, 4 */ + {0x1543F3DB, 0x000017D0}, /* -37, 252, 340, -48, 5 */ + {0x1563E3DD, 0x000013D1}, /* -35, 248, 342, -47, 4 */ + {0x1593D7DD, 0x000013D1}, /* -35, 245, 345, -47, 4 */ + {0x15B3CFDD, 0x000013D1}, /* -35, 243, 347, -47, 4 */ + {0x15E3C3DE, 0x000013D0}, /* -34, 240, 350, -48, 4 */ + {0x1613B7DE, 0x000013D0}, /* -34, 237, 353, -48, 4 */ + {0x1633ABDF, 0x000013D0}, /* -33, 234, 355, -48, 4 */ + {0x16639FDF, 0x000013D0}, /* -33, 231, 358, -48, 4 */ + {0x167397E0, 0x000013D0}, /* -32, 229, 359, -48, 4 */ + {0x16B38BE0, 0x000013CF}, /* -32, 226, 363, -49, 4 */ + {0x16E383DF, 0x000017CE}, /* -33, 224, 366, -50, 5 */ + {0x170373E1, 0x000013CF}, /* -31, 220, 368, -49, 4 */ + {0x17236BE1, 0x000013CF}, /* -31, 218, 370, -49, 4 */ + {0x17435FE2, 0x000013CF}, /* -30, 215, 372, -49, 4 */ + {0x177353E2, 0x000013CF}, /* -30, 212, 375, -49, 4 */ + {0x17B34BE1, 0x000017CD}, /* -31, 210, 379, -51, 5 */ + {0x17C33FE3, 0x000013CE}, /* -29, 207, 380, -50, 4 */ + {0x17F333E3, 0x000013CE}, /* -29, 204, 383, -50, 4 */ + {0x181327E4, 0x000013CE}, /* -28, 201, 385, -50, 4 */ + {0x18431FE3, 0x000017CD}, /* -29, 199, 388, -51, 5 */ + {0x186313E4, 0x000013CE}, /* -28, 196, 390, -50, 4 */ + {0x188307E5, 0x000013CE}, /* -27, 193, 392, -50, 4 */ + {0x18B2FBE5, 0x000013CE}, /* -27, 190, 395, -50, 4 */ + {0x18C2F3E6, 0x000013CE}, /* -26, 188, 396, -50, 4 */ + {0x18F2E7E6, 0x000013CE}, /* -26, 185, 399, -50, 4 */ + {0x1912DBE7, 0x000013CE}, /* -25, 182, 401, -50, 4 */ + {0x1952D3E6, 0x000017CC}, /* -26, 180, 405, -52, 5 */ + {0x1972CBE6, 0x000017CC}, /* -26, 178, 407, -52, 5 */ + {0x1992BFE7, 0x000017CC}, /* -25, 175, 409, -52, 5 */ + {0x19C2B3E7, 0x000017CC}, /* -25, 172, 412, -52, 5 */ + {0x19D2A7E9, 0x000013CD}, /* -23, 169, 413, -51, 4 */ + {0x1A029FE8, 0x000017CC}, /* -24, 167, 416, -52, 5 */ + {0x1A1293E9, 0x000013CE}, /* -23, 164, 417, -50, 4 */ + {0x1A3287EA, 0x000013CE}, /* -22, 161, 419, -50, 4 */ + {0x1A627FE9, 0x000017CD}, /* -23, 159, 422, -51, 5 */ + {0x1A7273EB, 0x000013CE}, /* -21, 156, 423, -50, 4 */ + {0x1AA267EB, 0x000013CE}, /* -21, 153, 426, -50, 4 */ + {0x1AC25FEB, 0x000013CE}, /* -21, 151, 428, -50, 4 */ + {0x1AE253EC, 0x000013CE}, /* -20, 148, 430, -50, 4 */ + {0x1B124BEB, 0x000017CD}, /* -21, 146, 433, -51, 5 */ + {0x1B223FED, 0x000013CE}, /* -19, 143, 434, -50, 4 */ + {0x1B5237EC, 0x000017CD}, /* -20, 141, 437, -51, 5 */ + {0x1B622BED, 0x000013CF}, /* -19, 138, 438, -49, 4 */ + {0x1B821FEE, 0x000013CF}, /* -18, 135, 440, -49, 4 */ + {0x1BA217EE, 0x000013CF}, /* -18, 133, 442, -49, 4 */ + {0x1BC20BEF, 0x000013CF}, /* -17, 130, 444, -49, 4 */ + {0x1BE203EF, 0x000013CF}, /* -17, 128, 446, -49, 4 */ + {0x1C01FBEE, 0x000017CF}, /* -18, 126, 448, -49, 5 */ + {0x1C11EFF0, 0x000013D0}, /* -16, 123, 449, -48, 4 */ + {0x1C41E7EF, 0x000017CF}, /* -17, 121, 452, -49, 5 */ + {0x1C61DFEF, 0x000017CF}, /* -17, 119, 454, -49, 5 */ + {0x1C61D3F1, 0x000013D1}, /* -15, 116, 454, -47, 4 */ + {0x1C91CBF0, 0x000017D0}, /* -16, 114, 457, -48, 5 */ + {0x1CA1BFF2, 0x000013D1}, /* -14, 111, 458, -47, 4 */ + {0x1CC1B3F2, 0x000013D2}, /* -14, 108, 460, -46, 4 */ + {0x1CE1AFF1, 0x000017D1}, /* -15, 107, 462, -47, 5 */ + {0x1CF1A3F3, 0x000013D2}, /* -13, 104, 463, -46, 4 */ + {0x1D1197F3, 0x000013D3}, /* -13, 101, 465, -45, 4 */ + {0x1D3197F2, 0x000013D2}, /* -14, 101, 467, -46, 4 */ + {0x1D518BF3, 0x000013D2}, /* -13, 98, 469, -46, 4 */ + {0x1D6183F3, 0x000013D3}, /* -13, 96, 470, -45, 4 */ + {0x1D817BF3, 0x000013D3}, /* -13, 94, 472, -45, 4 */ + {0x1D916FF4, 0x000013D4}, /* -12, 91, 473, -44, 4 */ + {0x1DB167F4, 0x000013D4}, /* -12, 89, 475, -44, 4 */ + {0x1DC15FF4, 0x000013D5}, /* -12, 87, 476, -43, 4 */ + {0x1DE153F5, 0x000013D5}, /* -11, 84, 478, -43, 4 */ + {0x1DF14BF5, 0x000013D6}, /* -11, 82, 479, -42, 4 */ + {0x1E1143F5, 0x000013D6}, /* -11, 80, 481, -42, 4 */ + {0x1E1137F7, 0x00000FD8}, /* -9, 77, 481, -40, 3 */ + {0x1E3133F6, 0x000013D7}, /* -10, 76, 483, -41, 4 */ + {0x1E412BF6, 0x000013D8}, /* -10, 74, 484, -40, 4 */ + {0x1E611FF7, 0x000013D8}, /* -9, 71, 486, -40, 4 */ + {0x1E7117F7, 0x000013D9}, /* -9, 69, 487, -39, 4 */ + {0x1E810FF7, 0x000013DA}, /* -9, 67, 488, -38, 4 */ + {0x1E9107F8, 0x000013DA}, /* -8, 65, 489, -38, 4 */ + {0x1EA0FFF8, 0x000013DB}, /* -8, 63, 490, -37, 4 */ + {0x1EB0F3F9, 0x00000FDD}, /* -7, 60, 491, -35, 3 */ + {0x1ED0EFF8, 0x000013DC}, /* -8, 59, 493, -36, 4 */ + {0x1EE0E7F9, 0x00000FDD}, /* -7, 57, 494, -35, 3 */ + {0x1EF0DFF9, 0x00000FDE}, /* -7, 55, 495, -34, 3 */ + {0x1F00D7F9, 0x00000FDF}, /* -7, 53, 496, -33, 3 */ + {0x1F10CFFA, 0x00000FDF}, /* -6, 51, 497, -33, 3 */ + {0x1F20C7FA, 0x00000FE0}, /* -6, 49, 498, -32, 3 */ + {0x1F20C3FA, 0x00000FE1}, /* -6, 48, 498, -31, 3 */ + {0x1F30BBFA, 0x00000FE2}, /* -6, 46, 499, -30, 3 */ + {0x1F40AFFB, 0x00000FE3}, /* -5, 43, 500, -29, 3 */ + {0x1F50A7FB, 0x00000FE4}, /* -5, 41, 501, -28, 3 */ + {0x1F60A3FB, 0x00000FE4}, /* -5, 40, 502, -28, 3 */ + {0x1F709BFB, 0x00000FE5}, /* -5, 38, 503, -27, 3 */ + {0x1F7093FC, 0x00000FE6}, /* -4, 36, 503, -26, 3 */ + {0x1F808FFC, 0x00000BE7}, /* -4, 35, 504, -25, 2 */ + {0x1F9087FC, 0x00000BE8}, /* -4, 33, 505, -24, 2 */ + {0x1F9083FC, 0x00000BE9}, /* -4, 32, 505, -23, 2 */ + {0x1FA077FD, 0x00000BEA}, /* -3, 29, 506, -22, 2 */ + {0x1FA073FD, 0x00000BEB}, /* -3, 28, 506, -21, 2 */ + {0x1FB06BFD, 0x00000BEC}, /* -3, 26, 507, -20, 2 */ + {0x1FC063FD, 0x00000BED}, /* -3, 24, 508, -19, 2 */ + {0x1FC05BFE, 0x00000BEE}, /* -2, 22, 508, -18, 2 */ + {0x1FC057FE, 0x00000BEF}, /* -2, 21, 508, -17, 2 */ + {0x1FD053FE, 0x000007F0}, /* -2, 20, 509, -16, 1 */ + {0x1FD04BFE, 0x000007F2}, /* -2, 18, 509, -14, 1 */ + {0x1FE043FE, 0x000007F3}, /* -2, 16, 510, -13, 1 */ + {0x1FE03BFF, 0x000007F4}, /* -1, 14, 510, -12, 1 */ + {0x1FE037FF, 0x000007F5}, /* -1, 13, 510, -11, 1 */ + {0x1FE033FF, 0x000007F6}, /* -1, 12, 510, -10, 1 */ + {0x1FF02BFF, 0x000007F7}, /* -1, 10, 511, -9, 1 */ + {0x1FF027FF, 0x000003F9}, /* -1, 9, 511, -7, 0 */ + {0x1FF01C00, 0x000003FA}, /* 0, 7, 511, -6, 0 */ + {0x1FF01800, 0x000003FB}, /* 0, 6, 511, -5, 0 */ + {0x1FF01400, 0x000003FC}, /* 0, 5, 511, -4, 0 */ + {0x1FF00C00, 0x000003FE}, /* 0, 3, 511, -2, 0 */ + {0x1FF00800, 0x000003FF}, /* 0, 2, 511, -1, 0 */ + {0x1FF00400, 0x00000000}, /* 0, 1, 511, 0, 0 */ + {0x1FFFFC00, 0x00000002}, /* 0, -1, 511, 2, 0 */ + {0x1FFFF800, 0x00000003}, /* 0, -2, 511, 3, 0 */ + {0x1FFFF000, 0x00000005}, /* 0, -4, 511, 5, 0 */ + {0x1FFFEC00, 0x00000006}, /* 0, -5, 511, 6, 0 */ + {0x1FFFE800, 0x00000007}, /* 0, -6, 511, 7, 0 */ + {0x1FFFE400, 0x000FFC09}, /* 0, -7, 511, 9, -1 */ + {0x1FFFDC01, 0x000FFC0A}, /* 1, -9, 511, 10, -1 */ + {0x1FEFDC01, 0x000FFC0B}, /* 1, -9, 510, 11, -1 */ + {0x1FEFD401, 0x000FFC0D}, /* 1, -11, 510, 13, -1 */ + {0x1FEFD001, 0x000FFC0E}, /* 1, -12, 510, 14, -1 */ + {0x1FEFCC01, 0x000FF810}, /* 1, -13, 510, 16, -2 */ + {0x1FDFCC01, 0x000FF811}, /* 1, -13, 509, 17, -2 */ + {0x1FDFC401, 0x000FF813}, /* 1, -15, 509, 19, -2 */ + {0x1FCFC002, 0x000FF814}, /* 2, -16, 508, 20, -2 */ + {0x1FCFB802, 0x000FF816}, /* 2, -18, 508, 22, -2 */ + {0x1FCFB402, 0x000FF418}, /* 2, -19, 508, 24, -3 */ + {0x1FBFB402, 0x000FF419}, /* 2, -19, 507, 25, -3 */ + {0x1FAFB002, 0x000FF41B}, /* 2, -20, 506, 27, -3 */ + {0x1FAFA802, 0x000FF41D}, /* 2, -22, 506, 29, -3 */ + {0x1F9FA802, 0x000FF01F}, /* 2, -22, 505, 31, -4 */ + {0x1F9FA402, 0x000FF020}, /* 2, -23, 505, 32, -4 */ + {0x1F8FA002, 0x000FF022}, /* 2, -24, 504, 34, -4 */ + {0x1F7F9803, 0x000FF024}, /* 3, -26, 503, 36, -4 */ + {0x1F7F9403, 0x000FEC26}, /* 3, -27, 503, 38, -5 */ + {0x1F6F9003, 0x000FEC28}, /* 3, -28, 502, 40, -5 */ + {0x1F5F9003, 0x000FEC29}, /* 3, -28, 501, 41, -5 */ + {0x1F4F8C03, 0x000FEC2B}, /* 3, -29, 500, 43, -5 */ + {0x1F3F8C03, 0x000FE82D}, /* 3, -29, 499, 45, -6 */ + {0x1F2F8803, 0x000FE82F}, /* 3, -30, 498, 47, -6 */ + {0x1F2F8003, 0x000FE831}, /* 3, -32, 498, 49, -6 */ + {0x1F1F7C03, 0x000FE833}, /* 3, -33, 497, 51, -6 */ + {0x1F0F7C03, 0x000FE435}, /* 3, -33, 496, 53, -7 */ + {0x1EFF7803, 0x000FE437}, /* 3, -34, 495, 55, -7 */ + {0x1EEF7403, 0x000FE439}, /* 3, -35, 494, 57, -7 */ + {0x1EDF7004, 0x000FE03B}, /* 4, -36, 493, 59, -8 */ + {0x1EBF7403, 0x000FE43C}, /* 3, -35, 491, 60, -7 */ + {0x1EAF6C04, 0x000FE03F}, /* 4, -37, 490, 63, -8 */ + {0x1E9F6804, 0x000FE041}, /* 4, -38, 489, 65, -8 */ + {0x1E8F6804, 0x000FDC43}, /* 4, -38, 488, 67, -9 */ + {0x1E7F6404, 0x000FDC45}, /* 4, -39, 487, 69, -9 */ + {0x1E6F6004, 0x000FDC47}, /* 4, -40, 486, 71, -9 */ + {0x1E4F6404, 0x000FD849}, /* 4, -39, 484, 73, -10 */ + {0x1E3F6004, 0x000FD84B}, /* 4, -40, 483, 75, -10 */ + {0x1E1F6003, 0x000FDC4D}, /* 3, -40, 481, 77, -9 */ + {0x1E1F5804, 0x000FD450}, /* 4, -42, 481, 80, -11 */ + {0x1DFF5804, 0x000FD452}, /* 4, -42, 479, 82, -11 */ + {0x1DEF5404, 0x000FD454}, /* 4, -43, 478, 84, -11 */ + {0x1DCF5804, 0x000FD056}, /* 4, -42, 476, 86, -12 */ + {0x1DBF5004, 0x000FD059}, /* 4, -44, 475, 89, -12 */ + {0x1D9F5004, 0x000FD05B}, /* 4, -44, 473, 91, -12 */ + {0x1D8F5004, 0x000FCC5D}, /* 4, -44, 472, 93, -13 */ + {0x1D6F5004, 0x000FCC5F}, /* 4, -44, 470, 95, -13 */ + {0x1D5F4804, 0x000FCC62}, /* 4, -46, 469, 98, -13 */ + {0x1D3F4C04, 0x000FC864}, /* 4, -45, 467, 100, -14 */ + {0x1D1F4C04, 0x000FCC65}, /* 4, -45, 465, 101, -13 */ + {0x1CFF4804, 0x000FCC68}, /* 4, -46, 463, 104, -13 */ + {0x1CEF4405, 0x000FC46B}, /* 5, -47, 462, 107, -15 */ + {0x1CCF4804, 0x000FC86C}, /* 4, -46, 460, 108, -14 */ + {0x1CAF4404, 0x000FC86F}, /* 4, -47, 458, 111, -14 */ + {0x1C9F4005, 0x000FC072}, /* 5, -48, 457, 114, -16 */ + {0x1C6F4404, 0x000FC474}, /* 4, -47, 454, 116, -15 */ + {0x1C6F3C05, 0x000FBC77}, /* 5, -49, 454, 119, -17 */ + {0x1C4F3C05, 0x000FBC79}, /* 5, -49, 452, 121, -17 */ + {0x1C1F4004, 0x000FC07B}, /* 4, -48, 449, 123, -16 */ + {0x1C0F3C05, 0x000FB87E}, /* 5, -49, 448, 126, -18 */ + {0x1BEF3C04, 0x000FBC80}, /* 4, -49, 446, 128, -17 */ + {0x1BCF3C04, 0x000FBC82}, /* 4, -49, 444, 130, -17 */ + {0x1BAF3C04, 0x000FB885}, /* 4, -49, 442, 133, -18 */ + {0x1B8F3C04, 0x000FB887}, /* 4, -49, 440, 135, -18 */ + {0x1B6F3C04, 0x000FB48A}, /* 4, -49, 438, 138, -19 */ + {0x1B5F3405, 0x000FB08D}, /* 5, -51, 437, 141, -20 */ + {0x1B2F3804, 0x000FB48F}, /* 4, -50, 434, 143, -19 */ + {0x1B1F3405, 0x000FAC92}, /* 5, -51, 433, 146, -21 */ + {0x1AEF3804, 0x000FB094}, /* 4, -50, 430, 148, -20 */ + {0x1ACF3804, 0x000FAC97}, /* 4, -50, 428, 151, -21 */ + {0x1AAF3804, 0x000FAC99}, /* 4, -50, 426, 153, -21 */ + {0x1A7F3804, 0x000FAC9C}, /* 4, -50, 423, 156, -21 */ + {0x1A6F3405, 0x000FA49F}, /* 5, -51, 422, 159, -23 */ + {0x1A3F3804, 0x000FA8A1}, /* 4, -50, 419, 161, -22 */ + {0x1A1F3804, 0x000FA4A4}, /* 4, -50, 417, 164, -23 */ + {0x1A0F3005, 0x000FA0A7}, /* 5, -52, 416, 167, -24 */ + {0x19DF3404, 0x000FA4A9}, /* 4, -51, 413, 169, -23 */ + {0x19CF3005, 0x000F9CAC}, /* 5, -52, 412, 172, -25 */ + {0x199F3005, 0x000F9CAF}, /* 5, -52, 409, 175, -25 */ + {0x197F3005, 0x000F98B2}, /* 5, -52, 407, 178, -26 */ + {0x195F3005, 0x000F98B4}, /* 5, -52, 405, 180, -26 */ + {0x191F3804, 0x000F9CB6}, /* 4, -50, 401, 182, -25 */ + {0x18FF3804, 0x000F98B9}, /* 4, -50, 399, 185, -26 */ + {0x18CF3804, 0x000F98BC}, /* 4, -50, 396, 188, -26 */ + {0x18BF3804, 0x000F94BE}, /* 4, -50, 395, 190, -27 */ + {0x188F3804, 0x000F94C1}, /* 4, -50, 392, 193, -27 */ + {0x186F3804, 0x000F90C4}, /* 4, -50, 390, 196, -28 */ + {0x184F3405, 0x000F8CC7}, /* 5, -51, 388, 199, -29 */ + {0x181F3804, 0x000F90C9}, /* 4, -50, 385, 201, -28 */ + {0x17FF3804, 0x000F8CCC}, /* 4, -50, 383, 204, -29 */ + {0x17CF3804, 0x000F8CCF}, /* 4, -50, 380, 207, -29 */ + {0x17BF3405, 0x000F84D2}, /* 5, -51, 379, 210, -31 */ + {0x177F3C04, 0x000F88D4}, /* 4, -49, 375, 212, -30 */ + {0x174F3C04, 0x000F88D7}, /* 4, -49, 372, 215, -30 */ + {0x172F3C04, 0x000F84DA}, /* 4, -49, 370, 218, -31 */ + {0x170F3C04, 0x000F84DC}, /* 4, -49, 368, 220, -31 */ + {0x16EF3805, 0x000F7CE0}, /* 5, -50, 366, 224, -33 */ + {0x16BF3C04, 0x000F80E2}, /* 4, -49, 363, 226, -32 */ + {0x167F4004, 0x000F80E5}, /* 4, -48, 359, 229, -32 */ + {0x166F4004, 0x000F7CE7}, /* 4, -48, 358, 231, -33 */ + {0x163F4004, 0x000F7CEA}, /* 4, -48, 355, 234, -33 */ + {0x161F4004, 0x000F78ED}, /* 4, -48, 353, 237, -34 */ + {0x15EF4004, 0x000F78F0}, /* 4, -48, 350, 240, -34 */ + {0x15BF4404, 0x000F74F3}, /* 4, -47, 347, 243, -35 */ + {0x159F4404, 0x000F74F5}, /* 4, -47, 345, 245, -35 */ + {0x156F4404, 0x000F74F8}, /* 4, -47, 342, 248, -35 */ + {0x154F4005, 0x000F6CFC}, /* 5, -48, 340, 252, -37 */ + {0x150F4804, 0x000F70FE}, /* 4, -46, 336, 254, -36 */ + {0x14FF4405, 0x000F6901}, /* 5, -47, 335, 257, -38 */ + {0x14CF4804, 0x000F6D03}, /* 4, -46, 332, 259, -37 */ + {0x149F4804, 0x000F6D06}, /* 4, -46, 329, 262, -37 */ + {0x146F4C04, 0x000F6909}, /* 4, -45, 326, 265, -38 */ + {0x143F4C04, 0x000F690C}, /* 4, -45, 323, 268, -38 */ + {0x141F4C04, 0x000F690E}, /* 4, -45, 321, 270, -38 */ + {0x13EF5004, 0x000F6511}, /* 4, -44, 318, 273, -39 */ + {0x13BF5004, 0x000F6514}, /* 4, -44, 315, 276, -39 */ + {0x139F5004, 0x000F6117}, /* 4, -44, 313, 279, -40 */ + {0x136F5404, 0x000F6119}, /* 4, -43, 310, 281, -40 */ + {0x133F5404, 0x000F611C}, /* 4, -43, 307, 284, -40 */ + {0x131F5404, 0x000F5D1F}, /* 4, -43, 305, 287, -41 */ + {0x12DF5C04, 0x000F5D21}, /* 4, -41, 301, 289, -41 */ + {0x12AF5C04, 0x000F5D24}, /* 4, -41, 298, 292, -41 */ }; static const unsigned long CimarronVerticalGraphicsFilter[] = { - 0x3F840D05, /* 261, 259, -8 */ - 0x3F841D01, /* 257, 263, -8 */ - 0x3F8428FE, /* 254, 266, -8 */ - 0x3F8438FA, /* 250, 270, -8 */ - 0x3F8444F7, /* 247, 273, -8 */ - 0x3F8450F4, /* 244, 276, -8 */ - 0x3F845CF1, /* 241, 279, -8 */ - 0x3F8468EE, /* 238, 282, -8 */ - 0x3F8474EB, /* 235, 285, -8 */ - 0x3F8480E8, /* 232, 288, -8 */ - 0x3F7490E5, /* 229, 292, -9 */ - 0x3F749CE2, /* 226, 295, -9 */ - 0x3F74ACDE, /* 222, 299, -9 */ - 0x3F74B8DB, /* 219, 302, -9 */ - 0x3F74C0D9, /* 217, 304, -9 */ - 0x3F74CCD6, /* 214, 307, -9 */ - 0x3F74D8D3, /* 211, 310, -9 */ - 0x3F74E8CF, /* 207, 314, -9 */ - 0x3F74F4CC, /* 204, 317, -9 */ - 0x3F7500C9, /* 201, 320, -9 */ - 0x3F750CC6, /* 198, 323, -9 */ - 0x3F7518C3, /* 195, 326, -9 */ - 0x3F7520C1, /* 193, 328, -9 */ - 0x3F7530BD, /* 189, 332, -9 */ - 0x3F753CBA, /* 186, 335, -9 */ - 0x3F7548B7, /* 183, 338, -9 */ - 0x3F6558B4, /* 180, 342, -10 */ - 0x3F6560B2, /* 178, 344, -10 */ - 0x3F656CAF, /* 175, 347, -10 */ - 0x3F6578AC, /* 172, 350, -10 */ - 0x3F6584A9, /* 169, 353, -10 */ - 0x3F658CA7, /* 167, 355, -10 */ - 0x3F6598A4, /* 164, 358, -10 */ - 0x3F65A8A0, /* 160, 362, -10 */ - 0x3F65B09E, /* 158, 364, -10 */ - 0x3F65BC9B, /* 155, 367, -10 */ - 0x3F65C499, /* 153, 369, -10 */ - 0x3F65D096, /* 150, 372, -10 */ - 0x3F55E093, /* 147, 376, -11 */ - 0x3F55E891, /* 145, 378, -11 */ - 0x3F55F48E, /* 142, 381, -11 */ - 0x3F56008B, /* 139, 384, -11 */ - 0x3F560C88, /* 136, 387, -11 */ - 0x3F561486, /* 134, 389, -11 */ - 0x3F562083, /* 131, 392, -11 */ - 0x3F562881, /* 129, 394, -11 */ - 0x3F56347E, /* 126, 397, -11 */ - 0x3F56407B, /* 123, 400, -11 */ - 0x3F564879, /* 121, 402, -11 */ - 0x3F465876, /* 118, 406, -12 */ - 0x3F466074, /* 116, 408, -12 */ - 0x3F466872, /* 114, 410, -12 */ - 0x3F46746F, /* 111, 413, -12 */ - 0x3F467C6D, /* 109, 415, -12 */ - 0x3F46846B, /* 107, 417, -12 */ - 0x3F468C69, /* 105, 419, -12 */ - 0x3F469866, /* 102, 422, -12 */ - 0x3F46A064, /* 100, 424, -12 */ - 0x3F46AC61, /* 97, 427, -12 */ - 0x3F46B45F, /* 95, 429, -12 */ - 0x3F46BC5D, /* 93, 431, -12 */ - 0x3F46C45B, /* 91, 433, -12 */ - 0x3F46CC59, /* 89, 435, -12 */ - 0x3F36DC56, /* 86, 439, -13 */ - 0x3F36E454, /* 84, 441, -13 */ - 0x3F36EC52, /* 82, 443, -13 */ - 0x3F36F450, /* 80, 445, -13 */ - 0x3F36FC4E, /* 78, 447, -13 */ - 0x3F37004D, /* 77, 448, -13 */ - 0x3F370C4A, /* 74, 451, -13 */ - 0x3F371448, /* 72, 453, -13 */ - 0x3F371C46, /* 70, 455, -13 */ - 0x3F372444, /* 68, 457, -13 */ - 0x3F372C42, /* 66, 459, -13 */ - 0x3F373440, /* 64, 461, -13 */ - 0x3F37383F, /* 63, 462, -13 */ - 0x3F37403D, /* 61, 464, -13 */ - 0x3F37483B, /* 59, 466, -13 */ - 0x3F375039, /* 57, 468, -13 */ - 0x3F375438, /* 56, 469, -13 */ - 0x3F375C36, /* 54, 471, -13 */ - 0x3F376434, /* 52, 473, -13 */ - 0x3F376833, /* 51, 474, -13 */ - 0x3F377031, /* 49, 476, -13 */ - 0x3F377430, /* 48, 477, -13 */ - 0x3F377C2E, /* 46, 479, -13 */ - 0x3F37842C, /* 44, 481, -13 */ - 0x3F37882B, /* 43, 482, -13 */ - 0x3F47882A, /* 42, 482, -12 */ - 0x3F479028, /* 40, 484, -12 */ - 0x3F479427, /* 39, 485, -12 */ - 0x3F479C25, /* 37, 487, -12 */ - 0x3F47A024, /* 36, 488, -12 */ - 0x3F47A822, /* 34, 490, -12 */ - 0x3F47AC21, /* 33, 491, -12 */ - 0x3F47B020, /* 32, 492, -12 */ - 0x3F57B01F, /* 31, 492, -11 */ - 0x3F57B81D, /* 29, 494, -11 */ - 0x3F57BC1C, /* 28, 495, -11 */ - 0x3F57C01B, /* 27, 496, -11 */ - 0x3F57C41A, /* 26, 497, -11 */ - 0x3F67C818, /* 24, 498, -10 */ - 0x3F67CC17, /* 23, 499, -10 */ - 0x3F67D016, /* 22, 500, -10 */ - 0x3F67D415, /* 21, 501, -10 */ - 0x3F67D814, /* 20, 502, -10 */ - 0x3F77D813, /* 19, 502, -9 */ - 0x3F77DC12, /* 18, 503, -9 */ - 0x3F77E011, /* 17, 504, -9 */ - 0x3F87E010, /* 16, 504, -8 */ - 0x3F87E40F, /* 15, 505, -8 */ - 0x3F87E80E, /* 14, 506, -8 */ - 0x3F97E80D, /* 13, 506, -7 */ - 0x3F97EC0C, /* 12, 507, -7 */ - 0x3F97F00B, /* 11, 508, -7 */ - 0x3FA7F00A, /* 10, 508, -6 */ - 0x3FA7F409, /* 9, 509, -6 */ - 0x3FB7F408, /* 8, 509, -5 */ - 0x3FB7F408, /* 8, 509, -5 */ - 0x3FC7F806, /* 6, 510, -4 */ - 0x3FC7F806, /* 6, 510, -4 */ - 0x3FD7F805, /* 5, 510, -3 */ - 0x3FD7FC04, /* 4, 511, -3 */ - 0x3FE7FC03, /* 3, 511, -2 */ - 0x3FE7FC03, /* 3, 511, -2 */ - 0x3FF7FC02, /* 2, 511, -1 */ - 0x3FF7FC02, /* 2, 511, -1 */ - 0x0007FC01, /* 1, 511, 0 */ - 0x0007FC01, /* 1, 511, 0 */ - 0x0007FC01, /* 1, 511, 0 */ - 0x0027FFFF, /* -1, 511, 2 */ - 0x0027FFFF, /* -1, 511, 2 */ - 0x0037FFFE, /* -2, 511, 3 */ - 0x0037FFFE, /* -2, 511, 3 */ - 0x0047FFFD, /* -3, 511, 4 */ - 0x0047FBFE, /* -2, 510, 4 */ - 0x0057FBFD, /* -3, 510, 5 */ - 0x0067FBFC, /* -4, 510, 6 */ - 0x0077F7FC, /* -4, 509, 7 */ - 0x0077F7FC, /* -4, 509, 7 */ - 0x0087F7FB, /* -5, 509, 8 */ - 0x0097F3FB, /* -5, 508, 9 */ - 0x00A7F3FA, /* -6, 508, 10 */ - 0x00B7EFFA, /* -6, 507, 11 */ - 0x00C7EBFA, /* -6, 506, 12 */ - 0x00D7EBF9, /* -7, 506, 13 */ - 0x00E7E7F9, /* -7, 505, 14 */ - 0x00F7E3F9, /* -7, 504, 15 */ - 0x0107E3F8, /* -8, 504, 16 */ - 0x0117DFF8, /* -8, 503, 17 */ - 0x0127DBF8, /* -8, 502, 18 */ - 0x0137DBF7, /* -9, 502, 19 */ - 0x0147D7F7, /* -9, 501, 20 */ - 0x0157D3F7, /* -9, 500, 21 */ - 0x0167CFF7, /* -9, 499, 22 */ - 0x0177CBF7, /* -9, 498, 23 */ - 0x0197C7F6, /* -10, 497, 25 */ - 0x01A7C3F6, /* -10, 496, 26 */ - 0x01B7BFF6, /* -10, 495, 27 */ - 0x01C7BBF6, /* -10, 494, 28 */ - 0x01E7B3F6, /* -10, 492, 30 */ - 0x01F7B3F5, /* -11, 492, 31 */ - 0x0207AFF5, /* -11, 491, 32 */ - 0x0217ABF5, /* -11, 490, 33 */ - 0x0237A3F5, /* -11, 488, 35 */ - 0x02479FF5, /* -11, 487, 36 */ - 0x026797F5, /* -11, 485, 38 */ - 0x027793F5, /* -11, 484, 39 */ - 0x02978BF5, /* -11, 482, 41 */ - 0x02A78BF4, /* -12, 482, 42 */ - 0x02B787F4, /* -12, 481, 43 */ - 0x02D77FF4, /* -12, 479, 45 */ - 0x02F777F4, /* -12, 477, 47 */ - 0x030773F4, /* -12, 476, 48 */ - 0x03276BF4, /* -12, 474, 50 */ - 0x033767F4, /* -12, 473, 51 */ - 0x03575FF4, /* -12, 471, 53 */ - 0x037757F4, /* -12, 469, 55 */ - 0x038753F4, /* -12, 468, 56 */ - 0x03A74BF4, /* -12, 466, 58 */ - 0x03C743F4, /* -12, 464, 60 */ - 0x03E73BF4, /* -12, 462, 62 */ - 0x040737F3, /* -13, 461, 64 */ - 0x04272FF3, /* -13, 459, 66 */ - 0x044727F3, /* -13, 457, 68 */ - 0x04671FF3, /* -13, 455, 70 */ - 0x048717F3, /* -13, 453, 72 */ - 0x04A70FF3, /* -13, 451, 74 */ - 0x04C703F4, /* -12, 448, 76 */ - 0x04D6FFF4, /* -12, 447, 77 */ - 0x04F6F7F4, /* -12, 445, 79 */ - 0x0516EFF4, /* -12, 443, 81 */ - 0x0536E7F4, /* -12, 441, 83 */ - 0x0556DFF4, /* -12, 439, 85 */ - 0x0586CFF5, /* -11, 435, 88 */ - 0x05A6C7F5, /* -11, 433, 90 */ - 0x05C6BFF5, /* -11, 431, 92 */ - 0x05F6B7F4, /* -12, 429, 95 */ - 0x0616AFF4, /* -12, 427, 97 */ - 0x0636A3F5, /* -11, 424, 99 */ - 0x06569BF5, /* -11, 422, 101 */ - 0x06868FF5, /* -11, 419, 104 */ - 0x06A687F5, /* -11, 417, 106 */ - 0x06C67FF5, /* -11, 415, 108 */ - 0x06E677F5, /* -11, 413, 110 */ - 0x07166BF5, /* -11, 410, 113 */ - 0x073663F5, /* -11, 408, 115 */ - 0x07665BF4, /* -12, 406, 118 */ - 0x07964BF5, /* -11, 402, 121 */ - 0x07B643F5, /* -11, 400, 123 */ - 0x07D637F6, /* -10, 397, 125 */ - 0x08062BF6, /* -10, 394, 128 */ - 0x082623F6, /* -10, 392, 130 */ - 0x085617F6, /* -10, 389, 133 */ - 0x08760FF6, /* -10, 387, 135 */ - 0x08B603F5, /* -11, 384, 139 */ - 0x08D5F7F6, /* -10, 381, 141 */ - 0x0905EBF6, /* -10, 378, 144 */ - 0x0925E3F6, /* -10, 376, 146 */ - 0x0955D3F7, /* -9, 372, 149 */ - 0x0985C7F7, /* -9, 369, 152 */ - 0x09A5BFF7, /* -9, 367, 154 */ - 0x09D5B3F7, /* -9, 364, 157 */ - 0x0A05ABF6, /* -10, 362, 160 */ - 0x0A359BF7, /* -9, 358, 163 */ - 0x0A658FF7, /* -9, 355, 166 */ - 0x0A9587F6, /* -10, 353, 169 */ - 0x0AB57BF7, /* -9, 350, 171 */ - 0x0AE56FF7, /* -9, 347, 174 */ - 0x0B1563F7, /* -9, 344, 177 */ - 0x0B455BF6, /* -10, 342, 180 */ - 0x0B754BF7, /* -9, 338, 183 */ - 0x0BA53FF7, /* -9, 335, 186 */ - 0x0BD533F7, /* -9, 332, 189 */ - 0x0C0523F8, /* -8, 328, 192 */ - 0x0C251BF8, /* -8, 326, 194 */ - 0x0C550FF8, /* -8, 323, 197 */ - 0x0C9503F7, /* -9, 320, 201 */ - 0x0CC4F7F7, /* -9, 317, 204 */ - 0x0CF4EBF7, /* -9, 314, 207 */ - 0x0D24DBF8, /* -8, 310, 210 */ - 0x0D54CFF8, /* -8, 307, 213 */ - 0x0D84C3F8, /* -8, 304, 216 */ - 0x0DB4BBF7, /* -9, 302, 219 */ - 0x0DE4AFF7, /* -9, 299, 222 */ - 0x0E149FF8, /* -8, 295, 225 */ - 0x0E4493F8, /* -8, 292, 228 */ - 0x0E7483F9, /* -7, 288, 231 */ - 0x0EA477F9, /* -7, 285, 234 */ - 0x0ED46BF9, /* -7, 282, 237 */ - 0x0F045FF9, /* -7, 279, 240 */ - 0x0F4453F8, /* -8, 276, 244 */ - 0x0F7447F8, /* -8, 273, 247 */ - 0x0FA43BF8, /* -8, 270, 250 */ - 0x0FD42BF9, /* -7, 266, 253 */ - 0x10041FF9, /* -7, 263, 256 */ + 0x3F840D05, /* 261, 259, -8 */ + 0x3F841D01, /* 257, 263, -8 */ + 0x3F8428FE, /* 254, 266, -8 */ + 0x3F8438FA, /* 250, 270, -8 */ + 0x3F8444F7, /* 247, 273, -8 */ + 0x3F8450F4, /* 244, 276, -8 */ + 0x3F845CF1, /* 241, 279, -8 */ + 0x3F8468EE, /* 238, 282, -8 */ + 0x3F8474EB, /* 235, 285, -8 */ + 0x3F8480E8, /* 232, 288, -8 */ + 0x3F7490E5, /* 229, 292, -9 */ + 0x3F749CE2, /* 226, 295, -9 */ + 0x3F74ACDE, /* 222, 299, -9 */ + 0x3F74B8DB, /* 219, 302, -9 */ + 0x3F74C0D9, /* 217, 304, -9 */ + 0x3F74CCD6, /* 214, 307, -9 */ + 0x3F74D8D3, /* 211, 310, -9 */ + 0x3F74E8CF, /* 207, 314, -9 */ + 0x3F74F4CC, /* 204, 317, -9 */ + 0x3F7500C9, /* 201, 320, -9 */ + 0x3F750CC6, /* 198, 323, -9 */ + 0x3F7518C3, /* 195, 326, -9 */ + 0x3F7520C1, /* 193, 328, -9 */ + 0x3F7530BD, /* 189, 332, -9 */ + 0x3F753CBA, /* 186, 335, -9 */ + 0x3F7548B7, /* 183, 338, -9 */ + 0x3F6558B4, /* 180, 342, -10 */ + 0x3F6560B2, /* 178, 344, -10 */ + 0x3F656CAF, /* 175, 347, -10 */ + 0x3F6578AC, /* 172, 350, -10 */ + 0x3F6584A9, /* 169, 353, -10 */ + 0x3F658CA7, /* 167, 355, -10 */ + 0x3F6598A4, /* 164, 358, -10 */ + 0x3F65A8A0, /* 160, 362, -10 */ + 0x3F65B09E, /* 158, 364, -10 */ + 0x3F65BC9B, /* 155, 367, -10 */ + 0x3F65C499, /* 153, 369, -10 */ + 0x3F65D096, /* 150, 372, -10 */ + 0x3F55E093, /* 147, 376, -11 */ + 0x3F55E891, /* 145, 378, -11 */ + 0x3F55F48E, /* 142, 381, -11 */ + 0x3F56008B, /* 139, 384, -11 */ + 0x3F560C88, /* 136, 387, -11 */ + 0x3F561486, /* 134, 389, -11 */ + 0x3F562083, /* 131, 392, -11 */ + 0x3F562881, /* 129, 394, -11 */ + 0x3F56347E, /* 126, 397, -11 */ + 0x3F56407B, /* 123, 400, -11 */ + 0x3F564879, /* 121, 402, -11 */ + 0x3F465876, /* 118, 406, -12 */ + 0x3F466074, /* 116, 408, -12 */ + 0x3F466872, /* 114, 410, -12 */ + 0x3F46746F, /* 111, 413, -12 */ + 0x3F467C6D, /* 109, 415, -12 */ + 0x3F46846B, /* 107, 417, -12 */ + 0x3F468C69, /* 105, 419, -12 */ + 0x3F469866, /* 102, 422, -12 */ + 0x3F46A064, /* 100, 424, -12 */ + 0x3F46AC61, /* 97, 427, -12 */ + 0x3F46B45F, /* 95, 429, -12 */ + 0x3F46BC5D, /* 93, 431, -12 */ + 0x3F46C45B, /* 91, 433, -12 */ + 0x3F46CC59, /* 89, 435, -12 */ + 0x3F36DC56, /* 86, 439, -13 */ + 0x3F36E454, /* 84, 441, -13 */ + 0x3F36EC52, /* 82, 443, -13 */ + 0x3F36F450, /* 80, 445, -13 */ + 0x3F36FC4E, /* 78, 447, -13 */ + 0x3F37004D, /* 77, 448, -13 */ + 0x3F370C4A, /* 74, 451, -13 */ + 0x3F371448, /* 72, 453, -13 */ + 0x3F371C46, /* 70, 455, -13 */ + 0x3F372444, /* 68, 457, -13 */ + 0x3F372C42, /* 66, 459, -13 */ + 0x3F373440, /* 64, 461, -13 */ + 0x3F37383F, /* 63, 462, -13 */ + 0x3F37403D, /* 61, 464, -13 */ + 0x3F37483B, /* 59, 466, -13 */ + 0x3F375039, /* 57, 468, -13 */ + 0x3F375438, /* 56, 469, -13 */ + 0x3F375C36, /* 54, 471, -13 */ + 0x3F376434, /* 52, 473, -13 */ + 0x3F376833, /* 51, 474, -13 */ + 0x3F377031, /* 49, 476, -13 */ + 0x3F377430, /* 48, 477, -13 */ + 0x3F377C2E, /* 46, 479, -13 */ + 0x3F37842C, /* 44, 481, -13 */ + 0x3F37882B, /* 43, 482, -13 */ + 0x3F47882A, /* 42, 482, -12 */ + 0x3F479028, /* 40, 484, -12 */ + 0x3F479427, /* 39, 485, -12 */ + 0x3F479C25, /* 37, 487, -12 */ + 0x3F47A024, /* 36, 488, -12 */ + 0x3F47A822, /* 34, 490, -12 */ + 0x3F47AC21, /* 33, 491, -12 */ + 0x3F47B020, /* 32, 492, -12 */ + 0x3F57B01F, /* 31, 492, -11 */ + 0x3F57B81D, /* 29, 494, -11 */ + 0x3F57BC1C, /* 28, 495, -11 */ + 0x3F57C01B, /* 27, 496, -11 */ + 0x3F57C41A, /* 26, 497, -11 */ + 0x3F67C818, /* 24, 498, -10 */ + 0x3F67CC17, /* 23, 499, -10 */ + 0x3F67D016, /* 22, 500, -10 */ + 0x3F67D415, /* 21, 501, -10 */ + 0x3F67D814, /* 20, 502, -10 */ + 0x3F77D813, /* 19, 502, -9 */ + 0x3F77DC12, /* 18, 503, -9 */ + 0x3F77E011, /* 17, 504, -9 */ + 0x3F87E010, /* 16, 504, -8 */ + 0x3F87E40F, /* 15, 505, -8 */ + 0x3F87E80E, /* 14, 506, -8 */ + 0x3F97E80D, /* 13, 506, -7 */ + 0x3F97EC0C, /* 12, 507, -7 */ + 0x3F97F00B, /* 11, 508, -7 */ + 0x3FA7F00A, /* 10, 508, -6 */ + 0x3FA7F409, /* 9, 509, -6 */ + 0x3FB7F408, /* 8, 509, -5 */ + 0x3FB7F408, /* 8, 509, -5 */ + 0x3FC7F806, /* 6, 510, -4 */ + 0x3FC7F806, /* 6, 510, -4 */ + 0x3FD7F805, /* 5, 510, -3 */ + 0x3FD7FC04, /* 4, 511, -3 */ + 0x3FE7FC03, /* 3, 511, -2 */ + 0x3FE7FC03, /* 3, 511, -2 */ + 0x3FF7FC02, /* 2, 511, -1 */ + 0x3FF7FC02, /* 2, 511, -1 */ + 0x0007FC01, /* 1, 511, 0 */ + 0x0007FC01, /* 1, 511, 0 */ + 0x0007FC01, /* 1, 511, 0 */ + 0x0027FFFF, /* -1, 511, 2 */ + 0x0027FFFF, /* -1, 511, 2 */ + 0x0037FFFE, /* -2, 511, 3 */ + 0x0037FFFE, /* -2, 511, 3 */ + 0x0047FFFD, /* -3, 511, 4 */ + 0x0047FBFE, /* -2, 510, 4 */ + 0x0057FBFD, /* -3, 510, 5 */ + 0x0067FBFC, /* -4, 510, 6 */ + 0x0077F7FC, /* -4, 509, 7 */ + 0x0077F7FC, /* -4, 509, 7 */ + 0x0087F7FB, /* -5, 509, 8 */ + 0x0097F3FB, /* -5, 508, 9 */ + 0x00A7F3FA, /* -6, 508, 10 */ + 0x00B7EFFA, /* -6, 507, 11 */ + 0x00C7EBFA, /* -6, 506, 12 */ + 0x00D7EBF9, /* -7, 506, 13 */ + 0x00E7E7F9, /* -7, 505, 14 */ + 0x00F7E3F9, /* -7, 504, 15 */ + 0x0107E3F8, /* -8, 504, 16 */ + 0x0117DFF8, /* -8, 503, 17 */ + 0x0127DBF8, /* -8, 502, 18 */ + 0x0137DBF7, /* -9, 502, 19 */ + 0x0147D7F7, /* -9, 501, 20 */ + 0x0157D3F7, /* -9, 500, 21 */ + 0x0167CFF7, /* -9, 499, 22 */ + 0x0177CBF7, /* -9, 498, 23 */ + 0x0197C7F6, /* -10, 497, 25 */ + 0x01A7C3F6, /* -10, 496, 26 */ + 0x01B7BFF6, /* -10, 495, 27 */ + 0x01C7BBF6, /* -10, 494, 28 */ + 0x01E7B3F6, /* -10, 492, 30 */ + 0x01F7B3F5, /* -11, 492, 31 */ + 0x0207AFF5, /* -11, 491, 32 */ + 0x0217ABF5, /* -11, 490, 33 */ + 0x0237A3F5, /* -11, 488, 35 */ + 0x02479FF5, /* -11, 487, 36 */ + 0x026797F5, /* -11, 485, 38 */ + 0x027793F5, /* -11, 484, 39 */ + 0x02978BF5, /* -11, 482, 41 */ + 0x02A78BF4, /* -12, 482, 42 */ + 0x02B787F4, /* -12, 481, 43 */ + 0x02D77FF4, /* -12, 479, 45 */ + 0x02F777F4, /* -12, 477, 47 */ + 0x030773F4, /* -12, 476, 48 */ + 0x03276BF4, /* -12, 474, 50 */ + 0x033767F4, /* -12, 473, 51 */ + 0x03575FF4, /* -12, 471, 53 */ + 0x037757F4, /* -12, 469, 55 */ + 0x038753F4, /* -12, 468, 56 */ + 0x03A74BF4, /* -12, 466, 58 */ + 0x03C743F4, /* -12, 464, 60 */ + 0x03E73BF4, /* -12, 462, 62 */ + 0x040737F3, /* -13, 461, 64 */ + 0x04272FF3, /* -13, 459, 66 */ + 0x044727F3, /* -13, 457, 68 */ + 0x04671FF3, /* -13, 455, 70 */ + 0x048717F3, /* -13, 453, 72 */ + 0x04A70FF3, /* -13, 451, 74 */ + 0x04C703F4, /* -12, 448, 76 */ + 0x04D6FFF4, /* -12, 447, 77 */ + 0x04F6F7F4, /* -12, 445, 79 */ + 0x0516EFF4, /* -12, 443, 81 */ + 0x0536E7F4, /* -12, 441, 83 */ + 0x0556DFF4, /* -12, 439, 85 */ + 0x0586CFF5, /* -11, 435, 88 */ + 0x05A6C7F5, /* -11, 433, 90 */ + 0x05C6BFF5, /* -11, 431, 92 */ + 0x05F6B7F4, /* -12, 429, 95 */ + 0x0616AFF4, /* -12, 427, 97 */ + 0x0636A3F5, /* -11, 424, 99 */ + 0x06569BF5, /* -11, 422, 101 */ + 0x06868FF5, /* -11, 419, 104 */ + 0x06A687F5, /* -11, 417, 106 */ + 0x06C67FF5, /* -11, 415, 108 */ + 0x06E677F5, /* -11, 413, 110 */ + 0x07166BF5, /* -11, 410, 113 */ + 0x073663F5, /* -11, 408, 115 */ + 0x07665BF4, /* -12, 406, 118 */ + 0x07964BF5, /* -11, 402, 121 */ + 0x07B643F5, /* -11, 400, 123 */ + 0x07D637F6, /* -10, 397, 125 */ + 0x08062BF6, /* -10, 394, 128 */ + 0x082623F6, /* -10, 392, 130 */ + 0x085617F6, /* -10, 389, 133 */ + 0x08760FF6, /* -10, 387, 135 */ + 0x08B603F5, /* -11, 384, 139 */ + 0x08D5F7F6, /* -10, 381, 141 */ + 0x0905EBF6, /* -10, 378, 144 */ + 0x0925E3F6, /* -10, 376, 146 */ + 0x0955D3F7, /* -9, 372, 149 */ + 0x0985C7F7, /* -9, 369, 152 */ + 0x09A5BFF7, /* -9, 367, 154 */ + 0x09D5B3F7, /* -9, 364, 157 */ + 0x0A05ABF6, /* -10, 362, 160 */ + 0x0A359BF7, /* -9, 358, 163 */ + 0x0A658FF7, /* -9, 355, 166 */ + 0x0A9587F6, /* -10, 353, 169 */ + 0x0AB57BF7, /* -9, 350, 171 */ + 0x0AE56FF7, /* -9, 347, 174 */ + 0x0B1563F7, /* -9, 344, 177 */ + 0x0B455BF6, /* -10, 342, 180 */ + 0x0B754BF7, /* -9, 338, 183 */ + 0x0BA53FF7, /* -9, 335, 186 */ + 0x0BD533F7, /* -9, 332, 189 */ + 0x0C0523F8, /* -8, 328, 192 */ + 0x0C251BF8, /* -8, 326, 194 */ + 0x0C550FF8, /* -8, 323, 197 */ + 0x0C9503F7, /* -9, 320, 201 */ + 0x0CC4F7F7, /* -9, 317, 204 */ + 0x0CF4EBF7, /* -9, 314, 207 */ + 0x0D24DBF8, /* -8, 310, 210 */ + 0x0D54CFF8, /* -8, 307, 213 */ + 0x0D84C3F8, /* -8, 304, 216 */ + 0x0DB4BBF7, /* -9, 302, 219 */ + 0x0DE4AFF7, /* -9, 299, 222 */ + 0x0E149FF8, /* -8, 295, 225 */ + 0x0E4493F8, /* -8, 292, 228 */ + 0x0E7483F9, /* -7, 288, 231 */ + 0x0EA477F9, /* -7, 285, 234 */ + 0x0ED46BF9, /* -7, 282, 237 */ + 0x0F045FF9, /* -7, 279, 240 */ + 0x0F4453F8, /* -8, 276, 244 */ + 0x0F7447F8, /* -8, 273, 247 */ + 0x0FA43BF8, /* -8, 270, 250 */ + 0x0FD42BF9, /* -7, 266, 253 */ + 0x10041FF9, /* -7, 263, 256 */ }; diff --git a/driver/xf86-video-geode/src/cim/cim_msr.c b/driver/xf86-video-geode/src/cim/cim_msr.c index 4a6b72dfd..6dd41834e 100644 --- a/driver/xf86-video-geode/src/cim/cim_msr.c +++ b/driver/xf86-video-geode/src/cim/cim_msr.c @@ -50,7 +50,7 @@ GEODELINK_NODE msr_dev_lookup[MSR_DEVICE_EMPTY]; int msr_init_table(void) { - Q_WORD msr_value = {0, 0}; + Q_WORD msr_value = { 0, 0 }; unsigned int i, j; int return_value = CIM_STATUS_OK; @@ -93,19 +93,16 @@ msr_init_table(void) msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU0].address_from_cpu = MSR_ADDRESS_GLIU0; - msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU0].device_id = - MSR_DEVICE_PRESENT; + msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU0].device_id = MSR_DEVICE_PRESENT; msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU1].address_from_cpu = MSR_ADDRESS_GLIU1; - msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU1].device_id = - MSR_DEVICE_PRESENT; + msr_dev_lookup[MSR_DEVICE_GEODELX_GLIU1].device_id = MSR_DEVICE_PRESENT; msr_dev_lookup[MSR_DEVICE_5535_GLIU].address_from_cpu = MSR_ADDRESS_GLIU2; msr_dev_lookup[MSR_DEVICE_5535_GLIU].device_id = MSR_DEVICE_PRESENT; msr_dev_lookup[MSR_DEVICE_GEODELX_VAIL].address_from_cpu = MSR_ADDRESS_VAIL; - msr_dev_lookup[MSR_DEVICE_GEODELX_VAIL].device_id = - MSR_DEVICE_PRESENT; + msr_dev_lookup[MSR_DEVICE_GEODELX_VAIL].device_id = MSR_DEVICE_PRESENT; for (i = 0; i < MSR_DEVICE_EMPTY; i++) { if (msr_dev_lookup[i].device_id == MSR_DEVICE_NOTFOUND) { @@ -123,7 +120,8 @@ msr_init_table(void) } } } - } else { + } + else { /* ERROR OUT THE GEODELINK TABLES */ for (i = 0; i < 24; i++) { @@ -157,7 +155,7 @@ msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) int glcp_count = 0; int usb_count = 0; int mpci_count = 0; - Q_WORD msr_value = {0, 0}; + Q_WORD msr_value = { 0, 0 }; /* ALL THREE GLIUS ARE IN ONE ARRAY */ /* Entries 0-7 contain the port information for GLIU0, entries */ @@ -199,7 +197,7 @@ msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) gliu_nodes[port].device_id = MSR_CLASS_CODE_UNPOPULATED; else { MSR_READ(MSR_GEODELINK_CAP, gliu_nodes[port].address_from_cpu, - &msr_value); + &msr_value); gliu_nodes[port].device_id = GET_DEVICE_ID(msr_value.high, msr_value.low); } @@ -230,7 +228,7 @@ msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) gliu_nodes[index].device_id = MSR_CLASS_CODE_UNPOPULATED; else { MSR_READ(MSR_GEODELINK_CAP, gliu_nodes[index].address_from_cpu, - &msr_value); + &msr_value); gliu_nodes[index].device_id = GET_DEVICE_ID(msr_value.high, msr_value.low); } @@ -272,7 +270,7 @@ msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes) gliu_nodes[index].device_id = MSR_CLASS_CODE_UNPOPULATED; else { MSR_READ(MSR_GEODELINK_CAP, gliu_nodes[index].address_from_cpu, - &msr_value); + &msr_value); gliu_nodes[index].device_id = GET_DEVICE_ID(msr_value.high, msr_value.low); } @@ -397,13 +395,12 @@ msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices) *-------------------------------------------------------------------*/ int -msr_read64(unsigned long device, unsigned long msr_register, - Q_WORD * msr_value) +msr_read64(unsigned long device, unsigned long msr_register, Q_WORD * msr_value) { if (device < MSR_DEVICE_EMPTY) { if (msr_dev_lookup[device].device_id == MSR_DEVICE_PRESENT) { MSR_READ(msr_register, msr_dev_lookup[device].address_from_cpu, - msr_value); + msr_value); return CIM_STATUS_OK; } } @@ -421,12 +418,12 @@ msr_read64(unsigned long device, unsigned long msr_register, int msr_write64(unsigned long device, unsigned long msr_register, - Q_WORD * msr_value) + Q_WORD * msr_value) { if (device < MSR_DEVICE_EMPTY) { if (msr_dev_lookup[device].device_id == MSR_DEVICE_PRESENT) { MSR_WRITE(msr_register, msr_dev_lookup[device].address_from_cpu, - msr_value); + msr_value); return CIM_STATUS_OK; } } diff --git a/driver/xf86-video-geode/src/cim/cim_parm.h b/driver/xf86-video-geode/src/cim/cim_parm.h index ed1df8bd0..a8fa9b05c 100644 --- a/driver/xf86-video-geode/src/cim/cim_parm.h +++ b/driver/xf86-video-geode/src/cim/cim_parm.h @@ -101,8 +101,7 @@ /* on a GeodeLink Interface Unit (GLIU) */ /*---------------------------------------------*/ -typedef struct tagGeodeLinkNode -{ +typedef struct tagGeodeLinkNode { unsigned long address_from_cpu; unsigned long device_id; @@ -113,8 +112,7 @@ typedef struct tagGeodeLinkNode /* 64-bit data structure for MSR acess. */ /*---------------------------------------------*/ -typedef struct tagQ_WORD -{ +typedef struct tagQ_WORD { unsigned long high; unsigned long low; @@ -124,8 +122,7 @@ typedef struct tagQ_WORD /* INITIALIZATION USER PARAMETERS */ /*===================================================*/ -typedef struct tagInitBaseAddresses -{ +typedef struct tagInitBaseAddresses { unsigned long framebuffer_base; unsigned long gp_register_base; unsigned long vg_register_base; @@ -212,8 +209,7 @@ typedef struct tagInitBaseAddresses /* USER STRUCTURE FOR SAVING/RESTORING GP STATE */ /*----------------------------------------------*/ -typedef struct tagGPSaveRestore -{ +typedef struct tagGPSaveRestore { unsigned long base_offset; unsigned long cmd_top; unsigned long cmd_bottom; @@ -326,8 +322,7 @@ typedef struct tagGPSaveRestore VG_MODEFLAG_EXCLUDEPLL | \ VG_MODEFLAG_LINEARPITCH) -typedef struct tagVGDisplayMode -{ +typedef struct tagVGDisplayMode { /* DISPLAY MODE FLAGS */ /* Includes BPP, refresh rate information, interlacing, etc. */ @@ -402,8 +397,7 @@ typedef struct tagVGDisplayMode /* USER STRUCTURE FOR QUERYING DISPLAY MODES */ /*-------------------------------------------*/ -typedef struct tagQueryDisplayMode -{ +typedef struct tagQueryDisplayMode { int interlaced; int halfclock; unsigned long active_width; @@ -425,8 +419,7 @@ typedef struct tagQueryDisplayMode /* USER STRUCTURE FOR QUERYING CURSOR DATA */ /*-------------------------------------------*/ -typedef struct tagCursorData -{ +typedef struct tagCursorData { int enable; int color_cursor; unsigned long cursor_offset; @@ -451,8 +444,7 @@ typedef struct tagCursorData /* USER STRUCTURE FOR SETTING COMPRESSION DATA */ /*------------------------------------------------*/ -typedef struct tagCompressionData -{ +typedef struct tagCompressionData { unsigned long compression_offset; unsigned long pitch; unsigned long size; @@ -464,8 +456,7 @@ typedef struct tagCompressionData /* USER STRUCTURE FOR CONFIGURING LINE INTERRUPTS */ /*-------------------------------------------------*/ -typedef struct tagInterruptInfo -{ +typedef struct tagInterruptInfo { unsigned long line; unsigned long flags; int enable; @@ -476,8 +467,7 @@ typedef struct tagInterruptInfo /* USER STRUCTURE FOR PANNING THE DESKTOP */ /*-------------------------------------------------*/ -typedef struct tagPanningInfo -{ +typedef struct tagPanningInfo { unsigned long start_x; unsigned long start_y; int start_updated; @@ -488,8 +478,7 @@ typedef struct tagPanningInfo /* USER STRUCTURE FOR SAVING/RESTORING THE VG STATE */ /*--------------------------------------------------*/ -typedef struct tagVGSaveRestore -{ +typedef struct tagVGSaveRestore { /* VG REGISTERS */ unsigned long unlock; @@ -680,8 +669,7 @@ typedef struct tagVGSaveRestore #define DF_SOURCEFLAG_HDTVSOURCE 0x0001 #define DF_SOURCEFLAG_IMPLICITSCALING 0x0002 -typedef struct tagVideoSourceInfo -{ +typedef struct tagVideoSourceInfo { unsigned long video_format; unsigned long y_offset; unsigned long u_offset; @@ -701,8 +689,7 @@ typedef struct tagVideoSourceInfo #define DF_POSFLAG_DIRECTCLIP 0x0001 #define DF_POSFLAG_INCLUDEBORDER 0x0002 -typedef struct tagVideoPosition -{ +typedef struct tagVideoPosition { long x; long y; unsigned long width; @@ -717,8 +704,7 @@ typedef struct tagVideoPosition /* USER STRUCTURE FOR CONFIGURING THE VIDEO CURSOR */ /*-------------------------------------------------*/ -typedef struct tagVideoCursorInfo -{ +typedef struct tagVideoCursorInfo { unsigned long key; unsigned long mask; unsigned long color1; @@ -735,8 +721,7 @@ typedef struct tagVideoCursorInfo #define DF_ALPHAFLAG_COLORENABLED 0x0001 #define DF_ALPHAFLAG_PERPIXELENABLED 0x0002 -typedef struct tagAlphaRegionInfo -{ +typedef struct tagAlphaRegionInfo { unsigned long x; unsigned long y; unsigned long width; @@ -753,8 +738,7 @@ typedef struct tagAlphaRegionInfo /* USER STRUCTURE FOR SAVING/RESTORING DF DATA */ /*-------------------------------------------------*/ -typedef struct tagDFSaveRestore -{ +typedef struct tagDFSaveRestore { unsigned long vcfg; unsigned long dcfg; unsigned long video_x; @@ -828,8 +812,7 @@ typedef struct tagDFSaveRestore /* USER STRUCTURE FOR CONFIGURING 601 SETTINGS */ /*---------------------------------------------*/ -typedef struct _TAG_VIP601PARAMS -{ +typedef struct _TAG_VIP601PARAMS { unsigned long flags; unsigned long horz_start; unsigned long width; @@ -886,8 +869,7 @@ typedef struct _TAG_VIP601PARAMS #define VIP_420CAPTURE_ALTERNATINGLINES 0x00000002 #define VIP_420CAPTURE_ALTERNATINGFIELDS 0x00000003 -typedef struct _TAG_SETMODEBUFFER -{ +typedef struct _TAG_SETMODEBUFFER { unsigned long flags; unsigned long stream_enables; unsigned long operating_mode; @@ -929,8 +911,7 @@ typedef struct _TAG_SETMODEBUFFER /* USER STRUCTURE FOR CONFIGURING THE VG VSYNC GENLOCK */ /*--------------------------------------------------------*/ -typedef struct _TAG_GENLOCKBUFFER -{ +typedef struct _TAG_GENLOCKBUFFER { unsigned long vip_signal_loss; unsigned long vsync_to_vg; unsigned long field_to_vg; @@ -943,8 +924,7 @@ typedef struct _TAG_GENLOCKBUFFER /* USER STRUCTURE FOR CONFIGURING VIP ANCILLARY CAPTURE */ /*------------------------------------------------------*/ -typedef struct _TAG_ANCILLARYBUFFER -{ +typedef struct _TAG_ANCILLARYBUFFER { unsigned long msg1_base; unsigned long msg2_base; unsigned long msg_size; @@ -975,8 +955,7 @@ typedef struct _TAG_ANCILLARYBUFFER #define VIP_BUFFER_B_ODD 0x0007 #define VIP_BUFFER_B_EVEN 0x0008 -typedef struct _TAG_INPUTBUFFER_ADDR -{ +typedef struct _TAG_INPUTBUFFER_ADDR { unsigned long even_base[VIP_MAX_BUFFERS]; unsigned long odd_base[VIP_MAX_BUFFERS]; unsigned long y_pitch; @@ -990,8 +969,7 @@ typedef struct _TAG_INPUTBUFFER_ADDR } VIPINPUTBUFFER_ADDR; -typedef struct _TAG_SETINPUTBUFFER -{ +typedef struct _TAG_SETINPUTBUFFER { unsigned long flags; VIPINPUTBUFFER_ADDR offsets[VIP_BUFFER_MAX_TASKS]; unsigned long current_buffer; @@ -1004,8 +982,7 @@ typedef struct _TAG_SETINPUTBUFFER /* USER STRUCTURE FOR CONFIGURING VIP SUBWINDOW CAPTURE */ /*------------------------------------------------------*/ -typedef struct _TAG_SUBWINDOWBUFFER -{ +typedef struct _TAG_SUBWINDOWBUFFER { int enable; unsigned long start; unsigned long stop; @@ -1016,8 +993,7 @@ typedef struct _TAG_SUBWINDOWBUFFER /* USER STRUCTURE FOR SAVING/RESTORING VIP REGISTERS */ /*--------------------------------------------------------*/ -typedef struct _TAG_VIPSTATEBUFFER -{ +typedef struct _TAG_VIPSTATEBUFFER { unsigned long control1; unsigned long control2; unsigned long vip_int; @@ -1108,8 +1084,7 @@ typedef struct _TAG_VIPSTATEBUFFER /* USER STRUCTURE FOR QUERYING VIP CAPABILITIES */ /*-------------------------------------------------*/ -typedef struct _TAG_CAPABILITIESBUFFER -{ +typedef struct _TAG_CAPABILITIESBUFFER { unsigned long revision_id; unsigned long device_id; unsigned long n_clock_domains; @@ -1121,8 +1096,7 @@ typedef struct _TAG_CAPABILITIESBUFFER /* USER STRUCTURE FOR CONFIGURING VIP POWER */ /*-------------------------------------------------*/ -typedef struct _TAG_POWERBUFFER -{ +typedef struct _TAG_POWERBUFFER { int glink_clock_mode; int vip_clock_mode; @@ -1132,8 +1106,7 @@ typedef struct _TAG_POWERBUFFER /* USER STRUCTURE FOR CONFIGURING VIP PRIORITIES */ /*-------------------------------------------------*/ -typedef struct _TAG_PRIORITYBUFFER -{ +typedef struct _TAG_PRIORITYBUFFER { unsigned long secondary; unsigned long primary; unsigned long pid; @@ -1164,8 +1137,7 @@ typedef struct _TAG_PRIORITYBUFFER #define VIP_DIAG_LOWER_FORMATTER 0x00000200 #define VIP_DIAG_LOWER_INPUT_CONTROL 0x00000400 -typedef struct _TAG_DEBUGBUFFER -{ +typedef struct _TAG_DEBUGBUFFER { unsigned long bist; unsigned long enable_upper; unsigned long select_upper; @@ -1182,8 +1154,7 @@ typedef struct _TAG_DEBUGBUFFER /* USER STRUCTURE FOR CONFIGURING VBI CAPTURE */ /*------------------------------------------------------*/ -typedef struct _TAG_VBIWINDOWBUFFER -{ +typedef struct _TAG_VBIWINDOWBUFFER { long horz_start; unsigned long vbi_width; unsigned long odd_line_capture_mask; @@ -1217,8 +1188,7 @@ typedef struct _TAG_VBIWINDOWBUFFER #define VOP_601_RGB_8_8_8 0x00000002 #define VOP_601_YUV_4_4_4 0x00000003 -typedef struct _TAG_VOP601 -{ +typedef struct _TAG_VOP601 { unsigned long flags; unsigned long vsync_shift; unsigned long vsync_shift_count; @@ -1262,8 +1232,7 @@ typedef struct _TAG_VOP601 #define VOP_MB_SYNCSEL_STATREG17 0x00000060 #define VOP_MB_SYNCSEL_STATREG17_INV 0x00000080 -typedef struct _TAG_VOPMODECONFIGURATIONBUFFER -{ +typedef struct _TAG_VOPMODECONFIGURATIONBUFFER { unsigned long flags; unsigned long mode; unsigned long conversion_mode; @@ -1276,8 +1245,7 @@ typedef struct _TAG_VOPMODECONFIGURATIONBUFFER /* USER STRUCTURE FOR SAVING/RESTORING VOP REGISTERS */ /*--------------------------------------------------------*/ -typedef struct _TAG_VOPSTATEBUFFER -{ +typedef struct _TAG_VOPSTATEBUFFER { unsigned long config; } VOPSTATEBUFFER; diff --git a/driver/xf86-video-geode/src/cim/cim_regs.h b/driver/xf86-video-geode/src/cim/cim_regs.h index 6d434a22d..f0bc95a1d 100644 --- a/driver/xf86-video-geode/src/cim/cim_regs.h +++ b/driver/xf86-video-geode/src/cim/cim_regs.h @@ -636,8 +636,7 @@ /* and not the m, n and p from the PLL equation. The PLL */ /* equation adds 1 to each value. */ -typedef struct tagPLLFrequency -{ +typedef struct tagPLLFrequency { unsigned long pll_value; unsigned long frequency; diff --git a/driver/xf86-video-geode/src/cim/cim_rtns.h b/driver/xf86-video-geode/src/cim/cim_rtns.h index 60bdcd1c1..588d3d152 100644 --- a/driver/xf86-video-geode/src/cim/cim_rtns.h +++ b/driver/xf86-video-geode/src/cim/cim_rtns.h @@ -38,8 +38,7 @@ /* COMPILER OPTION FOR C++ PROGRAMS */ #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /*--------------------------*/ @@ -59,7 +58,7 @@ extern "C" /*----------------------------------------*/ int init_detect_cpu(unsigned long *cpu_revision, - unsigned long *companion_revision); + unsigned long *companion_revision); unsigned long init_read_pci(unsigned long address); int init_read_base_addresses(INIT_BASE_ADDRESSES * base_addresses); int init_read_cpu_frequency(unsigned long *cpu_frequency); @@ -70,7 +69,7 @@ extern "C" void gp_set_limit_on_buffer_lead(unsigned long lead); void gp_set_command_buffer_base(unsigned long address, - unsigned long start, unsigned long stop); + unsigned long start, unsigned long stop); void gp_set_frame_buffer_base(unsigned long address, unsigned long size); void gp_set_bpp(int bpp); void gp_declare_blt(unsigned long flags); @@ -78,69 +77,76 @@ extern "C" void gp_write_parameters(void); void gp_set_raster_operation(unsigned char ROP); void gp_set_alpha_operation(int alpha_operation, int alpha_type, - int channel, int apply_alpha, unsigned char alpha); + int channel, int apply_alpha, + unsigned char alpha); void gp_set_solid_pattern(unsigned long color); void gp_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, int transparent, int x, - int y); + unsigned long data0, unsigned long data1, + int transparent, int x, int y); void gp_set_pattern_origin(int x, int y); - void gp_set_color_pattern(unsigned long *pattern, int format, int x, - int y); + void gp_set_color_pattern(unsigned long *pattern, int format, int x, int y); void gp_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - int transparent); + int transparent); void gp_set_solid_source(unsigned long color); void gp_set_source_transparency(unsigned long color, unsigned long mask); void gp_program_lut(unsigned long *colors, int full_lut); void gp_set_vector_pattern(unsigned long pattern, unsigned long color, - int length); + int length); void gp_set_strides(unsigned long dst_stride, unsigned long src_stride); void gp_set_source_format(int format); void gp_pattern_fill(unsigned long dstoffset, unsigned long width, - unsigned long height); + unsigned long height); void gp_screen_to_screen_blt(unsigned long dstoffset, - unsigned long srcoffset, unsigned long width, - unsigned long height, int flags); + unsigned long srcoffset, unsigned long width, + unsigned long height, int flags); void gp_screen_to_screen_convert(unsigned long dstoffset, - unsigned long srcoffset, unsigned long width, - unsigned long height, int nibble); + unsigned long srcoffset, + unsigned long width, unsigned long height, + int nibble); void gp_color_bitmap_to_screen_blt(unsigned long dstoffset, - unsigned long srcx, unsigned long width, unsigned long height, - unsigned char *data, long pitch); + unsigned long srcx, unsigned long width, + unsigned long height, + unsigned char *data, long pitch); void gp_color_convert_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, unsigned char *data, - long pitch); + unsigned long width, unsigned long height, + unsigned char *data, long pitch); void gp_custom_convert_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, unsigned char *data, - long pitch); + unsigned long width, unsigned long height, + unsigned char *data, long pitch); void gp_rotate_blt(unsigned long dstoffset, unsigned long srcoffset, - unsigned long width, unsigned long height, int degrees); + unsigned long width, unsigned long height, int degrees); void gp_mono_bitmap_to_screen_blt(unsigned long dstoffset, - unsigned long srcx, unsigned long width, unsigned long height, - unsigned char *data, long stride); + unsigned long srcx, unsigned long width, + unsigned long height, unsigned char *data, + long stride); void gp_text_blt(unsigned long dstoffset, unsigned long width, - unsigned long height, unsigned char *data); + unsigned long height, unsigned char *data); void gp_mono_expand_blt(unsigned long dstoffset, unsigned long srcoffset, - unsigned long srcx, unsigned long width, unsigned long height, - int byte_packed); + unsigned long srcx, unsigned long width, + unsigned long height, int byte_packed); void gp_antialiased_text(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, unsigned char *data, - long stride, int fourbpp); - void gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, - unsigned long width, unsigned long height, unsigned long, - long stride, int operation, int fourbpp); - void gp_masked_blt(unsigned long dstoffset, unsigned long width, - unsigned long height, unsigned long mono_srcx, - unsigned long color_srcx, unsigned char *mono_mask, - unsigned char *color_data, long mono_pitch, long color_pitch); + unsigned long width, unsigned long height, + unsigned char *data, long stride, int fourbpp); + void gp_blend_mask_blt(unsigned long dstoffset, unsigned long srcx, + unsigned long width, unsigned long height, + unsigned long, long stride, int operation, + int fourbpp); + void gp_masked_blt(unsigned long dstoffset, unsigned long width, + unsigned long height, unsigned long mono_srcx, + unsigned long color_srcx, unsigned char *mono_mask, + unsigned char *color_data, long mono_pitch, + long color_pitch); void gp_screen_to_screen_masked(unsigned long dstoffset, - unsigned long srcoffset, unsigned long width, - unsigned long height, unsigned long mono_srcx, - unsigned char *mono_mask, long mono_pitch); + unsigned long srcoffset, + unsigned long width, unsigned long height, + unsigned long mono_srcx, + unsigned char *mono_mask, long mono_pitch); void gp_bresenham_line(unsigned long dstoffset, unsigned short length, - unsigned short initerr, unsigned short axialerr, - unsigned short diagerr, unsigned long flags); + unsigned short initerr, unsigned short axialerr, + unsigned short diagerr, unsigned long flags); void gp_line_from_endpoints(unsigned long dstoffset, unsigned long x0, - unsigned long y0, unsigned long x1, unsigned long y1, int inclusive); + unsigned long y0, unsigned long x1, + unsigned long y1, int inclusive); int gp_test_blt_pending(void); void gp_wait_blt_pending(void); @@ -155,50 +161,54 @@ extern "C" int vg_delay_milliseconds(unsigned long ms); int vg_set_display_mode(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, int bpp, int hz, - unsigned long flags); + unsigned long dst_width, unsigned long dst_height, + int bpp, int hz, unsigned long flags); int vg_set_panel_mode(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, - unsigned long panel_width, unsigned long panel_height, - int bpp, unsigned long flags); + unsigned long dst_width, unsigned long dst_height, + unsigned long panel_width, unsigned long panel_height, + int bpp, unsigned long flags); int vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, - unsigned long encoder, unsigned long tvres, int bpp, - unsigned long flags, unsigned long h_overscan, - unsigned long v_overscan); + unsigned long encoder, unsigned long tvres, int bpp, + unsigned long flags, unsigned long h_overscan, + unsigned long v_overscan); int vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp); int vg_set_display_bpp(int bpp); int vg_get_display_mode_index(VG_QUERY_MODE * query); int vg_get_display_mode_information(unsigned int index, - VG_DISPLAY_MODE * vg_mode); + VG_DISPLAY_MODE * vg_mode); int vg_get_display_mode_count(void); int vg_get_current_display_mode(VG_DISPLAY_MODE * current_display, - int *bpp); + int *bpp); int vg_set_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]); int vg_configure_flicker_filter(unsigned long flicker_strength, - int flicker_alpha); + int flicker_alpha); int vg_set_clock_frequency(unsigned long frequency, - unsigned long pll_flags); + unsigned long pll_flags); int vg_set_border_color(unsigned long border_color); int vg_set_cursor_enable(int enable); - int vg_set_mono_cursor_colors(unsigned long bkcolor, - unsigned long fgcolor); + int vg_set_mono_cursor_colors(unsigned long bkcolor, unsigned long fgcolor); int vg_set_cursor_position(long xpos, long ypos, - VG_PANNING_COORDINATES * panning); + VG_PANNING_COORDINATES * panning); int vg_set_mono_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask, - unsigned long x_hotspot, unsigned long y_hotspot); + unsigned long *andmask, + unsigned long *xormask, + unsigned long x_hotspot, + unsigned long y_hotspot); int vg_set_mono_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask, - unsigned long x_hotspot, unsigned long y_hotspot); - int vg_set_color_cursor_shape(unsigned long memoffset, - unsigned char *data, unsigned long width, unsigned long height, - long pitch, unsigned long x_hotspot, unsigned long y_hotspot); + unsigned long *andmask, + unsigned long *xormask, + unsigned long x_hotspot, + unsigned long y_hotspot); + int vg_set_color_cursor_shape(unsigned long memoffset, unsigned char *data, + unsigned long width, unsigned long height, + long pitch, unsigned long x_hotspot, + unsigned long y_hotspot); int vg_pan_desktop(unsigned long x, unsigned long y, - VG_PANNING_COORDINATES * panning); + VG_PANNING_COORDINATES * panning); int vg_set_display_offset(unsigned long address); int vg_set_display_pitch(unsigned long pitch); int vg_set_display_palette_entry(unsigned long index, - unsigned long palette); + unsigned long palette); int vg_set_display_palette(unsigned long *palette); int vg_set_compression_enable(int enable); int vg_configure_compression(VG_COMPRESSION_DATA * comp_data); @@ -218,17 +228,17 @@ extern "C" unsigned long vg_read_graphics_crc(int crc_source); unsigned long vg_read_window_crc(int crc_source, unsigned long x, - unsigned long y, unsigned long width, unsigned long height); + unsigned long y, unsigned long width, + unsigned long height); int vg_get_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]); int vg_get_flicker_filter_configuration(unsigned long *strength, - int *flicker_alpha); + int *flicker_alpha); unsigned long vg_get_display_pitch(void); unsigned long vg_get_frame_buffer_line_size(void); unsigned long vg_get_current_vline(void); unsigned long vg_get_display_offset(void); int vg_get_cursor_info(VG_CURSOR_DATA * cursor_data); - int vg_get_display_palette_entry(unsigned long index, - unsigned long *entry); + int vg_get_display_palette_entry(unsigned long index, unsigned long *entry); unsigned long vg_get_border_color(void); int vg_get_display_palette(unsigned long *palette); int vg_get_compression_info(VG_COMPRESSION_DATA * comp_data); @@ -242,25 +252,24 @@ extern "C" int df_set_crt_enable(int crt_output); int df_set_panel_enable(int panel_output); int df_configure_video_source(DF_VIDEO_SOURCE_PARAMS * video_source_odd, - DF_VIDEO_SOURCE_PARAMS * video_source_even); + DF_VIDEO_SOURCE_PARAMS * video_source_even); int df_set_video_offsets(int even, unsigned long y_offset, - unsigned long u_offset, unsigned long v_offset); + unsigned long u_offset, unsigned long v_offset); int df_set_video_scale(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, - unsigned long flags); + unsigned long dst_width, unsigned long dst_height, + unsigned long flags); int df_set_video_position(DF_VIDEO_POSITION * video_window); int df_set_video_filter_coefficients(long taps[][4], int phase256); int df_set_video_enable(int enable, unsigned long flags); int df_set_video_color_key(unsigned long key, unsigned long mask, - int graphics); + int graphics); int df_set_video_palette(unsigned long *palette); - int df_set_video_palette_entry(unsigned long index, - unsigned long palette); + int df_set_video_palette_entry(unsigned long index, unsigned long palette); int df_configure_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * - cursor_color_key); + cursor_color_key); int df_set_video_cursor_color_key_enable(int enable); int df_configure_alpha_window(int window, - DF_ALPHA_REGION_PARAMS * alpha_data); + DF_ALPHA_REGION_PARAMS * alpha_data); int df_set_alpha_window_enable(int window, int enable); int df_set_no_ck_outside_alpha(int enable); int df_set_video_request(unsigned long x, unsigned long y); @@ -276,25 +285,28 @@ extern "C" unsigned long df_read_composite_crc(int crc_source); unsigned long df_read_composite_window_crc(unsigned long x, - unsigned long y, unsigned long width, unsigned long height, - int source); + unsigned long y, + unsigned long width, + unsigned long height, + int source); unsigned long df_read_panel_crc(void); int df_get_video_enable(int *enable, unsigned long *flags); int df_get_video_source_configuration(DF_VIDEO_SOURCE_PARAMS * - video_source_odd, DF_VIDEO_SOURCE_PARAMS * video_source_even); + video_source_odd, + DF_VIDEO_SOURCE_PARAMS * + video_source_even); int df_get_video_position(DF_VIDEO_POSITION * video_window); int df_get_video_scale(unsigned long *x_scale, unsigned long *y_scale); int df_get_video_filter_coefficients(long taps[][4], int *phase256); int df_get_video_color_key(unsigned long *key, unsigned long *mask, - int *graphics); - int df_get_video_palette_entry(unsigned long index, - unsigned long *palette); + int *graphics); + int df_get_video_palette_entry(unsigned long index, unsigned long *palette); int df_get_video_palette(unsigned long *palette); int df_get_video_cursor_color_key(DF_VIDEO_CURSOR_PARAMS * - cursor_color_key); + cursor_color_key); int df_get_video_cursor_color_key_enable(void); int df_get_alpha_window_configuration(int window, - DF_ALPHA_REGION_PARAMS * alpha_data); + DF_ALPHA_REGION_PARAMS * alpha_data); int df_get_alpha_window_enable(int window); int df_get_video_request(unsigned long *x, unsigned long *y); int df_get_output_color_space(int *color_space); @@ -307,9 +319,9 @@ extern "C" int msr_create_geodelink_table(GEODELINK_NODE * gliu_nodes); int msr_create_device_list(GEODELINK_NODE * gliu_nodes, int max_devices); int msr_read64(unsigned long device, unsigned long msr_register, - Q_WORD * msr_value); + Q_WORD * msr_value); int msr_write64(unsigned long device, unsigned long msr_register, - Q_WORD * msr_value); + Q_WORD * msr_value); /*----------------------------------------*/ /* VIP ROUTINE DEFINITIONS */ @@ -318,15 +330,15 @@ extern "C" int vip_initialize(VIPSETMODEBUFFER * buffer); int vip_update_601_params(VIP_601PARAMS * buffer); int vip_terminate(void); - int vip_configure_capture_buffers(int buffer_type, - VIPINPUTBUFFER * buffer); + int vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer); int vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER * buffer); int vip_max_address_enable(unsigned long max_address, int enable); int vip_set_interrupt_enable(unsigned long mask, int enable); unsigned long vip_get_interrupt_state(void); int vip_set_capture_state(unsigned long state); int vip_set_vsync_error(unsigned long vertical_count, - unsigned long window_before, unsigned long window_after, int enable); + unsigned long window_before, + unsigned long window_after, int enable); int vip_configure_fifo(unsigned long fifo_type, unsigned long fifo_size); int vip_set_loopback_enable(int bEnable); int vip_configure_genlock(VIPGENLOCKBUFFER * buffer); @@ -352,8 +364,7 @@ extern "C" int vip_get_current_mode(VIPSETMODEBUFFER * buffer); int vip_get_601_configuration(VIP_601PARAMS * buffer); - int vip_get_buffer_configuration(int buffer_type, - VIPINPUTBUFFER * buffer); + int vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer); int vip_get_genlock_configuration(VIPGENLOCKBUFFER * buffer); int vip_get_genlock_enable(void); int vip_is_buffer_update_latched(void); @@ -391,5 +402,4 @@ extern "C" #ifdef __cplusplus } #endif - #endif diff --git a/driver/xf86-video-geode/src/cim/cim_vg.c b/driver/xf86-video-geode/src/cim/cim_vg.c index ff24221b0..784519d12 100644 --- a/driver/xf86-video-geode/src/cim/cim_vg.c +++ b/driver/xf86-video-geode/src/cim/cim_vg.c @@ -76,8 +76,8 @@ vg_delay_milliseconds(unsigned long ms) int vg_set_display_mode(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, - int bpp, int hz, unsigned long flags) + unsigned long dst_width, unsigned long dst_height, + int bpp, int hz, unsigned long flags) { VG_QUERY_MODE crt_query; VG_DISPLAY_MODE crt_mode; @@ -130,9 +130,9 @@ vg_set_display_mode(unsigned long src_width, unsigned long src_height, int vg_set_panel_mode(unsigned long src_width, unsigned long src_height, - unsigned long dst_width, unsigned long dst_height, - unsigned long panel_width, unsigned long panel_height, - int bpp, unsigned long flags) + unsigned long dst_width, unsigned long dst_height, + unsigned long panel_width, unsigned long panel_height, + int bpp, unsigned long flags) { unsigned long sync_width; unsigned long sync_offset; @@ -233,8 +233,9 @@ vg_set_panel_mode(unsigned long src_width, unsigned long src_height, int vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, - unsigned long encoder, unsigned long tvres, int bpp, - unsigned long flags, unsigned long h_overscan, unsigned long v_overscan) + unsigned long encoder, unsigned long tvres, int bpp, + unsigned long flags, unsigned long h_overscan, + unsigned long v_overscan) { unsigned long sync_width; unsigned long sync_offset; @@ -260,17 +261,16 @@ vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, */ if (!(*src_width) || !(*src_height)) { - *src_width = CimarronDisplayModes[mode].hactive - - (h_overscan << 1); + *src_width = CimarronDisplayModes[mode].hactive - (h_overscan << 1); *src_height = CimarronDisplayModes[mode].vactive; if (CimarronDisplayModes[mode].flags & VG_MODEFLAG_INTERLACED) { if (((flags & VG_MODEFLAG_INT_OVERRIDE) && - (flags & VG_MODEFLAG_INT_MASK) == - VG_MODEFLAG_INT_LINEDOUBLE) + (flags & VG_MODEFLAG_INT_MASK) == + VG_MODEFLAG_INT_LINEDOUBLE) || (!(flags & VG_MODEFLAG_INT_OVERRIDE) - && (CimarronDisplayModes[mode]. - flags & VG_MODEFLAG_INT_MASK) == + && (CimarronDisplayModes[mode].flags & + VG_MODEFLAG_INT_MASK) == VG_MODEFLAG_INT_LINEDOUBLE)) { if (CimarronDisplayModes[mode].vactive_even > CimarronDisplayModes[mode].vactive) @@ -279,11 +279,13 @@ vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, /* ONLY 1/2 THE OVERSCAN FOR LINE DOUBLED MODES */ *src_height -= v_overscan; - } else { + } + else { *src_height += CimarronDisplayModes[mode].vactive_even; *src_height -= v_overscan << 1; } - } else { + } + else { *src_height -= v_overscan << 1; } @@ -344,7 +346,8 @@ vg_set_tv_mode(unsigned long *src_width, unsigned long *src_height, tv_mode.vsyncstart_even = tv_mode.vblankstart_even + sync_offset; tv_mode.vsyncend_even = tv_mode.vsyncstart_even + sync_width; - } else { + } + else { tv_mode.vactive -= v_overscan << 1; tv_mode.vblankstart = tv_mode.vactive + v_overscan; tv_mode.vblankend = tv_mode.vtotal - v_overscan; @@ -433,7 +436,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) hscale = (mode_params->src_width << 14) / (mode_params->mode_width - 1); irq_ctl |= (DC3_IRQFILT_ALPHA_FILT_EN | DC3_IRQFILT_GFX_FILT_EN); - } else { + } + else { starting_width = mode_params->hactive; hscale = 0x4000; } @@ -443,24 +447,28 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) vscale = (mode_params->src_height << 14) / (mode_params->mode_height - 1); irq_ctl |= (DC3_IRQFILT_ALPHA_FILT_EN | DC3_IRQFILT_GFX_FILT_EN); - } else { + } + else { starting_height = output_height; vscale = 0x4000; } - } else { + } + else { starting_width = mode_params->src_width; starting_height = mode_params->src_height; if (mode_params->src_width != mode_params->hactive) { hscale = (mode_params->src_width << 14) / (mode_params->hactive - 1); irq_ctl |= (DC3_IRQFILT_ALPHA_FILT_EN | DC3_IRQFILT_GFX_FILT_EN); - } else { + } + else { hscale = 0x4000; } if (mode_params->src_height != output_height) { vscale = (mode_params->src_height << 14) / (output_height - 1); irq_ctl |= (DC3_IRQFILT_ALPHA_FILT_EN | DC3_IRQFILT_GFX_FILT_EN); - } else { + } + else { vscale = 0x4000; } } @@ -480,9 +488,9 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) if (mode_params->flags & VG_MODEFLAG_INTERLACED) { if ((((mode_params->flags & VG_MODEFLAG_INT_MASK) == - VG_MODEFLAG_INT_FLICKER) && (mode_params->hactive > 1024)) + VG_MODEFLAG_INT_FLICKER) && (mode_params->hactive > 1024)) || (((mode_params->flags & VG_MODEFLAG_INT_MASK) == - VG_MODEFLAG_INT_ADDRESS) && irq_ctl)) { + VG_MODEFLAG_INT_ADDRESS) && irq_ctl)) { return CIM_STATUS_INVALIDSCALE; } } @@ -536,8 +544,9 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) if ((mode_params->flags & VG_MODEFLAG_INVERT_SHFCLK) && !(temp & DF_PM_INVERT_SHFCLK)) { WRITE_VID32(DF_POWER_MANAGEMENT, (temp | DF_PM_INVERT_SHFCLK)); - } else if (!(mode_params->flags & VG_MODEFLAG_INVERT_SHFCLK) && - (temp & DF_PM_INVERT_SHFCLK)) { + } + else if (!(mode_params->flags & VG_MODEFLAG_INVERT_SHFCLK) && + (temp & DF_PM_INVERT_SHFCLK)) { WRITE_VID32(DF_POWER_MANAGEMENT, (temp & ~DF_PM_INVERT_SHFCLK)); } @@ -552,13 +561,15 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) dith_ctl = DF_DEFAULT_DITHCTL; msr_value.low = DF_DEFAULT_XVGA_PAD_SEL_LOW; msr_value.high = DF_DEFAULT_XVGA_PAD_SEL_HIGH; - } else if (mode_params->flags & VG_MODEFLAG_CUSTOM_PANEL) { + } + else if (mode_params->flags & VG_MODEFLAG_CUSTOM_PANEL) { pmtim1 = mode_params->panel_tim1; pmtim2 = mode_params->panel_tim2; dith_ctl = mode_params->panel_dither_ctl; msr_value.low = mode_params->panel_pad_sel_low; msr_value.high = mode_params->panel_pad_sel_high; - } else { + } + else { pmtim1 = DF_DEFAULT_TFT_PMTIM1; pmtim2 = DF_DEFAULT_TFT_PMTIM2; dith_ctl = DF_DEFAULT_DITHCTL; @@ -585,7 +596,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) msr_write64(MSR_DEVICE_GEODELX_DF, MSR_GEODELINK_CONFIG, &msr_value); - } else if (mode_params->flags & VG_MODEFLAG_TVOUT) { + } + else if (mode_params->flags & VG_MODEFLAG_TVOUT) { vg3_panel_enable = 0; /* SET APPROPRIATE TV OUTPUT MODE */ @@ -607,7 +619,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) msr_value.low = DF_DEFAULT_TV_PAD_SEL_LOW; msr_value.high = DF_DEFAULT_TV_PAD_SEL_HIGH; msr_write64(MSR_DEVICE_GEODELX_DF, DF_MSR_PAD_SEL, &msr_value); - } else { + } + else { vg3_panel_enable = 0; /* SET OUTPUT TO CRT ONLY */ @@ -652,7 +665,7 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) /* DISABLE VG INTERRUPTS */ WRITE_REG32(DC3_IRQ, DC3_IRQ_MASK | DC3_VSYNC_IRQ_MASK | - DC3_IRQ_STATUS | DC3_VSYNC_IRQ_STATUS); + DC3_IRQ_STATUS | DC3_VSYNC_IRQ_STATUS); /* DISABLE GENLOCK */ @@ -663,8 +676,7 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) WRITE_VIP32(VIP_CONTROL1, 0); WRITE_VIP32(VIP_CONTROL2, 0); - WRITE_VIP32(VIP_INTERRUPT, - VIP_ALL_INTERRUPTS | (VIP_ALL_INTERRUPTS >> 16)); + WRITE_VIP32(VIP_INTERRUPT, VIP_ALL_INTERRUPTS | (VIP_ALL_INTERRUPTS >> 16)); /* DISABLE COLOR KEYING * The color key mechanism should be disabled whenever a mode switch @@ -686,8 +698,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) WRITE_VID32(DF_VID_MISC, (misc | DF_DAC_POWER_DOWN)); WRITE_VID32(DF_DISPLAY_CONFIG, - (config & ~(DF_DCFG_DIS_EN | DF_DCFG_HSYNC_EN | - DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN))); + (config & ~(DF_DCFG_DIS_EN | DF_DCFG_HSYNC_EN | + DF_DCFG_VSYNC_EN | DF_DCFG_DAC_BL_EN))); /* DISABLE COMPRESSION */ @@ -715,7 +727,7 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) /* WAIT FOR THE GP TO BE IDLE (JUST IN CASE) */ while (((temp = READ_GP32(GP3_BLT_STATUS)) & GP3_BS_BLT_BUSY) || - !(temp & GP3_BS_CB_EMPTY)) { + !(temp & GP3_BS_CB_EMPTY)) { ; } @@ -752,7 +764,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) WRITE_REG32(DC3_CURS_ST_OFFSET, 0); genlk_ctl = READ_REG32(DC3_GENLK_CTL) & ~(DC3_GC_ALPHA_FLICK_ENABLE | - DC3_GC_FLICKER_FILTER_ENABLE | DC3_GC_FLICKER_FILTER_MASK); + DC3_GC_FLICKER_FILTER_ENABLE | + DC3_GC_FLICKER_FILTER_MASK); /* ENABLE INTERLACING */ @@ -763,7 +776,7 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) VG_MODEFLAG_INT_ADDRESS) irq_ctl |= DC3_IRQFILT_INTL_ADDR; else if ((mode_params->flags & VG_MODEFLAG_INT_MASK) == - VG_MODEFLAG_INT_FLICKER) { + VG_MODEFLAG_INT_FLICKER) { genlk_ctl |= DC3_GC_FLICKER_FILTER_1_8 | DC3_GC_FLICKER_FILTER_ENABLE | DC3_GC_ALPHA_FLICK_ENABLE; } @@ -835,7 +848,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) gcfg |= DC3_GCFG_FDTY; pitch = size; - } else { + } + else { WRITE_REG32(DC3_DV_TOP, 0); } } @@ -866,8 +880,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) /* ENABLE TIMING GENERATOR, TIM. REG. UPDATES, PALETTE BYPASS */ /* AND VERT. INT. SELECT */ - dcfg |= (unsigned long)(DC3_DCFG_TGEN | DC3_DCFG_TRUP | DC3_DCFG_PALB | - DC3_DCFG_VISL); + dcfg |= (unsigned long) (DC3_DCFG_TGEN | DC3_DCFG_TRUP | DC3_DCFG_PALB | + DC3_DCFG_VISL); /* SET FIFO PRIORITIES AND DISPLAY FIFO LOAD ENABLE * Note that the bandwidth setting gets upgraded when scaling or flicker @@ -876,15 +890,16 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) msr_read64(MSR_DEVICE_GEODELX_VG, DC3_SPARE_MSR, &msr_value); msr_value.low &= ~(DC3_SPARE_DISABLE_CFIFO_HGO | - DC3_SPARE_VFIFO_ARB_SELECT | - DC3_SPARE_LOAD_WM_LPEN_MASK | DC3_SPARE_WM_LPEN_OVRD | - DC3_SPARE_DISABLE_INIT_VID_PRI | DC3_SPARE_DISABLE_VFIFO_WM); + DC3_SPARE_VFIFO_ARB_SELECT | + DC3_SPARE_LOAD_WM_LPEN_MASK | DC3_SPARE_WM_LPEN_OVRD | + DC3_SPARE_DISABLE_INIT_VID_PRI | + DC3_SPARE_DISABLE_VFIFO_WM); if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) == - VG_MODEFLAG_HIGH_BAND - || ((mode_params->flags & VG_MODEFLAG_INTERLACED) - && (mode_params->flags & VG_MODEFLAG_INT_MASK) == - VG_MODEFLAG_INT_FLICKER) || (irq_ctl & DC3_IRQFILT_GFX_FILT_EN)) { + VG_MODEFLAG_HIGH_BAND || ((mode_params->flags & VG_MODEFLAG_INTERLACED) + && (mode_params->flags & VG_MODEFLAG_INT_MASK) + == VG_MODEFLAG_INT_FLICKER) || + (irq_ctl & DC3_IRQFILT_GFX_FILT_EN)) { /* HIGH BANDWIDTH */ /* Set agressive watermarks and disallow forced low priority */ @@ -894,8 +909,9 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) msr_value.low |= DC3_SPARE_DISABLE_CFIFO_HGO | DC3_SPARE_VFIFO_ARB_SELECT | DC3_SPARE_WM_LPEN_OVRD; - } else if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) == - VG_MODEFLAG_AVG_BAND) { + } + else if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) == + VG_MODEFLAG_AVG_BAND) { /* AVERAGE BANDWIDTH * Set average watermarks and allow small regions of forced low * priority. @@ -917,8 +933,9 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) temp = 127; acfg |= temp << 9; - } else if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) == - VG_MODEFLAG_LOW_BAND) { + } + else if ((mode_params->flags & VG_MODEFLAG_BANDWIDTHMASK) == + VG_MODEFLAG_LOW_BAND) { /* LOW BANDWIDTH * Set low watermarks and allow larger regions of forced low priority */ @@ -939,7 +956,8 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) temp = 127; acfg |= temp << 9; - } else { + } + else { /* LEGACY CHARACTERISTICS */ /* Arbitration from a single set of watermarks. */ @@ -965,19 +983,17 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) temp = (mode_params->hblankstart - 1) | ((mode_params->hblankend - 1) << 16); WRITE_REG32(DC3_H_BLANK_TIMING, temp); - temp = (mode_params->hsyncstart - 1) | - ((mode_params->hsyncend - 1) << 16); + temp = (mode_params->hsyncstart - 1) | ((mode_params->hsyncend - 1) << 16); WRITE_REG32(DC3_H_SYNC_TIMING, temp); temp = (mode_params->vactive - 1) | ((mode_params->vtotal - 1) << 16); WRITE_REG32(DC3_V_ACTIVE_TIMING, temp); temp = (mode_params->vblankstart - 1) | ((mode_params->vblankend - 1) << 16); WRITE_REG32(DC3_V_BLANK_TIMING, temp); - temp = (mode_params->vsyncstart - 1) | - ((mode_params->vsyncend - 1) << 16); + temp = (mode_params->vsyncstart - 1) | ((mode_params->vsyncend - 1) << 16); WRITE_REG32(DC3_V_SYNC_TIMING, temp); temp = (mode_params->vactive_even - 1) | ((mode_params->vtotal_even - - 1) << 16); + 1) << 16); WRITE_REG32(DC3_V_ACTIVE_EVEN, temp); temp = (mode_params->vblankstart_even - 1) | ((mode_params->vblankend_even - 1) << 16); @@ -993,14 +1009,14 @@ vg_set_custom_mode(VG_DISPLAY_MODE * mode_params, int bpp) /* SET SOURCE DIMENSIONS */ WRITE_REG32(DC3_FB_ACTIVE, ((starting_width - 1) << 16) | - (starting_height - 1)); + (starting_height - 1)); /* SET SYNC POLARITIES */ temp = READ_VID32(DF_DISPLAY_CONFIG); temp &= ~(DF_DCFG_CRT_SYNC_SKW_MASK | DF_DCFG_PWR_SEQ_DLY_MASK | - DF_DCFG_CRT_HSYNC_POL | DF_DCFG_CRT_VSYNC_POL); + DF_DCFG_CRT_HSYNC_POL | DF_DCFG_CRT_VSYNC_POL); temp |= DF_DCFG_CRT_SYNC_SKW_INIT | DF_DCFG_PWR_SEQ_DLY_INIT; @@ -1060,7 +1076,7 @@ vg_set_display_bpp(int bpp) unlock = READ_REG32(DC3_UNLOCK); dcfg = READ_REG32(DC3_DISPLAY_CFG) & ~(DC3_DCFG_DISP_MODE_MASK | - DC3_DCFG_16BPP_MODE_MASK); + DC3_DCFG_16BPP_MODE_MASK); dcfg |= bpp_mask; WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE); @@ -1197,17 +1213,16 @@ vg_get_display_mode_index(VG_QUERY_MODE * query) for (mode = 0; mode < NUM_CIMARRON_DISPLAY_MODES; mode++) { if ((!(query->query_flags & VG_QUERYFLAG_PANEL) || - (CimarronDisplayModes[mode]. - internal_flags & VG_SUPPORTFLAG_PANEL)) + (CimarronDisplayModes[mode].internal_flags & VG_SUPPORTFLAG_PANEL)) && (!(query->query_flags & VG_QUERYFLAG_TVOUT) - || (CimarronDisplayModes[mode]. - internal_flags & VG_SUPPORTFLAG_TVOUT)) + || (CimarronDisplayModes[mode].internal_flags & + VG_SUPPORTFLAG_TVOUT)) && (!(query->query_flags & VG_QUERYFLAG_INTERLACED) - || (CimarronDisplayModes[mode]. - flags & VG_MODEFLAG_INTERLACED) == interlaced) + || (CimarronDisplayModes[mode].flags & VG_MODEFLAG_INTERLACED) + == interlaced) && (!(query->query_flags & VG_QUERYFLAG_HALFCLOCK) - || (CimarronDisplayModes[mode]. - flags & VG_MODEFLAG_HALFCLOCK) == halfclock) + || (CimarronDisplayModes[mode].flags & VG_MODEFLAG_HALFCLOCK) == + halfclock) && (!(query->query_flags & VG_QUERYFLAG_PANELWIDTH) || (CimarronDisplayModes[mode].panel_width == query->panel_width)) @@ -1215,11 +1230,9 @@ vg_get_display_mode_index(VG_QUERY_MODE * query) || (CimarronDisplayModes[mode].panel_height == query->panel_height)) && (!(query->query_flags & VG_QUERYFLAG_ACTIVEWIDTH) - || (CimarronDisplayModes[mode].hactive == - query->active_width)) + || (CimarronDisplayModes[mode].hactive == query->active_width)) && (!(query->query_flags & VG_QUERYFLAG_ACTIVEHEIGHT) - || (CimarronDisplayModes[mode].vactive == - query->active_height)) + || (CimarronDisplayModes[mode].vactive == query->active_height)) && (!(query->query_flags & VG_QUERYFLAG_TOTALWIDTH) || (CimarronDisplayModes[mode].htotal == query->total_width)) && (!(query->query_flags & VG_QUERYFLAG_TOTALHEIGHT) @@ -1231,17 +1244,15 @@ vg_get_display_mode_index(VG_QUERY_MODE * query) && (!(query->query_flags & VG_QUERYFLAG_ENCODER) || (CimarronDisplayModes[mode].internal_flags & enc_flag)) && (!(query->query_flags & VG_QUERYFLAG_TVMODE) - || ((CimarronDisplayModes[mode]. - internal_flags & VG_SUPPORTFLAG_TVMODEMASK) == - tv_flag)) + || + ((CimarronDisplayModes[mode].internal_flags & + VG_SUPPORTFLAG_TVMODEMASK) == tv_flag)) && (!(query->query_flags & VG_QUERYFLAG_PIXELCLOCK) - || (CimarronDisplayModes[mode].frequency == - query->frequency))) { + || (CimarronDisplayModes[mode].frequency == query->frequency))) { /* ALLOW SEARCHING BASED ON AN APPROXIMATE PIXEL CLOCK */ if (query->query_flags & VG_QUERYFLAG_PIXELCLOCK_APPROX) { - diff = query->frequency - - CimarronDisplayModes[mode].frequency; + diff = query->frequency - CimarronDisplayModes[mode].frequency; if (diff < 0) diff = -diff; @@ -1249,7 +1260,8 @@ vg_get_display_mode_index(VG_QUERY_MODE * query) minimum = diff; match = mode; } - } else { + } + else { match = mode; break; } @@ -1417,21 +1429,26 @@ vg_get_current_display_mode(VG_DISPLAY_MODE * current_display, int *bpp) if (temp == DC3_DCFG_DISP_MODE_8BPP) { iflags |= VG_SUPPORTFLAG_8BPP; *bpp = 8; - } else if (temp == DC3_DCFG_DISP_MODE_24BPP) { + } + else if (temp == DC3_DCFG_DISP_MODE_24BPP) { iflags |= VG_SUPPORTFLAG_24BPP; *bpp = 24; - } else if (temp == DC3_DCFG_DISP_MODE_32BPP) { + } + else if (temp == DC3_DCFG_DISP_MODE_32BPP) { iflags |= VG_SUPPORTFLAG_32BPP; *bpp = 32; - } else if (temp == DC3_DCFG_DISP_MODE_16BPP) { + } + else if (temp == DC3_DCFG_DISP_MODE_16BPP) { temp = READ_REG32(DC3_DISPLAY_CFG) & DC3_DCFG_16BPP_MODE_MASK; if (temp == DC3_DCFG_16BPP) { iflags |= VG_SUPPORTFLAG_16BPP; *bpp = 16; - } else if (temp == DC3_DCFG_15BPP) { + } + else if (temp == DC3_DCFG_15BPP) { iflags |= VG_SUPPORTFLAG_15BPP; *bpp = 15; - } else if (temp == DC3_DCFG_12BPP) { + } + else if (temp == DC3_DCFG_12BPP) { iflags |= VG_SUPPORTFLAG_12BPP; *bpp = 12; } @@ -1488,8 +1505,7 @@ vg_get_current_display_mode(VG_DISPLAY_MODE * current_display, int *bpp) p = msr_value.high & 0xF; n = (msr_value.high >> 4) & 0xFF; m = (msr_value.high >> 12) & 0x7; - current_display->frequency = - (0x300000 * (n + 1)) / ((p + 1) * (m + 1)); + current_display->frequency = (0x300000 * (n + 1)) / ((p + 1) * (m + 1)); return CIM_STATUS_INEXACTMATCH; } @@ -1572,13 +1588,14 @@ vg_set_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]) if (!h_taps) { temp0 = CimarronHorizontalGraphicsFilter[i][0]; temp1 = CimarronHorizontalGraphicsFilter[i][1]; - } else { - temp0 = ((unsigned long)h_taps[i][0] & 0x3FF) | - (((unsigned long)h_taps[i][1] & 0x3FF) << 10) | - (((unsigned long)h_taps[i][2] & 0x3FF) << 20); + } + else { + temp0 = ((unsigned long) h_taps[i][0] & 0x3FF) | + (((unsigned long) h_taps[i][1] & 0x3FF) << 10) | + (((unsigned long) h_taps[i][2] & 0x3FF) << 20); - temp1 = ((unsigned long)h_taps[i][3] & 0x3FF) | - (((unsigned long)h_taps[i][4] & 0x3FF) << 10); + temp1 = ((unsigned long) h_taps[i][3] & 0x3FF) | + (((unsigned long) h_taps[i][4] & 0x3FF) << 10); } WRITE_REG32(DC3_FILT_COEFF1, temp0); WRITE_REG32(DC3_FILT_COEFF2, temp1); @@ -1595,10 +1612,11 @@ vg_set_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]) if (!v_taps) { temp0 = CimarronVerticalGraphicsFilter[i]; - } else { - temp0 = ((unsigned long)v_taps[i][0] & 0x3FF) | - (((unsigned long)v_taps[i][1] & 0x3FF) << 10) | - (((unsigned long)v_taps[i][2] & 0x3FF) << 20); + } + else { + temp0 = ((unsigned long) v_taps[i][0] & 0x3FF) | + (((unsigned long) v_taps[i][1] & 0x3FF) << 10) | + (((unsigned long) v_taps[i][2] & 0x3FF) << 20); } WRITE_REG32(DC3_FILT_COEFF1, temp0); @@ -1636,7 +1654,7 @@ vg_configure_flicker_filter(unsigned long flicker_strength, int flicker_alpha) unlock = READ_REG32(DC3_UNLOCK); genlk_ctl = READ_REG32(DC3_GENLK_CTL) & ~(DC3_GC_FLICKER_FILTER_MASK | - DC3_GC_ALPHA_FLICK_ENABLE); + DC3_GC_ALPHA_FLICK_ENABLE); genlk_ctl |= flicker_strength; if (flicker_alpha) genlk_ctl |= DC3_GC_ALPHA_FLICK_ENABLE; @@ -1674,13 +1692,13 @@ vg_set_clock_frequency(unsigned long frequency, unsigned long pll_flags) pll_low = 0; if (!(pll_flags & VG_PLL_MANUAL)) { - min = (long)CimarronPLLFrequencies[0].frequency - (long)frequency; + min = (long) CimarronPLLFrequencies[0].frequency - (long) frequency; if (min < 0L) min = -min; for (i = 1; i < NUM_CIMARRON_PLL_FREQUENCIES; i++) { - diff = (long)CimarronPLLFrequencies[i].frequency - - (long)frequency; + diff = (long) CimarronPLLFrequencies[i].frequency - + (long) frequency; if (diff < 0L) diff = -diff; @@ -1691,7 +1709,8 @@ vg_set_clock_frequency(unsigned long frequency, unsigned long pll_flags) } pll_high = CimarronPLLFrequencies[index].pll_value & 0x00007FFF; - } else { + } + else { pll_high = frequency; } @@ -1713,7 +1732,7 @@ vg_set_clock_frequency(unsigned long frequency, unsigned long pll_flags) if ((msr_value.low & GLCP_DOTPLL_LOCK) && ((msr_value.low & (GLCP_DOTPLL_HALFPIX | GLCP_DOTPLL_BYPASS)) == - pll_low) && (msr_value.high == pll_high)) { + pll_low) && (msr_value.high == pll_high)) { return CIM_STATUS_OK; } @@ -1851,8 +1870,8 @@ vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) long y, yoffset; memoffset = vg3_cursor_offset; - x = xpos - (long)vg3_x_hotspot; - y = ypos - (long)vg3_y_hotspot; + x = xpos - (long) vg3_x_hotspot; + y = ypos - (long) vg3_y_hotspot; /* HANDLE NEGATIVE COORDINATES */ /* This routine supports operating systems that use negative */ @@ -1873,9 +1892,10 @@ vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) if ((vg3_mode_width > vg3_panel_width) || (vg3_mode_height > vg3_panel_height)) { vg_pan_desktop(xpos, ypos, panning); - x = x - (unsigned short)vg3_delta_x; - y = y - (unsigned short)vg3_delta_y; - } else { + x = x - (unsigned short) vg3_delta_x; + y = y - (unsigned short) vg3_delta_y; + } + else { panning->start_x = 0; panning->start_y = 0; panning->start_updated = 0; @@ -1891,21 +1911,23 @@ vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) if (x < 0) { xoffset = -x; x = 0; - } else { + } + else { xoffset = 0; } if (y < 0) { yoffset = -y; y = 0; - } else { + } + else { yoffset = 0; } if (vg3_color_cursor) - memoffset += (unsigned long)yoffset *192; + memoffset += (unsigned long) yoffset *192; else - memoffset += (unsigned long)yoffset << 4; + memoffset += (unsigned long) yoffset << 4; /* SET COLOR CURSOR BIT */ @@ -1921,10 +1943,10 @@ vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) WRITE_REG32(DC3_UNLOCK, DC3_UNLOCK_VALUE); WRITE_REG32(DC3_CURS_ST_OFFSET, memoffset); WRITE_REG32(DC3_GENERAL_CFG, gcfg); - WRITE_REG32(DC3_CURSOR_X, (unsigned long)x | - (((unsigned long)xoffset) << 11)); - WRITE_REG32(DC3_CURSOR_Y, (unsigned long)y | - (((unsigned long)yoffset) << 11)); + WRITE_REG32(DC3_CURSOR_X, (unsigned long) x | + (((unsigned long) xoffset) << 11)); + WRITE_REG32(DC3_CURSOR_Y, (unsigned long) y | + (((unsigned long) yoffset) << 11)); WRITE_REG32(DC3_UNLOCK, unlock); return CIM_STATUS_OK; @@ -1940,7 +1962,8 @@ vg_set_cursor_position(long xpos, long ypos, VG_PANNING_COORDINATES * panning) int vg_set_mono_cursor_shape32(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned long x_hotspot, unsigned long y_hotspot) + unsigned long *xormask, unsigned long x_hotspot, + unsigned long y_hotspot) { int i; @@ -1990,7 +2013,8 @@ vg_set_mono_cursor_shape32(unsigned long memoffset, unsigned long *andmask, int vg_set_mono_cursor_shape64(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned long x_hotspot, unsigned long y_hotspot) + unsigned long *xormask, unsigned long x_hotspot, + unsigned long y_hotspot) { int i; @@ -2032,8 +2056,8 @@ vg_set_mono_cursor_shape64(unsigned long memoffset, unsigned long *andmask, int vg_set_color_cursor_shape(unsigned long memoffset, unsigned char *data, - unsigned long width, unsigned long height, long pitch, - unsigned long x_hotspot, unsigned long y_hotspot) + unsigned long width, unsigned long height, long pitch, + unsigned long x_hotspot, unsigned long y_hotspot) { unsigned long y; @@ -2081,7 +2105,7 @@ vg_set_color_cursor_shape(unsigned long memoffset, unsigned char *data, int vg_pan_desktop(unsigned long x, unsigned long y, - VG_PANNING_COORDINATES * panning) + VG_PANNING_COORDINATES * panning) { unsigned long modeShiftPerPixel; unsigned long modeBytesPerScanline; @@ -2162,7 +2186,7 @@ vg_set_display_offset(unsigned long address) if (READ_REG32(DC3_GENERAL_CFG) & DC3_GCFG_CMPE) { gcfg = READ_REG32(DC3_GENERAL_CFG); WRITE_REG32(DC3_GENERAL_CFG, - (gcfg & ~(DC3_GCFG_CMPE | DC3_GCFG_DECE))); + (gcfg & ~(DC3_GCFG_CMPE | DC3_GCFG_DECE))); } } @@ -2203,24 +2227,28 @@ vg_set_display_pitch(unsigned long pitch) if (pitch > 4096) { dvsize = DC3_DV_LINE_SIZE_8192; - } else if (pitch > 2048) { + } + else if (pitch > 2048) { dvsize = DC3_DV_LINE_SIZE_4096; - } else if (pitch > 1024) { + } + else if (pitch > 1024) { dvsize = DC3_DV_LINE_SIZE_2048; - } else { + } + else { dvsize = DC3_DV_LINE_SIZE_1024; } temp = READ_REG32(DC3_DV_CTL); WRITE_REG32(DC3_DV_CTL, - (temp & ~DC3_DV_LINE_SIZE_MASK) | dvsize | 0x00000001); + (temp & ~DC3_DV_LINE_SIZE_MASK) | dvsize | 0x00000001); value = READ_REG32(DC3_GENERAL_CFG); if (pitch == 1024 || pitch == 2048 || pitch == 4096 || pitch == 8192) { value &= ~DC3_GCFG_FDTY; dvtop = 0; - } else { + } + else { value |= DC3_GCFG_FDTY; dvtop = (READ_REG32(DC3_FB_ACTIVE) & 0xFFF) + 1; @@ -2339,7 +2367,8 @@ vg_set_compression_enable(int enable) /* ENABLE COMPRESSION BITS */ gcfg |= DC3_GCFG_CMPE | DC3_GCFG_DECE; - } else { + } + else { gcfg &= ~(DC3_GCFG_CMPE | DC3_GCFG_DECE); } @@ -2442,8 +2471,8 @@ int vg_wait_vertical_blank(void) { if (vg_test_timing_active()) { - while (!vg_test_vertical_active()) ; - while (vg_test_vertical_active()) ; + while (!vg_test_vertical_active()); + while (vg_test_vertical_active()); } return CIM_STATUS_OK; } @@ -2494,7 +2523,8 @@ vg_configure_line_interrupt(VG_INTERRUPT_PARAMS * interrupt_info) if (interrupt_info->enable) { WRITE_REG32(DC3_IRQ_FILT_CTL, irq_line); WRITE_REG32(DC3_IRQ, ((irq_enable & ~DC3_IRQ_MASK) | DC3_IRQ_STATUS)); - } else { + } + else { WRITE_REG32(DC3_IRQ, (irq_enable | DC3_IRQ_MASK)); WRITE_REG32(DC3_IRQ_FILT_CTL, irq_line); } @@ -2680,17 +2710,15 @@ vg_save_state(VG_SAVE_RESTORE * vg_state) /* READ ALL VG MSRS */ - msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CAP, - &(vg_state->msr_cap)); + msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CAP, &(vg_state->msr_cap)); msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CONFIG, - &(vg_state->msr_config)); - msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_SMI, - &(vg_state->msr_smi)); + &(vg_state->msr_config)); + msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_SMI, &(vg_state->msr_smi)); msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_ERROR, - &(vg_state->msr_error)); + &(vg_state->msr_error)); msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_PM, &(vg_state->msr_pm)); msr_read64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_DIAG, - &(vg_state->msr_diag)); + &(vg_state->msr_diag)); msr_read64(MSR_DEVICE_GEODELX_VG, DC3_SPARE_MSR, &(vg_state->msr_spare)); msr_read64(MSR_DEVICE_GEODELX_VG, DC3_RAM_CTL, &(vg_state->msr_ram_ctl)); @@ -2799,8 +2827,8 @@ vg_restore_state(VG_SAVE_RESTORE * vg_state) /* RESTORE THE CURSOR DATA */ memoffset = READ_REG32(DC3_CURS_ST_OFFSET) & 0x0FFFFFFF; - WRITE_FB_STRING32(memoffset, (unsigned char *)&(vg_state->cursor_data[0]), - 3072); + WRITE_FB_STRING32(memoffset, (unsigned char *) &(vg_state->cursor_data[0]), + 3072); /* RESTORE THE PLL */ /* Use a common routine to use common code to poll for lock bit */ @@ -2809,17 +2837,15 @@ vg_restore_state(VG_SAVE_RESTORE * vg_state) /* RESTORE ALL VG MSRS */ - msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CAP, - &(vg_state->msr_cap)); + msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CAP, &(vg_state->msr_cap)); msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_CONFIG, - &(vg_state->msr_config)); - msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_SMI, - &(vg_state->msr_smi)); + &(vg_state->msr_config)); + msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_SMI, &(vg_state->msr_smi)); msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_ERROR, - &(vg_state->msr_error)); + &(vg_state->msr_error)); msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_PM, &(vg_state->msr_pm)); msr_write64(MSR_DEVICE_GEODELX_VG, MSR_GEODELINK_DIAG, - &(vg_state->msr_diag)); + &(vg_state->msr_diag)); msr_write64(MSR_DEVICE_GEODELX_VG, DC3_SPARE_MSR, &(vg_state->msr_spare)); msr_write64(MSR_DEVICE_GEODELX_VG, DC3_RAM_CTL, &(vg_state->msr_ram_ctl)); @@ -2901,9 +2927,10 @@ vg_read_graphics_crc(int crc_source) do { line = READ_REG32(DC3_LINE_CNT_STATUS); } while ((line & DC3_LNCNT_EVEN_FIELD) != field || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 10 || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 15); - } else { + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 10 || + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 15); + } + else { /* NON-INTERLACED - EVEN FIELD CRCS ARE INVALID */ if (crc_source & VG_CRC_SOURCE_EVEN) @@ -2917,7 +2944,7 @@ vg_read_graphics_crc(int crc_source) /* WAIT FOR THE CRC TO BE COMPLETED */ - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_SIGC)) ; + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_SIGC)); /* READ THE COMPLETED CRC */ @@ -2941,7 +2968,7 @@ vg_read_graphics_crc(int crc_source) unsigned long vg_read_window_crc(int crc_source, unsigned long x, unsigned long y, - unsigned long width, unsigned long height) + unsigned long width, unsigned long height) { Q_WORD msr_value; unsigned long crc = 0; @@ -3242,8 +3269,9 @@ vg_read_window_crc(int crc_source, unsigned long x, unsigned long y, msr_value.high = 0x00000000; msr_value.low = 0x002055AA; msr_write64(MSR_DEVICE_GEODELX_GLCP, GLCP_H0CTL + 3, &msr_value); - } else if (crc_source == VG_CRC_SOURCE_PREFLICKER - || crc_source == VG_CRC_SOURCE_PREFLICKER_EVEN) { + } + else if (crc_source == VG_CRC_SOURCE_PREFLICKER + || crc_source == VG_CRC_SOURCE_PREFLICKER_EVEN) { diag = 0x801F8032; /* ENABLE HW CLOCK GATING AND SET GLCP CLOCK TO GEODELINK CLOCK */ @@ -3276,7 +3304,8 @@ vg_read_window_crc(int crc_source, unsigned long x, unsigned long y, msr_value.high = 0x00000000; msr_value.low = 0x002D55AA; msr_write64(MSR_DEVICE_GEODELX_GLCP, GLCP_H0CTL + 3, &msr_value); - } else { + } + else { /* PREFILTER CRC */ diag = 0x80138048; @@ -3335,9 +3364,10 @@ vg_read_window_crc(int crc_source, unsigned long x, unsigned long y, do { line = READ_REG32(DC3_LINE_CNT_STATUS); } while ((line & DC3_LNCNT_EVEN_FIELD) != field || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 1 || - ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 5); - } else { + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) < 1 || + ((line & DC3_LNCNT_V_LINE_CNT) >> 16) > 5); + } + else { /* NON-INTERLACED - EVEN FIELD CRCS ARE INVALID */ if (crc_source & VG_CRC_SOURCE_EVEN) @@ -3362,11 +3392,11 @@ vg_read_window_crc(int crc_source, unsigned long x, unsigned long y, /* DELAY TWO FRAMES */ - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)) ; - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)) ; - while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA) ; + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)); + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA)); + while (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_VNA); /* VERIFY THAT XSTATE = 11 */ @@ -3468,8 +3498,7 @@ vg_get_scaler_filter_coefficients(long h_taps[][5], long v_taps[][3]) *--------------------------------------------------------------------------*/ int -vg_get_flicker_filter_configuration(unsigned long *strength, - int *flicker_alpha) +vg_get_flicker_filter_configuration(unsigned long *strength, int *flicker_alpha) { unsigned long genlk_ctl; @@ -3530,7 +3559,7 @@ vg_get_current_vline(void) current_line = READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_V_LINE_CNT; } while (current_line != - (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_V_LINE_CNT)); + (READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_V_LINE_CNT)); return (current_line >> 16); } @@ -3661,7 +3690,7 @@ vg_get_compression_info(VG_COMPRESSION_DATA * comp_data) comp_data->compression_offset = READ_REG32(DC3_CB_ST_OFFSET) & 0x0FFFFFFF; comp_data->pitch = (READ_REG32(DC3_GFX_PITCH) >> 13) & 0x7FFF8; comp_data->size = ((READ_REG32(DC3_LINE_SIZE) >> (DC3_LINE_SIZE_CB_SHIFT - - 3)) & 0x3F8) + 24; + 3)) & 0x3F8) + 24; return CIM_STATUS_OK; } diff --git a/driver/xf86-video-geode/src/cim/cim_vip.c b/driver/xf86-video-geode/src/cim/cim_vip.c index 025449bad..a88b65f41 100644 --- a/driver/xf86-video-geode/src/cim/cim_vip.c +++ b/driver/xf86-video-geode/src/cim/cim_vip.c @@ -66,13 +66,15 @@ vip_initialize(VIPSETMODEBUFFER * buffer) if (buffer->planar_capture == VIP_420CAPTURE_EVERYLINE) { vip_control1 |= VIP_CONTROL1_DISABLE_DECIMATION; - } else if (buffer->planar_capture == VIP_420CAPTURE_ALTERNATINGFIELDS) { + } + else if (buffer->planar_capture == VIP_420CAPTURE_ALTERNATINGFIELDS) { if (buffer->flags & VIP_MODEFLAG_PROGRESSIVE) return CIM_STATUS_INVALIDPARAMS; vip_control1 |= VIP_CONTROL1_DISABLE_DECIMATION; vip_control3 |= VIP_CONTROL3_DECIMATE_EVEN; - } else if (buffer->planar_capture != VIP_420CAPTURE_ALTERNATINGLINES) + } + else if (buffer->planar_capture != VIP_420CAPTURE_ALTERNATINGLINES) return CIM_STATUS_INVALIDPARAMS; /* CONFIGURE THE VIDEO FIFO THRESHOLD BASED ON THE FIFO DEPTH */ @@ -80,7 +82,8 @@ vip_initialize(VIPSETMODEBUFFER * buffer) vip_control2 |= VIP_CONTROL2_DEFAULT_VIDTH_420 << VIP_CONTROL2_VIDTH_SHIFT; - } else { + } + else { vip_control2 |= VIP_CONTROL2_DEFAULT_VIDTH_422 << VIP_CONTROL2_VIDTH_SHIFT; } @@ -104,13 +107,13 @@ vip_initialize(VIPSETMODEBUFFER * buffer) } if ((buffer->operating_mode == VIP_MODE_MSG || - buffer->operating_mode == VIP_MODE_DATA) && + buffer->operating_mode == VIP_MODE_DATA) && (buffer->flags & VIP_MODEFLAG_FLIPMESSAGEWHENFULL)) { vip_control1 |= VIP_CONTROL1_MSG_STRM_CTRL; } else if (buffer->operating_mode == VIP_MODE_VIP2_8BIT || - buffer->operating_mode == VIP_MODE_VIP2_16BIT) { + buffer->operating_mode == VIP_MODE_VIP2_16BIT) { if (buffer->flags & VIP_MODEFLAG_ENABLEREPEATFLAG) vip_control2 |= VIP_CONTROL2_REPEAT_ENABLE; if (buffer->flags & VIP_MODEFLAG_INVERTTASKPOLARITY) @@ -172,13 +175,13 @@ vip_update_601_params(VIP_601PARAMS * buffer) WRITE_VIP32(VIP_601_VBI_START, buffer->vbi_start); WRITE_VIP32(VIP_601_VBI_END, buffer->vbi_start + buffer->vbi_height - 1); WRITE_VIP32(VIP_601_EVEN_START_STOP, - buffer->vert_start_even | ((buffer->vert_start_even + - buffer->even_height - 1) << 16)); + buffer->vert_start_even | ((buffer->vert_start_even + + buffer->even_height - 1) << 16)); WRITE_VIP32(VIP_601_ODD_START_STOP, - buffer->vert_start_odd | ((buffer->vert_start_odd + - buffer->odd_height - 1) << 16)); + buffer->vert_start_odd | ((buffer->vert_start_odd + + buffer->odd_height - 1) << 16)); WRITE_VIP32(VIP_ODD_FIELD_DETECT, - buffer->odd_detect_start | (buffer->odd_detect_end << 16)); + buffer->odd_detect_start | (buffer->odd_detect_end << 16)); /* SPECIAL CASE FOR HORIZONTAL DATA * 601 horizontal parameters are based on the number of clocks and not @@ -187,7 +190,7 @@ vip_update_601_params(VIP_601PARAMS * buffer) if ((vip_control1 & VIP_CONTROL1_MODE_MASK) == VIP_MODE_16BIT601) WRITE_VIP32(VIP_601_HORZ_END, - buffer->horz_start + (buffer->width << 1) + 3); + buffer->horz_start + (buffer->width << 1) + 3); else WRITE_VIP32(VIP_601_HORZ_END, buffer->horz_start + buffer->width + 3); @@ -225,24 +228,22 @@ vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer) /* SET VIDEO PITCH */ WRITE_VIP32(VIP_TASKA_VID_PITCH, - offsets->y_pitch | (offsets->uv_pitch << 16)); + offsets->y_pitch | (offsets->uv_pitch << 16)); /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->even_base[cur_buffer]); - WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); if (buffer->flags & VIP_INPUTFLAG_VBI) { WRITE_VIP32(VIP_TASKA_VBI_ODD_BASE, offsets->vbi_even_base); WRITE_VIP32(VIP_TASKA_VBI_EVEN_BASE, offsets->vbi_odd_base); } - } else { - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); + } + else { + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->odd_base[cur_buffer]); WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); + offsets->even_base[cur_buffer]); if (buffer->flags & VIP_INPUTFLAG_VBI) { WRITE_VIP32(VIP_TASKA_VBI_ODD_BASE, offsets->vbi_odd_base); WRITE_VIP32(VIP_TASKA_VBI_EVEN_BASE, offsets->vbi_even_base); @@ -257,30 +258,29 @@ vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer) WRITE_VIP32(VIP_TASKA_U_EVEN_OFFSET, offsets->even_uoffset); WRITE_VIP32(VIP_TASKA_V_EVEN_OFFSET, offsets->even_voffset); } - } else if (buffer_type == VIP_BUFFER_B) { + } + else if (buffer_type == VIP_BUFFER_B) { offsets = &buffer->offsets[VIP_BUFFER_TASK_B]; /* SET VIDEO PITCH */ WRITE_VIP32(VIP_TASKB_VID_PITCH, - offsets->y_pitch | (offsets->uv_pitch << 16)); + offsets->y_pitch | (offsets->uv_pitch << 16)); /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->even_base[cur_buffer]); - WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); if (buffer->flags & VIP_INPUTFLAG_VBI) { WRITE_VIP32(VIP_TASKB_VBI_ODD_BASE, offsets->vbi_even_base); WRITE_VIP32(VIP_TASKB_VBI_EVEN_BASE, offsets->vbi_odd_base); } - } else { - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); + } + else { + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->odd_base[cur_buffer]); WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); + offsets->even_base[cur_buffer]); if (buffer->flags & VIP_INPUTFLAG_VBI) { WRITE_VIP32(VIP_TASKB_VBI_ODD_BASE, offsets->vbi_odd_base); WRITE_VIP32(VIP_TASKB_VBI_EVEN_BASE, offsets->vbi_even_base); @@ -293,11 +293,13 @@ vip_configure_capture_buffers(int buffer_type, VIPINPUTBUFFER * buffer) WRITE_VIP32(VIP_TASKB_U_OFFSET, offsets->odd_uoffset); WRITE_VIP32(VIP_TASKB_V_OFFSET, offsets->odd_voffset); } - } else if (buffer_type == VIP_BUFFER_ANC || buffer_type == VIP_BUFFER_MSG) { + } + else if (buffer_type == VIP_BUFFER_ANC || buffer_type == VIP_BUFFER_MSG) { WRITE_VIP32(VIP_ANC_MSG1_BASE, buffer->ancillaryData.msg1_base); WRITE_VIP32(VIP_ANC_MSG2_BASE, buffer->ancillaryData.msg2_base); WRITE_VIP32(VIP_ANC_MSG_SIZE, buffer->ancillaryData.msg_size); - } else { + } + else { return CIM_STATUS_INVALIDPARAMS; } @@ -325,77 +327,73 @@ vip_toggle_video_offsets(int buffer_type, VIPINPUTBUFFER * buffer) /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->even_base[cur_buffer]); - WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); - } else { - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); + } + else { + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->odd_base[cur_buffer]); WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); + offsets->even_base[cur_buffer]); } - } else if (buffer_type == VIP_BUFFER_B) { + } + else if (buffer_type == VIP_BUFFER_B) { offsets = &buffer->offsets[VIP_BUFFER_TASK_B]; /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->even_base[cur_buffer]); - WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); - } else { - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); + } + else { + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->odd_base[cur_buffer]); WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); + offsets->even_base[cur_buffer]); } - } else if (buffer_type == VIP_BUFFER_A_ODD) { + } + else if (buffer_type == VIP_BUFFER_A_ODD) { offsets = &buffer->offsets[VIP_BUFFER_TASK_A]; /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->even_base[cur_buffer]); else - WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); - } else if (buffer_type == VIP_BUFFER_A_EVEN) { + WRITE_VIP32(VIP_TASKA_VID_ODD_BASE, offsets->odd_base[cur_buffer]); + } + else if (buffer_type == VIP_BUFFER_A_EVEN) { offsets = &buffer->offsets[VIP_BUFFER_TASK_A]; /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) - WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); else WRITE_VIP32(VIP_TASKA_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); - } else if (buffer_type == VIP_BUFFER_B_ODD) { + offsets->even_base[cur_buffer]); + } + else if (buffer_type == VIP_BUFFER_B_ODD) { offsets = &buffer->offsets[VIP_BUFFER_TASK_B]; /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->even_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->even_base[cur_buffer]); else - WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, - offsets->odd_base[cur_buffer]); - } else if (buffer_type == VIP_BUFFER_B_EVEN) { + WRITE_VIP32(VIP_TASKB_VID_ODD_BASE, offsets->odd_base[cur_buffer]); + } + else if (buffer_type == VIP_BUFFER_B_EVEN) { offsets = &buffer->offsets[VIP_BUFFER_TASK_B]; /* SET BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) - WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->odd_base[cur_buffer]); + WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, offsets->odd_base[cur_buffer]); else WRITE_VIP32(VIP_TASKB_VID_EVEN_BASE, - offsets->even_base[cur_buffer]); - } else + offsets->even_base[cur_buffer]); + } + else return CIM_STATUS_INVALIDPARAMS; return CIM_STATUS_OK; @@ -450,8 +448,7 @@ vip_terminate(void) /* DISABLE AND CLEAR ALL VIP INTERRUPTS */ - WRITE_VIP32(VIP_INTERRUPT, VIP_ALL_INTERRUPTS | - (VIP_ALL_INTERRUPTS >> 16)); + WRITE_VIP32(VIP_INTERRUPT, VIP_ALL_INTERRUPTS | (VIP_ALL_INTERRUPTS >> 16)); /* DISABLE VIP CAPTURE */ /* We will try to let the VIP FIFO flush before shutting it down. */ @@ -575,7 +572,7 @@ vip_set_interrupt_enable(unsigned long mask, int enable) int vip_set_vsync_error(unsigned long vertical_count, unsigned long window_before, - unsigned long window_after, int enable) + unsigned long window_after, int enable) { unsigned long vip_control2 = READ_VIP32(VIP_CONTROL2); unsigned long temp; @@ -589,14 +586,15 @@ vip_set_vsync_error(unsigned long vertical_count, unsigned long window_before, */ temp = ((window_before + - window_after) << VIP_VSYNC_ERR_WINDOW_SHIFT) & + window_after) << VIP_VSYNC_ERR_WINDOW_SHIFT) & VIP_VSYNC_ERR_WINDOW_MASK; temp |= (vertical_count - window_before) & VIP_VSYNC_ERR_COUNT_MASK; vip_control2 |= VIP_CONTROL2_VERTERROR_ENABLE; WRITE_VIP32(VIP_VSYNC_ERR_COUNT, temp); - } else { + } + else { vip_control2 &= ~VIP_CONTROL2_VERTERROR_ENABLE; } WRITE_VIP32(VIP_CONTROL2, vip_control2); @@ -624,7 +622,8 @@ vip_max_address_enable(unsigned long max_address, int enable) vip_control2 |= VIP_CONTROL2_ADD_ERROR_ENABLE; WRITE_VIP32(VIP_MAX_ADDRESS, max_address & VIP_MAXADDR_MASK); - } else { + } + else { /* DISABLE DETECTION */ vip_control2 &= ~VIP_CONTROL2_ADD_ERROR_ENABLE; @@ -792,12 +791,12 @@ vip_set_priority_characteristics(VIPPRIORITYBUFFER * buffer) q_word.low = q_word.high = 0; q_word.low |= (buffer->secondary << - VIP_MSR_MCR_SECOND_PRIORITY_SHIFT) & VIP_MSR_MCR_SECOND_PRIORITY_MASK; - q_word.low |= (buffer->primary << - VIP_MSR_MCR_PRIMARY_PRIORITY_SHIFT) & + VIP_MSR_MCR_SECOND_PRIORITY_SHIFT) & + VIP_MSR_MCR_SECOND_PRIORITY_MASK; + q_word.low |= + (buffer->primary << VIP_MSR_MCR_PRIMARY_PRIORITY_SHIFT) & VIP_MSR_MCR_PRIMARY_PRIORITY_MASK; - q_word.low |= (buffer->pid << VIP_MSR_MCR_PID_SHIFT) & - VIP_MSR_MCR_PID_MASK; + q_word.low |= (buffer->pid << VIP_MSR_MCR_PID_SHIFT) & VIP_MSR_MCR_PID_MASK; msr_write64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_CONFIG, &q_word); @@ -822,12 +821,10 @@ vip_set_debug_characteristics(VIPDEBUGBUFFER * buffer) q_word.high |= (buffer->bist << VIP_MSR_DIAG_BIST_SHIFT) & VIP_MSR_DIAG_BIST_WMASK; - q_word.low |= (buffer->enable_upper ? - VIP_MSR_DIAG_MSB_ENABLE : 0x00000000); + q_word.low |= (buffer->enable_upper ? VIP_MSR_DIAG_MSB_ENABLE : 0x00000000); q_word.low |= (buffer->select_upper << VIP_MSR_DIAG_SEL_UPPER_SHIFT) & VIP_MSR_DIAG_SEL_UPPER_MASK; - q_word.low |= (buffer->enable_lower ? - VIP_MSR_DIAG_LSB_ENABLE : 0x00000000); + q_word.low |= (buffer->enable_lower ? VIP_MSR_DIAG_LSB_ENABLE : 0x00000000); q_word.low |= (buffer->select_lower << VIP_MSR_DIAG_SEL_LOWER_SHIFT) & VIP_MSR_DIAG_SEL_LOWER_MASK; @@ -871,7 +868,7 @@ int vip_set_interrupt_line(int line) { WRITE_VIP32(VIP_CURRENT_TARGET, - (line << VIP_CTARGET_TLINE_SHIFT) & VIP_CTARGET_TLINE_MASK); + (line << VIP_CTARGET_TLINE_SHIFT) & VIP_CTARGET_TLINE_MASK); return CIM_STATUS_OK; } @@ -922,14 +919,16 @@ vip_set_subwindow_enable(VIPSUBWINDOWBUFFER * buffer) /* WRITE THE WINDOW VALUE */ WRITE_VIP32(VIP_VERTICAL_START_STOP, ((buffer->stop << - VIP_VSTART_VERTEND_SHIFT) & - VIP_VSTART_VERTEND_MASK) | ((buffer->start << - VIP_VSTART_VERTSTART_SHIFT) & VIP_VSTART_VERTSTART_MASK)); + VIP_VSTART_VERTEND_SHIFT) & + VIP_VSTART_VERTEND_MASK) | + ((buffer->start << VIP_VSTART_VERTSTART_SHIFT) & + VIP_VSTART_VERTSTART_MASK)); /* ENABLE IN THE CONTROL REGISTER */ vip_control2 |= VIP_CONTROL2_SWC_ENABLE; - } else { + } + else { /* DISABLE SUBWINDOW CAPTURE IN THE CONTROL REGISTER */ vip_control2 &= ~VIP_CONTROL2_SWC_ENABLE; @@ -1009,13 +1008,13 @@ vip_save_state(VIPSTATEBUFFER * save_buffer) /* READ ALL VIP MSRS */ msr_read64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_CONFIG, - &(save_buffer->msr_config)); + &(save_buffer->msr_config)); msr_read64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_SMI, - &(save_buffer->msr_smi)); + &(save_buffer->msr_smi)); msr_read64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_PM, - &(save_buffer->msr_pm)); + &(save_buffer->msr_pm)); msr_read64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_DIAG, - &(save_buffer->msr_diag)); + &(save_buffer->msr_diag)); return CIM_STATUS_OK; } @@ -1064,13 +1063,13 @@ vip_restore_state(VIPSTATEBUFFER * restore_buffer) /* RESTORE THE VIP MSRS */ msr_write64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_CONFIG, - &(restore_buffer->msr_config)); + &(restore_buffer->msr_config)); msr_write64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_SMI, - &(restore_buffer->msr_smi)); + &(restore_buffer->msr_smi)); msr_write64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_PM, - &(restore_buffer->msr_pm)); + &(restore_buffer->msr_pm)); msr_write64(MSR_DEVICE_GEODELX_VIP, MSR_GEODELINK_DIAG, - &(restore_buffer->msr_diag)); + &(restore_buffer->msr_diag)); /* RESTORE THE CONTROL WORDS LAST */ @@ -1185,7 +1184,8 @@ vip_get_current_mode(VIPSETMODEBUFFER * buffer) buffer->planar_capture = VIP_420CAPTURE_ALTERNATINGFIELDS; else buffer->planar_capture = VIP_420CAPTURE_EVERYLINE; - } else + } + else buffer->planar_capture = VIP_420CAPTURE_ALTERNATINGLINES; } @@ -1257,10 +1257,9 @@ vip_get_601_configuration(VIP_601PARAMS * buffer) if ((vip_control1 & VIP_CONTROL1_MODE_MASK) == VIP_MODE_16BIT601) buffer->width = (READ_VIP32(VIP_601_HORZ_END) - - buffer->horz_start - 3) >> 1; + buffer->horz_start - 3) >> 1; else - buffer->width = (READ_VIP32(VIP_601_HORZ_END) - - buffer->horz_start - 3); + buffer->width = (READ_VIP32(VIP_601_HORZ_END) - buffer->horz_start - 3); return CIM_STATUS_OK; } @@ -1293,20 +1292,18 @@ vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) /* READ BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - offsets->even_base[cur_buffer] = - READ_VIP32(VIP_TASKA_VID_ODD_BASE); - offsets->odd_base[cur_buffer] = - READ_VIP32(VIP_TASKA_VID_EVEN_BASE); + offsets->even_base[cur_buffer] = READ_VIP32(VIP_TASKA_VID_ODD_BASE); + offsets->odd_base[cur_buffer] = READ_VIP32(VIP_TASKA_VID_EVEN_BASE); if (buffer->flags & VIP_INPUTFLAG_VBI) { offsets->vbi_even_base = READ_VIP32(VIP_TASKA_VBI_ODD_BASE); offsets->vbi_odd_base = READ_VIP32(VIP_TASKA_VBI_EVEN_BASE); } - } else { + } + else { offsets->even_base[cur_buffer] = READ_VIP32(VIP_TASKA_VID_EVEN_BASE); - offsets->odd_base[cur_buffer] = - READ_VIP32(VIP_TASKA_VID_ODD_BASE); + offsets->odd_base[cur_buffer] = READ_VIP32(VIP_TASKA_VID_ODD_BASE); if (buffer->flags & VIP_INPUTFLAG_VBI) { offsets->vbi_even_base = READ_VIP32(VIP_TASKA_VBI_EVEN_BASE); @@ -1322,7 +1319,8 @@ vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) offsets->even_uoffset = READ_VIP32(VIP_TASKA_U_EVEN_OFFSET); offsets->even_voffset = READ_VIP32(VIP_TASKA_V_EVEN_OFFSET); } - } else if (buffer_type == VIP_BUFFER_B) { + } + else if (buffer_type == VIP_BUFFER_B) { offsets = &buffer->offsets[VIP_BUFFER_TASK_B]; /* READ VIDEO PITCH */ @@ -1333,20 +1331,18 @@ vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) /* READ BASE OFFSETS */ if (buffer->flags & VIP_INPUTFLAG_INVERTPOLARITY) { - offsets->even_base[cur_buffer] = - READ_VIP32(VIP_TASKB_VID_ODD_BASE); - offsets->odd_base[cur_buffer] = - READ_VIP32(VIP_TASKB_VID_EVEN_BASE); + offsets->even_base[cur_buffer] = READ_VIP32(VIP_TASKB_VID_ODD_BASE); + offsets->odd_base[cur_buffer] = READ_VIP32(VIP_TASKB_VID_EVEN_BASE); if (buffer->flags & VIP_INPUTFLAG_VBI) { offsets->vbi_even_base = READ_VIP32(VIP_TASKB_VBI_ODD_BASE); offsets->vbi_odd_base = READ_VIP32(VIP_TASKB_VBI_EVEN_BASE); } - } else { + } + else { offsets->even_base[cur_buffer] = READ_VIP32(VIP_TASKB_VID_EVEN_BASE); - offsets->odd_base[cur_buffer] = - READ_VIP32(VIP_TASKB_VID_ODD_BASE); + offsets->odd_base[cur_buffer] = READ_VIP32(VIP_TASKB_VID_ODD_BASE); if (buffer->flags & VIP_INPUTFLAG_VBI) { offsets->vbi_even_base = READ_VIP32(VIP_TASKB_VBI_EVEN_BASE); @@ -1360,11 +1356,13 @@ vip_get_buffer_configuration(int buffer_type, VIPINPUTBUFFER * buffer) offsets->odd_uoffset = READ_VIP32(VIP_TASKB_U_OFFSET); offsets->odd_voffset = READ_VIP32(VIP_TASKB_V_OFFSET); } - } else if (buffer_type == VIP_BUFFER_ANC || buffer_type == VIP_BUFFER_MSG) { + } + else if (buffer_type == VIP_BUFFER_ANC || buffer_type == VIP_BUFFER_MSG) { buffer->ancillaryData.msg1_base = READ_VIP32(VIP_ANC_MSG1_BASE); buffer->ancillaryData.msg2_base = READ_VIP32(VIP_ANC_MSG2_BASE); buffer->ancillaryData.msg_size = READ_VIP32(VIP_ANC_MSG_SIZE); - } else { + } + else { return CIM_STATUS_INVALIDPARAMS; } @@ -1450,7 +1448,7 @@ unsigned long vip_get_capture_state(void) { return ((READ_VIP32(VIP_CONTROL1) & VIP_CONTROL1_RUNMODE_MASK) >> - VIP_CONTROL1_RUNMODE_SHIFT); + VIP_CONTROL1_RUNMODE_SHIFT); } /*--------------------------------------------------------------------------- @@ -1569,8 +1567,8 @@ vip_get_power_characteristics(VIPPOWERBUFFER * buffer) /* DECODE THE CLOCK GATING BITS */ - buffer->glink_clock_mode = (int)(q_word.low & VIP_MSR_POWER_GLINK); - buffer->vip_clock_mode = (int)(q_word.low & VIP_MSR_POWER_CLOCK); + buffer->glink_clock_mode = (int) (q_word.low & VIP_MSR_POWER_GLINK); + buffer->vip_clock_mode = (int) (q_word.low & VIP_MSR_POWER_CLOCK); return CIM_STATUS_OK; } diff --git a/driver/xf86-video-geode/src/cim/cim_vop.c b/driver/xf86-video-geode/src/cim/cim_vop.c index 4b83c0314..5a8599896 100644 --- a/driver/xf86-video-geode/src/cim/cim_vop.c +++ b/driver/xf86-video-geode/src/cim/cim_vop.c @@ -73,11 +73,12 @@ vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer) return CIM_STATUS_INVALIDPARAMS; hstart = buffer->horz_start + hsyncstart; - } else { + } + else { /* VERIFY THAT THE INPUT IS VALID */ - if (buffer->horz_start < ((long)hsyncstart - (long)htotal) || - buffer->horz_start > (long)hsyncstart || + if (buffer->horz_start < ((long) hsyncstart - (long) htotal) || + buffer->horz_start > (long) hsyncstart || buffer->vbi_width > htotal) { return CIM_STATUS_INVALIDPARAMS; } @@ -93,17 +94,20 @@ vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer) hstart--; hstop--; WRITE_REG32(DC3_VBI_HOR, ((hstop << DC3_VBI_HOR_END_SHIFT) & - DC3_VBI_HOR_END_MASK) | (hstart & DC3_VBI_HOR_START_MASK)); + DC3_VBI_HOR_END_MASK) | (hstart & + DC3_VBI_HOR_START_MASK)); /* WRITE LINE CAPTURE MASKS */ WRITE_REG32(DC3_VBI_LN_ODD, ((buffer->odd_line_offset << - DC3_VBI_ODD_LINE_SHIFT) & DC3_VBI_ODD_LINE_MASK) | - (buffer->odd_line_capture_mask & DC3_VBI_ODD_ENABLE_MASK)); + DC3_VBI_ODD_LINE_SHIFT) & + DC3_VBI_ODD_LINE_MASK) | + (buffer->odd_line_capture_mask & DC3_VBI_ODD_ENABLE_MASK)); WRITE_REG32(DC3_VBI_LN_EVEN, ((buffer->even_line_offset << - DC3_VBI_EVEN_LINE_SHIFT) & DC3_VBI_EVEN_LINE_MASK) | - (buffer->even_line_capture_mask & DC3_VBI_EVEN_ENABLE_MASK)); + DC3_VBI_EVEN_LINE_SHIFT) & + DC3_VBI_EVEN_LINE_MASK) | + (buffer->even_line_capture_mask & DC3_VBI_EVEN_ENABLE_MASK)); /* PROGRAM SOURCE OFFSETS * Start with the even offsets. Note that we always enable 16-bit VBI, @@ -115,18 +119,18 @@ vop_set_vbi_window(VOPVBIWINDOWBUFFER * buffer) if (buffer->enable_upscale) temp |= DC3_VBI_EVEN_CTL_UPSCALE; WRITE_REG32(DC3_VBI_EVEN_CTL, temp | - (buffer->even_address_offset & DC3_VBI_EVEN_CTL_OFFSET_MASK)); + (buffer->even_address_offset & DC3_VBI_EVEN_CTL_OFFSET_MASK)); /* ODD OFFSET */ temp = READ_REG32(DC3_VBI_ODD_CTL) & ~DC3_VBI_ODD_CTL_OFFSET_MASK; WRITE_REG32(DC3_VBI_ODD_CTL, temp | - (buffer->odd_address_offset & DC3_VBI_ODD_CTL_OFFSET_MASK)); + (buffer->odd_address_offset & DC3_VBI_ODD_CTL_OFFSET_MASK)); /* PITCH */ temp = ((buffer->data_size >> 3) << 16) | ((buffer->data_pitch >> 3) & - 0x0000FFFF); + 0x0000FFFF); WRITE_REG32(DC3_VBI_PITCH, temp); WRITE_REG32(DC3_UNLOCK, unlock); @@ -221,10 +225,11 @@ vop_set_configuration(VOPCONFIGURATIONBUFFER * config) if (config->vop601.vsync_shift == VOP_VSYNC_LATER_BY_X) { delta |= (config->vop601.vsync_shift_count & - DC3_601_VSYNC_SHIFT_MASK); + DC3_601_VSYNC_SHIFT_MASK); delta |= DC3_601_VSYNC_SHIFT_ENABLE; } - } else { + } + else { if (config->flags & VOP_FLAG_VBI) vop_config |= VOP_CONFIG_VBI; if (config->flags & VOP_FLAG_TASK) @@ -275,7 +280,8 @@ vop_set_configuration(VOPCONFIGURATIONBUFFER * config) alpha |= DF_CSC_VOP_RGB_TO_YUV; else alpha &= ~DF_CSC_VOP_RGB_TO_YUV; - } else { + } + else { /* YUV OUTPUT FROM THE MIXER */ /* As there is no YUV->RGB VOP conversion, we simply disable the */ /* VOP CSC and trust that the user is competent. */ @@ -384,14 +390,14 @@ vop_get_current_mode(VOPCONFIGURATIONBUFFER * config) /* READ 601 SETTINGS */ config->vop601.flags = vop_config & (VOP_CONFIG_INVERT_DISPE | - VOP_CONFIG_INVERT_HSYNC | VOP_CONFIG_INVERT_VSYNC); + VOP_CONFIG_INVERT_HSYNC | + VOP_CONFIG_INVERT_VSYNC); config->vop601.vsync_shift = vop_config & VOP_CONFIG_VSYNC_MASK; config->vop601.vsync_shift_count = READ_REG32(DC3_VID_DS_DELTA) & DC3_601_VSYNC_SHIFT_MASK; - if ((alpha & DF_CSC_GRAPHICS_RGB_TO_YUV) || - (alpha & DF_CSC_VOP_RGB_TO_YUV)) { + if ((alpha & DF_CSC_GRAPHICS_RGB_TO_YUV) || (alpha & DF_CSC_VOP_RGB_TO_YUV)) { /* YUV OUTPUT */ if (vop_config & VOP_CONFIG_DISABLE_DECIMATE) @@ -400,7 +406,8 @@ vop_get_current_mode(VOPCONFIGURATIONBUFFER * config) config->vop601.output_mode = VOP_601_YUV_16BIT; else config->vop601.output_mode = VOP_601_YUV_8BIT; - } else { + } + else { config->vop601.output_mode = VOP_601_RGB_8_8_8; } @@ -455,11 +462,12 @@ vop_get_vbi_configuration(VOPVBIWINDOWBUFFER * buffer) hstop = ((temp & DC3_VBI_HOR_END_MASK) >> DC3_VBI_HOR_END_SHIFT) + 1; if (buffer->horz_from_hsync) { buffer->horz_start = hstart + htotal - hsyncstart; - if (buffer->horz_start >= (long)htotal) + if (buffer->horz_start >= (long) htotal) buffer->horz_start -= htotal; - } else { + } + else { if (hstart > hsyncstart) - buffer->horz_start = (long)hstart - (long)htotal; + buffer->horz_start = (long) hstart - (long) htotal; else buffer->horz_start = hstart; } @@ -547,7 +555,7 @@ vop_get_crc(void) /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */ - while (!(READ_VOP32(VOP_CONFIGURATION) & VOP_CONFIG_SIGVAL)) ; + while (!(READ_VOP32(VOP_CONFIGURATION) & VOP_CONFIG_SIGVAL)); crc = READ_VOP32(VOP_SIGNATURE); @@ -586,7 +594,7 @@ vop_read_vbi_crc(void) /* WAIT FOR THE CRC TO BE COMPLETED */ - while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_SIGC)) ; + while (!(READ_REG32(DC3_LINE_CNT_STATUS) & DC3_LNCNT_SIGC)); /* READ THE COMPLETED CRC */ diff --git a/driver/xf86-video-geode/src/cim_dev.h b/driver/xf86-video-geode/src/cim_dev.h index f491eaf2e..45b397d58 100644 --- a/driver/xf86-video-geode/src/cim_dev.h +++ b/driver/xf86-video-geode/src/cim_dev.h @@ -32,13 +32,12 @@ #define CIMDEV_MINOR_DEV 156 /* Block flags */ -#define CIM_F_FREE 0x01 /* This block is marked as free */ -#define CIM_F_CMDBUF 0x02 /* GP command buffer flag */ -#define CIM_F_PRIVATE 0x04 /* This block is reserved only for its owner */ -#define CIM_F_PUBLIC 0x08 /* This block can be used by the world */ +#define CIM_F_FREE 0x01 /* This block is marked as free */ +#define CIM_F_CMDBUF 0x02 /* GP command buffer flag */ +#define CIM_F_PRIVATE 0x04 /* This block is reserved only for its owner */ +#define CIM_F_PUBLIC 0x08 /* This block can be used by the world */ -typedef struct -{ +typedef struct { /* These fields get populated by the client */ char owner[10]; char name[15]; @@ -49,8 +48,7 @@ typedef struct unsigned long offset; } cim_mem_req_t; -typedef struct -{ +typedef struct { char owner[10]; unsigned long offset; } cim_mem_free_t; diff --git a/driver/xf86-video-geode/src/cimarron.c b/driver/xf86-video-geode/src/cimarron.c index b6986feb4..e4376a938 100644 --- a/driver/xf86-video-geode/src/cimarron.c +++ b/driver/xf86-video-geode/src/cimarron.c @@ -166,13 +166,13 @@ /* registers of their respective blocks. */ /*----------------------------------------------------------------------*/ -unsigned char *cim_gp_ptr = (unsigned char *)0; -unsigned char *cim_fb_ptr = (unsigned char *)0; -unsigned char *cim_cmd_base_ptr = (unsigned char *)0; -unsigned char *cim_cmd_ptr = (unsigned char *)0; -unsigned char *cim_vid_ptr = (unsigned char *)0; -unsigned char *cim_vip_ptr = (unsigned char *)0; -unsigned char *cim_vg_ptr = (unsigned char *)0; +unsigned char *cim_gp_ptr = (unsigned char *) 0; +unsigned char *cim_fb_ptr = (unsigned char *) 0; +unsigned char *cim_cmd_base_ptr = (unsigned char *) 0; +unsigned char *cim_cmd_ptr = (unsigned char *) 0; +unsigned char *cim_vid_ptr = (unsigned char *) 0; +unsigned char *cim_vip_ptr = (unsigned char *) 0; +unsigned char *cim_vg_ptr = (unsigned char *) 0; /* Define hooks for reading and writing MSRs - this is a major hack * to share the MSR code with the GX code */ diff --git a/driver/xf86-video-geode/src/compat-api.h b/driver/xf86-video-geode/src/compat-api.h new file mode 100644 index 000000000..f8b841685 --- /dev/null +++ b/driver/xf86-video-geode/src/compat-api.h @@ -0,0 +1,118 @@ +/* + * Copyright 2012 Red Hat, Inc. + * Copyright 2012 Canonical Ltd. + * + * 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. + * + * Authors: + * Dave Airlie <airlied@redhat.com> + * Maarten Lankhorst <maarten.lankhorst@canonical.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 DDC_CALL(pScrni) (pScrni->scrnIndex) + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrni = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScrn = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScrn, 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 pScrn +#define CLOSE_SCREEN_ARGS scrnIndex, pScrn + +#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags +#define ADJUST_FRAME_ARGS(x, y) pScrni->scrnIndex, (x), (y), 0 + +#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr pMode, int flags + +#define FREE_SCREEN_ARGS_DECL int arg, int flags +#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 + +#define VT_FUNC_ARGS_DECL int arg, int flags +#define VT_FUNC_ARGS(flags) pScrni->scrnIndex, (flags) + +#define XF86_ENABLEDISABLEFB_ARG(pScrni, x) ((pScrni)->scrnIndex), (x) + +#define POINTER_MOVED_ARGS_DECL int arg, int x, int y +#define POINTER_MOVED_ARGS(x, y) pScrni->scrnIndex, (x), (y) + +#define VALID_MODE_ARGS_DECL int arg, DisplayModePtr pMode, Bool Verbose, int flags + +#else /*XF86_SCRN_INTERFACE) */ + +#define DDC_CALL(pScrni) (pScrni) + +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrni = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScrn = (arg1) + +#define SCREEN_INIT_ARGS_DECL ScreenPtr pScrn, 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 pScrn +#define CLOSE_SCREEN_ARGS pScrn + +#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define ADJUST_FRAME_ARGS(x, y) pScrni, (x), (y) + +#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode + +#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg +#define FREE_SCREEN_ARGS(x) (x) + +#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg +#define VT_FUNC_ARGS(flags) pScrni + +#define XF86_ENABLEDISABLEFB_ARG(pScrni, x) (pScrni), (x) + +#define POINTER_MOVED_ARGS_DECL ScrnInfoPtr arg, int x, int y +#define POINTER_MOVED_ARGS(x, y) pScrni, (x), (y) + +#define VALID_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode, Bool Verbose, int flags + +#endif + +#endif diff --git a/driver/xf86-video-geode/src/durango.c b/driver/xf86-video-geode/src/durango.c index 8795d41c8..fbca7b2de 100644 --- a/driver/xf86-video-geode/src/durango.c +++ b/driver/xf86-video-geode/src/durango.c @@ -35,49 +35,49 @@ #include <unistd.h> #include <errno.h> #include <compiler.h> -#include <os.h> /* ErrorF() */ +#include <os.h> /* ErrorF() */ /* Compiler options */ -#define GFX_DISPLAY_GU1 0 /* 1st generation display controller */ -#define GFX_DISPLAY_GU2 1 /* 2nd generation display controller */ +#define GFX_DISPLAY_GU1 0 /* 1st generation display controller */ +#define GFX_DISPLAY_GU2 1 /* 2nd generation display controller */ -#define GFX_INIT_DYNAMIC 0 /* runtime selection */ -#define GFX_INIT_GU1 0 /* SC1200/GX1 */ -#define GFX_INIT_GU2 1 /* GX */ +#define GFX_INIT_DYNAMIC 0 /* runtime selection */ +#define GFX_INIT_GU1 0 /* SC1200/GX1 */ +#define GFX_INIT_GU2 1 /* GX */ -#define GFX_MSR_DYNAMIC 0 /* runtime selection */ -#define GFX_MSR_REDCLOUD 1 /* GX */ +#define GFX_MSR_DYNAMIC 0 /* runtime selection */ +#define GFX_MSR_REDCLOUD 1 /* GX */ -#define GFX_2DACCEL_DYNAMIC 0 /* runtime selection */ -#define GFX_2DACCEL_GU1 0 /* 1st generation 2D accelerator */ -#define GFX_2DACCEL_GU2 1 /* 2nd generation 2D accelerator */ +#define GFX_2DACCEL_DYNAMIC 0 /* runtime selection */ +#define GFX_2DACCEL_GU1 0 /* 1st generation 2D accelerator */ +#define GFX_2DACCEL_GU2 1 /* 2nd generation 2D accelerator */ -#define GFX_VIDEO_DYNAMIC 0 /* runtime selection */ -#define GFX_VIDEO_CS5530 0 /* support for CS5530 */ -#define GFX_VIDEO_SC1200 0 /* support for SC1200 */ -#define GFX_VIDEO_REDCLOUD 1 /* support for GX */ +#define GFX_VIDEO_DYNAMIC 0 /* runtime selection */ +#define GFX_VIDEO_CS5530 0 /* support for CS5530 */ +#define GFX_VIDEO_SC1200 0 /* support for SC1200 */ +#define GFX_VIDEO_REDCLOUD 1 /* support for GX */ -#define GFX_VIP_DYNAMIC 0 /* runtime selection */ -#define GFX_VIP_SC1200 0 /* support for SC1200 */ +#define GFX_VIP_DYNAMIC 0 /* runtime selection */ +#define GFX_VIP_SC1200 0 /* support for SC1200 */ -#define GFX_DECODER_DYNAMIC 0 /* runtime selection */ -#define GFX_DECODER_SAA7114 0 /* Philips SAA7114 decoder */ +#define GFX_DECODER_DYNAMIC 0 /* runtime selection */ +#define GFX_DECODER_SAA7114 0 /* Philips SAA7114 decoder */ -#define GFX_TV_DYNAMIC 0 /* runtime selection */ -#define GFX_TV_FS451 0 /* Focus Enhancements FS450 */ -#define GFX_TV_SC1200 0 /* SC1200 integrated TV encoder */ +#define GFX_TV_DYNAMIC 0 /* runtime selection */ +#define GFX_TV_FS451 0 /* Focus Enhancements FS450 */ +#define GFX_TV_SC1200 0 /* SC1200 integrated TV encoder */ -#define GFX_I2C_DYNAMIC 0 /* runtime selection */ -#define GFX_I2C_ACCESS 0 /* support for ACCESS.BUS */ -#define GFX_I2C_GPIO 0 /* support for CS5530 GPIOs */ +#define GFX_I2C_DYNAMIC 0 /* runtime selection */ +#define GFX_I2C_ACCESS 0 /* support for ACCESS.BUS */ +#define GFX_I2C_GPIO 0 /* support for CS5530 GPIOs */ -#define GFX_VGA_DYNAMIC 0 /* runtime selection */ -#define GFX_VGA_GU1 0 /* 1st generation graphics unit */ +#define GFX_VGA_DYNAMIC 0 /* runtime selection */ +#define GFX_VGA_GU1 0 /* 1st generation graphics unit */ -#define FB4MB 1 /* Set to use 4Mb vid ram for Pyramid */ +#define FB4MB 1 /* Set to use 4Mb vid ram for Pyramid */ -#define GFX_NO_IO_IN_WAIT_MACROS 1 /* Set to remove I/O accesses in GP */ +#define GFX_NO_IO_IN_WAIT_MACROS 1 /* Set to remove I/O accesses in GP */ #define GFX_READ_ROUTINES 1 #include "gfx_rtns.h" @@ -85,17 +85,17 @@ #include "gfx_regs.h" #include "gfx_defs.h" -unsigned char *gfx_virt_regptr = (unsigned char *)0x40000000; -unsigned char *gfx_virt_fbptr = (unsigned char *)0x40800000; -unsigned char *gfx_virt_vidptr = (unsigned char *)0x40010000; -unsigned char *gfx_virt_vipptr = (unsigned char *)0x40015000; -unsigned char *gfx_virt_spptr = (unsigned char *)0x40000000; -unsigned char *gfx_virt_gpptr = (unsigned char *)0x40000000; +unsigned char *gfx_virt_regptr = (unsigned char *) 0x40000000; +unsigned char *gfx_virt_fbptr = (unsigned char *) 0x40800000; +unsigned char *gfx_virt_vidptr = (unsigned char *) 0x40010000; +unsigned char *gfx_virt_vipptr = (unsigned char *) 0x40015000; +unsigned char *gfx_virt_spptr = (unsigned char *) 0x40000000; +unsigned char *gfx_virt_gpptr = (unsigned char *) 0x40000000; -unsigned char *gfx_phys_regptr = (unsigned char *)0x40000000; -unsigned char *gfx_phys_fbptr = (unsigned char *)0x40800000; -unsigned char *gfx_phys_vidptr = (unsigned char *)0x40010000; -unsigned char *gfx_phys_vipptr = (unsigned char *)0x40015000; +unsigned char *gfx_phys_regptr = (unsigned char *) 0x40000000; +unsigned char *gfx_phys_fbptr = (unsigned char *) 0x40800000; +unsigned char *gfx_phys_vidptr = (unsigned char *) 0x40010000; +unsigned char *gfx_phys_vipptr = (unsigned char *) 0x40015000; #define INB(port) inb(port) #define INW(port) inw(port) @@ -186,15 +186,15 @@ extern int GeodeReadMSR(unsigned long, unsigned long *, unsigned long *); void gfx_msr_asm_write(unsigned short reg, unsigned long addr, - unsigned long *hi, unsigned long *lo) + unsigned long *hi, unsigned long *lo) { static int msr_method = 0; if (msr_method == 0) { - if (!GeodeWriteMSR(addr | reg, *lo, *hi)) - return; + if (!GeodeWriteMSR(addr | reg, *lo, *hi)) + return; - msr_method = 1; + msr_method = 1; } /* This is the fallback VSA method - not preferred */ @@ -203,16 +203,16 @@ gfx_msr_asm_write(unsigned short reg, unsigned long addr, void gfx_msr_asm_read(unsigned short reg, unsigned long addr, - unsigned long *hi, unsigned long *lo) + unsigned long *hi, unsigned long *lo) { static int msr_method = 0; if (msr_method == 0) { - if (!GeodeReadMSR(addr | reg, lo, hi)) - return; + if (!GeodeReadMSR(addr | reg, lo, hi)) + return; - ErrorF("Unable to read the MSR - reverting to the VSA method.\n"); - msr_method = 1; + ErrorF("Unable to read the MSR - reverting to the VSA method.\n"); + msr_method = 1; } /* This is the fallback VSA method - not preferred */ diff --git a/driver/xf86-video-geode/src/geode.h b/driver/xf86-video-geode/src/geode.h index ebf8abb9b..ac693687c 100644 --- a/driver/xf86-video-geode/src/geode.h +++ b/driver/xf86-video-geode/src/geode.h @@ -30,7 +30,9 @@ #include "geode_pcirename.h" #include "config.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif #include "exa.h" #include "xf86Cursor.h" @@ -41,6 +43,8 @@ #include "xf86xv.h" +#include "compat-api.h" + /* We only support EXA version >=2 */ #if (EXA_VERSION_MAJOR >= 2) @@ -51,6 +55,12 @@ #undef XF86EXA #endif +#ifdef HAVE_XAA_H +#define XF86XAA 1 +#else +#undef XF86XAA +#endif + #define CFB 0 #define INT10_SUPPORT 1 @@ -71,10 +81,10 @@ #define GFX_CPU_GEODELX 4 -#ifdef HAVE_GX +#if defined(HAVE_GX) && XF86XAA #define GX_FILL_RECT_SUPPORT 1 #define GX_BRES_LINE_SUPPORT 1 -#define GX_DASH_LINE_SUPPORT 0 /* does not do dashed lines */ +#define GX_DASH_LINE_SUPPORT 0 /* does not do dashed lines */ #define GX_MONO_8X8_PAT_SUPPORT 1 #define GX_CLREXP_8X8_PAT_SUPPORT 1 #define GX_SCR2SCREXP_SUPPORT 1 @@ -84,10 +94,10 @@ #define GX_USE_OFFSCRN_MEM 0 #define GX_ONE_LINE_AT_A_TIME 1 #define GX_WRITE_PIXMAP_SUPPORT 1 +#endif #define GFX(func) gfx_##func #define GFX2(func) gfx2_##func -#endif #define GEODEPTR(p) ((GeodeRec *)((p)->driverPrivate)) @@ -116,8 +126,7 @@ extern void cim_outd(unsigned short port, unsigned long data); #include "cim_rtns.h" -typedef struct _CIM_DISPLAYTIMING -{ +typedef struct _CIM_DISPLAYTIMING { unsigned short wPitch; unsigned short wBpp; VG_DISPLAY_MODE vgDisplayMode; @@ -145,8 +154,7 @@ extern void gfx_outd(unsigned short port, unsigned long data); #undef Q_WORD #include "panel.h" -typedef struct tag_GFX_DISPLAYTIMING -{ +typedef struct tag_GFX_DISPLAYTIMING { unsigned int dwDotClock; unsigned short wPitch; unsigned short wBpp; @@ -167,13 +175,11 @@ typedef struct tag_GFX_DISPLAYTIMING #endif -typedef struct _VESARec -{ +typedef struct _VESARec { xf86Int10InfoPtr pInt; } VESARec; -typedef struct _GeodeMemRec -{ +typedef struct _GeodeMemRec { struct _GeodeMemRec *next; struct _GeodeMemRec *prev; unsigned int offset; @@ -186,14 +192,13 @@ typedef struct _GeodeMemRec #define OUTPUT_VOP 0x08 #define OUTPUT_DCON 0x10 -typedef struct _geodeRec -{ +typedef struct _geodeRec { /* Common for both GX and LX */ - int Output; /* Bitmask indicating the valid output options */ + int Output; /* Bitmask indicating the valid output options */ Bool HWCursor; Bool NoAccel; Bool useVGA; - Bool VGAActive; /* Flag indicating if LX VGA is active */ + Bool VGAActive; /* Flag indicating if LX VGA is active */ Bool Compression; Bool useEXA; @@ -203,12 +208,12 @@ typedef struct _geodeRec Bool tryCompression; Bool tryHWCursor; - int mm_width, mm_height; /* physical display size */ + int mm_width, mm_height; /* physical display size */ unsigned long CursorStartOffset; - int Pitch; /* display FB pitch */ - int displaySize; /* The size of the visibile area */ + int Pitch; /* display FB pitch */ + int displaySize; /* The size of the visibile area */ ExaOffscreenArea *shadowArea; @@ -226,7 +231,7 @@ typedef struct _geodeRec /* Other structures */ EntityInfoPtr pEnt; - ScreenBlockHandlerProcPtr BlockHandler; /* needed for video */ + ScreenBlockHandlerProcPtr BlockHandler; /* needed for video */ XF86VideoAdaptorPtr adaptor; /* State save structures */ @@ -245,16 +250,16 @@ typedef struct _geodeRec /* Hooks */ - void (*PointerMoved) (int index, int x, int y); + void (*PointerMoved) (POINTER_MOVED_ARGS_DECL); CloseScreenProcPtr CloseScreen; - Bool(*CreateScreenResources) (ScreenPtr); + Bool (*CreateScreenResources) (ScreenPtr); /* ===== LX specific items ===== */ /* Flags */ Bool Scale; - DisplayModePtr panelMode; /* The mode for the panel (if attached) */ + DisplayModePtr panelMode; /* The mode for the panel (if attached) */ /* Command buffer information */ unsigned long CmdBfrOffset; @@ -278,8 +283,8 @@ typedef struct _geodeRec int PanelX; int PanelY; - int displayPitch; /* The pitch ofthe visible area */ - int displayOffset; /* The offset of the visible area */ + int displayPitch; /* The pitch ofthe visible area */ + int displayOffset; /* The offset of the visible area */ DisplayModePtr curMode; @@ -304,7 +309,9 @@ typedef struct _geodeRec int NoOfImgBuffers; unsigned char **AccelColorExpandBuffers; int NoOfColorExpandLines; +#if XF86XAA XAAInfoRecPtr AccelInfoRec; +#endif /* Save state */ unsigned long FBCompressionOffset; @@ -314,8 +321,8 @@ typedef struct _geodeRec /* Hooks */ void (*WritePixmap) (ScrnInfoPtr pScrni, int x, int y, int w, int h, - unsigned char *src, int srcwidth, int rop, - unsigned int planemask, int trans, int bpp, int depth); + unsigned char *src, int srcwidth, int rop, + unsigned int planemask, int trans, int bpp, int depth); /* Video information */ int video_x; @@ -330,13 +337,11 @@ typedef struct _geodeRec int video_offset; ScrnInfoPtr video_scrnptr; BOOL OverlayON; -} -GeodeRec, *GeodePtr; +} GeodeRec, *GeodePtr; /* option flags are self-explanatory */ #ifdef HAVE_LX -enum -{ +enum { LX_OPTION_SW_CURSOR, LX_OPTION_HW_CURSOR, LX_OPTION_NOCOMPRESSION, @@ -350,13 +355,11 @@ enum LX_OPTION_FBSIZE, LX_OPTION_PANEL_MODE, LX_OPTION_DONT_PROGRAM -} -LX_GeodeOpts; +} LX_GeodeOpts; #endif #ifdef HAVE_GX -enum -{ +enum { GX_OPTION_SW_CURSOR, GX_OPTION_HW_CURSOR, GX_OPTION_NOCOMPRESSION, @@ -373,8 +376,7 @@ enum GX_OPTION_FBSIZE, GX_OPTION_PANEL_GEOMETRY, GX_OPTION_DONT_PROGRAM -} -GX_GeodeOpts; +} GX_GeodeOpts; #endif /* geode_dcon.c */ @@ -384,7 +386,7 @@ extern int DCONDPMSSet(ScrnInfoPtr pScrni, int mode); /* geode_common.c */ void geode_memory_to_screen_blt(unsigned long, unsigned long, - unsigned long, unsigned long, long, long, int); + unsigned long, unsigned long, long, long, int); int GeodeGetRefreshRate(DisplayModePtr); void GeodeCopyGreyscale(unsigned char *, unsigned char *, int, int, int, int); int GeodeGetSizeFromFB(unsigned int *); @@ -392,8 +394,10 @@ int GeodeGetSizeFromFB(unsigned int *); /* gx_video.c */ int + + GeodeQueryImageAttributes(ScrnInfoPtr, int id, unsigned short *w, - unsigned short *h, int *pitches, int *offsets); + unsigned short *h, int *pitches, int *offsets); Bool RegionsEqual(RegionPtr A, RegionPtr B); @@ -404,8 +408,8 @@ xf86MonPtr GeodeDoDDC(ScrnInfoPtr pScrni, int index); Bool GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name); int GeodeGetFPGeometry(const char *str, int *width, int *height); -void GeodePointerMoved(int index, int x, int y); -void GeodeFreeScreen(int scrnIndex, int flags); +void GeodePointerMoved(POINTER_MOVED_ARGS_DECL); +void GeodeFreeScreen(FREE_SCREEN_ARGS_DECL); int GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp); void GXSetupChipsetFPtr(ScrnInfoPtr pScrn); @@ -423,7 +427,7 @@ void GXShowCursor(ScrnInfoPtr pScrni); Rotation GXGetRotation(ScreenPtr pScreen); Bool GXRandRInit(ScreenPtr pScreen, int rotation); extern _X_EXPORT Bool GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, - int rate, RRScreenSizePtr pSize); + int rate, RRScreenSizePtr pSize); /* gx_rotate.c */ Bool GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode); @@ -457,7 +461,7 @@ void LXSetupOutput(ScrnInfoPtr); DisplayModePtr LXGetLegacyPanelMode(ScrnInfoPtr pScrni); DisplayModePtr LXGetManualPanelMode(char *modestr); -void LXAdjustFrame(int scrnIndex, int x, int y, int flags); +void LXAdjustFrame(ADJUST_FRAME_ARGS_DECL); /* lx_display.c */ void LXSetupCrtc(ScrnInfoPtr pScrni); diff --git a/driver/xf86-video-geode/src/geode_blend.h b/driver/xf86-video-geode/src/geode_blend.h index 6748ec064..51dff1b77 100644 --- a/driver/xf86-video-geode/src/geode_blend.h +++ b/driver/xf86-video-geode/src/geode_blend.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2007 Advanced Micro Devices, 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 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. + * + * Neither the name of the Advanced Micro Devices, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + */ + #ifndef AMD_BLEND_H_ #define AMD_BLEND_H_ diff --git a/driver/xf86-video-geode/src/geode_common.c b/driver/xf86-video-geode/src/geode_common.c index 2e02af17b..7d85592c9 100644 --- a/driver/xf86-video-geode/src/geode_common.c +++ b/driver/xf86-video-geode/src/geode_common.c @@ -30,7 +30,7 @@ #include "config.h" #endif -#include <string.h> /* memcmp() */ +#include <string.h> /* memcmp() */ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -74,7 +74,8 @@ void geode_memory_to_screen_blt(unsigned long src, unsigned long dst, - unsigned long sp, unsigned long dp, long w, long h, int bpp) + unsigned long sp, unsigned long dp, long w, long h, + int bpp) { int d0, d1, d2; int n = w * (bpp >> 3); @@ -82,33 +83,33 @@ geode_memory_to_screen_blt(unsigned long src, unsigned long dst, switch (n & 3) { case 0: - while (--h >= 0) { - move0(dst, src, m); - src += sp; - dst += dp; - } - break; + while (--h >= 0) { + move0(dst, src, m); + src += sp; + dst += dp; + } + break; case 1: - while (--h >= 0) { - move1(dst, src, m); - src += sp; - dst += dp; - } - break; + while (--h >= 0) { + move1(dst, src, m); + src += sp; + dst += dp; + } + break; case 2: - while (--h >= 0) { - move2(dst, src, m); - src += sp; - dst += dp; - } - break; + while (--h >= 0) { + move2(dst, src, m); + src += sp; + dst += dp; + } + break; case 3: - while (--h >= 0) { - move3(dst, src, m); - src += sp; - dst += dp; - } - break; + while (--h >= 0) { + move3(dst, src, m); + src += sp; + dst += dp; + } + break; } } @@ -120,9 +121,9 @@ int GeodeGetRefreshRate(DisplayModePtr pMode) { if (pMode->VRefresh) - return (int)(pMode->VRefresh + 0.5); + return (int) (pMode->VRefresh + 0.5); - return (int)(pMode->Clock * 1000.0 / pMode->HTotal / pMode->VTotal + 0.5); + return (int) (pMode->Clock * 1000.0 / pMode->HTotal / pMode->VTotal + 0.5); } /* This is used by both GX and LX. It could be accelerated for LX, probably, but @@ -133,7 +134,7 @@ GeodeGetRefreshRate(DisplayModePtr pMode) void GeodeCopyGreyscale(unsigned char *src, unsigned char *dst, - int dstPitch, int srcPitch, int h, int w) + int dstPitch, int srcPitch, int h, int w) { int i; unsigned char *src2 = src; @@ -144,21 +145,21 @@ GeodeCopyGreyscale(unsigned char *src, unsigned char *dst, dstPitch <<= 1; while (h--) { - dst3 = dst2; - src3 = src2; - for (i = 0; i < w; i++) { - *dst3++ = *src3++; /* Copy Y data */ - *dst3++ = 0x80; /* Fill UV with 0x80 - greyscale */ - } - - src3 = src2; - for (i = 0; i < w; i++) { - *dst3++ = *src3++; /* Copy Y data */ - *dst3++ = 0x80; /* Fill UV with 0x80 - greyscale */ - } - - dst2 += dstPitch; - src2 += srcPitch; + dst3 = dst2; + src3 = src2; + for (i = 0; i < w; i++) { + *dst3++ = *src3++; /* Copy Y data */ + *dst3++ = 0x80; /* Fill UV with 0x80 - greyscale */ + } + + src3 = src2; + for (i = 0; i < w; i++) { + *dst3++ = *src3++; /* Copy Y data */ + *dst3++ = 0x80; /* Fill UV with 0x80 - greyscale */ + } + + dst2 += dstPitch; + src2 += srcPitch; } } @@ -174,16 +175,16 @@ GeodeGetSizeFromFB(unsigned int *size) int fd = open("/dev/fb0", O_RDONLY); if (fd == -1) - return -1; + return -1; ret = ioctl(fd, FBIOGET_FSCREENINFO, &fix); close(fd); if (!ret) { - if (!memcmp(fix.id, "Geode", 5)) { - *size = fix.smem_len; - return 0; - } + if (!memcmp(fix.id, "Geode", 5)) { + *size = fix.smem_len; + return 0; + } } return -1; diff --git a/driver/xf86-video-geode/src/geode_dcon.c b/driver/xf86-video-geode/src/geode_dcon.c index 900929305..5580c9697 100644 --- a/driver/xf86-video-geode/src/geode_dcon.c +++ b/driver/xf86-video-geode/src/geode_dcon.c @@ -45,7 +45,7 @@ dcon_present(void) static int _dval = -1; if (_dval == -1) - _dval = (access("/sys/class/power_supply/olpc-ac", F_OK) == 0); + _dval = (access("/sys/class/power_supply/olpc-ac", F_OK) == 0); return (Bool) _dval; } @@ -59,10 +59,10 @@ DCONDPMSSet(ScrnInfoPtr pScrni, int mode) char value[1]; if (failed == -1) - failed = !dcon_present(); + failed = !dcon_present(); if (failed) - return 0; + return 0; /* If the DCON is frozen, don't power it down, it was probably frozen * for a reason and powering it down would corrupt the display. @@ -72,41 +72,41 @@ DCONDPMSSet(ScrnInfoPtr pScrni, int mode) * that no mode change is needed and the display power is untouched. */ fd = open(DCON_FREEZE_FILE, O_RDONLY); if (fd < 0) { - failed = 1; - return 0; + failed = 1; + return 0; } ret = read(fd, value, 1); close(fd); if (ret == 1) { - if (value[0] == '1') - return 0; + if (value[0] == '1') + return 0; } fd = open(DCON_SLEEP_FILE, O_WRONLY); if (fd < 0) { - failed = 1; - return 0; + failed = 1; + return 0; } switch (mode) { case DPMSModeOn: - value[0] = '0'; - break; + value[0] = '0'; + break; case DPMSModeStandby: case DPMSModeSuspend: case DPMSModeOff: - value[0] = '1'; - break; + value[0] = '1'; + break; } ret = write(fd, value, sizeof(value)); close(fd); if (ret < 0) { - failed = 1; - return 0; + failed = 1; + return 0; } return 1; @@ -121,17 +121,17 @@ dcon_init(ScrnInfoPtr pScrni) pGeode->mm_height = 0; if (!dcon_present()) { - xf86DrvMsg(pScrni->scrnIndex, X_DEFAULT, "No DCON is present\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_DEFAULT, "No DCON is present\n"); + return FALSE; } pGeode->panelMode = xnfcalloc(1, sizeof(DisplayModeRec)); if (pGeode->panelMode == NULL) - return FALSE; + return FALSE; /* Set up the panel mode structure automagically */ - pGeode->panelMode->type = M_T_DRIVER|M_T_PREFERRED; + pGeode->panelMode->type = M_T_DRIVER | M_T_PREFERRED; pGeode->panelMode->Clock = 57275; pGeode->panelMode->HDisplay = 1200; pGeode->panelMode->HSyncStart = 1208; diff --git a/driver/xf86-video-geode/src/geode_ddc.c b/driver/xf86-video-geode/src/geode_ddc.c index 086dbb1ac..7b8277de0 100644 --- a/driver/xf86-video-geode/src/geode_ddc.c +++ b/driver/xf86-video-geode/src/geode_ddc.c @@ -70,13 +70,13 @@ geode_gpio_iobase(void) pci = pci_device_find_by_slot(0, 0, 0xF, 0x0); if (pci == NULL) - return 0; + return 0; if (pci_device_probe(pci) != 0) return 0; /* The GPIO I/O address is in resource 1 */ - return (unsigned short)pci->regions[1].base_addr; + return (unsigned short) pci->regions[1].base_addr; #else PCITAG Tag; @@ -86,18 +86,18 @@ geode_gpio_iobase(void) Tag = pciFindFirst(CS5535_ISA_DEVICE, 0xFFFFFFFF); if (Tag == PCI_NOT_FOUND) - return 0; + return 0; } /* The GPIO I/O address is in resource 1 */ - return (unsigned short)(pciReadLong(Tag, 0x14) & ~1); + return (unsigned short) (pciReadLong(Tag, 0x14) & ~1); #endif } static void geode_ddc_putbits(I2CBusPtr b, int scl, int sda) { - unsigned long iobase = (unsigned long)b->DriverPrivate.ptr; + unsigned long iobase = (unsigned long) b->DriverPrivate.ptr; unsigned long dat; dat = scl ? DDC_CLK_HIGH : DDC_CLK_LOW; @@ -109,7 +109,7 @@ geode_ddc_putbits(I2CBusPtr b, int scl, int sda) static void geode_ddc_getbits(I2CBusPtr b, int *scl, int *sda) { - unsigned long iobase = (unsigned long)b->DriverPrivate.ptr; + unsigned long iobase = (unsigned long) b->DriverPrivate.ptr; unsigned long dat = inl(iobase + GPIO_IN); *scl = (dat & DDC_CLK_HIGH) ? 1 : 0; @@ -125,9 +125,9 @@ GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name) ddciobase = geode_gpio_iobase(); if (ddciobase == 0) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Could not find the GPIO I/O base\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Could not find the GPIO I/O base\n"); + return FALSE; } /* The GPIO pins for DDC are multiplexed with a @@ -136,10 +136,10 @@ GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name) */ if ((inl(ddciobase + GPIO_IN_AUX1) & DDC_CLK_HIGH) || - (inl(ddciobase + GPIO_OUT_AUX1) & DDC_DATA_HIGH)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "GPIO pins are in serial mode. Assuming no DDC\n"); - return FALSE; + (inl(ddciobase + GPIO_OUT_AUX1) & DDC_DATA_HIGH)) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "GPIO pins are in serial mode. Assuming no DDC\n"); + return FALSE; } outl(ddciobase + GPIO_OUT_ENABLE, DDC_DATA_HIGH | DDC_CLK_HIGH); @@ -148,17 +148,17 @@ GeodeI2CInit(ScrnInfoPtr pScrni, I2CBusPtr * ptr, char *name) bus = xf86CreateI2CBusRec(); if (!bus) - return FALSE; + return FALSE; bus->BusName = name; bus->scrnIndex = pScrni->scrnIndex; bus->I2CGetBits = geode_ddc_getbits; bus->I2CPutBits = geode_ddc_putbits; - bus->DriverPrivate.ptr = (void *)(ddciobase); + bus->DriverPrivate.ptr = (void *) (unsigned long) (ddciobase); if (!xf86I2CBusInit(bus)) - return FALSE; + return FALSE; *ptr = bus; return TRUE; @@ -171,13 +171,13 @@ GeodeGetDDC(ScrnInfoPtr pScrni) I2CBusPtr bus; if (!GeodeI2CInit(pScrni, &bus, "CS5536 DDC BUS")) - return NULL; + return NULL; - mon = xf86DoEDID_DDC2(pScrni->scrnIndex, bus); + mon = xf86DoEDID_DDC2(DDC_CALL(pScrni), bus); #if (XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,4,99,0,0)) if (mon) - xf86DDCApplyQuirks(pScrni->scrnIndex, mon); + xf86DDCApplyQuirks(pScrni->scrnIndex, mon); #endif xf86DestroyI2CBusRec(bus, FALSE, FALSE); diff --git a/driver/xf86-video-geode/src/geode_driver.c b/driver/xf86-video-geode/src/geode_driver.c index ff12feeb3..b27bfd597 100644 --- a/driver/xf86-video-geode/src/geode_driver.c +++ b/driver/xf86-video-geode/src/geode_driver.c @@ -74,7 +74,7 @@ #include <X11/extensions/dpms.h> #endif -#endif /* DPMSExtension */ +#endif /* DPMSExtension */ /* A few things all drivers should have */ #define GEODE_NAME "GEODE" @@ -97,12 +97,12 @@ static Bool AmdProbe(DriverPtr, int); #ifdef XSERVER_LIBPCIACCESS static const struct pci_id_match amdDeviceMatch[] = { {PCI_VENDOR_ID_NS, PCI_CHIP_GEODEGX, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, - 0}, + 0}, {PCI_VENDOR_ID_AMD, PCI_CHIP_GEODELX, PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, - 0}, + 0}, {0, 0, 0} }; -#endif /* XSERVER_LIBPCIACCESS */ +#endif /* XSERVER_LIBPCIACCESS */ /* driver record contains the functions needed by the server after loading * the driver module. @@ -146,12 +146,10 @@ _X_EXPORT DriverRec GEODE = { }; /* Advanced Micro Devices Chip Models */ -typedef struct _DEVICE_MODEL -{ +typedef struct _DEVICE_MODEL { int DeviceId; int Model; -} -DeviceModel; +} DeviceModel; DeviceModel ChipModel[] = { #ifdef HAVE_LX @@ -242,7 +240,7 @@ static XF86ModuleVersionInfo AmdVersionRec = { MODINFOSTRING2, XORG_VERSION_CURRENT, GEODE_VERSION_MAJOR, GEODE_VERSION_MINOR, GEODE_VERSION_PATCH, - ABI_CLASS_VIDEODRV, /* This is a video driver */ + ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} @@ -255,7 +253,7 @@ static XF86ModuleVersionInfo GeodeVersionRec = { MODINFOSTRING2, XORG_VERSION_CURRENT, GEODE_VERSION_MAJOR, GEODE_VERSION_MINOR, GEODE_VERSION_PATCH, - ABI_CLASS_VIDEODRV, /* This is a video driver */ + ABI_CLASS_VIDEODRV, /* This is a video driver */ ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} @@ -271,8 +269,8 @@ GeodeSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) flag = HaveDriverFuncs; #endif if (init) { - *ErrorMajor = LDR_ONCEONLY; - return (pointer) NULL; + *ErrorMajor = LDR_ONCEONLY; + return (pointer) NULL; } init = TRUE; @@ -287,21 +285,21 @@ AmdSetup(pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor) static Bool Initialised = FALSE; if (!Initialised) { - Initialised = TRUE; - xf86AddDriver(&AMD, Module, + Initialised = TRUE; + xf86AddDriver(&AMD, Module, #ifdef XSERVER_LIBPCIACCESS - HaveDriverFuncs + HaveDriverFuncs #else - 0 + 0 #endif - ); + ); - return (pointer) TRUE; + return (pointer) TRUE; } /*The return value must be non-NULL on success */ if (ErrorMajor) - *ErrorMajor = LDR_ONCEONLY; + *ErrorMajor = LDR_ONCEONLY; return NULL; } @@ -309,7 +307,7 @@ _X_EXPORT XF86ModuleData amdModuleData = { &AmdVersionRec, AmdSetup, NULL }; _X_EXPORT XF86ModuleData geodeModuleData = { &GeodeVersionRec, GeodeSetup, NULL }; -#endif /*End of XFree86Loader */ +#endif /*End of XFree86Loader */ /*------------------------------------------------------------------------- * AmdIdentify. @@ -330,7 +328,7 @@ static void AmdIdentify(int flags) { xf86PrintChipsets(GEODE_NAME, "Driver for AMD Geode Chipsets", - GeodeChipsets); + GeodeChipsets); } /*---------------------------------------------------------------------------- @@ -354,11 +352,11 @@ AmdAvailableOptions(int chipid, int busid) switch (chipid) { #ifdef HAVE_LX case PCI_CHIP_GEODELX: - return LX_GeodeOptions; + return LX_GeodeOptions; #endif #ifdef HAVE_GX case PCI_CHIP_GEODEGX: - return GX_GeodeOptions; + return GX_GeodeOptions; #endif } return no_GeodeOptions; @@ -368,47 +366,41 @@ AmdAvailableOptions(int chipid, int busid) static Bool AmdPciProbe(DriverPtr driver, - int entity_num, struct pci_device *device, intptr_t match_data) + int entity_num, struct pci_device *device, intptr_t match_data) { ScrnInfoPtr scrn = NULL; - int cpu_detected; ErrorF("AmdPciProbe: Probing for supported devices!\n"); scrn = xf86ConfigPciEntity(scrn, 0, entity_num, GeodePCIchipsets, - NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL); if (scrn != NULL) { - scrn->driverName = GEODE_DRIVER_NAME; - scrn->driverVersion = GEODE_VERSION; - scrn->name = GEODE_NAME; - scrn->Probe = NULL; + scrn->driverName = GEODE_DRIVER_NAME; + scrn->driverVersion = GEODE_VERSION; + scrn->name = GEODE_NAME; + scrn->Probe = NULL; - switch (device->device_id) { + switch (device->device_id) { #ifdef HAVE_LX - case PCI_CHIP_GEODELX: - cpu_detected = LX; - LXSetupChipsetFPtr(scrn); - break; + case PCI_CHIP_GEODELX: + LXSetupChipsetFPtr(scrn); + break; #endif #ifdef HAVE_GX - case PCI_CHIP_GEODEGX: - cpu_detected = GX; - GXSetupChipsetFPtr(scrn); - break; + case PCI_CHIP_GEODEGX: + GXSetupChipsetFPtr(scrn); + break; #endif - default: - ErrorF("AmdPciProbe: unknown device ID\n"); - return FALSE; - } - - DEBUGMSG(1, (0, X_INFO, "AmdPciProbe: CPUDetected %d!\n", - cpu_detected)); + default: + ErrorF("AmdPciProbe: unknown device ID\n"); + return FALSE; + } } return scrn != NULL; } -#else /* XSERVER_LIBPCIACCESS */ +#else /* XSERVER_LIBPCIACCESS */ /*---------------------------------------------------------------------------- * AmdProbe. @@ -446,85 +438,88 @@ AmdProbe(DriverPtr drv, int flags) * * driver, and return if there are none. */ if ((numDevSections = xf86MatchDevice(GEODE_NAME, &devSections)) <= 0) { - DEBUGMSG(1, (0, X_INFO, "AmdProbe: failed 1!\n")); - return FALSE; + DEBUGMSG(1, (0, X_INFO, "AmdProbe: failed 1!\n")); + return FALSE; } DEBUGMSG(1, (0, X_INFO, "AmdProbe: Before MatchPciInstances!\n")); /* PCI BUS */ if (xf86GetPciVideoInfo()) { - numUsed = xf86MatchPciInstances(GEODE_NAME, PCI_VENDOR_ID_NS, - GeodeChipsets, GeodePCIchipsets, - devSections, numDevSections, drv, &usedChips); - - if (numUsed <= 0) - numUsed = xf86MatchPciInstances(GEODE_NAME, PCI_VENDOR_ID_AMD, - GeodeChipsets, GeodePCIchipsets, - devSections, numDevSections, drv, &usedChips); - - DEBUGMSG(1, (0, X_INFO, "AmdProbe: MatchPCI (%d)!\n", numUsed)); - - if (numUsed > 0) { - if (flags & PROBE_DETECT) - foundScreen = TRUE; - else { - /* Durango only supports one instance, */ - /* so take the first one */ - for (i = 0; i < numUsed; i++) { - /* Allocate a ScrnInfoRec */ - ScrnInfoPtr pScrni = NULL; - EntityInfoPtr pEnt = xf86GetEntityInfo(usedChips[i]); - PciChipsets *p_id; - - pScrni = xf86ConfigPciEntity(pScrni, 0, usedChips[i], - GeodePCIchipsets, NULL, NULL, NULL, NULL, NULL); - for (p_id = GeodePCIchipsets; p_id->numChipset != -1; - p_id++) { - if (pEnt->chipset == p_id->numChipset) { - switch (pEnt->chipset) { + numUsed = xf86MatchPciInstances(GEODE_NAME, PCI_VENDOR_ID_NS, + GeodeChipsets, GeodePCIchipsets, + devSections, numDevSections, drv, + &usedChips); + + if (numUsed <= 0) + numUsed = xf86MatchPciInstances(GEODE_NAME, PCI_VENDOR_ID_AMD, + GeodeChipsets, GeodePCIchipsets, + devSections, numDevSections, drv, + &usedChips); + + DEBUGMSG(1, (0, X_INFO, "AmdProbe: MatchPCI (%d)!\n", numUsed)); + + if (numUsed > 0) { + if (flags & PROBE_DETECT) + foundScreen = TRUE; + else { + /* Durango only supports one instance, */ + /* so take the first one */ + for (i = 0; i < numUsed; i++) { + /* Allocate a ScrnInfoRec */ + ScrnInfoPtr pScrni = NULL; + EntityInfoPtr pEnt = xf86GetEntityInfo(usedChips[i]); + PciChipsets *p_id; + + pScrni = xf86ConfigPciEntity(pScrni, 0, usedChips[i], + GeodePCIchipsets, NULL, NULL, + NULL, NULL, NULL); + for (p_id = GeodePCIchipsets; p_id->numChipset != -1; + p_id++) { + if (pEnt->chipset == p_id->numChipset) { + switch (pEnt->chipset) { #ifdef HAVE_LX - case PCI_CHIP_GEODELX: - CPUDetected = LX; - drvr_setup = &LXSetupChipsetFPtr; - break; + case PCI_CHIP_GEODELX: + CPUDetected = LX; + drvr_setup = &LXSetupChipsetFPtr; + break; #endif #ifdef HAVE_GX - case PCI_CHIP_GEODEGX: - CPUDetected = GX; - drvr_setup = &GXSetupChipsetFPtr; - break; + case PCI_CHIP_GEODEGX: + CPUDetected = GX; + drvr_setup = &GXSetupChipsetFPtr; + break; #endif - default: - break; - } - break; - } - } - free(pEnt); - if (drvr_setup == NULL) - return FALSE; - - DEBUGMSG(1, (0, X_INFO, "AmdProbe: CPUDetected %d!\n", - CPUDetected)); - - pScrni->driverName = GEODE_DRIVER_NAME; - pScrni->driverVersion = GEODE_VERSION; - pScrni->name = GEODE_NAME; - pScrni->Probe = AmdProbe; - drvr_setup(pScrni); - - foundScreen = TRUE; - - } - } - } + default: + break; + } + break; + } + } + free(pEnt); + if (drvr_setup == NULL) + return FALSE; + + DEBUGMSG(1, (0, X_INFO, "AmdProbe: CPUDetected %d!\n", + CPUDetected)); + + pScrni->driverName = GEODE_DRIVER_NAME; + pScrni->driverVersion = GEODE_VERSION; + pScrni->name = GEODE_NAME; + pScrni->Probe = AmdProbe; + drvr_setup(pScrni); + + foundScreen = TRUE; + + } + } + } } if (usedChips) - free(usedChips); + free(usedChips); if (devSections) - free(devSections); + free(devSections); DEBUGMSG(1, (0, X_INFO, "AmdProbe: result (%d)!\n", foundScreen)); return foundScreen; } -#endif /* else XSERVER_LIBPCIACCESS */ +#endif /* else XSERVER_LIBPCIACCESS */ diff --git a/driver/xf86-video-geode/src/geode_msr.c b/driver/xf86-video-geode/src/geode_msr.c index 6cb05c1aa..b55042f43 100644 --- a/driver/xf86-video-geode/src/geode_msr.c +++ b/driver/xf86-video-geode/src/geode_msr.c @@ -7,6 +7,32 @@ #endif #include <errno.h> +/* + * Copyright (c) 2008 Advanced Micro Devices, 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 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. + * + * Neither the name of the Advanced Micro Devices, Inc. nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + */ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -31,13 +57,13 @@ _msr_open(void) if (msrfd == 0) { #ifdef X_PRIVSEP - msrfd = priv_open_device(_PATH_MSRDEV); + msrfd = priv_open_device(_PATH_MSRDEV); #else - msrfd = open(_PATH_MSRDEV, O_RDWR); + msrfd = open(_PATH_MSRDEV, O_RDWR); #endif - if (msrfd == -1) - FatalError("Unable to open %s: %s\n", _PATH_MSRDEV, - strerror(errno)); + if (msrfd == -1) + FatalError("Unable to open %s: %s\n", _PATH_MSRDEV, + strerror(errno)); } return msrfd; @@ -66,17 +92,17 @@ GeodeReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi) int ret; if (fd == -1) - return -1; + return -1; ret = lseek(fd, (off_t) addr, SEEK_SET); if (ret == -1) - return -1; + return -1; - ret = read(fd, (void *)data, sizeof(data)); + ret = read(fd, (void *) data, sizeof(data)); if (ret != 8) - return -1; + return -1; *hi = data[1]; *lo = data[0]; @@ -94,26 +120,26 @@ GeodeWriteMSR(unsigned long addr, unsigned long lo, unsigned long hi) #ifdef __OpenBSD__ req.addr = addr; - req.val = (u_int64_t)hi << 32 | (u_int64_t)lo; + req.val = (u_int64_t) hi << 32 | (u_int64_t)lo; if (ioctl(fd, WRMSR, &req) == -1) - FatalError("Unable to write MSR at address 0x%06x: %s\n", addr, - strerror(errno)); + FatalError("Unable to write MSR at address 0x%06x: %s\n", addr, + strerror(errno)); #else unsigned int data[2]; int fd = _msr_open(); if (fd == -1) - return -1; + return -1; if (lseek(fd, (off_t) addr, SEEK_SET) == -1) - return -1; + return -1; data[0] = lo; data[1] = hi; - if (write(fd, (void *)data, 8) != 8) - return -1; + if (write(fd, (void *) data, 8) != 8) + return -1; #endif return 0; } diff --git a/driver/xf86-video-geode/src/geode_pcirename.h b/driver/xf86-video-geode/src/geode_pcirename.h index 145cc0167..fe4d65b65 100644 --- a/driver/xf86-video-geode/src/geode_pcirename.h +++ b/driver/xf86-video-geode/src/geode_pcirename.h @@ -29,8 +29,7 @@ #ifndef CIRPCIRENAME_H #define CIRPCIRENAME_H -enum region_type -{ +enum region_type { REGION_MEM, REGION_IO }; @@ -78,7 +77,7 @@ enum region_type #define PCI_WRITE_LONG(_pcidev, _value, _offset) \ pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value)) -#else /* XSERVER_LIBPCIACCESS */ +#else /* XSERVER_LIBPCIACCESS */ typedef struct pci_device *pciVideoPtr; @@ -118,6 +117,6 @@ typedef struct pci_device *pciVideoPtr; #define PCI_WRITE_LONG(_pcidev, _value, _offset) \ pci_device_cfg_write_u32((_pcidev), (_value), (_offset)) -#endif /* XSERVER_LIBPCIACCESS */ +#endif /* XSERVER_LIBPCIACCESS */ -#endif /* CIRPCIRENAME_H */ +#endif /* CIRPCIRENAME_H */ diff --git a/driver/xf86-video-geode/src/gfx/disp_gu1.c b/driver/xf86-video-geode/src/gfx/disp_gu1.c index 58e42eebf..2cb1ed535 100644 --- a/driver/xf86-video-geode/src/gfx/disp_gu1.c +++ b/driver/xf86-video-geode/src/gfx/disp_gu1.c @@ -23,9 +23,9 @@ * software without specific prior written permission. */ -void gu1_enable_compression(void); /* private routine definition */ -void gu1_disable_compression(void); /* private routine definition */ -void gfx_reset_video(void); /* private routine definition */ +void gu1_enable_compression(void); /* private routine definition */ +void gu1_disable_compression(void); /* private routine definition */ +void gfx_reset_video(void); /* private routine definition */ int gfx_set_display_control(int sync_polarities); /* private routine * definition */ int gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp); @@ -83,9 +83,9 @@ gu1_delay_precise(unsigned long milliseconds) else total_ticks = 1000 * milliseconds; /* timer resolution is 1 MHz */ - if (total_ticks > ((unsigned long)0xffffffff - timer_start)) + if (total_ticks > ((unsigned long) 0xffffffff - timer_start)) /* wrap-around */ - timer_end = total_ticks - ((unsigned long)0xffffffff - timer_start); + timer_end = total_ticks - ((unsigned long) 0xffffffff - timer_start); else timer_end = timer_start + total_ticks; @@ -110,7 +110,7 @@ gu1_delay_precise(unsigned long milliseconds) if (IND(SC1200_CB_BASE_ADDR + SC1200_CB_TMVALUE) > timer_end) break; } -#endif /* GFX_VIDEO_SC1200 */ +#endif /* GFX_VIDEO_SC1200 */ } /*---------------------------------------------------------------------------- @@ -152,7 +152,7 @@ gfx_delay_milliseconds(unsigned long milliseconds) #if GFX_VIDEO_DYNAMIC } #endif -#endif /* GFX_VIDEO_SC1200 */ +#endif /* GFX_VIDEO_SC1200 */ gu1_delay_approximate(milliseconds); } @@ -201,7 +201,7 @@ gu1_video_shutdown(void) tcfg = READ_REG32(DC_TIMING_CFG); /* BLANK THE GX DISPLAY AND DISABLE THE TIMING GENERATOR */ - tcfg &= ~((unsigned long)DC_TCFG_BLKE | (unsigned long)DC_TCFG_TGEN); + tcfg &= ~((unsigned long) DC_TCFG_BLKE | (unsigned long) DC_TCFG_TGEN); WRITE_REG32(DC_TIMING_CFG, tcfg); /* DELAY: WAIT FOR PENDING MEMORY REQUESTS */ @@ -210,7 +210,7 @@ gu1_video_shutdown(void) gfx_delay_milliseconds(1); /* DISABLE DISPLAY FIFO LOAD AND DISABLE COMPRESSION */ - gcfg &= ~(unsigned long)(DC_GCFG_DFLE | DC_GCFG_CMPE | DC_GCFG_DECE); + gcfg &= ~(unsigned long) (DC_GCFG_DFLE | DC_GCFG_CMPE | DC_GCFG_DECE); WRITE_REG32(DC_GENERAL_CFG, gcfg); WRITE_REG32(DC_UNLOCK, unlock); return; @@ -295,7 +295,7 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) tcfg = READ_REG32(DC_TIMING_CFG); /* BLANK THE GX DISPLAY AND DISABLE THE TIMING GENERATOR */ - tcfg &= ~((unsigned long)DC_TCFG_BLKE | (unsigned long)DC_TCFG_TGEN); + tcfg &= ~((unsigned long) DC_TCFG_BLKE | (unsigned long) DC_TCFG_TGEN); WRITE_REG32(DC_TIMING_CFG, tcfg); /* DELAY: WAIT FOR PENDING MEMORY REQUESTS @@ -305,12 +305,12 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) gfx_delay_milliseconds(1); /* DISABLE DISPLAY FIFO LOAD AND DISABLE COMPRESSION */ - gcfg &= ~(unsigned long)(DC_GCFG_DFLE | DC_GCFG_CMPE | DC_GCFG_DECE); + gcfg &= ~(unsigned long) (DC_GCFG_DFLE | DC_GCFG_CMPE | DC_GCFG_DECE); WRITE_REG32(DC_GENERAL_CFG, gcfg); /* CLEAR THE "DCLK_MUL" FIELD */ - gcfg &= ~(unsigned long)(DC_GCFG_DDCK | DC_GCFG_DPCK | DC_GCFG_DFCK); - gcfg &= ~(unsigned long)DC_GCFG_DCLK_MASK; + gcfg &= ~(unsigned long) (DC_GCFG_DDCK | DC_GCFG_DPCK | DC_GCFG_DFCK); + gcfg &= ~(unsigned long) DC_GCFG_DCLK_MASK; WRITE_REG32(DC_GENERAL_CFG, gcfg); /* SET THE DOT CLOCK FREQUENCY */ @@ -363,7 +363,8 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* requires a pitch of 2048. */ if ((pMode->flags & GFX_MODE_LINE_DOUBLE) && bpp > 8) pitch <<= 1; - } else { + } + else { if (gfx_cpu_version == GFX_CPU_PYRAMID) pitch = (size <= 2048) ? 2048 : 4096; else @@ -397,8 +398,7 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* SET FIFO PRIORITY, DCLK MULTIPLIER, AND FIFO ENABLE */ /* Default 6/5 for FIFO, 2x for DCLK multiplier. */ - gcfg = - (6 << DC_GCFG_DFHPEL_POS) | (5 << DC_GCFG_DFHPSL_POS) | DC_GCFG_DFLE; + gcfg = (6 << DC_GCFG_DFHPEL_POS) | (5 << DC_GCFG_DFHPSL_POS) | DC_GCFG_DFLE; /* INCREASE FIFO PRIORITY FOR LARGE MODES */ if (pMode->hactive == 1280 && pMode->vactive == 1024) { @@ -460,32 +460,32 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* COMBINE AND SET TIMING VALUES */ - value = (unsigned long)(hactive - 1) | - (((unsigned long)(pMode->htotal - 1)) << 16); + value = (unsigned long) (hactive - 1) | + (((unsigned long) (pMode->htotal - 1)) << 16); WRITE_REG32(DC_H_TIMING_1, value); - value = (unsigned long)(pMode->hblankstart - 1) | - (((unsigned long)(pMode->hblankend - 1)) << 16); + value = (unsigned long) (pMode->hblankstart - 1) | + (((unsigned long) (pMode->hblankend - 1)) << 16); WRITE_REG32(DC_H_TIMING_2, value); - value = (unsigned long)(pMode->hsyncstart - 1) | - (((unsigned long)(pMode->hsyncend - 1)) << 16); + value = (unsigned long) (pMode->hsyncstart - 1) | + (((unsigned long) (pMode->hsyncend - 1)) << 16); WRITE_REG32(DC_H_TIMING_3, value); WRITE_REG32(DC_FP_H_TIMING, value); - value = (unsigned long)(vactive - 1) | - (((unsigned long)(pMode->vtotal - 1)) << 16); + value = (unsigned long) (vactive - 1) | + (((unsigned long) (pMode->vtotal - 1)) << 16); WRITE_REG32(DC_V_TIMING_1, value); - value = (unsigned long)(pMode->vblankstart - 1) | - (((unsigned long)(pMode->vblankend - 1)) << 16); + value = (unsigned long) (pMode->vblankstart - 1) | + (((unsigned long) (pMode->vblankend - 1)) << 16); WRITE_REG32(DC_V_TIMING_2, value); - value = (unsigned long)(pMode->vsyncstart - 1) | - (((unsigned long)(pMode->vsyncend - 1)) << 16); + value = (unsigned long) (pMode->vsyncstart - 1) | + (((unsigned long) (pMode->vsyncend - 1)) << 16); WRITE_REG32(DC_V_TIMING_3, value); - value = (unsigned long)(pMode->vsyncstart - 2) | - (((unsigned long)(pMode->vsyncend - 2)) << 16); + value = (unsigned long) (pMode->vsyncstart - 2) | + (((unsigned long) (pMode->vsyncend - 2)) << 16); WRITE_REG32(DC_FP_V_TIMING, value); WRITE_REG32(DC_OUTPUT_CFG, ocfg); WRITE_REG32(DC_TIMING_CFG, tcfg); - gfx_delay_milliseconds(1); /* delay after TIMING_CFG */ + gfx_delay_milliseconds(1); /* delay after TIMING_CFG */ WRITE_REG32(DC_GENERAL_CFG, gcfg); /* ENABLE FLAT PANEL CENTERING */ @@ -496,13 +496,13 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) tcfg = READ_REG32(DC_TIMING_CFG); tcfg = tcfg | DC_TCFG_FCEN; WRITE_REG32(DC_TIMING_CFG, tcfg); - gfx_delay_milliseconds(1); /* delay after TIMING_CFG */ + gfx_delay_milliseconds(1); /* delay after TIMING_CFG */ } } /* CONFIGURE DISPLAY OUTPUT FROM VIDEO PROCESSOR */ gfx_set_display_control(((pMode->flags & GFX_MODE_NEG_HSYNC) ? 1 : 0) | - ((pMode->flags & GFX_MODE_NEG_VSYNC) ? 2 : 0)); + ((pMode->flags & GFX_MODE_NEG_VSYNC) ? 2 : 0)); /* RESTORE VALUE OF DC_UNLOCK */ WRITE_REG32(DC_UNLOCK, unlock); @@ -517,10 +517,10 @@ gu1_set_specified_mode(DISPLAYMODE * pMode, int bpp) else if (pitch > 1024) value |= BC_FB_WIDTH_2048; - WRITE_REG16(GP_BLIT_STATUS, (unsigned short)value); + WRITE_REG16(GP_BLIT_STATUS, (unsigned short) value); return GFX_STATUS_OK; -} /* end gfx_set_specified_mode() */ +} /* end gfx_set_specified_mode() */ /*---------------------------------------------------------------------------- * GFX_IS_DISPLAY_MODE_SUPPORTED @@ -571,13 +571,13 @@ gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz) /* ONLY PYRAMID SUPPORTS 4K PITCH */ if (gfx_cpu_version != GFX_CPU_PYRAMID && xres > 1024) { if (bpp > 8) - return (-1); /* return with mode not found */ + return (-1); /* return with mode not found */ } /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */ for (mode = 0; mode < NUM_GX_DISPLAY_MODES; mode++) { - if ((DisplayParams[mode].hactive == (unsigned short)xres) && - (DisplayParams[mode].vactive == (unsigned short)yres) && + if ((DisplayParams[mode].hactive == (unsigned short) xres) && + (DisplayParams[mode].vactive == (unsigned short) yres) && (DisplayParams[mode].flags & hz_flag) && (DisplayParams[mode].flags & bpp_flag)) { @@ -613,8 +613,7 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz) mode = gfx_is_display_mode_supported(xres, yres, bpp, hz); if (mode >= 0) { - if (gu1_set_specified_mode(&DisplayParams[mode], - bpp) == GFX_STATUS_OK) + if (gu1_set_specified_mode(&DisplayParams[mode], bpp) == GFX_STATUS_OK) return (1); } return (0); @@ -632,21 +631,23 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz) #if GFX_DISPLAY_DYNAMIC int gu1_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblankstart, - unsigned short hsyncstart, unsigned short hsyncend, - unsigned short hblankend, unsigned short htotal, - unsigned short vactive, unsigned short vblankstart, - unsigned short vsyncstart, unsigned short vsyncend, - unsigned short vblankend, unsigned short vtotal, unsigned long frequency) + unsigned short hactive, unsigned short hblankstart, + unsigned short hsyncstart, unsigned short hsyncend, + unsigned short hblankend, unsigned short htotal, + unsigned short vactive, unsigned short vblankstart, + unsigned short vsyncstart, unsigned short vsyncend, + unsigned short vblankend, unsigned short vtotal, + unsigned long frequency) #else int gfx_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblankstart, - unsigned short hsyncstart, unsigned short hsyncend, - unsigned short hblankend, unsigned short htotal, - unsigned short vactive, unsigned short vblankstart, - unsigned short vsyncstart, unsigned short vsyncend, - unsigned short vblankend, unsigned short vtotal, unsigned long frequency) + unsigned short hactive, unsigned short hblankstart, + unsigned short hsyncstart, unsigned short hsyncend, + unsigned short hblankend, unsigned short htotal, + unsigned short vactive, unsigned short vblankstart, + unsigned short vsyncstart, unsigned short vsyncend, + unsigned short vblankend, unsigned short vtotal, + unsigned long frequency) #endif { /* SET MODE STRUCTURE WITH SPECIFIED VALUES */ @@ -711,13 +712,13 @@ gfx_set_vtotal(unsigned short vtotal) timing2 = READ_REG32(DC_V_TIMING_2); /* DISABLE THE TIMING GENERATOR */ - WRITE_REG32(DC_TIMING_CFG, tcfg & ~(unsigned long)DC_TCFG_TGEN); + WRITE_REG32(DC_TIMING_CFG, tcfg & ~(unsigned long) DC_TCFG_TGEN); /* WRITE NEW TIMING VALUES */ WRITE_REG32(DC_V_TIMING_1, - (timing1 & 0xffff) | (unsigned long)(vtotal - 1) << 16); + (timing1 & 0xffff) | (unsigned long) (vtotal - 1) << 16); WRITE_REG32(DC_V_TIMING_2, - (timing2 & 0xffff) | (unsigned long)(vtotal - 1) << 16); + (timing2 & 0xffff) | (unsigned long) (vtotal - 1) << 16); /* RESTORE GX VALUES */ WRITE_REG32(DC_TIMING_CFG, tcfg); @@ -751,7 +752,7 @@ gfx_set_display_pitch(unsigned short pitch) /* ALSO UPDATE PITCH IN GRAPHICS ENGINE */ /* Pyramid alone supports 4K line pitch */ - value = (unsigned long)READ_REG16(GP_BLIT_STATUS); + value = (unsigned long) READ_REG16(GP_BLIT_STATUS); value &= ~(BC_FB_WIDTH_2048 | BC_FB_WIDTH_4096); if ((gfx_cpu_version == GFX_CPU_PYRAMID) && (pitch > 2048)) @@ -760,7 +761,7 @@ gfx_set_display_pitch(unsigned short pitch) else if (pitch > 1024) value |= BC_FB_WIDTH_2048; - WRITE_REG16(GP_BLIT_STATUS, (unsigned short)value); + WRITE_REG16(GP_BLIT_STATUS, (unsigned short) value); return; } @@ -800,7 +801,8 @@ gfx_set_display_offset(unsigned long offset) gfx_wait_vertical_blank(); gu1_enable_compression(); } - } else { + } + else { /* ONLY DISABLE COMPRESSION ONCE */ if (gfx_compression_active) gu1_disable_compression(); @@ -933,7 +935,7 @@ gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor) #if GFX_VIDEO_SC1200 if (gfx_test_timing_active()) - while ((gfx_get_vline()) > gfx_get_vactive()) ; + while ((gfx_get_vline()) > gfx_get_vactive()); #endif /* SET CURSOR COLORS */ WRITE_REG32(DC_PAL_ADDRESS, 0x100); @@ -958,13 +960,13 @@ gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor) #if GFX_DISPLAY_DYNAMIC void gu1_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot) + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot) #else void gfx_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot) + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot) #endif { unsigned long unlock; @@ -981,8 +983,8 @@ gfx_set_cursor_position(unsigned long memoffset, if (gfx_line_double) ypos <<= 1; - x = (short)xpos - (short)xhotspot; - y = (short)ypos - (short)yhotspot; + x = (short) xpos - (short) xhotspot; + y = (short) ypos - (short) yhotspot; if (x < -31) return; @@ -999,13 +1001,13 @@ gfx_set_cursor_position(unsigned long memoffset, y = 0; } - memoffset += (unsigned long)yoffset << 3; + memoffset += (unsigned long) yoffset << 3; if (PanelEnable) { if ((ModeWidth > PanelWidth) || (ModeHeight > PanelHeight)) { gfx_enable_panning(xpos, ypos); - x = x - (short)panelLeft; - y = y - (short)panelTop; + x = x - (short) panelLeft; + y = y - (short) panelTop; } } @@ -1013,10 +1015,10 @@ gfx_set_cursor_position(unsigned long memoffset, unlock = READ_REG32(DC_UNLOCK); WRITE_REG32(DC_UNLOCK, DC_UNLOCK_VALUE); WRITE_REG32(DC_CURS_ST_OFFSET, memoffset); - WRITE_REG32(DC_CURSOR_X, (unsigned long)x | - (((unsigned long)xoffset) << 11)); - WRITE_REG32(DC_CURSOR_Y, (unsigned long)y | - (((unsigned long)yoffset) << 11)); + WRITE_REG32(DC_CURSOR_X, (unsigned long) x | + (((unsigned long) xoffset) << 11)); + WRITE_REG32(DC_CURSOR_Y, (unsigned long) y | + (((unsigned long) yoffset) << 11)); WRITE_REG32(DC_UNLOCK, unlock); } @@ -1030,11 +1032,11 @@ gfx_set_cursor_position(unsigned long memoffset, #if GFX_DISPLAY_DYNAMIC void gu1_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #else void gfx_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #endif { int i; @@ -1190,7 +1192,7 @@ gfx_set_compression_pitch(unsigned short pitch) /* SET REGISTER VALUE */ lock = READ_REG32(DC_UNLOCK); line_delta = READ_REG32(DC_LINE_DELTA) & 0xFF800FFF; - line_delta |= ((unsigned long)pitch << 10l) & 0x007FF000; + line_delta |= ((unsigned long) pitch << 10l) & 0x007FF000; WRITE_REG32(DC_UNLOCK, DC_UNLOCK_VALUE); WRITE_REG32(DC_LINE_DELTA, line_delta); WRITE_REG32(DC_UNLOCK, lock); @@ -1293,7 +1295,7 @@ gfx_set_display_video_size(unsigned short width, unsigned short height) { unsigned long lock, size, value; - size = (unsigned long)(width << 1) * (unsigned long)height; + size = (unsigned long) (width << 1) * (unsigned long) height; /* STORE THE VIDEO BUFFER SIZE AS A GLOBAL */ vid_buf_size = ((size + 63) >> 6) << 16; @@ -1410,8 +1412,8 @@ gfx_wait_vertical_blank(void) #endif { if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); } return (0); @@ -1441,8 +1443,8 @@ gfx_enable_panning(int x, int y) (((ModeWidth + 1023) / 1024) * 1024) * modeBytesPerPixel; /* TEST FOR NO-WORK */ - if (x >= DeltaX && (unsigned short)x < (PanelWidth + DeltaX) && - y >= DeltaY && (unsigned short)y < (PanelHeight + DeltaY)) + if (x >= DeltaX && (unsigned short) x < (PanelWidth + DeltaX) && + y >= DeltaY && (unsigned short) y < (PanelHeight + DeltaY)) return; /* ADJUST PANNING VARIABLES WHEN CURSOR EXCEEDS BOUNDARY */ @@ -1450,12 +1452,12 @@ gfx_enable_panning(int x, int y) /* all variables and the starting offset accordingly. */ if (x < DeltaX) DeltaX = x; - else if ((unsigned short)x >= (DeltaX + PanelWidth)) + else if ((unsigned short) x >= (DeltaX + PanelWidth)) DeltaX = x - PanelWidth + 1; if (y < DeltaY) DeltaY = y; - else if ((unsigned short)y >= (DeltaY + PanelHeight)) + else if ((unsigned short) y >= (DeltaY + PanelHeight)) DeltaY = y - PanelHeight + 1; /* CALCULATE THE START OFFSET */ @@ -1483,19 +1485,19 @@ gfx_enable_panning(int x, int y) #if GFX_DISPLAY_DYNAMIC int gu1_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #else int gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #endif { unsigned int mode; ModeWidth = width; ModeHeight = height; - PanelWidth = (unsigned short)panelResX; - PanelHeight = (unsigned short)panelResY; + PanelWidth = (unsigned short) panelResX; + PanelHeight = (unsigned short) panelResY; PanelEnable = 1; /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */ @@ -1509,14 +1511,16 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, FIXEDTIMINGS *fmode = &FixedParams[mode]; gfx_set_display_timings(bpp, 3, fmode->hactive, - fmode->hblankstart, fmode->hsyncstart, fmode->hsyncend, - fmode->hblankend, fmode->htotal, fmode->vactive, - fmode->vblankstart, fmode->vsyncstart, fmode->vsyncend, - fmode->vblankend, fmode->vtotal, fmode->frequency); + fmode->hblankstart, fmode->hsyncstart, + fmode->hsyncend, fmode->hblankend, + fmode->htotal, fmode->vactive, + fmode->vblankstart, fmode->vsyncstart, + fmode->vsyncend, fmode->vblankend, + fmode->vtotal, fmode->frequency); return (1); - } /* end if() */ - } /* end for() */ + } /* end if() */ + } /* end for() */ return (-1); } @@ -1528,11 +1532,11 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, #if GFX_DISPLAY_DYNAMIC int gu1_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #else int gfx_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #endif { /* SET VALID BPP */ @@ -1549,8 +1553,8 @@ gfx_set_panel_present(int panelResX, int panelResY, unsigned short width, ModeWidth = width; ModeHeight = height; - PanelWidth = (unsigned short)panelResX; - PanelHeight = (unsigned short)panelResY; + PanelWidth = (unsigned short) panelResX; + PanelHeight = (unsigned short) panelResY; PanelEnable = 1; gbpp = bpp; @@ -1590,11 +1594,12 @@ gfx_get_display_pitch(void) if (gfx_cpu_version == GFX_CPU_PYRAMID) { /* Pyramid update for 4KB line pitch */ value = (READ_REG32(DC_LINE_DELTA) & 0x07FF) << 2; - } else { + } + else { value = (READ_REG32(DC_LINE_DELTA) & 0x03FF) << 2; } - return ((unsigned short)value); + return ((unsigned short) value); } /*---------------------------------------------------------------------------- @@ -1680,11 +1685,11 @@ gfx_get_frame_buffer_line_size(void) #if GFX_DISPLAY_DYNAMIC int gu1_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency) + unsigned long frequency) #else int gfx_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index; @@ -1696,8 +1701,8 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, bpp_flag = GFX_MODE_16BPP; for (index = 0; index < NUM_GX_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned short)xres) && - (DisplayParams[index].vactive == (unsigned short)yres) && + if ((DisplayParams[index].hactive == (unsigned short) xres) && + (DisplayParams[index].vactive == (unsigned short) yres) && (DisplayParams[index].flags & bpp_flag) && (DisplayParams[index].frequency == frequency)) { int hz = 0; @@ -1732,11 +1737,11 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, #if GFX_DISPLAY_DYNAMIC int gu1_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #else int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index, closematch = 0; @@ -1754,10 +1759,10 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; for (index = 0; index < NUM_GX_DISPLAY_MODES; index++) { - if ((DisplayParams[index].htotal == (unsigned short)xres) && - (DisplayParams[index].vtotal == (unsigned short)yres) && + if ((DisplayParams[index].htotal == (unsigned short) xres) && + (DisplayParams[index].vtotal == (unsigned short) yres) && (DisplayParams[index].flags & bpp_flag)) { - diff = (long)frequency - (long)DisplayParams[index].frequency; + diff = (long) frequency - (long) DisplayParams[index].frequency; if (diff < 0) diff = -diff; @@ -1797,11 +1802,11 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, #if GFX_DISPLAY_DYNAMIC int gu1_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #else int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index, closematch = 0; @@ -1819,10 +1824,10 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; for (index = 0; index < NUM_GX_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned short)xres) && - (DisplayParams[index].vactive == (unsigned short)yres) && + if ((DisplayParams[index].hactive == (unsigned short) xres) && + (DisplayParams[index].vactive == (unsigned short) yres) && (DisplayParams[index].flags & bpp_flag)) { - diff = (long)frequency - (long)DisplayParams[index].frequency; + diff = (long) frequency - (long) DisplayParams[index].frequency; if (diff < 0) diff = -diff; @@ -1860,11 +1865,11 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, #if GFX_DISPLAY_DYNAMIC int gu1_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency) + int *frequency) #else int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency) + int *frequency) #endif { unsigned int index; @@ -1894,8 +1899,8 @@ gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ for (index = 0; index < NUM_GX_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned short)xres) && - (DisplayParams[index].vactive == (unsigned short)yres) && + if ((DisplayParams[index].hactive == (unsigned short) xres) && + (DisplayParams[index].vactive == (unsigned short) yres) && (DisplayParams[index].flags & bpp_flag) && (DisplayParams[index].flags & hz_flag)) { *frequency = DisplayParams[index].frequency; @@ -1962,8 +1967,8 @@ gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz) bpp_flag = GFX_MODE_16BPP; for (mode = 0; mode < NUM_GX_DISPLAY_MODES; mode++) { - if ((DisplayParams[mode].hactive == (unsigned short)*xres) && - (DisplayParams[mode].vactive == (unsigned short)*yres) && + if ((DisplayParams[mode].hactive == (unsigned short) *xres) && + (DisplayParams[mode].vactive == (unsigned short) *yres) && (DisplayParams[mode].frequency == pll_freq) && (DisplayParams[mode].flags & bpp_flag)) { @@ -2000,7 +2005,7 @@ unsigned short gfx_get_hactive(void) #endif { - return ((unsigned short)((READ_REG32(DC_H_TIMING_1) & 0x07F8) + 8)); + return ((unsigned short) ((READ_REG32(DC_H_TIMING_1) & 0x07F8) + 8)); } /*--------------------------------------------------------------------------- @@ -2015,7 +2020,7 @@ unsigned short gfx_get_hsync_start(void) #endif { - return ((unsigned short)((READ_REG32(DC_H_TIMING_3) & 0x07F8) + 8)); + return ((unsigned short) ((READ_REG32(DC_H_TIMING_3) & 0x07F8) + 8)); } /*--------------------------------------------------------------------------- @@ -2030,8 +2035,8 @@ unsigned short gfx_get_hsync_end(void) #endif { - return ((unsigned short)(((READ_REG32(DC_H_TIMING_3) >> 16) & 0x07F8) + - 8)); + return ((unsigned short) (((READ_REG32(DC_H_TIMING_3) >> 16) & 0x07F8) + + 8)); } /*--------------------------------------------------------------------------- @@ -2046,8 +2051,8 @@ unsigned short gfx_get_htotal(void) #endif { - return ((unsigned short)(((READ_REG32(DC_H_TIMING_1) >> 16) & 0x07F8) + - 8)); + return ((unsigned short) (((READ_REG32(DC_H_TIMING_1) >> 16) & 0x07F8) + + 8)); } /*--------------------------------------------------------------------------- @@ -2062,7 +2067,7 @@ unsigned short gfx_get_vactive(void) #endif { - return ((unsigned short)((READ_REG32(DC_V_TIMING_1) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(DC_V_TIMING_1) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2077,8 +2082,8 @@ unsigned short gfx_get_vsync_end(void) #endif { - return ((unsigned short)(((READ_REG32(DC_V_TIMING_3) >> 16) & 0x07FF) + - 1)); + return ((unsigned short) (((READ_REG32(DC_V_TIMING_3) >> 16) & 0x07FF) + + 1)); } /*--------------------------------------------------------------------------- @@ -2093,8 +2098,8 @@ unsigned short gfx_get_vtotal(void) #endif { - return ((unsigned short)(((READ_REG32(DC_V_TIMING_1) >> 16) & 0x07FF) + - 1)); + return ((unsigned short) (((READ_REG32(DC_V_TIMING_1) >> 16) & 0x07FF) + + 1)); } /*----------------------------------------------------------------------------- @@ -2136,10 +2141,9 @@ gfx_get_vline(void) /* Read similar value twice to ensure that the value is not transitioning */ do { - current_scan_line = - (unsigned short)READ_REG32(DC_V_LINE_CNT) & 0x07FF; + current_scan_line = (unsigned short) READ_REG32(DC_V_LINE_CNT) & 0x07FF; } while (current_scan_line != - (unsigned short)(READ_REG32(DC_V_LINE_CNT) & 0x07FF)); + (unsigned short) (READ_REG32(DC_V_LINE_CNT) & 0x07FF)); return (current_scan_line); } @@ -2192,7 +2196,7 @@ unsigned short gfx_get_hblank_start(void) #endif { - return ((unsigned short)((READ_REG32(DC_H_TIMING_2) & 0x07F8) + 8)); + return ((unsigned short) ((READ_REG32(DC_H_TIMING_2) & 0x07F8) + 8)); } /*--------------------------------------------------------------------------- @@ -2207,8 +2211,8 @@ unsigned short gfx_get_hblank_end(void) #endif { - return ((unsigned short)(((READ_REG32(DC_H_TIMING_2) >> 16) & 0x07F8) + - 8)); + return ((unsigned short) (((READ_REG32(DC_H_TIMING_2) >> 16) & 0x07F8) + + 8)); } /*--------------------------------------------------------------------------- @@ -2223,7 +2227,7 @@ unsigned short gfx_get_vblank_start(void) #endif { - return ((unsigned short)((READ_REG32(DC_V_TIMING_2) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(DC_V_TIMING_2) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2238,7 +2242,7 @@ unsigned short gfx_get_vsync_start(void) #endif { - return ((unsigned short)((READ_REG32(DC_V_TIMING_3) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(DC_V_TIMING_3) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2253,8 +2257,8 @@ unsigned short gfx_get_vblank_end(void) #endif { - return ((unsigned short)(((READ_REG32(DC_V_TIMING_2) >> 16) & 0x07FF) + - 1)); + return ((unsigned short) (((READ_REG32(DC_V_TIMING_2) >> 16) & 0x07FF) + + 1)); } /*----------------------------------------------------------------------------- @@ -2334,7 +2338,7 @@ gfx_get_cursor_position(void) #endif { return ((READ_REG32(DC_CURSOR_X) & 0x07FF) | - ((READ_REG32(DC_CURSOR_Y) << 16) & 0x03FF0000)); + ((READ_REG32(DC_CURSOR_Y) << 16) & 0x03FF0000)); } /*----------------------------------------------------------------------------- @@ -2350,7 +2354,7 @@ gfx_get_cursor_clip(void) #endif { return (((READ_REG32(DC_CURSOR_X) >> 11) & 0x01F) | - ((READ_REG32(DC_CURSOR_Y) << 5) & 0x1F0000)); + ((READ_REG32(DC_CURSOR_Y) << 5) & 0x1F0000)); } /*----------------------------------------------------------------------------- @@ -2369,7 +2373,8 @@ gfx_get_cursor_color(int color) if (color) { WRITE_REG32(DC_PAL_ADDRESS, 0x101); - } else { + } + else { WRITE_REG32(DC_PAL_ADDRESS, 0x100); } data = READ_REG32(DC_PAL_DATA); @@ -2431,7 +2436,7 @@ gfx_get_compression_pitch(void) { unsigned short pitch; - pitch = (unsigned short)(READ_REG32(DC_LINE_DELTA) >> 12) & 0x03FF; + pitch = (unsigned short) (READ_REG32(DC_LINE_DELTA) >> 12) & 0x03FF; return (pitch << 2); } @@ -2449,7 +2454,7 @@ gfx_get_compression_size(void) { unsigned short size; - size = (unsigned short)((READ_REG32(DC_BUF_SIZE) >> 9) & 0x7F) - 1; + size = (unsigned short) ((READ_REG32(DC_BUF_SIZE) >> 9) & 0x7F) - 1; return ((size << 2) + 16); } @@ -2468,7 +2473,7 @@ gfx_get_valid_bit(int line) int valid; WRITE_REG32(MC_DR_ADD, line); - valid = (int)READ_REG32(MC_DR_ACC) & 1; + valid = (int) READ_REG32(MC_DR_ACC) & 1; return (valid); } @@ -2527,6 +2532,6 @@ gfx_get_display_priority_high(void) return (0); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/disp_gu2.c b/driver/xf86-video-geode/src/gfx/disp_gu2.c index 403a72ac3..f105cc106 100644 --- a/driver/xf86-video-geode/src/gfx/disp_gu2.c +++ b/driver/xf86-video-geode/src/gfx/disp_gu2.c @@ -27,8 +27,8 @@ * This file contains routines for the second generation display controller. * */ -void gu2_enable_compression(void); /* private routine definition */ -void gu2_disable_compression(void); /* private routine definition */ +void gu2_enable_compression(void); /* private routine definition */ +void gu2_disable_compression(void); /* private routine definition */ int gfx_set_display_control(int sync_polarities); /* private routine * definition */ void gfx_reset_video(void); @@ -98,7 +98,7 @@ gfx_set_display_bpp(unsigned short bpp) dcfg = READ_REG32(MDC_DISPLAY_CFG) & ~(MDC_DCFG_DISP_MODE_MASK | - MDC_DCFG_16BPP_MODE_MASK); + MDC_DCFG_16BPP_MODE_MASK); lock = READ_REG32(MDC_UNLOCK); switch (bpp) { @@ -207,7 +207,7 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) gfx_set_crt_enable(0); /* DISABLE THE TIMING GENERATOR */ - dcfg &= ~(unsigned long)MDC_DCFG_TGEN; + dcfg &= ~(unsigned long) MDC_DCFG_TGEN; WRITE_REG32(MDC_DISPLAY_CFG, dcfg); /* DELAY: WAIT FOR PENDING MEMORY REQUESTS */ @@ -216,11 +216,11 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) gfx_delay_milliseconds(5); /* DISABLE DISPLAY FIFO LOAD */ - gcfg &= ~(unsigned long)MDC_GCFG_DFLE; + gcfg &= ~(unsigned long) MDC_GCFG_DFLE; WRITE_REG32(MDC_GENERAL_CFG, gcfg); /* PRESERVE VIDEO INFORMATION */ - gcfg &= (unsigned long)(MDC_GCFG_YUVM | MDC_GCFG_VDSE); + gcfg &= (unsigned long) (MDC_GCFG_YUVM | MDC_GCFG_VDSE); dcfg = 0; /* SET THE DOT CLOCK FREQUENCY */ @@ -297,7 +297,7 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* ALWAYS ENABLE VIDEO AND GRAPHICS DATA */ /* These bits are relics from a previous design and */ /* should always be enabled. */ - dcfg |= (unsigned long)(MDC_DCFG_VDEN | MDC_DCFG_GDEN); + dcfg |= (unsigned long) (MDC_DCFG_VDEN | MDC_DCFG_GDEN); /* SET PIXEL FORMAT */ dcfg |= bpp_mask; @@ -305,8 +305,8 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* ENABLE TIMING GENERATOR, TIM. REG. UPDATES, PALETTE BYPASS */ /* AND VERT. INT. SELECT */ dcfg |= - (unsigned long)(MDC_DCFG_TGEN | MDC_DCFG_TRUP | MDC_DCFG_PALB | - MDC_DCFG_VISL); + (unsigned long) (MDC_DCFG_TGEN | MDC_DCFG_TRUP | MDC_DCFG_PALB | + MDC_DCFG_VISL); /* DISABLE ADDRESS MASKS */ dcfg |= MDC_DCFG_A20M; @@ -326,23 +326,23 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) dcfg |= MDC_DCFG_DCEN; /* COMBINE AND SET TIMING VALUES */ - value = (unsigned long)(pMode->hactive - 1) | - (((unsigned long)(pMode->htotal - 1)) << 16); + value = (unsigned long) (pMode->hactive - 1) | + (((unsigned long) (pMode->htotal - 1)) << 16); WRITE_REG32(MDC_H_ACTIVE_TIMING, value); - value = (unsigned long)(pMode->hblankstart - 1) | - (((unsigned long)(pMode->hblankend - 1)) << 16); + value = (unsigned long) (pMode->hblankstart - 1) | + (((unsigned long) (pMode->hblankend - 1)) << 16); WRITE_REG32(MDC_H_BLANK_TIMING, value); - value = (unsigned long)(pMode->hsyncstart - 1) | - (((unsigned long)(pMode->hsyncend - 1)) << 16); + value = (unsigned long) (pMode->hsyncstart - 1) | + (((unsigned long) (pMode->hsyncend - 1)) << 16); WRITE_REG32(MDC_H_SYNC_TIMING, value); - value = (unsigned long)(pMode->vactive - 1) | - (((unsigned long)(pMode->vtotal - 1)) << 16); + value = (unsigned long) (pMode->vactive - 1) | + (((unsigned long) (pMode->vtotal - 1)) << 16); WRITE_REG32(MDC_V_ACTIVE_TIMING, value); - value = (unsigned long)(pMode->vblankstart - 1) | - (((unsigned long)(pMode->vblankend - 1)) << 16); + value = (unsigned long) (pMode->vblankstart - 1) | + (((unsigned long) (pMode->vblankend - 1)) << 16); WRITE_REG32(MDC_V_BLANK_TIMING, value); - value = (unsigned long)(pMode->vsyncstart - 1) | - (((unsigned long)(pMode->vsyncend - 1)) << 16); + value = (unsigned long) (pMode->vsyncstart - 1) | + (((unsigned long) (pMode->vsyncend - 1)) << 16); WRITE_REG32(MDC_V_SYNC_TIMING, value); WRITE_REG32(MDC_DISPLAY_CFG, dcfg); @@ -350,15 +350,15 @@ gu2_set_specified_mode(DISPLAYMODE * pMode, int bpp) /* CONFIGURE DISPLAY OUTPUT FROM VIDEO PROCESSOR */ gfx_set_display_control(((pMode->flags & GFX_MODE_NEG_HSYNC) ? 1 : 0) | - ((pMode->flags & GFX_MODE_NEG_VSYNC) ? 2 : 0)); + ((pMode->flags & GFX_MODE_NEG_VSYNC) ? 2 : 0)); /* RESTORE VALUE OF MDC_UNLOCK */ WRITE_REG32(MDC_UNLOCK, unlock); /* RESET THE PITCH VALUES IN THE GP */ - gfx_reset_pitch((unsigned short)pitch); + gfx_reset_pitch((unsigned short) pitch); - gfx_set_bpp((unsigned short)bpp); + gfx_set_bpp((unsigned short) bpp); return GFX_STATUS_OK; } @@ -388,8 +388,8 @@ gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz) gfx_mode_bpp_conversion /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */ for (mode = 0; mode < NUM_RC_DISPLAY_MODES; mode++) { - if ((DisplayParams[mode].hactive == (unsigned short)xres) && - (DisplayParams[mode].vactive == (unsigned short)yres) && + if ((DisplayParams[mode].hactive == (unsigned short) xres) && + (DisplayParams[mode].vactive == (unsigned short) yres) && (DisplayParams[mode].flags & hz_flag) && (DisplayParams[mode].flags & bpp_flag)) { @@ -431,8 +431,7 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz) mode = gfx_is_display_mode_supported(xres, yres, bpp, hz); if (mode >= 0) { - if (gu2_set_specified_mode(&DisplayParams[mode], - bpp) == GFX_STATUS_OK) + if (gu2_set_specified_mode(&DisplayParams[mode], bpp) == GFX_STATUS_OK) return (1); } return (0); @@ -450,21 +449,23 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz) #if GFX_DISPLAY_DYNAMIC int gu2_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblankstart, - unsigned short hsyncstart, unsigned short hsyncend, - unsigned short hblankend, unsigned short htotal, - unsigned short vactive, unsigned short vblankstart, - unsigned short vsyncstart, unsigned short vsyncend, - unsigned short vblankend, unsigned short vtotal, unsigned long frequency) + unsigned short hactive, unsigned short hblankstart, + unsigned short hsyncstart, unsigned short hsyncend, + unsigned short hblankend, unsigned short htotal, + unsigned short vactive, unsigned short vblankstart, + unsigned short vsyncstart, unsigned short vsyncend, + unsigned short vblankend, unsigned short vtotal, + unsigned long frequency) #else int gfx_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblankstart, - unsigned short hsyncstart, unsigned short hsyncend, - unsigned short hblankend, unsigned short htotal, - unsigned short vactive, unsigned short vblankstart, - unsigned short vsyncstart, unsigned short vsyncend, - unsigned short vblankend, unsigned short vtotal, unsigned long frequency) + unsigned short hactive, unsigned short hblankstart, + unsigned short hsyncstart, unsigned short hsyncend, + unsigned short hblankend, unsigned short htotal, + unsigned short vactive, unsigned short vblankstart, + unsigned short vsyncstart, unsigned short vsyncend, + unsigned short vblankend, unsigned short vtotal, + unsigned long frequency) #endif { /* SET MODE STRUCTURE WITH SPECIFIED VALUES */ @@ -531,13 +532,15 @@ gfx_set_vtotal(unsigned short vtotal) vblank = READ_REG32(MDC_V_BLANK_TIMING); /* DISABLE TIMING REGISTER UPDATES */ - WRITE_REG32(MDC_DISPLAY_CFG, dcfg & ~(unsigned long)MDC_DCFG_TRUP); + WRITE_REG32(MDC_DISPLAY_CFG, dcfg & ~(unsigned long) MDC_DCFG_TRUP); /* WRITE NEW TIMING VALUES */ WRITE_REG32(MDC_V_ACTIVE_TIMING, - (vactive & MDC_VAT_VA_MASK) | (unsigned long)(vtotal - 1) << 16); + (vactive & MDC_VAT_VA_MASK) | (unsigned long) (vtotal - + 1) << 16); WRITE_REG32(MDC_V_BLANK_TIMING, - (vblank & MDC_VBT_VBS_MASK) | (unsigned long)(vtotal - 1) << 16); + (vblank & MDC_VBT_VBS_MASK) | (unsigned long) (vtotal - + 1) << 16); /* RESTORE OLD RC VALUES */ WRITE_REG32(MDC_DISPLAY_CFG, dcfg); @@ -579,9 +582,9 @@ gfx_set_display_pitch(unsigned short pitch) value = READ_REG32(MDC_GENERAL_CFG); if (pitch == 1024 || pitch == 2048 || pitch == 4096 || pitch == 8192) - value &= ~(unsigned long)(MDC_GCFG_FDTY); + value &= ~(unsigned long) (MDC_GCFG_FDTY); else - value |= (unsigned long)(MDC_GCFG_FDTY); + value |= (unsigned long) (MDC_GCFG_FDTY); WRITE_REG32(MDC_GENERAL_CFG, value); WRITE_REG32(MDC_UNLOCK, lock); @@ -622,7 +625,8 @@ gfx_set_display_offset(unsigned long offset) gfx_wait_vertical_blank(); gu2_enable_compression(); } - } else { + } + else { /* ONLY DISABLE COMPRESSION ONCE */ if (gfx_compression_active) gu2_disable_compression(); @@ -766,19 +770,19 @@ gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor) #if GFX_DISPLAY_DYNAMIC void gu2_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot) + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot) #else void gfx_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot) + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot) #endif { unsigned long unlock; - short x = (short)xpos - (short)xhotspot; - short y = (short)ypos - (short)yhotspot; + short x = (short) xpos - (short) xhotspot; + short y = (short) ypos - (short) yhotspot; short xoffset = 0; short yoffset = 0; @@ -790,8 +794,8 @@ gfx_set_cursor_position(unsigned long memoffset, if (PanelEnable) { if ((ModeWidth > PanelWidth) || (ModeHeight > PanelHeight)) { gfx_enable_panning(xpos, ypos); - x = x - (unsigned short)panelLeft; - y = y - (unsigned short)panelTop; + x = x - (unsigned short) panelLeft; + y = y - (unsigned short) panelTop; } } @@ -809,16 +813,16 @@ gfx_set_cursor_position(unsigned long memoffset, yoffset = -y; y = 0; } - memoffset += (unsigned long)yoffset << 4; + memoffset += (unsigned long) yoffset << 4; /* SET CURSOR POSITION */ unlock = READ_REG32(MDC_UNLOCK); WRITE_REG32(MDC_UNLOCK, MDC_UNLOCK_VALUE); WRITE_REG32(MDC_CURS_ST_OFFSET, memoffset); - WRITE_REG32(MDC_CURSOR_X, (unsigned long)x | - (((unsigned long)xoffset) << 11)); - WRITE_REG32(MDC_CURSOR_Y, (unsigned long)y | - (((unsigned long)yoffset) << 11)); + WRITE_REG32(MDC_CURSOR_X, (unsigned long) x | + (((unsigned long) xoffset) << 11)); + WRITE_REG32(MDC_CURSOR_Y, (unsigned long) y | + (((unsigned long) yoffset) << 11)); WRITE_REG32(MDC_UNLOCK, unlock); } @@ -834,11 +838,11 @@ gfx_set_cursor_position(unsigned long memoffset, #if GFX_DISPLAY_DYNAMIC void gu2_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #else void gfx_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #endif { int i; @@ -876,11 +880,11 @@ gfx_set_cursor_shape32(unsigned long memoffset, #if GFX_DISPLAY_DYNAMIC void gu2_set_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #else void gfx_set_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) #endif { int i; @@ -943,11 +947,11 @@ gfx_set_icon_enable(int enable) #if GFX_DISPLAY_DYNAMIC void gu2_set_icon_colors(unsigned long color0, unsigned long color1, - unsigned long color2) + unsigned long color2) #else void gfx_set_icon_colors(unsigned long color0, unsigned long color1, - unsigned long color2) + unsigned long color2) #endif { /* ICON COLORS LOCATED AT PALETTE INDEXES 102-104h */ @@ -981,7 +985,7 @@ gfx_set_icon_position(unsigned long memoffset, unsigned short xpos) WRITE_REG32(MDC_ICON_ST_OFFSET, memoffset & 0x0FFFFFFF); /* PROGRAM THE XCOORDINATE */ - WRITE_REG32(MDC_ICON_X, (unsigned long)(xpos & 0x07FF)); + WRITE_REG32(MDC_ICON_X, (unsigned long) (xpos & 0x07FF)); WRITE_REG32(MDC_UNLOCK, lock); } @@ -995,11 +999,11 @@ gfx_set_icon_position(unsigned long memoffset, unsigned short xpos) #if GFX_DISPLAY_DYNAMIC void gu2_set_icon_shape64(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned int lines) + unsigned long *xormask, unsigned int lines) #else void gfx_set_icon_shape64(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned int lines) + unsigned long *xormask, unsigned int lines) #endif { unsigned short i, height; @@ -1160,7 +1164,7 @@ gfx_set_compression_pitch(unsigned short pitch) /* SET REGISTER VALUE */ line_delta = READ_REG32(MDC_GFX_PITCH) & 0x0000FFFF; - line_delta |= (((unsigned long)pitch << 13) & 0xFFFF0000); + line_delta |= (((unsigned long) pitch << 13) & 0xFFFF0000); WRITE_REG32(MDC_UNLOCK, MDC_UNLOCK_VALUE); WRITE_REG32(MDC_GFX_PITCH, line_delta); WRITE_REG32(MDC_UNLOCK, lock); @@ -1196,7 +1200,7 @@ gfx_set_compression_size(unsigned short size) lock = READ_REG32(MDC_UNLOCK); buf_size = READ_REG32(MDC_LINE_SIZE) & 0xFF80FFFF; - buf_size |= ((((unsigned long)size >> 3) + 1) & 0x7F) << 16; + buf_size |= ((((unsigned long) size >> 3) + 1) & 0x7F) << 16; WRITE_REG32(MDC_UNLOCK, MDC_UNLOCK_VALUE); WRITE_REG32(MDC_LINE_SIZE, buf_size); WRITE_REG32(MDC_UNLOCK, lock); @@ -1307,14 +1311,15 @@ gfx_set_display_video_size(unsigned short width, unsigned short height) if (yuv_420) { width >>= 1; width = (width + 7) & 0xFFF8; - } else { + } + else { width <<= 1; width = (width + 31) & 0xFFE0; } /* ONLY THE LINE SIZE IS PROGRAMMED IN THE DISPLAY CONTROLLER */ - value |= ((unsigned long)width << 21); + value |= ((unsigned long) width << 21); /* WRITE THE REGISTER */ @@ -1357,11 +1362,11 @@ gfx_set_display_video_offset(unsigned long offset) #if GFX_DISPLAY_DYNAMIC void gu2_set_display_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset) + unsigned long uoffset, unsigned long voffset) #else void gfx_set_display_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset) + unsigned long uoffset, unsigned long voffset) #endif { unsigned long lock; @@ -1431,7 +1436,7 @@ gfx_set_display_video_downscale(unsigned short srch, unsigned short dsth) if (dsth > srch || dsth <= (srch >> 1)) delta = 0; else - delta = (((unsigned long)srch << 14) / (unsigned long)dsth) << 18; + delta = (((unsigned long) srch << 14) / (unsigned long) dsth) << 18; WRITE_REG32(MDC_UNLOCK, MDC_UNLOCK_VALUE); WRITE_REG32(MDC_VID_DS_DELTA, delta); @@ -1518,8 +1523,8 @@ gfx_wait_vertical_blank(void) #endif { if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); } return (0); } @@ -1549,8 +1554,8 @@ gfx_enable_panning(int x, int y) /* TEST FOR NO-WORK */ - if (x >= DeltaX && x < ((int)PanelWidth + DeltaX) && - y >= DeltaY && y < ((int)PanelHeight + DeltaY)) + if (x >= DeltaX && x < ((int) PanelWidth + DeltaX) && + y >= DeltaY && y < ((int) PanelHeight + DeltaY)) return; /* ADJUST PANNING VARIABLES WHEN CURSOR EXCEEDS BOUNDARY */ @@ -1560,14 +1565,14 @@ gfx_enable_panning(int x, int y) if (x < DeltaX) DeltaX = x; - else if (x >= (DeltaX + (int)PanelWidth)) - DeltaX = x - (int)PanelWidth + 1; + else if (x >= (DeltaX + (int) PanelWidth)) + DeltaX = x - (int) PanelWidth + 1; if (y < DeltaY) DeltaY = y; - else if (y >= (DeltaY + (int)PanelHeight)) - DeltaY = y - (int)PanelHeight + 1; + else if (y >= (DeltaY + (int) PanelHeight)) + DeltaY = y - (int) PanelHeight + 1; /* CALCULATE THE START OFFSET */ @@ -1596,11 +1601,13 @@ gfx_enable_panning(int x, int y) #if GFX_DISPLAY_DYNAMIC int gu2_is_panel_mode_supported(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp) + unsigned short width, unsigned short height, + unsigned short bpp) #else int gfx_is_panel_mode_supported(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp) + unsigned short width, unsigned short height, + unsigned short bpp) #endif { unsigned int mode; @@ -1611,7 +1618,7 @@ gfx_is_panel_mode_supported(int panelResX, int panelResY, (FixedParams[mode].yres == height) && (FixedParams[mode].panelresx == panelResX) && (FixedParams[mode].panelresy == panelResY)) { - return ((int)mode); + return ((int) mode); } } @@ -1626,19 +1633,19 @@ gfx_is_panel_mode_supported(int panelResX, int panelResY, #if GFX_DISPLAY_DYNAMIC int gu2_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #else int gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #endif { unsigned int mode; ModeWidth = width; ModeHeight = height; - PanelWidth = (unsigned short)panelResX; - PanelHeight = (unsigned short)panelResY; + PanelWidth = (unsigned short) panelResX; + PanelHeight = (unsigned short) panelResY; PanelEnable = 1; /* LOOP THROUGH THE AVAILABLE MODES TO FIND A MATCH */ @@ -1652,14 +1659,16 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, FIXEDTIMINGS *fmode = &FixedParams[mode]; gfx_set_display_timings(bpp, 3, fmode->hactive, - fmode->hblankstart, fmode->hsyncstart, fmode->hsyncend, - fmode->hblankend, fmode->htotal, fmode->vactive, - fmode->vblankstart, fmode->vsyncstart, fmode->vsyncend, - fmode->vblankend, fmode->vtotal, fmode->frequency); + fmode->hblankstart, fmode->hsyncstart, + fmode->hsyncend, fmode->hblankend, + fmode->htotal, fmode->vactive, + fmode->vblankstart, fmode->vsyncstart, + fmode->vsyncend, fmode->vblankend, + fmode->vtotal, fmode->frequency); return (1); - } /* end if() */ - } /* end for() */ + } /* end if() */ + } /* end for() */ return (-1); } @@ -1671,11 +1680,11 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, #if GFX_DISPLAY_DYNAMIC int gu2_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #else int gfx_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) #endif { /* SET VALID BPP */ @@ -1693,8 +1702,8 @@ gfx_set_panel_present(int panelResX, int panelResY, unsigned short width, ModeWidth = width; ModeHeight = height; - PanelWidth = (unsigned short)panelResX; - PanelHeight = (unsigned short)panelResY; + PanelWidth = (unsigned short) panelResX; + PanelHeight = (unsigned short) panelResY; PanelEnable = 1; gbpp = bpp; @@ -1721,7 +1730,7 @@ unsigned short gfx_get_display_pitch(void) #endif { - return ((unsigned short)(READ_REG32(MDC_GFX_PITCH) & 0x0000FFFF) << 3); + return ((unsigned short) (READ_REG32(MDC_GFX_PITCH) & 0x0000FFFF) << 3); } /*---------------------------------------------------------------------------- @@ -1736,11 +1745,11 @@ gfx_get_display_pitch(void) #if GFX_DISPLAY_DYNAMIC int gu2_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency) + unsigned long frequency) #else int gfx_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index; @@ -1750,8 +1759,8 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, gfx_mode_bpp_conversion_def(bpp) for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned int)xres) && - (DisplayParams[index].vactive == (unsigned int)yres) && + if ((DisplayParams[index].hactive == (unsigned int) xres) && + (DisplayParams[index].vactive == (unsigned int) yres) && (DisplayParams[index].flags & bpp_flag) && (DisplayParams[index].frequency == frequency)) { int hz = 0; @@ -1790,11 +1799,11 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, #if GFX_DISPLAY_DYNAMIC int gu2_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #else int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index, closematch = 0; @@ -1810,10 +1819,10 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { - if ((DisplayParams[index].htotal == (unsigned int)xres) && - (DisplayParams[index].vtotal == (unsigned int)yres) && + if ((DisplayParams[index].htotal == (unsigned int) xres) && + (DisplayParams[index].vtotal == (unsigned int) yres) && (DisplayParams[index].flags & bpp_flag)) { - diff = (long)frequency - (long)DisplayParams[index].frequency; + diff = (long) frequency - (long) DisplayParams[index].frequency; if (diff < 0) diff = -diff; @@ -1857,11 +1866,11 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, #if GFX_DISPLAY_DYNAMIC int gu2_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #else int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) #endif { unsigned int index, closematch = 0; @@ -1877,10 +1886,10 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, /* Search the table for the closest frequency (16.16 format). */ min = 0x7fffffff; for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned int)xres) && - (DisplayParams[index].vactive == (unsigned int)yres) && + if ((DisplayParams[index].hactive == (unsigned int) xres) && + (DisplayParams[index].vactive == (unsigned int) yres) && (DisplayParams[index].flags & bpp_flag)) { - diff = (long)frequency - (long)DisplayParams[index].frequency; + diff = (long) frequency - (long) DisplayParams[index].frequency; if (diff < 0) diff = -diff; @@ -1922,11 +1931,11 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, #if GFX_DISPLAY_DYNAMIC int gu2_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency) + int *frequency) #else int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency) + int *frequency) #endif { unsigned int index; @@ -1940,9 +1949,9 @@ gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, /* FIND THE REGISTER VALUES FOR THE DESIRED FREQUENCY */ /* Search the table for the closest frequency (16.16 format). */ - for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { - if ((DisplayParams[index].hactive == (unsigned short)xres) && - (DisplayParams[index].vactive == (unsigned short)yres) && + for (index = 0; index < NUM_RC_DISPLAY_MODES; index++) { + if ((DisplayParams[index].hactive == (unsigned short) xres) && + (DisplayParams[index].vactive == (unsigned short) yres) && (DisplayParams[index].flags & bpp_flag) && (DisplayParams[index].flags & hz_flag)) { *frequency = DisplayParams[index].frequency; @@ -1999,8 +2008,8 @@ gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz) gfx_mode_bpp_conversion_def(*bpp) for (mode = 0; mode < NUM_RC_DISPLAY_MODES; mode++) { - if ((DisplayParams[mode].hactive == (unsigned int)*xres) && - (DisplayParams[mode].vactive == (unsigned int)*yres) && + if ((DisplayParams[mode].hactive == (unsigned int) *xres) && + (DisplayParams[mode].vactive == (unsigned int) *yres) && (DisplayParams[mode].frequency == pll_freq) && (DisplayParams[mode].flags & bpp_flag)) { @@ -2122,7 +2131,7 @@ unsigned short gfx_get_hactive(void) #endif { - return ((unsigned short)((READ_REG32(MDC_H_ACTIVE_TIMING) & 0x0FF8) + 8)); + return ((unsigned short) ((READ_REG32(MDC_H_ACTIVE_TIMING) & 0x0FF8) + 8)); } /*--------------------------------------------------------------------------- @@ -2137,7 +2146,7 @@ unsigned short gfx_get_hsync_start(void) #endif { - return ((unsigned short)((READ_REG32(MDC_H_SYNC_TIMING) & 0x0FF8) + 8)); + return ((unsigned short) ((READ_REG32(MDC_H_SYNC_TIMING) & 0x0FF8) + 8)); } /*--------------------------------------------------------------------------- @@ -2152,8 +2161,8 @@ unsigned short gfx_get_hsync_end(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_H_SYNC_TIMING) >> 16) & 0x0FF8) - + 8)); + return ((unsigned short) (((READ_REG32(MDC_H_SYNC_TIMING) >> 16) & 0x0FF8) + + 8)); } /*--------------------------------------------------------------------------- @@ -2168,8 +2177,8 @@ unsigned short gfx_get_htotal(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_H_ACTIVE_TIMING) >> 16) & - 0x0FF8) + 8)); + return ((unsigned short) (((READ_REG32(MDC_H_ACTIVE_TIMING) >> 16) & + 0x0FF8) + 8)); } /*--------------------------------------------------------------------------- @@ -2184,7 +2193,7 @@ unsigned short gfx_get_vactive(void) #endif { - return ((unsigned short)((READ_REG32(MDC_V_ACTIVE_TIMING) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(MDC_V_ACTIVE_TIMING) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2199,8 +2208,8 @@ unsigned short gfx_get_vsync_end(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_V_SYNC_TIMING) >> 16) & 0x07FF) - + 1)); + return ((unsigned short) (((READ_REG32(MDC_V_SYNC_TIMING) >> 16) & 0x07FF) + + 1)); } /*--------------------------------------------------------------------------- @@ -2215,8 +2224,8 @@ unsigned short gfx_get_vtotal(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_V_ACTIVE_TIMING) >> 16) & - 0x07FF) + 1)); + return ((unsigned short) (((READ_REG32(MDC_V_ACTIVE_TIMING) >> 16) & + 0x07FF) + 1)); } /*---------------------------------------------------------------------------- @@ -2275,11 +2284,11 @@ gfx_get_vline(void) * transitioning */ do current_scan_line = - (unsigned short)(READ_REG32(MDC_LINE_CNT_STATUS) & - MDC_LNCNT_V_LINE_CNT); + (unsigned short) (READ_REG32(MDC_LINE_CNT_STATUS) & + MDC_LNCNT_V_LINE_CNT); while (current_scan_line != - (unsigned short)(READ_REG32(MDC_LINE_CNT_STATUS) & - MDC_LNCNT_V_LINE_CNT)); + (unsigned short) (READ_REG32(MDC_LINE_CNT_STATUS) & + MDC_LNCNT_V_LINE_CNT)); return (current_scan_line >> 16); } @@ -2332,7 +2341,7 @@ unsigned short gfx_get_hblank_start(void) #endif { - return ((unsigned short)((READ_REG32(MDC_H_BLANK_TIMING) & 0x0FF8) + 8)); + return ((unsigned short) ((READ_REG32(MDC_H_BLANK_TIMING) & 0x0FF8) + 8)); } /*--------------------------------------------------------------------------- @@ -2347,8 +2356,8 @@ unsigned short gfx_get_hblank_end(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_H_BLANK_TIMING) >> 16) & 0x0FF8) - + 8)); + return ((unsigned short) (((READ_REG32(MDC_H_BLANK_TIMING) >> 16) & 0x0FF8) + + 8)); } /*--------------------------------------------------------------------------- @@ -2363,7 +2372,7 @@ unsigned short gfx_get_vblank_start(void) #endif { - return ((unsigned short)((READ_REG32(MDC_V_BLANK_TIMING) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(MDC_V_BLANK_TIMING) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2378,7 +2387,7 @@ unsigned short gfx_get_vsync_start(void) #endif { - return ((unsigned short)((READ_REG32(MDC_V_SYNC_TIMING) & 0x07FF) + 1)); + return ((unsigned short) ((READ_REG32(MDC_V_SYNC_TIMING) & 0x07FF) + 1)); } /*--------------------------------------------------------------------------- @@ -2393,8 +2402,8 @@ unsigned short gfx_get_vblank_end(void) #endif { - return ((unsigned short)(((READ_REG32(MDC_V_BLANK_TIMING) >> 16) & 0x07FF) - + 1)); + return ((unsigned short) (((READ_REG32(MDC_V_BLANK_TIMING) >> 16) & 0x07FF) + + 1)); } /*---------------------------------------------------------------------------- @@ -2466,7 +2475,7 @@ gfx_get_cursor_position(void) #endif { return ((READ_REG32(MDC_CURSOR_X) & 0x07FF) | - ((READ_REG32(MDC_CURSOR_Y) << 16) & 0x07FF0000)); + ((READ_REG32(MDC_CURSOR_Y) << 16) & 0x07FF0000)); } /*---------------------------------------------------------------------------- @@ -2482,7 +2491,7 @@ gfx_get_cursor_clip(void) #endif { return (((READ_REG32(MDC_CURSOR_X) >> 11) & 0x03F) | - ((READ_REG32(MDC_CURSOR_Y) << 5) & 0x3F0000)); + ((READ_REG32(MDC_CURSOR_Y) << 5) & 0x3F0000)); } /*---------------------------------------------------------------------------- @@ -2499,7 +2508,8 @@ gfx_get_cursor_color(int color) { if (color) { WRITE_REG32(MDC_PAL_ADDRESS, 0x101); - } else { + } + else { WRITE_REG32(MDC_PAL_ADDRESS, 0x100); } return READ_REG32(MDC_PAL_DATA); @@ -2617,7 +2627,7 @@ gfx_get_compression_pitch(void) { unsigned short pitch; - pitch = (unsigned short)(READ_REG32(MDC_GFX_PITCH) >> 16); + pitch = (unsigned short) (READ_REG32(MDC_GFX_PITCH) >> 16); return (pitch << 3); } @@ -2635,7 +2645,7 @@ gfx_get_compression_size(void) { unsigned short size; - size = (unsigned short)((READ_REG32(MDC_LINE_SIZE) >> 16) & 0x7F) - 1; + size = (unsigned short) ((READ_REG32(MDC_LINE_SIZE) >> 16) & 0x7F) - 1; return ((size << 3) + 32); } @@ -2658,7 +2668,7 @@ gfx_get_valid_bit(int line) offset |= line; WRITE_REG32(MDC_PHY_MEM_OFFSET, offset); - valid = (int)READ_REG32(MDC_DV_ACC) & 2; + valid = (int) READ_REG32(MDC_DV_ACC) & 2; if (valid) return 1; @@ -2693,11 +2703,13 @@ gfx_get_display_video_offset(void) #if GFX_DISPLAY_DYNAMIC void gu2_get_display_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset) + unsigned long *uoffset, + unsigned long *voffset) #else void gfx_get_display_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset) + unsigned long *uoffset, + unsigned long *voffset) #endif { *yoffset = (READ_REG32(MDC_VID_Y_ST_OFFSET) & 0x0FFFFFFF); @@ -2760,7 +2772,7 @@ int gfx_get_display_video_downscale_enable(void) #endif { - return ((int)((READ_REG32(MDC_GENERAL_CFG) >> 19) & 1)); + return ((int) ((READ_REG32(MDC_GENERAL_CFG) >> 19) & 1)); } /*--------------------------------------------------------------------------- @@ -2783,6 +2795,6 @@ gfx_get_display_video_size(void) return ((READ_REG32(MDC_LINE_SIZE) >> 21) & 0x000007FF); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_dcdr.c b/driver/xf86-video-geode/src/gfx/gfx_dcdr.c index 57abe3745..40a4b47ae 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_dcdr.c +++ b/driver/xf86-video-geode/src/gfx/gfx_dcdr.c @@ -219,7 +219,7 @@ gfx_set_decoder_output_size(unsigned short width, unsigned short height) */ int gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) { int status = GFX_STATUS_UNSUPPORTED; @@ -409,7 +409,7 @@ gfx_get_decoder_hue(void) if (gfx_decoder_type == GFX_DECODER_SAA7114) hue = saa7114_get_decoder_hue(); #endif - return ((char)hue); + return ((char) hue); } /*---------------------------------------------------------------------------- @@ -492,8 +492,8 @@ gfx_get_decoder_vbi_format(int line) return (format); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ -#endif /* GFX_DECODER_DYNAMIC */ +#endif /* GFX_DECODER_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_defs.h b/driver/xf86-video-geode/src/gfx/gfx_defs.h index dde8385a8..045128c78 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_defs.h +++ b/driver/xf86-video-geode/src/gfx/gfx_defs.h @@ -112,9 +112,9 @@ /* ACCESS TO MSRS */ void gfx_msr_asm_write(unsigned short msrReg, unsigned long msrAddr, - unsigned long *ptrHigh, unsigned long *ptrLow); + unsigned long *ptrHigh, unsigned long *ptrLow); void gfx_msr_asm_read(unsigned short msrReg, unsigned long msrAddr, - unsigned long *ptrHigh, unsigned long *ptrLow); + unsigned long *ptrHigh, unsigned long *ptrLow); #define MSR_READ( MBD_MSR_CAP, address, valueHigh_ptr, valueLow_ptr ) \ gfx_msr_asm_read( ((unsigned short)(MBD_MSR_CAP)), address, \ diff --git a/driver/xf86-video-geode/src/gfx/gfx_disp.c b/driver/xf86-video-geode/src/gfx/gfx_disp.c index a1cd78f30..62238b205 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_disp.c +++ b/driver/xf86-video-geode/src/gfx/gfx_disp.c @@ -117,513 +117,513 @@ DISPLAYMODE DisplayParams[] = { /* 320 x 200 */ { - GFX_MODE_70HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ - GFX_MODE_NEG_HSYNC | /* negative HSYNC */ - GFX_MODE_PIXEL_DOUBLE | /* Double width */ - GFX_MODE_LINE_DOUBLE, /* Double height */ - 0x140, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horizontal timings */ - 0x0C8, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ - 0x00192CCC, /* freq = 25.175 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ + GFX_MODE_NEG_HSYNC | /* negative HSYNC */ + GFX_MODE_PIXEL_DOUBLE | /* Double width */ + GFX_MODE_LINE_DOUBLE, /* Double height */ + 0x140, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horizontal timings */ + 0x0C8, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ + 0x00192CCC, /* freq = 25.175 MHz */ + }, /* 320 x 240 */ { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ - GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC | /* negative syncs */ - GFX_MODE_PIXEL_DOUBLE | /* Double width */ - GFX_MODE_LINE_DOUBLE, /* Double height */ - 0x0140, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, - /* horizontal timings */ - 0x00F0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, - /* vertical timings */ - 0x001F8000, /* freq = 31.5 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ + GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC | /* negative syncs */ + GFX_MODE_PIXEL_DOUBLE | /* Double width */ + GFX_MODE_LINE_DOUBLE, /* Double height */ + 0x0140, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, + /* horizontal timings */ + 0x00F0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, + /* vertical timings */ + 0x001F8000, /* freq = 31.5 MHz */ + }, /* 400 x 300 */ { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ - GFX_MODE_PIXEL_DOUBLE | /* Double width */ - GFX_MODE_LINE_DOUBLE, /* Double height */ - 0x0190, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, - /* horizontal timings */ - 0x012C, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, - /* vertical timings */ - 0x00318000, /* freq = 49.5 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ + GFX_MODE_PIXEL_DOUBLE | /* Double width */ + GFX_MODE_LINE_DOUBLE, /* Double height */ + 0x0190, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, + /* horizontal timings */ + 0x012C, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, + /* vertical timings */ + 0x00318000, /* freq = 49.5 MHz */ + }, /* 512 x 384 */ { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ - GFX_MODE_PIXEL_DOUBLE | /* Double width */ - GFX_MODE_LINE_DOUBLE, /* Double height */ - 0x0200, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, - /* horizontal timings */ - 0x0180, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, - /* vertical timings */ - 0x004EC000, /* freq = 78.75 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_16BPP | /* 8 and 16 BPP valid */ + GFX_MODE_PIXEL_DOUBLE | /* Double width */ + GFX_MODE_LINE_DOUBLE, /* Double height */ + 0x0200, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, + /* horizontal timings */ + 0x0180, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, + /* vertical timings */ + 0x004EC000, /* freq = 78.75 MHz */ + }, /* 640 x 400 */ { - GFX_MODE_70HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC, - /* negative HSYNC */ - 0x280, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horizontal timings */ - 0x190, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ - 0x00192CCC, /* freq = 25.175 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC, + /* negative HSYNC */ + 0x280, 0x288, 0x290, 0x2F0, 0x318, 0x320, /* horizontal timings */ + 0x190, 0x197, 0x19C, 0x19E, 0x1BA, 0x1C1, /* vertical timings */ + 0x00192CCC, /* freq = 25.175 MHz */ + }, /* 640x480 */ { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0280, 0x0288, 0x0290, 0x02E8, 0x0318, 0x0320, - /* horizontal timings */ - 0x01E0, 0x01E8, 0x01EA, 0x01EC, 0x0205, 0x020D, - /* vertical timings */ - 0x00192CCC, /* freq = 25.175 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0280, 0x0288, 0x0290, 0x02E8, 0x0318, 0x0320, + /* horizontal timings */ + 0x01E0, 0x01E8, 0x01EA, 0x01EC, 0x0205, 0x020D, + /* vertical timings */ + 0x00192CCC, /* freq = 25.175 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0280, 0x0280, 0x0298, 0x02D8, 0x0330, 0x0330, - /* horizontal timings */ - 0x01E0, 0x01E0, 0x01E2, 0x01E5, 0x01F4, 0x01F4, - /* vertical timings */ - 0x001C8F5C, /* freq = 28.560 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0280, 0x0280, 0x0298, 0x02D8, 0x0330, 0x0330, + /* horizontal timings */ + 0x01E0, 0x01E0, 0x01E2, 0x01E5, 0x01F4, 0x01F4, + /* vertical timings */ + 0x001C8F5C, /* freq = 28.560 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 72 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0280, 0x0288, 0x0298, 0x02c0, 0x0338, 0x0340, - /* horizontal timings */ - 0x01e0, 0x01e8, 0x01e9, 0x01ec, 0x0200, 0x0208, - /* vertical timings */ - 0x001F8000, /* freq = 31.5 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 72 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0280, 0x0288, 0x0298, 0x02c0, 0x0338, 0x0340, + /* horizontal timings */ + 0x01e0, 0x01e8, 0x01e9, 0x01ec, 0x0200, 0x0208, + /* vertical timings */ + 0x001F8000, /* freq = 31.5 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0280, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, - /* horizontal timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, - /* vertical timings */ - 0x001F8000, /* freq = 31.5 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0280, 0x0280, 0x0290, 0x02D0, 0x0348, 0x0348, + /* horizontal timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01F4, 0x01F4, + /* vertical timings */ + 0x001F8000, /* freq = 31.5 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0280, 0x0280, 0x02B8, 0x02F0, 0x0340, 0x0340, - /* horizontal timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, - /* vertical timings */ - 0x00240000, /* freq = 36.0 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0280, 0x0280, 0x02B8, 0x02F0, 0x0340, 0x0340, + /* horizontal timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, + /* vertical timings */ + 0x00240000, /* freq = 36.0 MHz */ + }, { - GFX_MODE_90HZ | /* refresh rate = 90 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0280, 0x0280, 0x02A0, 0x02E0, 0x0340, 0x0340, - /* horizontal timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FA, 0x01FA, - /* vertical timings */ - 0x0025E395, /* freq = 37.889 MHz */ - }, + GFX_MODE_90HZ | /* refresh rate = 90 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0280, 0x0280, 0x02A0, 0x02E0, 0x0340, 0x0340, + /* horizontal timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FA, 0x01FA, + /* vertical timings */ + 0x0025E395, /* freq = 37.889 MHz */ + }, { - GFX_MODE_100HZ | /* refresh rate = 100 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0280, 0x0280, 0x02A8, 0x02E8, 0x0350, 0x0350, - /* horizontal timings */ - 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, - /* vertical timings */ - 0x002B29BA, /* freq = 43.163 MHz */ - }, + GFX_MODE_100HZ | /* refresh rate = 100 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0280, 0x0280, 0x02A8, 0x02E8, 0x0350, 0x0350, + /* horizontal timings */ + 0x01E0, 0x01E0, 0x01E1, 0x01E4, 0x01FD, 0x01FD, + /* vertical timings */ + 0x002B29BA, /* freq = 43.163 MHz */ + }, /* 800x600 */ { - GFX_MODE_56HZ | /* refresh rate = 56 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0338, 0x0380, 0x0400, 0x0400, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025B, 0x0271, 0x0271, - /* vertical timings */ - 0x00240000, /* freq = 36.00 MHz */ - }, + GFX_MODE_56HZ | /* refresh rate = 56 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0338, 0x0380, 0x0400, 0x0400, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025B, 0x0271, 0x0271, + /* vertical timings */ + 0x00240000, /* freq = 36.00 MHz */ + }, { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0328, 0x0348, 0x03D0, 0x0418, 0x0420, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, - /* vertical timings */ - 0x00280000, /* freq = 40.00 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0328, 0x0348, 0x03D0, 0x0418, 0x0420, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025D, 0x0274, 0x0274, + /* vertical timings */ + 0x00280000, /* freq = 40.00 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0348, 0x0398, 0x0410, 0x0410, - /* horizontal timings */ - 0x0258, 0x0258, 0x025c, 0x025F, 0x0274, 0x0274, - /* vertical timings */ - 0x002DB851, /* freq = 45.72 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0348, 0x0398, 0x0410, 0x0410, + /* horizontal timings */ + 0x0258, 0x0258, 0x025c, 0x025F, 0x0274, 0x0274, + /* vertical timings */ + 0x002DB851, /* freq = 45.72 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 72 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0358, 0x03D0, 0x0410, 0x0410, - /* horizontal timings */ - 0x0258, 0x0258, 0x027D, 0x0283, 0x029A, 0x029A, - /* vertical timings */ - 0x00320000, /* freq = 49.5 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 72 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0358, 0x03D0, 0x0410, 0x0410, + /* horizontal timings */ + 0x0258, 0x0258, 0x027D, 0x0283, 0x029A, 0x029A, + /* vertical timings */ + 0x00320000, /* freq = 49.5 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, - /* vertical timings */ - 0x00318000, /* freq = 49.5 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0330, 0x0380, 0x0420, 0x0420, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0271, 0x0271, + /* vertical timings */ + 0x00318000, /* freq = 49.5 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0340, 0x0380, 0x0418, 0x0418, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x0277, - /* vertical timings */ - 0x00384000, /* freq = 56.25 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0340, 0x0380, 0x0418, 0x0418, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x0277, + /* vertical timings */ + 0x00384000, /* freq = 56.25 MHz */ + }, { - GFX_MODE_90HZ | /* refresh rate = 90 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0348, 0x03A0, 0x0420, 0x0420, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0278, 0x0278, - /* vertical timings */ - 0x003C10A3, /* freq = 60.065 MHz */ - }, + GFX_MODE_90HZ | /* refresh rate = 90 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0348, 0x03A0, 0x0420, 0x0420, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0278, 0x0278, + /* vertical timings */ + 0x003C10A3, /* freq = 60.065 MHz */ + }, { - GFX_MODE_100HZ | /* refresh rate = 100 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0320, 0x0320, 0x0350, 0x03A8, 0x0430, 0x0430, - /* horizontal timings */ - 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x027C, - /* vertical timings */ - 0x00442DD2, /* freq = 68.179 MHz */ - }, + GFX_MODE_100HZ | /* refresh rate = 100 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0320, 0x0320, 0x0350, 0x03A8, 0x0430, 0x0430, + /* horizontal timings */ + 0x0258, 0x0258, 0x0259, 0x025C, 0x0277, 0x027C, + /* vertical timings */ + 0x00442DD2, /* freq = 68.179 MHz */ + }, /* 1024x768 */ { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, - /* horizontal timings */ - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - /* vertical timings */ - 0x00410000, /* freq = 65.00 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, + /* horizontal timings */ + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + /* vertical timings */ + 0x00410000, /* freq = 65.00 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0530, 0x0530, - /* horizontal timings */ - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - /* vertical timings */ - 0x004B0000, /* freq = 75.00 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP | GFX_MODE_NEG_HSYNC | GFX_MODE_NEG_VSYNC, /* negative syncs */ + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0530, 0x0530, + /* horizontal timings */ + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + /* vertical timings */ + 0x004B0000, /* freq = 75.00 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 72 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0400, 0x0400, 0x0438, 0x04A8, 0x0550, 0x0550, - /* horizontal timings */ - 0x0300, 0x0300, 0x0304, 0x0307, 0x0324, 0x0324, - /* vertical timings */ - 0x004EC000, /* freq = 78.75 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 72 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0400, 0x0400, 0x0438, 0x04A8, 0x0550, 0x0550, + /* horizontal timings */ + 0x0300, 0x0300, 0x0304, 0x0307, 0x0324, 0x0324, + /* vertical timings */ + 0x004EC000, /* freq = 78.75 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0400, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, - /* horizontal timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, - /* vertical timings */ - 0x004EC000, /* freq = 78.75 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0400, 0x0400, 0x0410, 0x0470, 0x0520, 0x0520, + /* horizontal timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0320, 0x0320, + /* vertical timings */ + 0x004EC000, /* freq = 78.75 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0400, 0x0400, 0x0430, 0x0490, 0x0560, 0x0560, - /* horizontal timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0328, 0x0328, - /* vertical timings */ - 0x005E8000, /* freq = 94.50 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0400, 0x0400, 0x0430, 0x0490, 0x0560, 0x0560, + /* horizontal timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0328, 0x0328, + /* vertical timings */ + 0x005E8000, /* freq = 94.50 MHz */ + }, { - GFX_MODE_90HZ | /* refresh rate = 90 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0400, 0x0400, 0x0440, 0x04B0, 0x0560, 0x0560, - /* horizontal timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x0329, 0x0329, - /* vertical timings */ - 0x00642FDF, /* freq = 100.187 MHz */ - }, + GFX_MODE_90HZ | /* refresh rate = 90 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0400, 0x0400, 0x0440, 0x04B0, 0x0560, 0x0560, + /* horizontal timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x0329, 0x0329, + /* vertical timings */ + 0x00642FDF, /* freq = 100.187 MHz */ + }, { - GFX_MODE_100HZ | /* refresh rate = 100 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0400, 0x0400, 0x0448, 0x04B8, 0x0570, 0x0570, - /* horizontal timings */ - 0x0300, 0x0300, 0x0301, 0x0304, 0x032E, 0x032E, - /* vertical timings */ - 0x00714F1A, /* freq = 113.309 MHz */ - }, + GFX_MODE_100HZ | /* refresh rate = 100 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0400, 0x0400, 0x0448, 0x04B8, 0x0570, 0x0570, + /* horizontal timings */ + 0x0300, 0x0300, 0x0301, 0x0304, 0x032E, 0x032E, + /* vertical timings */ + 0x00714F1A, /* freq = 113.309 MHz */ + }, /* 1152x864 */ { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, - /* horizontal timings */ - 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, - /* vertical timings */ - 0x00519999, /* freq = 81.60 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04C0, 0x0538, 0x05F0, 0x05F0, + /* horizontal timings */ + 0x0360, 0x0360, 0x0361, 0x0364, 0x037F, 0x037F, + /* vertical timings */ + 0x00519999, /* freq = 81.60 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04C8, 0x0540, 0x0600, 0x0600, - /* horizontal timings */ - 0x0360, 0x0360, 0x0368, 0x036B, 0x038B, 0x038B, - /* vertical timings */ - 0x00618560, /* freq = 97.521 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04C8, 0x0540, 0x0600, 0x0600, + /* horizontal timings */ + 0x0360, 0x0360, 0x0368, 0x036B, 0x038B, 0x038B, + /* vertical timings */ + 0x00618560, /* freq = 97.521 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, - /* horizontal timings */ - 0x0360, 0x0360, 0x0367, 0x036A, 0x038B, 0x038B, - /* vertical timings */ - 0x00656B85, /* freq = 101.42 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, + /* horizontal timings */ + 0x0360, 0x0360, 0x0367, 0x036A, 0x038B, 0x038B, + /* vertical timings */ + 0x00656B85, /* freq = 101.42 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04C0, 0x0540, 0x0640, 0x0640, - /* horizontal timings */ - 0x0360, 0x0360, 0x0361, 0x0364, 0x0384, 0x0384, - /* vertical timings */ - 0x006C0000, /* freq = 108.00 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04C0, 0x0540, 0x0640, 0x0640, + /* horizontal timings */ + 0x0360, 0x0360, 0x0361, 0x0364, 0x0384, 0x0384, + /* vertical timings */ + 0x006C0000, /* freq = 108.00 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, - /* horizontal timings */ - 0x0360, 0x0360, 0x0363, 0x0366, 0x038B, 0x038B, - /* vertical timings */ - 0x0077A666, /* freq = 119.65 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04C8, 0x0548, 0x0610, 0x0610, + /* horizontal timings */ + 0x0360, 0x0360, 0x0363, 0x0366, 0x038B, 0x038B, + /* vertical timings */ + 0x0077A666, /* freq = 119.65 MHz */ + }, { - GFX_MODE_90HZ | /* refresh rate = 90 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, - /* horizontal timings */ - 0x0360, 0x0360, 0x0363, 0x0366, 0x038E, 0x038E, - /* vertical timings */ - 0x00806666, /* freq = 128.40 MHz */ - }, + GFX_MODE_90HZ | /* refresh rate = 90 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, + /* horizontal timings */ + 0x0360, 0x0360, 0x0363, 0x0366, 0x038E, 0x038E, + /* vertical timings */ + 0x00806666, /* freq = 128.40 MHz */ + }, { - GFX_MODE_100HZ | /* refresh rate = 100 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, - /* horizontal timings */ - 0x0360, 0x0360, 0x0365, 0x0368, 0x0398, 0x0398, - /* vertical timings */ - 0x00906147, /* freq = 144.38 MHz */ - }, + GFX_MODE_100HZ | /* refresh rate = 100 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0480, 0x0480, 0x04D0, 0x0550, 0x0620, 0x0620, + /* horizontal timings */ + 0x0360, 0x0360, 0x0365, 0x0368, 0x0398, 0x0398, + /* vertical timings */ + 0x00906147, /* freq = 144.38 MHz */ + }, /* 1280x1024 */ { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, - /* horizontal timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, - /* vertical timings */ - 0x006C0000, /* freq = 108.0 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0530, 0x05A0, 0x0698, 0x0698, + /* horizontal timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, + /* vertical timings */ + 0x006C0000, /* freq = 108.0 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, - /* horizontal timings */ - 0x0400, 0x0400, 0x040A, 0x040D, 0x0433, 0x0433, - /* vertical timings */ - 0x00821999, /* freq = 130.1 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, + /* horizontal timings */ + 0x0400, 0x0400, 0x040A, 0x040D, 0x0433, 0x0433, + /* vertical timings */ + 0x00821999, /* freq = 130.1 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 72 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, - /* horizontal timings */ - 0x0400, 0x0400, 0x0407, 0x040A, 0x0431, 0x0431, - /* vertical timings */ - 0x00858000, /* freq = 133.5 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 72 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0558, 0x05E0, 0x06C0, 0x06C0, + /* horizontal timings */ + 0x0400, 0x0400, 0x0407, 0x040A, 0x0431, 0x0431, + /* vertical timings */ + 0x00858000, /* freq = 133.5 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0510, 0x05A0, 0x0698, 0x0698, - /* horizontal timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, - /* vertical timings */ - 0x00870000, /* freq = 135.0 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0510, 0x05A0, 0x0698, 0x0698, + /* horizontal timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x042A, 0x042A, + /* vertical timings */ + 0x00870000, /* freq = 135.0 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0540, 0x05E0, 0x06C0, 0x06C0, - /* horizontal timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x0430, 0x0430, - /* vertical timings */ - 0x009D8000, /* freq = 157.5 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0540, 0x05E0, 0x06C0, 0x06C0, + /* horizontal timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x0430, 0x0430, + /* vertical timings */ + 0x009D8000, /* freq = 157.5 MHz */ + }, { - GFX_MODE_90HZ | /* refresh rate = 90 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0560, 0x05E8, 0x06D0, 0x06D0, - /* horizontal timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x0436, 0x0436, - /* vertical timings */ - 0x00A933F7, /* freq = 169.203 MHz */ - }, + GFX_MODE_90HZ | /* refresh rate = 90 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0560, 0x05E8, 0x06D0, 0x06D0, + /* horizontal timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x0436, 0x0436, + /* vertical timings */ + 0x00A933F7, /* freq = 169.203 MHz */ + }, { - GFX_MODE_100HZ | /* refresh rate = 100 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, - /* horizontal timings */ - 0x0400, 0x0400, 0x0401, 0x0404, 0x043D, 0x043D, - /* vertical timings */ - 0x00BEF5C2, /* freq = 190.96 MHz */ - }, + GFX_MODE_100HZ | /* refresh rate = 100 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0500, 0x0500, 0x0560, 0x05F0, 0x06E0, 0x06E0, + /* horizontal timings */ + 0x0400, 0x0400, 0x0401, 0x0404, 0x043D, 0x043D, + /* vertical timings */ + 0x00BEF5C2, /* freq = 190.96 MHz */ + }, /*********************************/ /* BEGIN REDCLOUD-SPECIFIC MODES */ @@ -632,64 +632,64 @@ DISPLAYMODE DisplayParams[] = { /* 1600 x 1200 */ { - GFX_MODE_60HZ | /* refresh rate = 60 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, - /* horizontal timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, - /* vertical timings */ - 0x00A20000, /* freq = 162.0 MHz */ - }, + GFX_MODE_60HZ | /* refresh rate = 60 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, + /* horizontal timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, + /* vertical timings */ + 0x00A20000, /* freq = 162.0 MHz */ + }, { - GFX_MODE_70HZ | /* refresh rate = 70 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, - /* horizontal timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, - /* vertical timings */ - 0x00BD0000, /* freq = 189.0 MHz */ - }, + GFX_MODE_70HZ | /* refresh rate = 70 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, + /* horizontal timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, + /* vertical timings */ + 0x00BD0000, /* freq = 189.0 MHz */ + }, { - GFX_MODE_72HZ | /* refresh rate = 72 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0640, 0x0640, 0x06B0, 0x0760, 0x0880, 0x0880, - /* horizontal timings */ - 0x04B0, 0x04B0, 0x04BD, 0x04C0, 0x04EF, 0x04EF, - /* vertical timings */ - 0x00C60000, /* freq = 198.0 MHz */ - }, + GFX_MODE_72HZ | /* refresh rate = 72 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0640, 0x0640, 0x06B0, 0x0760, 0x0880, 0x0880, + /* horizontal timings */ + 0x04B0, 0x04B0, 0x04BD, 0x04C0, 0x04EF, 0x04EF, + /* vertical timings */ + 0x00C60000, /* freq = 198.0 MHz */ + }, { - GFX_MODE_75HZ | /* refresh rate = 75 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, - /* horizontal timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, - /* vertical timings */ - 0x00CA8000, /* freq = 202.5 MHz */ - }, + GFX_MODE_75HZ | /* refresh rate = 75 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, + /* horizontal timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, + /* vertical timings */ + 0x00CA8000, /* freq = 202.5 MHz */ + }, { - GFX_MODE_85HZ | /* refresh rate = 85 */ - GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | - /* all BPP valid */ - GFX_MODE_16BPP | GFX_MODE_24BPP, - 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, - /* horizontal timings */ - 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, - /* vertical timings */ - 0x00E58000, /* freq = 229.5 MHz */ - }, + GFX_MODE_85HZ | /* refresh rate = 85 */ + GFX_MODE_8BPP | GFX_MODE_12BPP | GFX_MODE_15BPP | + /* all BPP valid */ + GFX_MODE_16BPP | GFX_MODE_24BPP, + 0x0640, 0x0640, 0x0680, 0x0740, 0x0870, 0x0870, + /* horizontal timings */ + 0x04B0, 0x04B0, 0x04B1, 0x04B4, 0x04E2, 0x04E2, + /* vertical timings */ + 0x00E58000, /* freq = 229.5 MHz */ + }, }; /* UPDATE THIS VARIABLE WHENEVER NEW REDCLOUD-SPECIFIC MODES ARE ADDED */ @@ -702,145 +702,145 @@ DISPLAYMODE DisplayParams[] = { FIXEDTIMINGS FixedParams[] = { /* 640x480 Panel */ {640, 480, 640, 480, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, {640, 480, 800, 600, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, {640, 480, 1024, 768, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, {640, 480, 1152, 864, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, {640, 480, 1280, 1024, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, {640, 480, 1600, 1200, - 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, - 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, - 0x00192CCC, - }, + 0x0280, 0x0280, 0x0290, 0x02E8, 0x0318, 0x0320, + 0x01E0, 0x01E0, 0x01EA, 0x01EC, 0x0205, 0x020D, + 0x00192CCC, + }, /* 800x600 Panel */ {800, 600, 640, 480, - 0x0280, 0x2d0, 0x2f8, 0x378, 0x3d0, 0x420, - 0x1e0, 0x21c, 0x21d, 0x221, 0x238, 0x274, - 0x00280000, - }, + 0x0280, 0x2d0, 0x2f8, 0x378, 0x3d0, 0x420, + 0x1e0, 0x21c, 0x21d, 0x221, 0x238, 0x274, + 0x00280000, + }, {800, 600, 800, 600, - 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, - 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, - 0x00280000, - }, + 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, + 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, + 0x00280000, + }, {800, 600, 1024, 768, - 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, - 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, - 0x00280000, - }, + 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, + 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, + 0x00280000, + }, {800, 600, 1152, 864, - 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, - 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, - 0x00280000, - }, + 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, + 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, + 0x00280000, + }, {800, 600, 1280, 1024, - 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, - 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, - 0x00280000, - }, + 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, + 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, + 0x00280000, + }, {800, 600, 1600, 1200, - 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, - 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, - 0x00280000, - }, + 0x320, 0x320, 0x348, 0x3c8, 0x420, 0x420, + 0x258, 0x258, 0x259, 0x25d, 0x274, 0x274, + 0x00280000, + }, /* 1024x768 panel */ {1024, 768, 640, 480, - 0x0280, 0x340, 0x368, 0x3e8, 0x480, 0x540, - 0x1e0, 0x270, 0x271, 0x275, 0x296, 0x326, - 0x00410000, - }, + 0x0280, 0x340, 0x368, 0x3e8, 0x480, 0x540, + 0x1e0, 0x270, 0x271, 0x275, 0x296, 0x326, + 0x00410000, + }, {1024, 768, 800, 600, - 0x0320, 0x390, 0x3b8, 0x438, 0x4D0, 0x540, - 0x258, 0x2ac, 0x2ad, 0x2b1, 0x2D2, 0x326, - 0x00410000, - }, + 0x0320, 0x390, 0x3b8, 0x438, 0x4D0, 0x540, + 0x258, 0x2ac, 0x2ad, 0x2b1, 0x2D2, 0x326, + 0x00410000, + }, {1024, 768, 1024, 768, - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - 0x00410000, - }, + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + 0x00410000, + }, {1024, 768, 1152, 864, - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - 0x00410000, - }, + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + 0x00410000, + }, {1024, 768, 1280, 1024, - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - 0x00410000, - }, + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + 0x00410000, + }, {1024, 768, 1600, 1200, - 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, - 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, - 0x00410000, - }, + 0x0400, 0x0400, 0x0418, 0x04A0, 0x0540, 0x0540, + 0x0300, 0x0300, 0x0303, 0x0309, 0x0326, 0x0326, + 0x00410000, + }, /* 1280x1024 panel */ {1280, 1024, 640, 480, - 640, 960, 1008, 1120, 1368, 1688, - 480, 752, 753, 756, 794, 1066, - 0x006C0000, - }, + 640, 960, 1008, 1120, 1368, 1688, + 480, 752, 753, 756, 794, 1066, + 0x006C0000, + }, {1280, 1024, 800, 600, - 800, 1040, 1088, 1200, 1448, 1688, - 600, 812, 813, 816, 854, 1066, - 0x006C0000, - }, + 800, 1040, 1088, 1200, 1448, 1688, + 600, 812, 813, 816, 854, 1066, + 0x006C0000, + }, {1280, 1024, 1024, 768, - 1024, 1152, 1200, 1312, 1560, 1688, - 768, 896, 897, 900, 938, 1066, - 0x006C0000, - }, + 1024, 1152, 1200, 1312, 1560, 1688, + 768, 896, 897, 900, 938, 1066, + 0x006C0000, + }, {1280, 1024, 1152, 864, - 1152, 1216, 1264, 1376, 1624, 1688, - 864, 944, 945, 948, 986, 1066, - 0x006C0000, - }, + 1152, 1216, 1264, 1376, 1624, 1688, + 864, 944, 945, 948, 986, 1066, + 0x006C0000, + }, {1280, 1024, 1280, 1024, - 1280, 1280, 1328, 1440, 1688, 1688, - 1024, 1024, 1025, 1028, 1066, 1066, - 0x006C0000, - }, + 1280, 1280, 1328, 1440, 1688, 1688, + 1024, 1024, 1025, 1028, 1066, 1066, + 0x006C0000, + }, }; @@ -944,28 +944,31 @@ gfx_set_display_mode(int xres, int yres, int bpp, int hz) */ int gfx_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblankstart, - unsigned short hsyncstart, unsigned short hsyncend, - unsigned short hblankend, unsigned short htotal, - unsigned short vactive, unsigned short vblankstart, - unsigned short vsyncstart, unsigned short vsyncend, - unsigned short vblankend, unsigned short vtotal, unsigned long frequency) + unsigned short hactive, unsigned short hblankstart, + unsigned short hsyncstart, unsigned short hsyncend, + unsigned short hblankend, unsigned short htotal, + unsigned short vactive, unsigned short vblankstart, + unsigned short vsyncstart, unsigned short vsyncend, + unsigned short vblankend, unsigned short vtotal, + unsigned long frequency) { int retval = 0; #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) retval = gu1_set_display_timings(bpp, flags, - hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal, - vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal, - frequency); + hactive, hblankstart, hsyncstart, + hsyncend, hblankend, htotal, vactive, + vblankstart, vsyncstart, vsyncend, + vblankend, vtotal, frequency); #endif #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) retval = gu2_set_display_timings(bpp, flags, - hactive, hblankstart, hsyncstart, hsyncend, hblankend, htotal, - vactive, vblankstart, vsyncstart, vsyncend, vblankend, vtotal, - frequency); + hactive, hblankstart, hsyncstart, + hsyncend, hblankend, htotal, vactive, + vblankstart, vsyncstart, vsyncend, + vblankend, vtotal, frequency); #endif return (retval); } @@ -1084,8 +1087,8 @@ gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor) */ void gfx_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot) + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot) { #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) @@ -1103,7 +1106,7 @@ gfx_set_cursor_position(unsigned long memoffset, */ void gfx_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) { #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) @@ -1121,7 +1124,7 @@ gfx_set_cursor_shape32(unsigned long memoffset, */ void gfx_set_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask) + unsigned long *andmask, unsigned long *xormask) { #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) @@ -1148,7 +1151,7 @@ gfx_set_icon_enable(int enable) */ void gfx_set_icon_colors(unsigned long color0, unsigned long color1, - unsigned long color2) + unsigned long color2) { #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) @@ -1175,7 +1178,8 @@ gfx_set_icon_position(unsigned long memoffset, unsigned short xpos) */ void gfx_set_icon_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask, unsigned int lines) + unsigned long *andmask, unsigned long *xormask, + unsigned int lines) { #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) @@ -1362,7 +1366,7 @@ gfx_set_display_video_offset(unsigned long offset) */ void gfx_set_display_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset) + unsigned long uoffset, unsigned long voffset) { #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) @@ -1538,7 +1542,8 @@ gfx_enable_panning(int x, int y) */ int gfx_is_panel_mode_supported(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp) + unsigned short width, unsigned short height, + unsigned short bpp) { int status = -1; @@ -1546,7 +1551,7 @@ gfx_is_panel_mode_supported(int panelResX, int panelResY, if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) status = gu2_is_panel_mode_supported(panelResX, panelResY, width, height, - bpp); + bpp); #endif return (status); @@ -1558,7 +1563,7 @@ gfx_is_panel_mode_supported(int panelResX, int panelResY, */ int gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) { int status = 0; @@ -1581,7 +1586,7 @@ gfx_set_fixed_timings(int panelResX, int panelResY, unsigned short width, */ int gfx_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp) + unsigned short height, unsigned short bpp) { int status = 0; @@ -1635,7 +1640,7 @@ gfx_set_vtotal(unsigned short vtotal) */ int gfx_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency) + unsigned long frequency) { int freq = 0; @@ -1656,7 +1661,7 @@ gfx_mode_frequency_supported(int xres, int yres, int bpp, */ int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) { #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) @@ -1676,7 +1681,7 @@ gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, */ int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency) + unsigned long frequency) { #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) @@ -1696,21 +1701,19 @@ gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, */ int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency) + int *frequency) { int retval = -1; #if GFX_DISPLAY_GU1 if (gfx_display_type & GFX_DISPLAY_TYPE_GU1) retval = - gu1_get_frequency_from_refreshrate(xres, yres, bpp, hz, - frequency); + gu1_get_frequency_from_refreshrate(xres, yres, bpp, hz, frequency); #endif #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) retval = - gu2_get_frequency_from_refreshrate(xres, yres, bpp, hz, - frequency); + gu2_get_frequency_from_refreshrate(xres, yres, bpp, hz, frequency); #endif return retval; @@ -2475,6 +2478,7 @@ unsigned long gfx_get_display_video_color_key(void) { unsigned long value = 0; + return (value); } @@ -2504,7 +2508,8 @@ gfx_get_display_video_offset(void) */ void gfx_get_display_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset) + unsigned long *uoffset, + unsigned long *voffset) { #if GFX_DISPLAY_GU2 if (gfx_display_type & GFX_DISPLAY_TYPE_GU2) @@ -2587,9 +2592,10 @@ unsigned long gfx_get_display_video_color_key_mask(void) { unsigned long mask = 0; + return (mask); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ -#endif /* GFX_DISPLAY_DYNAMIC */ +#endif /* GFX_DISPLAY_DYNAMIC */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_i2c.c b/driver/xf86-video-geode/src/gfx/gfx_i2c.c index 7a3ad422c..0ceb460bb 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_i2c.c +++ b/driver/xf86-video-geode/src/gfx/gfx_i2c.c @@ -90,7 +90,7 @@ gfx_i2c_select_gpio(int clock, int data) */ int gfx_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) { int status = -1; @@ -111,7 +111,7 @@ gfx_i2c_write(unsigned char busnum, unsigned char chipadr, */ int gfx_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) { int status = -1; @@ -163,6 +163,6 @@ gfx_i2c_cleanup(void) #endif } -#endif /* GFX_I2C_DYNAMIC */ +#endif /* GFX_I2C_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_init.c b/driver/xf86-video-geode/src/gfx/gfx_init.c index 469c70f0f..648d9cbab 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_init.c +++ b/driver/xf86-video-geode/src/gfx/gfx_init.c @@ -122,7 +122,8 @@ gfx_detect_chip(void) } if (rev > 0x6) gfx_chip_revision = SC1200_FUTURE_REV; - } else if (pid == 0x5) { + } + else if (pid == 0x5) { if (rev == 0x6) gfx_chip_revision = SC1200_REV_D2_MVE; else if (rev > 0x6) @@ -184,12 +185,13 @@ gfx_detect_cpu(void) /* Major version is one less than what appears in DIR1 */ if ((dir1 & 0xF0) < 0x70) { - version = GFX_CPU_GXLV | (((((unsigned long)dir1 >> 4) - 1) << 8)) | /* major - 1 */ - ((((unsigned long)dir1 & 0x0F)) << 16); /* minor */ - } else { - version = GFX_CPU_GXLV | ((((unsigned long)dir1 >> 4)) - << 8) | /* major */ - ((((unsigned long)dir1 & 0x0F)) << 16); /* minor */ + version = GFX_CPU_GXLV | (((((unsigned long) dir1 >> 4) - 1) << 8)) | /* major - 1 */ + ((((unsigned long) dir1 & 0x0F)) << 16); /* minor */ + } + else { + version = GFX_CPU_GXLV | ((((unsigned long) dir1 >> 4)) + << 8) | /* major */ + ((((unsigned long) dir1 & 0x0F)) << 16); /* minor */ } /* Currently always CS5530 for video overlay. */ @@ -207,13 +209,14 @@ gfx_detect_cpu(void) gfx_tv_type = GFX_TV_TYPE_FS451; #endif } - } else if (dir0 == 0xB0) { + } + else if (dir0 == 0xB0) { /* CHECK FOR SC1200 */ if ((dir1 == 0x70) || (dir1 == 0x81)) { - version = GFX_CPU_SC1200 | ((((unsigned long)dir1 >> 4)) - << 8) | /* major */ - ((((unsigned long)dir1 & 0x0F)) << 16); /* minor */ + version = GFX_CPU_SC1200 | ((((unsigned long) dir1 >> 4)) + << 8) | /* major */ + ((((unsigned long) dir1 & 0x0F)) << 16); /* minor */ /* Detect SC1200 revision */ @@ -356,12 +359,12 @@ gfx_detect_cpu(void) ((msr_value.low & 0x0F) << 16); /* MINOR */ /* READ THE CORE FREQUENCY */ - /* I can't find GX implementations that need - * this - we're trying to avoid virtual reads - * anyway, so bail on it - */ + /* I can't find GX implementations that need + * this - we're trying to avoid virtual reads + * anyway, so bail on it + */ - /* gfx_cpu_frequency = gfx_get_core_freq(); */ + /* gfx_cpu_frequency = gfx_get_core_freq(); */ /* SET THE GP SCRATCH AREA */ /* Color bitmap BLTs use the last 16K of frame buffer space */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_mode.h b/driver/xf86-video-geode/src/gfx/gfx_mode.h index f9b42b0c7..a38bc730d 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_mode.h +++ b/driver/xf86-video-geode/src/gfx/gfx_mode.h @@ -127,8 +127,7 @@ /* STRUCTURE DEFINITION */ -typedef struct tagDISPLAYMODE -{ +typedef struct tagDISPLAYMODE { /* DISPLAY MODE FLAGS */ /* Specify valid color depths and the refresh rate. */ @@ -157,8 +156,7 @@ typedef struct tagDISPLAYMODE } DISPLAYMODE; /* For Fixed timings */ -typedef struct tagFIXEDTIMINGS -{ +typedef struct tagFIXEDTIMINGS { /* DISPLAY MODE FLAGS */ /* Specify valid color depths and the refresh rate. */ @@ -189,6 +187,6 @@ typedef struct tagFIXEDTIMINGS } FIXEDTIMINGS; -#endif /* !_gfx_mode_h */ +#endif /* !_gfx_mode_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_msr.c b/driver/xf86-video-geode/src/gfx/gfx_msr.c index 1705acb6e..a7799717a 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_msr.c +++ b/driver/xf86-video-geode/src/gfx/gfx_msr.c @@ -140,8 +140,7 @@ gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) *---------------------------------------------------------------------------- */ DEV_STATUS -gfx_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) +gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) { DEV_STATUS ret_value = NOT_KNOWN; diff --git a/driver/xf86-video-geode/src/gfx/gfx_priv.h b/driver/xf86-video-geode/src/gfx/gfx_priv.h index 5647af849..6a2218ec1 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_priv.h +++ b/driver/xf86-video-geode/src/gfx/gfx_priv.h @@ -89,13 +89,13 @@ DEV_STATUS redcloud_find_msr_device(MSR * pDev); int redcloud_msr_init(void); DEV_STATUS redcloud_id_msr_device(MSR * pDev, unsigned long address); DEV_STATUS redcloud_get_msr_dev_address(unsigned int device, - unsigned long *address); + unsigned long *address); DEV_STATUS redcloud_get_glink_id_at_address(unsigned int *device, - unsigned long address); + unsigned long address); DEV_STATUS redcloud_msr_read(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); DEV_STATUS redcloud_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); #endif #endif @@ -131,13 +131,14 @@ int gu1_set_display_bpp(unsigned short bpp); int gu1_is_display_mode_supported(int xres, int yres, int bpp, int hz); int gu1_set_display_mode(int xres, int yres, int bpp, int hz); int gu1_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblank_start, - unsigned short hsync_start, unsigned short hsync_end, - unsigned short hblank_end, unsigned short htotal, - unsigned short vactive, unsigned short vblank_start, - unsigned short vsync_start, unsigned short vsync_end, - unsigned short vblank_end, unsigned short vtotal, - unsigned long frequency); + unsigned short hactive, unsigned short hblank_start, + unsigned short hsync_start, + unsigned short hsync_end, unsigned short hblank_end, + unsigned short htotal, unsigned short vactive, + unsigned short vblank_start, + unsigned short vsync_start, + unsigned short vsync_end, unsigned short vblank_end, + unsigned short vtotal, unsigned long frequency); int gu1_set_vtotal(unsigned short vtotal); void gu1_set_display_pitch(unsigned short pitch); void gu1_set_display_offset(unsigned long offset); @@ -147,10 +148,10 @@ void gu1_video_shutdown(void); void gu1_set_cursor_enable(int enable); void gu1_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor); void gu1_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot); + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot); void gu1_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask); + unsigned long *andmask, unsigned long *xormask); int gu1_set_compression_enable(int enable); int gu1_set_compression_offset(unsigned long offset); int gu1_set_compression_pitch(unsigned short pitch); @@ -163,21 +164,21 @@ void gu1_delay_milliseconds(unsigned long milliseconds); void gu1_delay_microseconds(unsigned long microseconds); void gu1_enable_panning(int x, int y); int gu1_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp); + unsigned short height, unsigned short bpp); int gu1_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp); + unsigned short height, unsigned short bpp); void gu1_reset_timing_lock(void); int gu1_get_display_details(unsigned int mode, int *xres, int *yres, int *hz); unsigned short gu1_get_display_pitch(void); unsigned long gu1_get_max_supported_pixel_clock(void); int gu1_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency); + unsigned long frequency); int gu1_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency); + unsigned long frequency); int gu1_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency); + unsigned long frequency); int gu1_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency); + int *frequency); int gu1_get_display_mode_count(void); int gu1_get_display_mode(int *xres, int *yres, int *bpp, int *hz); unsigned long gu1_get_frame_buffer_line_size(void); @@ -196,8 +197,7 @@ unsigned short gu1_get_vblank_end(void); unsigned short gu1_get_vtotal(void); unsigned short gu1_get_display_bpp(void); unsigned long gu1_get_display_offset(void); -int gu1_get_display_palette_entry(unsigned long index, - unsigned long *palette); +int gu1_get_display_palette_entry(unsigned long index, unsigned long *palette); void gu1_get_display_palette(unsigned long *palette); unsigned long gu1_get_cursor_enable(void); unsigned long gu1_get_cursor_offset(void); @@ -220,16 +220,17 @@ int gu1_get_valid_bit(int line); void gfx_set_display_video_format(unsigned long format); void gfx_set_display_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset); + unsigned long uoffset, + unsigned long voffset); void gfx_set_display_video_yuv_pitch(unsigned long ypitch, - unsigned long uvpitch); -void gfx_set_display_video_downscale(unsigned short srch, - unsigned short dsth); + unsigned long uvpitch); +void gfx_set_display_video_downscale(unsigned short srch, unsigned short dsth); void gfx_set_display_video_vertical_downscale_enable(int enable); void gfx_get_display_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset); + unsigned long *uoffset, + unsigned long *voffset); void gfx_get_display_video_yuv_pitch(unsigned long *ypitch, - unsigned long *uvpitch); + unsigned long *uvpitch); unsigned long gfx_get_display_video_downscale_delta(void); int gfx_get_display_video_downscale_enable(void); @@ -248,18 +249,19 @@ void gu2_disable_compression(void); #if GFX_DISPLAY_DYNAMIC void gu2_get_display_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset); + unsigned long *uoffset, + unsigned long *voffset); void gu2_get_display_video_yuv_pitch(unsigned long *ypitch, - unsigned long *uvpitch); + unsigned long *uvpitch); unsigned long gu2_get_display_video_downscale_delta(void); int gu2_get_display_video_downscale_enable(void); void gu2_set_display_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset); + unsigned long uoffset, + unsigned long voffset); void gu2_set_display_video_format(unsigned long format); void gu2_set_display_video_yuv_pitch(unsigned long ypitch, - unsigned long uvpitch); -void gu2_set_display_video_downscale(unsigned short srch, - unsigned short dsth); + unsigned long uvpitch); +void gu2_set_display_video_downscale(unsigned short srch, unsigned short dsth); void gu2_set_display_video_vertical_downscale_enable(int enable); void gu2_set_display_video_enable(int enable); void gu2_set_display_video_size(unsigned short width, unsigned short height); @@ -270,13 +272,14 @@ int gu2_set_display_bpp(unsigned short bpp); int gu2_is_display_mode_supported(int xres, int yres, int bpp, int hz); int gu2_set_display_mode(int xres, int yres, int bpp, int hz); int gu2_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblank_start, - unsigned short hsync_start, unsigned short hsync_end, - unsigned short hblank_end, unsigned short htotal, - unsigned short vactive, unsigned short vblank_start, - unsigned short vsync_start, unsigned short vsync_end, - unsigned short vblank_end, unsigned short vtotal, - unsigned long frequency); + unsigned short hactive, unsigned short hblank_start, + unsigned short hsync_start, + unsigned short hsync_end, unsigned short hblank_end, + unsigned short htotal, unsigned short vactive, + unsigned short vblank_start, + unsigned short vsync_start, + unsigned short vsync_end, unsigned short vblank_end, + unsigned short vtotal, unsigned long frequency); int gu2_set_vtotal(unsigned short vtotal); void gu2_set_display_pitch(unsigned short pitch); void gu2_set_display_offset(unsigned long offset); @@ -285,18 +288,18 @@ int gu2_set_display_palette(unsigned long *palette); void gu2_set_cursor_enable(int enable); void gu2_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor); void gu2_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot); + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, unsigned short yhotspot); void gu2_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask); + unsigned long *andmask, unsigned long *xormask); void gu2_set_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask); + unsigned long *andmask, unsigned long *xormask); void gu2_set_icon_enable(int enable); void gu2_set_icon_colors(unsigned long color0, unsigned long color1, - unsigned long color2); + unsigned long color2); void gu2_set_icon_position(unsigned long memoffset, unsigned short xpos); void gu2_set_icon_shape64(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned int lines); + unsigned long *xormask, unsigned int lines); int gu2_set_compression_enable(int enable); int gu2_set_compression_offset(unsigned long offset); int gu2_set_compression_pitch(unsigned short pitch); @@ -309,23 +312,24 @@ void gu2_delay_milliseconds(unsigned long milliseconds); void gu2_delay_microseconds(unsigned long microseconds); void gu2_enable_panning(int x, int y); int gu2_is_panel_mode_supported(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp); + unsigned short width, unsigned short height, + unsigned short bpp); int gu2_set_fixed_timings(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp); + unsigned short height, unsigned short bpp); int gu2_set_panel_present(int panelResX, int panelResY, unsigned short width, - unsigned short height, unsigned short bpp); + unsigned short height, unsigned short bpp); void gu2_reset_timing_lock(void); int gu2_get_display_details(unsigned int mode, int *xres, int *yres, int *hz); unsigned short gu2_get_display_pitch(void); unsigned long gu2_get_max_supported_pixel_clock(void); int gu2_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency); + unsigned long frequency); int gu2_get_refreshrate_from_frequency(int xres, int yres, int bpp, int *hz, - unsigned long frequency); + unsigned long frequency); int gu2_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency); + unsigned long frequency); int gu2_get_frequency_from_refreshrate(int xres, int yres, int bpp, int hz, - int *frequency); + int *frequency); int gu2_get_display_mode_count(void); int gu2_get_display_mode(int *xres, int *yres, int *bpp, int *hz); unsigned long gu2_get_frame_buffer_line_size(void); @@ -344,8 +348,7 @@ unsigned short gu2_get_vblank_end(void); unsigned short gu2_get_vtotal(void); unsigned short gu2_get_display_bpp(void); unsigned long gu2_get_display_offset(void); -int gu2_get_display_palette_entry(unsigned long index, - unsigned long *palette); +int gu2_get_display_palette_entry(unsigned long index, unsigned long *palette); void gu2_get_display_palette(unsigned long *palette); unsigned long gu2_get_cursor_enable(void); unsigned long gu2_get_cursor_offset(void); @@ -374,7 +377,8 @@ int gu2_get_valid_bit(int line); /* PRIVATE ROUTINES */ void gu1_solid_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long color); + unsigned short width, unsigned short height, + unsigned long color); void gu1_detect_blt_buffer_base(void); /* DYNAMIC ROUTINES */ @@ -383,41 +387,50 @@ void gu1_detect_blt_buffer_base(void); void gu1_set_bpp(unsigned short bpp); void gu1_set_solid_pattern(unsigned long color); void gu1_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned char transparency); void gu1_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparency); void gu1_load_color_pattern_line(short y, unsigned long *pattern_8x8); void gu1_set_solid_source(unsigned long color); void gu1_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent); + unsigned short transparent); void gu1_set_pattern_flags(unsigned short flags); void gu1_set_raster_operation(unsigned char rop); void gu1_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); void gu1_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern); + unsigned short width, unsigned short height, + unsigned long *pattern); void gu1_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height); void gu1_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color); void gu1_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch); void gu1_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color); + unsigned short dstx, unsigned short dsty, + unsigned short width, + unsigned short height, unsigned char *data, + long pitch, unsigned long color); void gu1_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch); void gu1_text_blt(unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data); + unsigned short width, unsigned short height, + unsigned char *data); void gu1_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, unsigned short axialerr, - unsigned short diagerr, unsigned short flags); + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags); void gu1_wait_until_idle(void); int gu1_test_blt_pending(void); #endif @@ -438,41 +451,50 @@ void gu2_reset_pitch(unsigned short pitch); void gu2_set_bpp(unsigned short bpp); void gu2_set_solid_pattern(unsigned long color); void gu2_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned char transparency); void gu2_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparency); void gu2_load_color_pattern_line(short y, unsigned long *pattern_8x8); void gu2_set_solid_source(unsigned long color); void gu2_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent); + unsigned short transparent); void gu2_set_pattern_flags(unsigned short flags); void gu2_set_raster_operation(unsigned char rop); void gu2_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); void gu2_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern); + unsigned short width, unsigned short height, + unsigned long *pattern); void gu2_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height); void gu2_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color); void gu2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch); void gu2_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color); + unsigned short dstx, unsigned short dsty, + unsigned short width, + unsigned short height, unsigned char *data, + long pitch, unsigned long color); void gu2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch); void gu2_text_blt(unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data); + unsigned short width, unsigned short height, + unsigned char *data); void gu2_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, unsigned short axialerr, - unsigned short diagerr, unsigned short flags); + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags); void gu2_wait_until_idle(void); int gu2_test_blt_pending(void); @@ -483,26 +505,30 @@ void gu22_set_source_transparency(unsigned long color, unsigned long mask); void gu22_set_alpha_mode(int mode); void gu22_set_alpha_value(unsigned char value); void gu22_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height); + unsigned short height); void gu22_color_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned long *pattern); + unsigned short height, unsigned long *pattern); void gu22_screen_to_screen_blt(unsigned long srcoffset, - unsigned long dstoffset, unsigned short width, unsigned short height, - int flags); + unsigned long dstoffset, unsigned short width, + unsigned short height, int flags); void gu22_mono_expand_blt(unsigned long srcbase, unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, int byte_packed); + unsigned short srcy, unsigned long dstoffset, + unsigned short width, unsigned short height, + int byte_packed); void gu22_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, unsigned short height, - unsigned char *data, short pitch); + unsigned long dstoffset, + unsigned short width, + unsigned short height, unsigned char *data, + short pitch); void gu22_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, unsigned short height, - unsigned char *data, short pitch); + unsigned long dstoffset, + unsigned short width, unsigned short height, + unsigned char *data, short pitch); void gu22_text_blt(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data); + unsigned short height, unsigned char *data); void gu22_bresenham_line(unsigned long dstoffset, unsigned short length, - unsigned short initerr, unsigned short axialerr, unsigned short diagerr, - unsigned short flags); + unsigned short initerr, unsigned short axialerr, + unsigned short diagerr, unsigned short flags); void gu22_sync_to_vblank(void); #endif @@ -535,12 +561,12 @@ int cs5530_set_video_format(unsigned long format); int cs5530_set_video_size(unsigned short width, unsigned short height); int cs5530_set_video_offset(unsigned long offset); int cs5530_set_video_window(short x, short y, unsigned short w, - unsigned short h); + unsigned short h); int cs5530_set_video_left_crop(unsigned short x); int cs5530_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int cs5530_set_video_color_key(unsigned long key, unsigned long mask, - int bluescreen); + int bluescreen); int cs5530_set_video_filter(int xfilter, int yfilter); int cs5530_set_video_palette(unsigned long *palette); int cs5530_set_video_palette_entry(unsigned long index, unsigned long color); @@ -562,8 +588,7 @@ unsigned long cs5530_get_video_dst_size(void); unsigned long cs5530_get_video_position(void); unsigned long cs5530_get_video_color_key(void); unsigned long cs5530_get_video_color_key_mask(void); -int cs5530_get_video_palette_entry(unsigned long index, - unsigned long *palette); +int cs5530_get_video_palette_entry(unsigned long index, unsigned long *palette); int cs5530_get_video_color_key_src(void); int cs5530_get_video_filter(void); unsigned long cs5530_read_crc(void); @@ -594,21 +619,23 @@ int sc1200_set_video_format(unsigned long format); int sc1200_set_video_size(unsigned short width, unsigned short height); int sc1200_set_video_offset(unsigned long offset); int sc1200_set_video_window(short x, short y, unsigned short w, - unsigned short h); + unsigned short h); int sc1200_set_video_left_crop(unsigned short x); int sc1200_set_video_upscale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int sc1200_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int sc1200_set_video_downscale_config(unsigned short type, unsigned short m); int sc1200_set_video_color_key(unsigned long key, unsigned long mask, - int bluescreen); + int bluescreen); int sc1200_set_video_filter(int xfilter, int yfilter); int sc1200_set_video_palette(unsigned long *palette); int sc1200_set_video_palette_bypass(int enable); int sc1200_set_video_palette_entry(unsigned long index, unsigned long color); int sc1200_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4); + unsigned short coef2, + unsigned short coef3, + unsigned short coef4); int sc1200_set_video_downscale_enable(int enable); int sc1200_set_video_source(VideoSourceType source); int sc1200_set_vbi_source(VbiSourceType source); @@ -621,13 +648,14 @@ int sc1200_set_top_line_in_odd(int enable); int sc1200_set_genlock_delay(unsigned long delay); int sc1200_set_genlock_enable(int flags); int sc1200_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2); + unsigned short select_color2, unsigned long color1, + unsigned long color2); int sc1200_set_video_request(short x, short y); int sc1200_select_alpha_region(int region); int sc1200_set_alpha_enable(int enable); int sc1200_set_alpha_window(short x, short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); int sc1200_set_alpha_value(unsigned char alpha, char delta); int sc1200_set_alpha_priority(int priority); int sc1200_set_alpha_color(unsigned long color); @@ -648,17 +676,17 @@ unsigned long sc1200_get_video_xclip(void); unsigned long sc1200_get_video_offset(void); unsigned long sc1200_get_video_upscale(void); unsigned long sc1200_get_video_scale(void); -int sc1200_get_video_downscale_config(unsigned short *type, - unsigned short *m); +int sc1200_get_video_downscale_config(unsigned short *type, unsigned short *m); void sc1200_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4); + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4); void sc1200_get_video_downscale_enable(int *enable); unsigned long sc1200_get_video_dst_size(void); unsigned long sc1200_get_video_position(void); unsigned long sc1200_get_video_color_key(void); unsigned long sc1200_get_video_color_key_mask(void); -int sc1200_get_video_palette_entry(unsigned long index, - unsigned long *palette); +int sc1200_get_video_palette_entry(unsigned long index, unsigned long *palette); int sc1200_get_video_color_key_src(void); int sc1200_get_video_filter(void); int sc1200_get_video_request(short *x, short *y); @@ -672,14 +700,14 @@ int sc1200_get_vertical_scaler_offset(char *offset); unsigned long sc1200_get_genlock_delay(void); int sc1200_get_genlock_enable(void); int sc1200_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2); + unsigned short *select_color2, + unsigned long *color1, unsigned short *color2); unsigned long sc1200_read_crc(void); int sc1200_get_macrovision_enable(void); void sc1200_get_alpha_enable(int *enable); void sc1200_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height); + unsigned short *width, unsigned short *height); void sc1200_get_alpha_value(unsigned char *alpha, char *delta); void sc1200_get_alpha_priority(int *priority); void sc1200_get_alpha_color(unsigned long *color); @@ -709,38 +737,40 @@ int redcloud_set_video_size(unsigned short width, unsigned short height); int redcloud_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch); int redcloud_set_video_offset(unsigned long offset); int redcloud_set_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset); + unsigned long uoffset, + unsigned long voffset); int redcloud_set_video_window(short x, short y, unsigned short w, - unsigned short h); + unsigned short h); int redcloud_set_video_left_crop(unsigned short x); int redcloud_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int redcloud_set_video_vertical_downscale(unsigned short srch, - unsigned short dsth); + unsigned short dsth); void redcloud_set_video_vertical_downscale_enable(int enable); -int redcloud_set_video_downscale_config(unsigned short type, - unsigned short m); +int redcloud_set_video_downscale_config(unsigned short type, unsigned short m); int redcloud_set_video_color_key(unsigned long key, unsigned long mask, - int bluescreen); + int bluescreen); int redcloud_set_video_filter(int xfilter, int yfilter); int redcloud_set_video_palette(unsigned long *palette); int redcloud_set_graphics_palette(unsigned long *palette); int redcloud_set_video_palette_bypass(int enable); -int redcloud_set_video_palette_entry(unsigned long index, - unsigned long color); +int redcloud_set_video_palette_entry(unsigned long index, unsigned long color); int redcloud_set_graphics_palette_entry(unsigned long index, - unsigned long color); + unsigned long color); int redcloud_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4); + unsigned short coef2, + unsigned short coef3, + unsigned short coef4); int redcloud_set_video_downscale_enable(int enable); int redcloud_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2); + unsigned short select_color2, + unsigned long color1, unsigned long color2); int redcloud_set_video_cursor_enable(int enable); int redcloud_select_alpha_region(int region); int redcloud_set_alpha_enable(int enable); int redcloud_set_alpha_window(short x, short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); int redcloud_set_alpha_value(unsigned char alpha, char delta); int redcloud_set_alpha_priority(int priority); int redcloud_set_alpha_color(unsigned long color); @@ -757,36 +787,40 @@ unsigned long redcloud_get_video_line_size(void); unsigned long redcloud_get_video_xclip(void); unsigned long redcloud_get_video_offset(void); void redcloud_get_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset); + unsigned long *uoffset, + unsigned long *voffset); void redcloud_get_video_yuv_pitch(unsigned long *ypitch, - unsigned long *uvpitch); + unsigned long *uvpitch); unsigned long redcloud_get_video_scale(void); unsigned long redcloud_get_video_downscale_delta(void); int redcloud_get_video_vertical_downscale_enable(void); int redcloud_get_video_downscale_config(unsigned short *type, - unsigned short *m); + unsigned short *m); void redcloud_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4); + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4); void redcloud_get_video_downscale_enable(int *enable); unsigned long redcloud_get_video_dst_size(void); unsigned long redcloud_get_video_position(void); unsigned long redcloud_get_video_color_key(void); unsigned long redcloud_get_video_color_key_mask(void); int redcloud_get_video_palette_entry(unsigned long index, - unsigned long *palette); + unsigned long *palette); int redcloud_get_video_color_key_src(void); int redcloud_get_video_filter(void); int redcloud_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2); + unsigned short *select_color2, + unsigned long *color1, unsigned short *color2); unsigned long redcloud_read_crc(void); unsigned long redcloud_read_crc32(void); unsigned long redcloud_read_window_crc(int source, unsigned short x, - unsigned short y, unsigned short width, unsigned short height, int crc32); + unsigned short y, unsigned short width, + unsigned short height, int crc32); void redcloud_get_alpha_enable(int *enable); void redcloud_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height); + unsigned short *width, unsigned short *height); void redcloud_get_alpha_value(unsigned char *alpha, char *delta); void redcloud_get_alpha_priority(int *priority); void redcloud_get_alpha_color(unsigned long *color); @@ -853,12 +887,11 @@ int saa7114_set_decoder_contrast(unsigned char contrast); int saa7114_set_decoder_hue(char hue); int saa7114_set_decoder_saturation(unsigned char saturation); int saa7114_set_decoder_input_offset(unsigned short x, unsigned short y); -int saa7114_set_decoder_input_size(unsigned short width, - unsigned short height); +int saa7114_set_decoder_input_size(unsigned short width, unsigned short height); int saa7114_set_decoder_output_size(unsigned short width, - unsigned short height); + unsigned short height); int saa7114_set_decoder_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int saa7114_set_decoder_vbi_format(int start, int end, int format); int saa7114_set_decoder_vbi_enable(int enable); int saa7114_set_decoder_vbi_upscale(void); @@ -885,9 +918,11 @@ int saa7114_get_decoder_vbi_format(int line); #if GFX_I2C_DYNAMIC int acc_i2c_reset(unsigned char busnum, short adr, char freq); int acc_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int acc_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int acc_i2c_select_gpio(int clock, int data); int acc_i2c_init(void); void acc_i2c_cleanup(void); @@ -901,9 +936,11 @@ void acc_i2c_cleanup(void); #if GFX_I2C_DYNAMIC int gpio_i2c_reset(unsigned char busnum, short adr, char freq); int gpio_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int gpio_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int gpio_i2c_select_gpio(int clock, int data); int gpio_i2c_init(void); void gpio_i2c_cleanup(void); @@ -935,9 +972,11 @@ int sc1200_get_tv_output(void); int sc1200_get_tv_mode_count(TVStandardType format); int sc1200_get_tv_display_mode(int *width, int *height, int *bpp, int *hz); int sc1200_get_tv_display_mode_frequency(unsigned short width, - unsigned short height, TVStandardType format, int *frequency); + unsigned short height, + TVStandardType format, int *frequency); int sc1200_is_tv_display_mode_supported(unsigned short width, - unsigned short height, TVStandardType format); + unsigned short height, + TVStandardType format); unsigned char cc_add_parity_bit(unsigned char data); #endif diff --git a/driver/xf86-video-geode/src/gfx/gfx_regs.h b/driver/xf86-video-geode/src/gfx/gfx_regs.h index 2326f61a4..c43f29468 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_regs.h +++ b/driver/xf86-video-geode/src/gfx/gfx_regs.h @@ -184,17 +184,17 @@ #define DC_GCFG_CMPE 0x00000010 /* compression enable */ #define DC_GCFG_DECE 0x00000020 /* decompression enable */ #define DC_GCFG_DCLK_MASK 0x000000C0 /* dotclock multiplier */ -#define DC_GCFG_DCLK_POS 6 /* dotclock multiplier */ +#define DC_GCFG_DCLK_POS 6 /* dotclock multiplier */ #define DC_GCFG_DFHPSL_MASK 0x00000F00 /* FIFO high-priority start */ -#define DC_GCFG_DFHPSL_POS 8 /* FIFO high-priority start */ +#define DC_GCFG_DFHPSL_POS 8 /* FIFO high-priority start */ #define DC_GCFG_DFHPEL_MASK 0x0000F000 /* FIFO high-priority end */ -#define DC_GCFG_DFHPEL_POS 12 /* FIFO high-priority end */ +#define DC_GCFG_DFHPEL_POS 12 /* FIFO high-priority end */ #define DC_GCFG_CIM_MASK 0x00030000 /* compressor insert mode */ -#define DC_GCFG_CIM_POS 16 /* compressor insert mode */ +#define DC_GCFG_CIM_POS 16 /* compressor insert mode */ #define DC_GCFG_FDTY 0x00040000 /* frame dirty mode */ #define DC_GCFG_RTPM 0x00080000 /* real-time perf. monitor */ #define DC_GCFG_DAC_RS_MASK 0x00700000 /* DAC register selects */ -#define DC_GCFG_DAC_RS_POS 20 /* DAC register selects */ +#define DC_GCFG_DAC_RS_POS 20 /* DAC register selects */ #define DC_GCFG_CKWR 0x00800000 /* clock write */ #define DC_GCFG_LDBL 0x01000000 /* line double */ #define DC_GCFG_DIAG 0x02000000 /* FIFO diagnostic mode */ @@ -229,7 +229,7 @@ #define DC_TCFG_PXDB 0x00008000 /* pixel double */ #define DC_TCFG_BKRT 0x00010000 /* blink rate */ #define DC_TCFG_PSD_MASK 0x000E0000 /* power sequence delay */ -#define DC_TCFG_PSD_POS 17 /* power sequence delay */ +#define DC_TCFG_PSD_POS 17 /* power sequence delay */ #define DC_TCFG_DDCI 0x08000000 /* DDC input (RO) */ #define DC_TCFG_SENS 0x10000000 /* monitor sense (RO) */ #define DC_TCFG_DNA 0x20000000 /* display not active (RO) */ @@ -261,7 +261,7 @@ /* MC_MEM_CNTRL1 BIT DEFINITIONS */ -#define MC_XBUSARB 0x00000008 /* 0 = GP priority < CPU priority */ +#define MC_XBUSARB 0x00000008 /* 0 = GP priority < CPU priority */ /* 1 = GP priority = CPU priority */ /* GXm databook V2.0 is wrong ! */ /*----------*/ @@ -1200,14 +1200,14 @@ /* GEODELINK DEVICE MSR REGISTER SUMMARY */ -#define MBD_MSR_CAP 0x2000 /* Device Capabilities */ -#define MBD_MSR_CONFIG 0x2001 /* Device Master Configuration */ +#define MBD_MSR_CAP 0x2000 /* Device Capabilities */ +#define MBD_MSR_CONFIG 0x2001 /* Device Master Configuration */ /* Register */ -#define MBD_MSR_SMI 0x2002 /* MBus Device SMI Register */ -#define MBD_MSR_ERROR 0x2003 /* MBus Device Error */ -#define MBD_MSR_PM 0x2004 /* MBus Device Power Management */ +#define MBD_MSR_SMI 0x2002 /* MBus Device SMI Register */ +#define MBD_MSR_ERROR 0x2003 /* MBus Device Error */ +#define MBD_MSR_PM 0x2004 /* MBus Device Power Management */ /* Register */ -#define MBD_MSR_DIAG 0x2005 /* Mbus Device Diagnostic Register */ +#define MBD_MSR_DIAG 0x2005 /* Mbus Device Diagnostic Register */ /* DISPLAY FILTER MBD_MSR_DIAG DEFINITIONS */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_rndr.c b/driver/xf86-video-geode/src/gfx/gfx_rndr.c index c5a46ac10..09f88f0b3 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_rndr.c +++ b/driver/xf86-video-geode/src/gfx/gfx_rndr.c @@ -128,7 +128,7 @@ gfx_set_solid_source(unsigned long color) */ void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent) + unsigned short transparent) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -169,7 +169,8 @@ gfx_set_solid_pattern(unsigned long color) */ void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned char transparent) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -187,18 +188,19 @@ gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, */ void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, - unsigned long data2, unsigned long data3, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparent) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) gu1_set_color_pattern(bgcolor, fgcolor, data0, data1, data2, data3, - transparent); + transparent); #endif #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu2_set_color_pattern(bgcolor, fgcolor, data0, data1, data2, data3, - transparent); + transparent); #endif } @@ -242,7 +244,7 @@ gfx_set_raster_operation(unsigned char rop) */ void gfx_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -260,7 +262,8 @@ gfx_pattern_fill(unsigned short x, unsigned short y, */ void gfx_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern) + unsigned short width, unsigned short height, + unsigned long *pattern) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -278,8 +281,8 @@ gfx_color_pattern_fill(unsigned short x, unsigned short y, */ void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -297,18 +300,17 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, */ void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) - gu1_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, - color); + gu1_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, color); #endif #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) - gu2_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, - color); + gu2_screen_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, color); #endif } @@ -318,18 +320,19 @@ gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, */ void gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) gu1_color_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, - data, pitch); + data, pitch); #endif #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu2_color_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, - data, pitch); + data, pitch); #endif } @@ -339,19 +342,20 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, */ void gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch, + unsigned long color) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) gu1_color_bitmap_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, - data, pitch, color); + data, pitch, color); #endif #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu2_color_bitmap_to_screen_xblt(srcx, srcy, dstx, dsty, width, height, - data, pitch, color); + data, pitch, color); #endif } @@ -361,18 +365,19 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, */ void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) gu1_mono_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, - data, pitch); + data, pitch); #endif #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu2_mono_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, - data, pitch); + data, pitch); #endif } @@ -382,7 +387,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, */ void gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -400,8 +405,9 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, */ void gfx_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) { #if GFX_2DACCEL_GU1 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU1) @@ -539,7 +545,7 @@ gfx2_set_alpha_value(unsigned char value) */ void gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height) + unsigned short height) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) @@ -553,7 +559,7 @@ gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, */ void gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned long *pattern) + unsigned short height, unsigned long *pattern) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) @@ -567,7 +573,8 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, */ void gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, - unsigned short width, unsigned short height, int flags) + unsigned short width, unsigned short height, + int flags) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) @@ -581,13 +588,14 @@ gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, */ void gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, int byte_packed) + unsigned short srcy, unsigned long dstoffset, + unsigned short width, unsigned short height, + int byte_packed) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu22_mono_expand_blt(srcbase, srcx, srcy, dstoffset, width, height, - byte_packed); + byte_packed); #endif } @@ -597,13 +605,14 @@ gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, */ void gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, unsigned short height, - unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu22_color_bitmap_to_screen_blt(srcx, srcy, dstoffset, width, height, - data, pitch); + data, pitch); #endif } @@ -613,7 +622,7 @@ gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, */ void gfx2_text_blt(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) @@ -627,13 +636,14 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, */ void gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, unsigned short height, - unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu22_mono_bitmap_to_screen_blt(srcx, srcy, dstoffset, width, height, - data, pitch); + data, pitch); #endif } @@ -643,13 +653,14 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, */ void gfx2_bresenham_line(unsigned long dstoffset, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) { #if GFX_2DACCEL_GU2 if (gfx_2daccel_type & GFX_2DACCEL_TYPE_GU2) gu22_bresenham_line(dstoffset, length, initerr, axialerr, diagerr, - flags); + flags); #endif } @@ -666,6 +677,6 @@ gfx2_sync_to_vblank(void) #endif } -#endif /* GFX_2DACCEL_DYNAMIC */ +#endif /* GFX_2DACCEL_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_rtns.h b/driver/xf86-video-geode/src/gfx/gfx_rtns.h index d7e001e66..bfcfe9f00 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_rtns.h +++ b/driver/xf86-video-geode/src/gfx/gfx_rtns.h @@ -44,8 +44,7 @@ /* COMPILER OPTION FOR C++ PROGRAMS */ #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /* DURANGO MEMORY POINTERS */ @@ -126,13 +125,13 @@ extern "C" int gfx_msr_init(void); DEV_STATUS gfx_id_msr_device(MSR * pDev, unsigned long address); DEV_STATUS gfx_get_msr_dev_address(unsigned int device, - unsigned long *address); + unsigned long *address); DEV_STATUS gfx_get_glink_id_at_address(unsigned int *device, - unsigned long address); + unsigned long address); DEV_STATUS gfx_msr_read(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); DEV_STATUS gfx_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); /* ROUTINES IN GFX_DISP.C */ @@ -140,18 +139,22 @@ extern "C" int gfx_is_display_mode_supported(int xres, int yres, int bpp, int hz); int gfx_set_display_mode(int xres, int yres, int bpp, int hz); int gfx_set_display_timings(unsigned short bpp, unsigned short flags, - unsigned short hactive, unsigned short hblank_start, - unsigned short hsync_start, unsigned short hsync_end, - unsigned short hblank_end, unsigned short htotal, - unsigned short vactive, unsigned short vblank_start, - unsigned short vsync_start, unsigned short vsync_end, - unsigned short vblank_end, unsigned short vtotal, - unsigned long frequency); + unsigned short hactive, + unsigned short hblank_start, + unsigned short hsync_start, + unsigned short hsync_end, + unsigned short hblank_end, + unsigned short htotal, unsigned short vactive, + unsigned short vblank_start, + unsigned short vsync_start, + unsigned short vsync_end, + unsigned short vblank_end, + unsigned short vtotal, unsigned long frequency); int gfx_set_vtotal(unsigned short vtotal); void gfx_set_display_pitch(unsigned short pitch); void gfx_set_display_offset(unsigned long offset); int gfx_set_display_palette_entry(unsigned long index, - unsigned long palette); + unsigned long palette); int gfx_set_display_palette(unsigned long *palette); void gfx_video_shutdown(void); void gfx_set_clock_frequency(unsigned long frequency); @@ -159,18 +162,19 @@ extern "C" void gfx_set_cursor_enable(int enable); void gfx_set_cursor_colors(unsigned long bkcolor, unsigned long fgcolor); void gfx_set_cursor_position(unsigned long memoffset, - unsigned short xpos, unsigned short ypos, - unsigned short xhotspot, unsigned short yhotspot); - void gfx_set_cursor_shape32(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask); - void gfx_set_cursor_shape64(unsigned long memoffset, - unsigned long *andmask, unsigned long *xormask); + unsigned short xpos, unsigned short ypos, + unsigned short xhotspot, + unsigned short yhotspot); + void gfx_set_cursor_shape32(unsigned long memoffset, unsigned long *andmask, + unsigned long *xormask); + void gfx_set_cursor_shape64(unsigned long memoffset, unsigned long *andmask, + unsigned long *xormask); void gfx_set_icon_enable(int enable); void gfx_set_icon_colors(unsigned long color0, unsigned long color1, - unsigned long color2); + unsigned long color2); void gfx_set_icon_position(unsigned long memoffset, unsigned short xpos); void gfx_set_icon_shape64(unsigned long memoffset, unsigned long *andmask, - unsigned long *xormask, unsigned int lines); + unsigned long *xormask, unsigned int lines); int gfx_set_compression_enable(int enable); int gfx_set_compression_offset(unsigned long offset); @@ -184,30 +188,33 @@ extern "C" void gfx_delay_microseconds(unsigned long microseconds); void gfx_enable_panning(int x, int y); int gfx_is_panel_mode_supported(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp); + unsigned short width, unsigned short height, + unsigned short bpp); int gfx_set_fixed_timings(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp); + unsigned short width, unsigned short height, + unsigned short bpp); int gfx_set_panel_present(int panelResX, int panelResY, - unsigned short width, unsigned short height, unsigned short bpp); + unsigned short width, unsigned short height, + unsigned short bpp); void gfx_reset_timing_lock(void); /* "READ" ROUTINES IN GFX_DISP.C */ int gfx_get_display_details(unsigned int mode, int *xres, int *yres, - int *hz); + int *hz); unsigned short gfx_get_display_pitch(void); int gfx_get_vsa2_softvga_enable(void); int gfx_get_sync_polarities(void); unsigned long gfx_get_clock_frequency(void); unsigned long gfx_get_max_supported_pixel_clock(void); int gfx_mode_frequency_supported(int xres, int yres, int bpp, - unsigned long frequency); + unsigned long frequency); int gfx_get_refreshrate_from_frequency(int xres, int yres, int bpp, - int *hz, unsigned long frequency); + int *hz, unsigned long frequency); int gfx_get_refreshrate_from_mode(int xres, int yres, int bpp, int *hz, - unsigned long frequency); + unsigned long frequency); int gfx_get_frequency_from_refreshrate(int xres, int yres, int bpp, - int hz, int *frequency); + int hz, int *frequency); int gfx_get_display_mode_count(void); int gfx_get_display_mode(int *xres, int *yres, int *bpp, int *hz); unsigned long gfx_get_frame_buffer_line_size(void); @@ -227,7 +234,7 @@ extern "C" unsigned short gfx_get_display_bpp(void); unsigned long gfx_get_display_offset(void); int gfx_get_display_palette_entry(unsigned long index, - unsigned long *palette); + unsigned long *palette); void gfx_get_display_palette(unsigned long *palette); unsigned long gfx_get_cursor_enable(void); unsigned long gfx_get_cursor_offset(void); @@ -250,44 +257,57 @@ extern "C" void gfx_set_bpp(unsigned short bpp); void gfx_set_solid_pattern(unsigned long color); void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned char transparency); void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparency); + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparency); void gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8); void gfx_set_solid_source(unsigned long color); void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent); + unsigned short transparent); void gfx_set_pattern_flags(unsigned short flags); void gfx_set_raster_operation(unsigned char rop); void gfx_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); void gfx_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern); + unsigned short width, unsigned short height, + unsigned long *pattern); void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height); void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color); + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color); void gfx_color_bitmap_to_screen_blt(unsigned short srcx, - unsigned short srcy, unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data, - long pitch); + unsigned short srcy, + unsigned short dstx, + unsigned short dsty, + unsigned short width, + unsigned short height, + unsigned char *data, long pitch); void gfx_color_bitmap_to_screen_xblt(unsigned short srcx, - unsigned short srcy, unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data, - long pitch, unsigned long color); - void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, - unsigned short srcy, unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data, - short pitch); + unsigned short srcy, + unsigned short dstx, + unsigned short dsty, + unsigned short width, + unsigned short height, + unsigned char *data, long pitch, + unsigned long color); + void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, + unsigned short dstx, unsigned short dsty, + unsigned short width, + unsigned short height, + unsigned char *data, short pitch); void gfx_text_blt(unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, unsigned char *data); + unsigned short width, unsigned short height, + unsigned char *data); void gfx_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, - unsigned short flags); + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags); void gfx_wait_until_idle(void); int gfx_test_blt_pending(void); @@ -296,31 +316,39 @@ extern "C" void gfx2_set_source_stride(unsigned short stride); void gfx2_set_destination_stride(unsigned short stride); void gfx2_set_pattern_origin(int x, int y); - void gfx2_set_source_transparency(unsigned long color, - unsigned long mask); + void gfx2_set_source_transparency(unsigned long color, unsigned long mask); void gfx2_set_alpha_mode(int mode); void gfx2_set_alpha_value(unsigned char value); void gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height); + unsigned short height); void gfx2_color_pattern_fill(unsigned long dstoffset, - unsigned short width, unsigned short height, unsigned long *pattern); + unsigned short width, unsigned short height, + unsigned long *pattern); void gfx2_screen_to_screen_blt(unsigned long srcoffset, - unsigned long dstoffset, unsigned short width, unsigned short height, - int flags); + unsigned long dstoffset, + unsigned short width, unsigned short height, + int flags); void gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, int byte_packed); + unsigned short srcy, unsigned long dstoffset, + unsigned short width, unsigned short height, + int byte_packed); void gfx2_color_bitmap_to_screen_blt(unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch); + unsigned short srcy, + unsigned long dstoffset, + unsigned short width, + unsigned short height, + unsigned char *data, short pitch); void gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch); + unsigned short srcy, + unsigned long dstoffset, + unsigned short width, + unsigned short height, + unsigned char *data, short pitch); void gfx2_text_blt(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data); + unsigned short height, unsigned char *data); void gfx2_bresenham_line(unsigned long dstoffset, unsigned short length, - unsigned short initerr, unsigned short axialerr, - unsigned short diagerr, unsigned short flags); + unsigned short initerr, unsigned short axialerr, + unsigned short diagerr, unsigned short flags); void gfx2_sync_to_vblank(void); /* ROUTINES IN GFX_VID.C */ @@ -331,29 +359,31 @@ extern "C" int gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch); int gfx_set_video_offset(unsigned long offset); int gfx_set_video_yuv_offsets(unsigned long yoffset, - unsigned long uoffset, unsigned long voffset); + unsigned long uoffset, unsigned long voffset); int gfx_set_video_window(short x, short y, unsigned short w, - unsigned short h); + unsigned short h); int gfx_set_video_left_crop(unsigned short x); int gfx_set_video_upscale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int gfx_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int gfx_set_video_vertical_downscale(unsigned short srch, - unsigned short dsth); + unsigned short dsth); void gfx_set_video_vertical_downscale_enable(int enable); int gfx_set_video_downscale_config(unsigned short type, unsigned short m); int gfx_set_video_color_key(unsigned long key, unsigned long mask, - int bluescreen); + int bluescreen); int gfx_set_video_filter(int xfilter, int yfilter); int gfx_set_video_palette(unsigned long *palette); int gfx_set_graphics_palette(unsigned long *palette); int gfx_set_video_palette_bypass(int enable); int gfx_set_video_palette_entry(unsigned long index, unsigned long color); int gfx_set_graphics_palette_entry(unsigned long index, - unsigned long color); + unsigned long color); int gfx_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4); + unsigned short coef2, + unsigned short coef3, + unsigned short coef4); int gfx_set_video_downscale_enable(int enable); int gfx_set_video_source(VideoSourceType source); int gfx_set_vbi_source(VbiSourceType source); @@ -366,15 +396,15 @@ extern "C" int gfx_set_genlock_delay(unsigned long delay); int gfx_set_genlock_enable(int flags); int gfx_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, - unsigned long color2); + unsigned short select_color2, unsigned long color1, + unsigned long color2); int gfx_set_video_cursor_enable(int enable); int gfx_set_video_request(short x, short y); int gfx_select_alpha_region(int region); int gfx_set_alpha_enable(int enable); int gfx_set_alpha_window(short x, short y, - unsigned short width, unsigned short height); + unsigned short width, unsigned short height); int gfx_set_alpha_value(unsigned char alpha, char delta); int gfx_set_alpha_priority(int priority); int gfx_set_alpha_color(unsigned long color); @@ -394,24 +424,25 @@ extern "C" unsigned long gfx_get_video_xclip(void); unsigned long gfx_get_video_offset(void); void gfx_get_video_yuv_offsets(unsigned long *yoffset, - unsigned long *uoffset, unsigned long *voffset); - void gfx_get_video_yuv_pitch(unsigned long *ypitch, - unsigned long *uvpitch); + unsigned long *uoffset, + unsigned long *voffset); + void gfx_get_video_yuv_pitch(unsigned long *ypitch, unsigned long *uvpitch); unsigned long gfx_get_video_upscale(void); unsigned long gfx_get_video_scale(void); unsigned long gfx_get_video_downscale_delta(void); int gfx_get_video_vertical_downscale_enable(void); - int gfx_get_video_downscale_config(unsigned short *type, - unsigned short *m); + int gfx_get_video_downscale_config(unsigned short *type, unsigned short *m); void gfx_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4); + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4); void gfx_get_video_downscale_enable(int *enable); unsigned long gfx_get_video_dst_size(void); unsigned long gfx_get_video_position(void); unsigned long gfx_get_video_color_key(void); unsigned long gfx_get_video_color_key_mask(void); int gfx_get_video_palette_entry(unsigned long index, - unsigned long *palette); + unsigned long *palette); int gfx_get_video_color_key_src(void); int gfx_get_video_filter(void); int gfx_get_video_request(short *x, short *y); @@ -425,18 +456,18 @@ extern "C" unsigned long gfx_get_genlock_delay(void); int gfx_get_genlock_enable(void); int gfx_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2); + unsigned short *select_color2, + unsigned long *color1, unsigned short *color2); unsigned long gfx_read_crc(void); unsigned long gfx_read_crc32(void); unsigned long gfx_read_window_crc(int source, unsigned short x, - unsigned short y, unsigned short width, unsigned short height, - int crc32); + unsigned short y, unsigned short width, + unsigned short height, int crc32); int gfx_get_macrovision_enable(void); void gfx_get_alpha_enable(int *enable); void gfx_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height); + unsigned short *width, unsigned short *height); void gfx_get_alpha_value(unsigned char *alpha, char *delta); void gfx_get_alpha_priority(int *priority); void gfx_get_alpha_color(unsigned long *color); @@ -484,12 +515,11 @@ extern "C" int gfx_set_decoder_hue(char hue); int gfx_set_decoder_saturation(unsigned char saturation); int gfx_set_decoder_input_offset(unsigned short x, unsigned short y); - int gfx_set_decoder_input_size(unsigned short width, - unsigned short height); + int gfx_set_decoder_input_size(unsigned short width, unsigned short height); int gfx_set_decoder_output_size(unsigned short width, - unsigned short height); + unsigned short height); int gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth); + unsigned short dstw, unsigned short dsth); int gfx_set_decoder_vbi_format(int start, int end, int format); int gfx_set_decoder_vbi_enable(int enable); int gfx_set_decoder_vbi_upscale(void); @@ -514,9 +544,11 @@ extern "C" int gfx_i2c_reset(unsigned char busnum, short adr, char freq); int gfx_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int gfx_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data); + unsigned char subadr, unsigned char bytes, + unsigned char *data); int gfx_i2c_select_gpio(int clock, int data); int gfx_i2c_init(void); void gfx_i2c_cleanup(void); @@ -543,9 +575,12 @@ extern "C" int gfx_get_tv_mode_count(TVStandardType format); int gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz); int gfx_get_tv_display_mode_frequency(unsigned short width, - unsigned short height, TVStandardType format, int *frequency); + unsigned short height, + TVStandardType format, + int *frequency); int gfx_is_tv_display_mode_supported(unsigned short width, - unsigned short height, TVStandardType format); + unsigned short height, + TVStandardType format); int gfx_get_tv_standard(unsigned long *p_standard); int gfx_get_available_tv_standards(unsigned long *p_standards); @@ -582,8 +617,7 @@ extern "C" int gfx_vga_set_pci_command(unsigned char command); int gfx_vga_seq_reset(int reset); int gfx_vga_set_graphics_bits(void); - int gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, - int hz); + int gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz); int gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch); int gfx_vga_save(gfx_vga_struct * vga, int flags); int gfx_vga_restore(gfx_vga_struct * vga, int flags); @@ -595,7 +629,5 @@ extern "C" #ifdef __cplusplus } #endif - -#endif /* !_gfx_rtns_h */ - +#endif /* !_gfx_rtns_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_tv.c b/driver/xf86-video-geode/src/gfx/gfx_tv.c index fb34d6036..3ee4a0cf1 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_tv.c +++ b/driver/xf86-video-geode/src/gfx/gfx_tv.c @@ -50,42 +50,42 @@ DISPLAYMODE TVTimings[] = { /* NTSC resolution */ - {0x3 | /* negative syncs */ - GFX_MODE_TV_NTSC, /* NTSC format */ - 640, 640, 656, 744, 792, 792, /* horizontal timings */ - 480, 480, 490, 492, 517, 525, /* vertical timings */ - 0x0018EC4D, /* freq = 24.923052 MHz */ - } + {0x3 | /* negative syncs */ + GFX_MODE_TV_NTSC, /* NTSC format */ + 640, 640, 656, 744, 792, 792, /* horizontal timings */ + 480, 480, 490, 492, 517, 525, /* vertical timings */ + 0x0018EC4D, /* freq = 24.923052 MHz */ + } , /* PAL resolution */ - {0x3 | /* negative syncs */ - GFX_MODE_TV_PAL, /* PAL format */ - 768, 768, 800, 848, 864, 864, /* horizontal timings */ - 576, 576, 586, 588, 625, 625, /* vertical timings */ - 0x001B0000, /* freq = 27.00 MHz */ - } + {0x3 | /* negative syncs */ + GFX_MODE_TV_PAL, /* PAL format */ + 768, 768, 800, 848, 864, 864, /* horizontal timings */ + 576, 576, 586, 588, 625, 625, /* vertical timings */ + 0x001B0000, /* freq = 27.00 MHz */ + } , /* NTSC resolution non-square pixels */ - {0x3 | /* negative syncs */ - GFX_MODE_TV_NTSC, /* NTSC format */ - 720, 720, 736, 752, 792, 792, /* horizontal timings */ - 480, 480, 490, 492, 517, 525, /* vertical timings */ - 0x0018EC4D, /* freq = 24.923052 MHz */ - } + {0x3 | /* negative syncs */ + GFX_MODE_TV_NTSC, /* NTSC format */ + 720, 720, 736, 752, 792, 792, /* horizontal timings */ + 480, 480, 490, 492, 517, 525, /* vertical timings */ + 0x0018EC4D, /* freq = 24.923052 MHz */ + } , /* PAL resolution non-square pixels */ - {0x3 | /* negative syncs */ - GFX_MODE_TV_PAL, /* PAL format */ - 720, 720, 752, 816, 864, 864, /* horizontal timings */ - 576, 576, 586, 588, 625, 625, /* vertical timings */ - 0x001B0000, /* freq = 27.00 MHz */ - } + {0x3 | /* negative syncs */ + GFX_MODE_TV_PAL, /* PAL format */ + 720, 720, 752, 816, 864, 864, /* horizontal timings */ + 576, 576, 586, 588, 625, 625, /* vertical timings */ + 0x001B0000, /* freq = 27.00 MHz */ + } }; #define NUM_TV_MODES sizeof(TVTimings)/sizeof(DISPLAYMODE) @@ -438,7 +438,7 @@ gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz) */ int gfx_get_tv_display_mode_frequency(unsigned short width, unsigned short height, - TVStandardType format, int *frequency) + TVStandardType format, int *frequency) { int retval = -1; @@ -446,7 +446,7 @@ gfx_get_tv_display_mode_frequency(unsigned short width, unsigned short height, if (gfx_tv_type & GFX_TV_TYPE_SC1200) retval = sc1200_get_tv_display_mode_frequency(width, height, format, - frequency); + frequency); #endif return (retval); } @@ -457,7 +457,7 @@ gfx_get_tv_display_mode_frequency(unsigned short width, unsigned short height, */ int gfx_is_tv_display_mode_supported(unsigned short width, unsigned short height, - TVStandardType format) + TVStandardType format) { int retval = -1; @@ -831,6 +831,6 @@ gfx_set_aps_trigger_bits(unsigned int trigger_bits) return (retval); } -#endif /* GFX_TV_DYNAMIC */ +#endif /* GFX_TV_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_type.h b/driver/xf86-video-geode/src/gfx/gfx_type.h index 33b6cab0d..449235466 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_type.h +++ b/driver/xf86-video-geode/src/gfx/gfx_type.h @@ -34,24 +34,21 @@ /* MSR DEFINITIONS */ typedef enum DevStatus -{ FOUND, NOT_KNOWN, REQ_NOT_FOUND, REQ_NOT_INSTALLED } DEV_STATUS; + { FOUND, NOT_KNOWN, REQ_NOT_FOUND, REQ_NOT_INSTALLED } DEV_STATUS; -typedef struct msr -{ - DEV_STATUS Present; /* Node enumeration status */ - unsigned char Id; /* Device ID (from MSR specs) */ - unsigned long Address; /* Address - 32-bit MBus address at */ +typedef struct msr { + DEV_STATUS Present; /* Node enumeration status */ + unsigned char Id; /* Device ID (from MSR specs) */ + unsigned long Address; /* Address - 32-bit MBus address at */ /* which 'Id' is found */ } MSR; -typedef struct mValue -{ +typedef struct mValue { unsigned long high; unsigned long low; } Q_WORD; -typedef struct mbusNode -{ +typedef struct mbusNode { unsigned long address; unsigned int deviceId; unsigned int claimed; @@ -126,14 +123,12 @@ typedef struct mbusNode /* TV DEFINITIONS */ -typedef enum TVStandardType -{ +typedef enum TVStandardType { TV_STANDARD_NTSC = 1, TV_STANDARD_PAL } TVStandardType; -typedef enum GfxOnTVType -{ +typedef enum GfxOnTVType { GFX_ON_TV_SQUARE_PIXELS = 1, GFX_ON_TV_NO_SCALING } GfxOnTVType; @@ -195,14 +190,12 @@ typedef enum GfxOnTVType #define VIDEO_DOWNSCALE_KEEP_1_OF 0x1 #define VIDEO_DOWNSCALE_DROP_1_OF 0x2 -typedef enum VideoSourceType -{ /* The source from which the video processor shows full screen video */ +typedef enum VideoSourceType { /* The source from which the video processor shows full screen video */ VIDEO_SOURCE_MEMORY = 1, VIDEO_SOURCE_DVIP } VideoSourceType; -typedef enum VbiSourceType -{ /* The source from which the video processor takes VBI */ +typedef enum VbiSourceType { /* The source from which the video processor takes VBI */ VBI_SOURCE_MEMORY = 1, VBI_SOURCE_DVIP } VbiSourceType; @@ -281,8 +274,7 @@ typedef enum VbiSourceType #define GFX_APS_TRIGGER_AGC_2_LINE 2 #define GFX_APS_TRIGGER_AGC_4_LINE 3 -typedef struct -{ +typedef struct { int xsize; int ysize; int hz; @@ -312,8 +304,7 @@ typedef struct /* CHIP NAME AND REVISION */ -typedef enum ChipType -{ +typedef enum ChipType { CHIP_NOT_DETECTED, SC1200_REV_A, SC1200_REV_B1_B2, @@ -321,9 +312,9 @@ typedef enum ChipType SC1200_REV_C1, SC1200_REV_D1, SC1200_REV_D1_1, - SC1200_REV_D2_MVD, /* Macrovision disabled */ - SC1200_REV_D2_MVE, /* Macrovision enabled */ + SC1200_REV_D2_MVD, /* Macrovision disabled */ + SC1200_REV_D2_MVE, /* Macrovision enabled */ SC1200_FUTURE_REV } ChipType; -#endif /* !_gfx_type_h */ +#endif /* !_gfx_type_h */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_vga.c b/driver/xf86-video-geode/src/gfx/gfx_vga.c index 8ab9b6a22..101c7a80a 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_vga.c +++ b/driver/xf86-video-geode/src/gfx/gfx_vga.c @@ -40,6 +40,6 @@ #if GFX_VGA_DYNAMIC -#endif /* GFX_DISPLAY_DYNAMIC */ +#endif /* GFX_DISPLAY_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_vid.c b/driver/xf86-video-geode/src/gfx/gfx_vid.c index 41fef74ac..15f00480a 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_vid.c +++ b/driver/xf86-video-geode/src/gfx/gfx_vid.c @@ -129,23 +129,23 @@ /* STATIC VARIABLES FOR VIDEO OVERLAY CONTROL */ /* These are saved to allow these routines to do clipping. */ -unsigned long gfx_vid_offset = 0; /* copy from last gfx_set_video_offset */ -unsigned long gfx_vid_uoffset = 0; /* copy from last - * gfx_set_video_yuv_offsets */ -unsigned long gfx_vid_voffset = 0; /* copy from last - * gfx_set_video_yuv_offsets */ -unsigned long gfx_vid_srcw = 300; /* copy from last gfx_set_video_scale */ -unsigned long gfx_vid_srch = 300; /* copy from last gfx_set_video_scale */ -unsigned long gfx_vid_dstw = 300; /* copy from last gfx_set_video_scale */ -unsigned long gfx_vid_dsth = 300; /* copy from last gfx_set_video_scale */ -short gfx_vid_xpos = 0; /* copy from last gfx_set_video_window */ -short gfx_vid_ypos = 0; /* copy from last gfx_set_video_window */ -unsigned short gfx_vid_width = 0; /* copy from last gfx_set_video_window */ -unsigned short gfx_vid_height = 0; /* copy from last gfx_set_video_window */ - -int gfx_alpha_select = 0; /* currently selected alpha region */ - -int gfx_set_screen_enable(int enable); /* forward declaration */ +unsigned long gfx_vid_offset = 0; /* copy from last gfx_set_video_offset */ +unsigned long gfx_vid_uoffset = 0; /* copy from last + * gfx_set_video_yuv_offsets */ +unsigned long gfx_vid_voffset = 0; /* copy from last + * gfx_set_video_yuv_offsets */ +unsigned long gfx_vid_srcw = 300; /* copy from last gfx_set_video_scale */ +unsigned long gfx_vid_srch = 300; /* copy from last gfx_set_video_scale */ +unsigned long gfx_vid_dstw = 300; /* copy from last gfx_set_video_scale */ +unsigned long gfx_vid_dsth = 300; /* copy from last gfx_set_video_scale */ +short gfx_vid_xpos = 0; /* copy from last gfx_set_video_window */ +short gfx_vid_ypos = 0; /* copy from last gfx_set_video_window */ +unsigned short gfx_vid_width = 0; /* copy from last gfx_set_video_window */ +unsigned short gfx_vid_height = 0; /* copy from last gfx_set_video_window */ + +int gfx_alpha_select = 0; /* currently selected alpha region */ + +int gfx_set_screen_enable(int enable); /* forward declaration */ /* INCLUDE SUPPORT FOR CS5530, IF SPECIFIED. */ @@ -420,7 +420,7 @@ gfx_set_video_offset(unsigned long offset) */ int gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset, - unsigned long voffset) + unsigned long voffset) { int status = GFX_STATUS_UNSUPPORTED; @@ -437,7 +437,7 @@ gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset, */ int gfx_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) { int status = GFX_STATUS_UNSUPPORTED; @@ -462,7 +462,7 @@ gfx_set_video_scale(unsigned short srcw, unsigned short srch, */ int gfx_set_video_upscale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) { int status = GFX_STATUS_UNSUPPORTED; @@ -528,21 +528,21 @@ gfx_set_video_downscale_config(unsigned short type, unsigned short m) */ int gfx_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4) + unsigned short coef2, unsigned short coef3, + unsigned short coef4) { int status = GFX_STATUS_UNSUPPORTED; #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) status = - sc1200_set_video_downscale_coefficients(coef1, coef2, coef3, - coef4); + sc1200_set_video_downscale_coefficients(coef1, coef2, coef3, coef4); #endif #if GFX_VIDEO_REDCLOUD if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD) status = redcloud_set_video_downscale_coefficients(coef1, coef2, coef3, - coef4); + coef4); #endif return (status); } @@ -951,7 +951,8 @@ gfx_set_genlock_enable(int flags) */ int gfx_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2) + unsigned short select_color2, unsigned long color1, + unsigned long color2) { int status = GFX_STATUS_UNSUPPORTED; @@ -963,8 +964,7 @@ gfx_set_video_cursor(unsigned long key, unsigned long mask, #if GFX_VIDEO_REDCLOUD if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD) status = - redcloud_set_video_cursor(key, mask, select_color2, color1, - color2); + redcloud_set_video_cursor(key, mask, select_color2, color1, color2); #endif return (status); } @@ -1011,7 +1011,7 @@ gfx_set_alpha_enable(int enable) */ int gfx_set_alpha_window(short x, short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) { int status = GFX_STATUS_UNSUPPORTED; @@ -1451,7 +1451,7 @@ gfx_get_video_offset(void) */ void gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset, - unsigned long *voffset) + unsigned long *voffset) { #if GFX_VIDEO_REDCLOUD if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD) @@ -1570,7 +1570,9 @@ gfx_get_video_downscale_config(unsigned short *type, unsigned short *m) */ void gfx_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4) + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4) { #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) @@ -1802,7 +1804,7 @@ gfx_get_vbi_source(VbiSourceType * source) unsigned long gfx_get_vbi_lines(int odd) { - unsigned long lines = (unsigned long)GFX_STATUS_UNSUPPORTED; + unsigned long lines = (unsigned long) GFX_STATUS_UNSUPPORTED; #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) @@ -1818,7 +1820,7 @@ gfx_get_vbi_lines(int odd) unsigned long gfx_get_vbi_total(int odd) { - unsigned long total = (unsigned long)GFX_STATUS_UNSUPPORTED; + unsigned long total = (unsigned long) GFX_STATUS_UNSUPPORTED; #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) @@ -1882,7 +1884,7 @@ gfx_get_vertical_scaler_offset(char *offset) unsigned long gfx_get_genlock_delay(void) { - unsigned long delay = (unsigned long)GFX_STATUS_UNSUPPORTED; + unsigned long delay = (unsigned long) GFX_STATUS_UNSUPPORTED; #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) @@ -1913,8 +1915,8 @@ gfx_get_genlock_enable(void) */ int gfx_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2) + unsigned short *select_color2, unsigned long *color1, + unsigned short *color2) { int enable = GFX_STATUS_UNSUPPORTED; @@ -1926,8 +1928,7 @@ gfx_get_video_cursor(unsigned long *key, unsigned long *mask, #if GFX_VIDEO_REDCLOUD if (gfx_video_type == GFX_VIDEO_TYPE_REDCLOUD) enable = - redcloud_get_video_cursor(key, mask, select_color2, color1, - color2); + redcloud_get_video_cursor(key, mask, select_color2, color1, color2); #endif return (enable); } @@ -1978,7 +1979,7 @@ gfx_read_crc32(void) */ unsigned long gfx_read_window_crc(int source, unsigned short x, unsigned short y, - unsigned short width, unsigned short height, int crc32) + unsigned short width, unsigned short height, int crc32) { unsigned long crc = 0; @@ -2029,7 +2030,7 @@ gfx_get_alpha_enable(int *enable) */ void gfx_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height) + unsigned short *width, unsigned short *height) { #if GFX_VIDEO_SC1200 if (gfx_video_type == GFX_VIDEO_TYPE_SC1200) @@ -2096,8 +2097,8 @@ gfx_get_alpha_color(unsigned long *color) return; } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ -#endif /* GFX_VIDEO_DYNAMIC */ +#endif /* GFX_VIDEO_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/gfx_vip.c b/driver/xf86-video-geode/src/gfx/gfx_vip.c index e38c2f7d5..d3994a6f0 100644 --- a/driver/xf86-video-geode/src/gfx/gfx_vip.c +++ b/driver/xf86-video-geode/src/gfx/gfx_vip.c @@ -524,8 +524,8 @@ gfx_get_vip_bus_request_threshold_high(void) return (enable); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ -#endif /* GFX_VIP_DYNAMIC */ +#endif /* GFX_VIP_DYNAMIC */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/i2c_acc.c b/driver/xf86-video-geode/src/gfx/i2c_acc.c index a45a2c3fb..f6a0b2f9b 100644 --- a/driver/xf86-video-geode/src/gfx/i2c_acc.c +++ b/driver/xf86-video-geode/src/gfx/i2c_acc.c @@ -48,15 +48,15 @@ unsigned short index_reg, data_reg; /* ACCESS BUS DEFINITIONS */ -#define ACC_I2C_TIMEOUT 1000000 /* Number of reads before timing out */ -#define ACB1_BASE 0x810 /* ACCESS.bus base addresses */ +#define ACC_I2C_TIMEOUT 1000000 /* Number of reads before timing out */ +#define ACB1_BASE 0x810 /* ACCESS.bus base addresses */ #define ACB2_BASE 0x820 -#define ACBSDA 0 /* ACB serial data */ -#define ACBST 1 /* ACB status */ -#define ACBCST 2 /* ACB control status */ -#define ACBCTL1 3 /* ACB control 1 */ -#define ACBADDR 4 /* ACB own address */ -#define ACBCTL2 5 /* ACB control 2 */ +#define ACBSDA 0 /* ACB serial data */ +#define ACBST 1 /* ACB status */ +#define ACBCST 2 /* ACB control status */ +#define ACBCTL1 3 /* ACB control 1 */ +#define ACBADDR 4 /* ACB own address */ +#define ACBCTL2 5 /* ACB control 2 */ #define LDN 0x7 /* Logical Device Numbers */ #define ACB1_LDN 0x5 #define ACB2_LDN 0x6 @@ -64,6 +64,7 @@ unsigned short index_reg, data_reg; /* INITIAL ACCESS.bus BASE ADDRESS VALUES */ unsigned short base_address_array[3] = { 0, ACB1_BASE, ACB2_BASE }; + char Freq = 0x71; /* LOCAL ACCESS.bus FUNCTION DECLARATIONS */ @@ -88,7 +89,7 @@ unsigned short acc_i2c_set_base_address(unsigned char busnum, short adr); /* LOCAL HELPER ROUTINES */ void OsPciReadDWord(int bus, int dev, int func, int address, - unsigned long *data); + unsigned long *data); int sio_set_index_data_reg(void); void sio_write_reg(unsigned char reg, unsigned char data); unsigned char sio_read_reg(unsigned char reg); @@ -112,8 +113,8 @@ OsPciReadDWord(int bus, int dev, int func, int address, unsigned long *data) * {10000000,bus[23:16],device[15:11],function[10:8],address[7:2],00} */ long addr = (0x80000000 | - ((bus & 0xff) << 16) | - ((dev & 0x1f) << 11) | ((func & 0x7) << 8) | (address & 0xff)); + ((bus & 0xff) << 16) | + ((dev & 0x1f) << 11) | ((func & 0x7) << 8) | (address & 0xff)); OUTD(PCI_INDEX, addr); *data = IND(PCI_DATA); } @@ -135,7 +136,7 @@ sio_set_index_data_reg(void) OsPciReadDWord(0, 0x12, 5, 0x10, &xbus_expention_bar); xbus_expention_bar = xbus_expention_bar & 0xfffffffe; - io_control_reg1 = IND((unsigned short)xbus_expention_bar); + io_control_reg1 = IND((unsigned short) xbus_expention_bar); if ((io_control_reg1) & (SIO_BASE_ADR_15C_15D)) { index_reg = INDEX_1; @@ -240,11 +241,11 @@ gfx_i2c_select_gpio(int clock, int data) #if GFX_I2C_DYNAMIC int acc_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) #else int gfx_i2c_write(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) #endif { int loop = 0; @@ -261,7 +262,7 @@ gfx_i2c_write(unsigned char busnum, unsigned char chipadr, acc_i2c_ack(busnum, 1, 0); acc_i2c_stall_after_start(busnum, 1); - acc_i2c_send_address(busnum, (unsigned char)(chipadr & 0xFE)); + acc_i2c_send_address(busnum, (unsigned char) (chipadr & 0xFE)); acc_i2c_stall_after_start(busnum, 0); if (!acc_i2c_ack(busnum, 0, 0)) return (GFX_STATUS_ERROR); @@ -297,11 +298,11 @@ gfx_i2c_write(unsigned char busnum, unsigned char chipadr, #if GFX_I2C_DYNAMIC int acc_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) #else int gfx_i2c_read(unsigned char busnum, unsigned char chipadr, - unsigned char subadr, unsigned char bytes, unsigned char *data) + unsigned char subadr, unsigned char bytes, unsigned char *data) #endif { unsigned char bytesRead; @@ -321,7 +322,7 @@ gfx_i2c_read(unsigned char busnum, unsigned char chipadr, acc_i2c_ack(busnum, 1, 0); acc_i2c_stall_after_start(busnum, 1); - acc_i2c_send_address(busnum, (unsigned char)(chipadr & 0xFE)); + acc_i2c_send_address(busnum, (unsigned char) (chipadr & 0xFE)); acc_i2c_stall_after_start(busnum, 0); if (!acc_i2c_ack(busnum, 0, 0)) return (GFX_STATUS_ERROR); @@ -340,7 +341,7 @@ gfx_i2c_read(unsigned char busnum, unsigned char chipadr, acc_i2c_ack(busnum, 1, 1); acc_i2c_stall_after_start(busnum, 1); - acc_i2c_send_address(busnum, (unsigned char)(chipadr | 0x01)); + acc_i2c_send_address(busnum, (unsigned char) (chipadr | 0x01)); /* IF LAST BYTE */ @@ -360,11 +361,13 @@ gfx_i2c_read(unsigned char busnum, unsigned char chipadr, if (bytesRead < (bytes - 2)) { data[bytesRead] = acc_i2c_read_byte(busnum, 0); acc_i2c_ack(busnum, 1, 0); - } else if (bytesRead == (bytes - 2)) { /* TWO BYTES LEFT */ + } + else if (bytesRead == (bytes - 2)) { /* TWO BYTES LEFT */ acc_i2c_ack(busnum, 1, 1); data[bytesRead] = acc_i2c_read_byte(busnum, 0); acc_i2c_ack(busnum, 1, 1); - } else { /* LAST BYTE */ + } + else { /* LAST BYTE */ data[bytesRead] = acc_i2c_read_byte(busnum, 1); acc_i2c_stop(busnum); @@ -432,32 +435,32 @@ acc_i2c_reset_bus(unsigned char busnum) /* Disable the ACCESS.bus device and */ /* Configure the SCL frequency */ - OUTB((unsigned short)(bus_base_address + ACBCTL2), - (unsigned char)(Freq & 0xFE)); + OUTB((unsigned short) (bus_base_address + ACBCTL2), + (unsigned char) (Freq & 0xFE)); /* Configure no interrupt mode (polling) and */ /* Disable global call address */ - OUTB((unsigned short)(bus_base_address + ACBCTL1), 0x0); + OUTB((unsigned short) (bus_base_address + ACBCTL1), 0x0); /* Disable slave address */ - OUTB((unsigned short)(bus_base_address + ACBADDR), 0x0); + OUTB((unsigned short) (bus_base_address + ACBADDR), 0x0); /* Enable the ACCESS.bus device */ - reg = INB((unsigned short)(bus_base_address + ACBCTL2)); + reg = INB((unsigned short) (bus_base_address + ACBCTL2)); reg |= 0x01; - OUTB((unsigned short)(bus_base_address + ACBCTL2), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL2), reg); /* Issue STOP event */ acc_i2c_stop(busnum); /* Clear NEGACK, STASTR and BER bits */ - OUTB((unsigned short)(bus_base_address + ACBST), 0x38); + OUTB((unsigned short) (bus_base_address + ACBST), 0x38); /* Clear BB (BUS BUSY) bit */ - reg = INB((unsigned short)(bus_base_address + ACBCST)); + reg = INB((unsigned short) (bus_base_address + ACBCST)); reg |= 0x02; - OUTB((unsigned short)(bus_base_address + ACBCST), reg); + OUTB((unsigned short) (bus_base_address + ACBCST), reg); } /*--------------------------------------------------------------------------- @@ -472,9 +475,9 @@ acc_i2c_start(unsigned char busnum) unsigned char reg; unsigned short bus_base_address = base_address_array[busnum]; - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); reg |= 0x01; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); } /*--------------------------------------------------------------------------- @@ -489,9 +492,9 @@ acc_i2c_stop(unsigned char busnum) unsigned char reg; unsigned short bus_base_address = base_address_array[busnum]; - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); reg |= 0x02; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); } /*--------------------------------------------------------------------------- @@ -505,9 +508,9 @@ acc_i2c_abort_data(unsigned char busnum) unsigned short bus_base_address = base_address_array[busnum]; acc_i2c_stop(busnum); - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); reg |= 0x10; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); } /*--------------------------------------------------------------------------- @@ -531,17 +534,17 @@ acc_i2c_stall_after_start(unsigned char busnum, int state) unsigned char reg; unsigned short bus_base_address = base_address_array[busnum]; - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); if (state) reg |= 0x80; else reg &= 0x7F; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); if (!state) { - reg = INB((unsigned short)(bus_base_address + ACBST)); + reg = INB((unsigned short) (bus_base_address + ACBST)); reg |= 0x08; - OUTB((unsigned short)(bus_base_address + ACBST), reg); + OUTB((unsigned short) (bus_base_address + ACBST), reg); } } @@ -558,10 +561,10 @@ acc_i2c_send_address(unsigned char busnum, unsigned char cData) /* WRITE THE DATA */ - OUTB((unsigned short)(bus_base_address + ACBSDA), cData); + OUTB((unsigned short) (bus_base_address + ACBSDA), cData); while (1) { - reg = INB((unsigned short)(bus_base_address + ACBST)); - if ((reg & 0x38) != 0) /* check STASTR, BER and NEGACK */ + reg = INB((unsigned short) (bus_base_address + ACBST)); + if ((reg & 0x38) != 0) /* check STASTR, BER and NEGACK */ break; if (timeout++ == ACC_I2C_TIMEOUT) { acc_i2c_bus_recovery(busnum); @@ -598,23 +601,25 @@ acc_i2c_ack(unsigned char busnum, int fPut, int negAck) unsigned short bus_base_address = base_address_array[busnum]; unsigned long timeout = 0; - if (fPut) { /* read operation */ + if (fPut) { /* read operation */ if (!negAck) { /* Push Ack onto I2C bus */ - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); reg &= 0xE7; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); - } else { + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); + } + else { /* Push negAck onto I2C bus */ - reg = INB((unsigned short)(bus_base_address + ACBCTL1)); + reg = INB((unsigned short) (bus_base_address + ACBCTL1)); reg |= 0x10; - OUTB((unsigned short)(bus_base_address + ACBCTL1), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL1), reg); } - } else { /* write operation */ + } + else { /* write operation */ /* Receive Ack from I2C bus */ while (1) { - reg = INB((unsigned short)(bus_base_address + ACBST)); - if ((reg & 0x70) != 0) /* check SDAST, BER and NEGACK */ + reg = INB((unsigned short) (bus_base_address + ACBST)); + if ((reg & 0x70) != 0) /* check SDAST, BER and NEGACK */ break; if (timeout++ == ACC_I2C_TIMEOUT) { acc_i2c_bus_recovery(busnum); @@ -651,9 +656,9 @@ acc_i2c_stop_clock(unsigned char busnum) unsigned char reg; unsigned short bus_base_address = base_address_array[busnum]; - reg = INB((unsigned short)(bus_base_address + ACBCTL2)); + reg = INB((unsigned short) (bus_base_address + ACBCTL2)); reg &= ~0x01; - OUTB((unsigned short)(bus_base_address + ACBCTL2), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL2), reg); } /*--------------------------------------------------------------------------- @@ -668,9 +673,9 @@ acc_i2c_activate_clock(unsigned char busnum) unsigned char reg; unsigned short bus_base_address = base_address_array[busnum]; - reg = INB((unsigned short)(bus_base_address + ACBCTL2)); + reg = INB((unsigned short) (bus_base_address + ACBCTL2)); reg |= 0x01; - OUTB((unsigned short)(bus_base_address + ACBCTL2), reg); + OUTB((unsigned short) (bus_base_address + ACBCTL2), reg); } /*--------------------------------------------------------------------------- @@ -687,7 +692,7 @@ acc_i2c_write_byte(unsigned char busnum, unsigned char cData) unsigned long timeout = 0; while (1) { - reg = INB((unsigned short)(bus_base_address + ACBST)); + reg = INB((unsigned short) (bus_base_address + ACBST)); if (reg & 0x70) break; if (timeout++ == ACC_I2C_TIMEOUT) { @@ -712,7 +717,7 @@ acc_i2c_write_byte(unsigned char busnum, unsigned char cData) /* WRITE THE DATA */ - OUTB((unsigned short)(bus_base_address + ACBSDA), cData); + OUTB((unsigned short) (bus_base_address + ACBSDA), cData); } /*--------------------------------------------------------------------------- @@ -729,7 +734,7 @@ acc_i2c_read_byte(unsigned char busnum, int last_byte) unsigned long timeout = 0; while (1) { - reg = INB((unsigned short)(bus_base_address + ACBST)); + reg = INB((unsigned short) (bus_base_address + ACBST)); if (reg & 0x60) break; if (timeout++ == ACC_I2C_TIMEOUT) { @@ -748,7 +753,7 @@ acc_i2c_read_byte(unsigned char busnum, int last_byte) /* READ DATA */ if (last_byte) acc_i2c_stop_clock(busnum); - cData = INB((unsigned short)(bus_base_address + ACBSDA)); + cData = INB((unsigned short) (bus_base_address + ACBSDA)); if (last_byte) acc_i2c_activate_clock(busnum); @@ -768,7 +773,7 @@ acc_i2c_request_master(unsigned char busnum) acc_i2c_start(busnum); while (1) { - reg = INB((unsigned short)(bus_base_address + ACBST)); + reg = INB((unsigned short) (bus_base_address + ACBST)); if (reg & 0x60) break; if (timeout++ == ACC_I2C_TIMEOUT) { @@ -821,7 +826,7 @@ acc_i2c_set_freq(unsigned char busnum, char freq) { unsigned short bus_base_address = base_address_array[busnum]; - OUTB((unsigned short)(bus_base_address + ACBCTL2), 0x0); + OUTB((unsigned short) (bus_base_address + ACBCTL2), 0x0); if (freq == -1) freq = 0x71; @@ -830,7 +835,7 @@ acc_i2c_set_freq(unsigned char busnum, char freq) freq |= 0x01; } - OUTB((unsigned short)(bus_base_address + ACBCTL2), freq); + OUTB((unsigned short) (bus_base_address + ACBCTL2), freq); return (freq); } @@ -867,8 +872,8 @@ acc_i2c_set_base_address(unsigned char busnum, short adr) } /* Set ACCESS.bus base address */ - sio_write_reg(BASE_ADR_LSB_REG, (unsigned char)(adr & 0xFF)); - sio_write_reg(BASE_ADR_MSB_REG, (unsigned char)(adr >> 8)); + sio_write_reg(BASE_ADR_LSB_REG, (unsigned char) (adr & 0xFF)); + sio_write_reg(BASE_ADR_MSB_REG, (unsigned char) (adr >> 8)); return adr; } diff --git a/driver/xf86-video-geode/src/gfx/i2c_gpio.c b/driver/xf86-video-geode/src/gfx/i2c_gpio.c index 7614cd02d..9774a8daa 100644 --- a/driver/xf86-video-geode/src/gfx/i2c_gpio.c +++ b/driver/xf86-video-geode/src/gfx/i2c_gpio.c @@ -35,11 +35,11 @@ int gpio_data = 0; static int g_initialized = 0; -#define I2CWRITE 0x00 /* Write address */ -#define I2CREAD 0x01 /* Read address */ +#define I2CWRITE 0x00 /* Write address */ +#define I2CREAD 0x01 /* Read address */ -#define I2CACK 0x00 /* Ack value */ -#define I2CNACK 0x01 /* Not - ack value */ +#define I2CACK 0x00 /* Ack value */ +#define I2CNACK 0x01 /* Not - ack value */ #define CS5530_ID (0x80000000 | (0x00<<16) | (0x12<<11) | (0<<8) | 0x00) #define CS5530_GPIO (0x80000000 | (0x00<<16) | (0x12<<11) | (0<<8) | 0x90) @@ -52,9 +52,9 @@ int I2C_init(void); void I2C_cleanup(void); int I2C_Read(unsigned char address, unsigned int reg, unsigned long *p_value, - unsigned int bytes); + unsigned int bytes); int I2C_Write(unsigned char address, unsigned int reg, unsigned long value, - unsigned int bytes); + unsigned int bytes); int I2CAL_init(void); void I2CAL_cleanup(void); @@ -123,11 +123,11 @@ gfx_i2c_select_gpio(int clock, int data) #if GFX_I2C_DYNAMIC int gpio_i2c_write(unsigned char busnum, unsigned char address, unsigned char reg, - unsigned char bytes, unsigned char *value) + unsigned char bytes, unsigned char *value) #else int gfx_i2c_write(unsigned char busnum, unsigned char address, unsigned char reg, - unsigned char bytes, unsigned char *value) + unsigned char bytes, unsigned char *value) #endif { /* ### ADD ### CODE TO WRITE BYTE TO I2B BUS */ @@ -139,13 +139,13 @@ gfx_i2c_write(unsigned char busnum, unsigned char address, unsigned char reg, /* The address is shifted left by one to make room for Read/Write * bit */ SendI2CStart(); - SendI2CData((char)((address << 1) | I2CWRITE)); + SendI2CData((char) ((address << 1) | I2CWRITE)); if (!ReceiveI2CAck()) { SendI2CStop(); gfx_delay_milliseconds(10); continue; } - SendI2CData((unsigned char)reg); + SendI2CData((unsigned char) reg); if (!ReceiveI2CAck()) { SendI2CStop(); gfx_delay_milliseconds(10); @@ -189,11 +189,11 @@ gfx_i2c_write(unsigned char busnum, unsigned char address, unsigned char reg, #if GFX_I2C_DYNAMIC int gpio_i2c_read(unsigned char busnum, unsigned char address, unsigned char reg, - unsigned char bytes, unsigned char *p_value) + unsigned char bytes, unsigned char *p_value) #else int gfx_i2c_read(unsigned char busnum, unsigned char address, unsigned char reg, - unsigned char bytes, unsigned char *p_value) + unsigned char bytes, unsigned char *p_value) #endif { /* ### ADD ### CODE TO WRITE BYTE TO I2B BUS */ @@ -209,18 +209,18 @@ gfx_i2c_read(unsigned char busnum, unsigned char address, unsigned char reg, /* The address is shifted left by one to make room for Read/Write * bit */ SendI2CStart(); - SendI2CData((char)((address << 1) | I2CWRITE)); + SendI2CData((char) ((address << 1) | I2CWRITE)); if (!ReceiveI2CAck()) { SendI2CStop(); gfx_delay_milliseconds(10); continue; } - SendI2CData((unsigned char)(reg & 0xFF)); + SendI2CData((unsigned char) (reg & 0xFF)); SendI2CNack(); /* read the first data byte. */ SendI2CStart(); - SendI2CData((char)((address << 1) | I2CREAD)); + SendI2CData((char) ((address << 1) | I2CREAD)); if (!ReceiveI2CAck()) { SendI2CStop(); gfx_delay_milliseconds(10); @@ -490,7 +490,7 @@ I2CAL_init(void) return 1; l_reg = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)l_reg; + reg = (unsigned short) l_reg; /* both outputs, both high. */ reg |= (SDADIR | SCLDIR | SDA | SCL); @@ -525,11 +525,12 @@ I2CAL_output_clock(int inState) unsigned long value; value = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)value; + reg = (unsigned short) value; - if (inState) { /* write a 1. */ + if (inState) { /* write a 1. */ reg |= SCL; - } else { /* write a 0. */ + } + else { /* write a 0. */ reg &= ~SCL; } @@ -554,11 +555,12 @@ I2CAL_output_data(int inState) unsigned long value; value = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)value; + reg = (unsigned short) value; - if (inState) { /* write a 1. */ + if (inState) { /* write a 1. */ reg |= SDA; - } else { + } + else { /* write a 0. */ reg &= ~SDA; } @@ -583,7 +585,7 @@ I2CAL_input_data(void) unsigned long value; value = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)value; + reg = (unsigned short) value; if (reg & SDA) return 1; @@ -605,7 +607,7 @@ I2CAL_set_data_for_input(void) unsigned long value; value = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)value; + reg = (unsigned short) value; reg &= ~SDADIR; @@ -628,7 +630,7 @@ I2CAL_set_data_for_output(void) unsigned long value; value = gfx_pci_config_read(CS5530_GPIO); - reg = (unsigned short)value; + reg = (unsigned short) value; reg |= SDADIR; value = reg; diff --git a/driver/xf86-video-geode/src/gfx/init_gu1.c b/driver/xf86-video-geode/src/gfx/init_gu1.c index e7d998763..647fab557 100644 --- a/driver/xf86-video-geode/src/gfx/init_gu1.c +++ b/driver/xf86-video-geode/src/gfx/init_gu1.c @@ -43,7 +43,7 @@ gfx_gxm_config_read(unsigned char index) OUTB(0x22, GXM_CONFIG_CCR3); lock = INB(0x23); OUTB(0x22, GXM_CONFIG_CCR3); - OUTB(0x23, (unsigned char)(lock | 0x10)); + OUTB(0x23, (unsigned char) (lock | 0x10)); OUTB(0x22, index); value = INB(0x23); OUTB(0x22, GXM_CONFIG_CCR3); @@ -103,7 +103,8 @@ gfx_get_core_freq(void) default: return (0); } - } else { + } + else { switch (dir0) { case 0: case 2: @@ -150,7 +151,7 @@ gfx_get_cpu_register_base(void) { unsigned long base; - base = (unsigned long)gfx_gxm_config_read(GXM_CONFIG_GCR); + base = (unsigned long) gfx_gxm_config_read(GXM_CONFIG_GCR); base = (base & 0x03) << 30; return (base); } @@ -175,7 +176,7 @@ gfx_get_frame_buffer_base(void) { unsigned long base; - base = (unsigned long)gfx_gxm_config_read(GXM_CONFIG_GCR); + base = (unsigned long) gfx_gxm_config_read(GXM_CONFIG_GCR); base = (base & 0x03) << 30; if (base) base |= 0x00800000; @@ -225,7 +226,7 @@ gfx_get_vid_register_base(void) { unsigned long base; - base = (unsigned long)gfx_gxm_config_read(GXM_CONFIG_GCR); + base = (unsigned long) gfx_gxm_config_read(GXM_CONFIG_GCR); base = (base & 0x03) << 30; if (base) base |= 0x00010000; @@ -254,7 +255,7 @@ gfx_get_vip_register_base(void) unsigned long base = 0; if ((gfx_cpu_version & 0xFF) == GFX_CPU_SC1200) { - base = (unsigned long)gfx_gxm_config_read(GXM_CONFIG_GCR); + base = (unsigned long) gfx_gxm_config_read(GXM_CONFIG_GCR); base = (base & 0x03) << 30; if (base) base |= 0x00015000; diff --git a/driver/xf86-video-geode/src/gfx/init_gu2.c b/driver/xf86-video-geode/src/gfx/init_gu2.c index 0bbb0640b..72a16c80b 100644 --- a/driver/xf86-video-geode/src/gfx/init_gu2.c +++ b/driver/xf86-video-geode/src/gfx/init_gu2.c @@ -50,7 +50,7 @@ gfx_get_core_freq(void) OUTW(0xAC1C, 0xFC53); OUTW(0xAC1C, 0x1201); - value = (unsigned long)(INW(0xAC1E)); + value = (unsigned long) (INW(0xAC1E)); return (value); } @@ -129,7 +129,7 @@ gfx_get_frame_buffer_size(void) OUTW(0xAC1C, 0xFC53); OUTW(0xAC1C, 0x0200); - value = (unsigned long)(INW(0xAC1E)) & 0xFFl; + value = (unsigned long) (INW(0xAC1E)) & 0xFFl; return (value << 19); } diff --git a/driver/xf86-video-geode/src/gfx/msr_rdcl.c b/driver/xf86-video-geode/src/gfx/msr_rdcl.c index 548e8a4da..2f85e6a48 100644 --- a/driver/xf86-video-geode/src/gfx/msr_rdcl.c +++ b/driver/xf86-video-geode/src/gfx/msr_rdcl.c @@ -27,7 +27,7 @@ * This file contains MSR access routines for Redcloud. * */ -void redcloud_build_mbus_tree(void); /* private routine definition */ +void redcloud_build_mbus_tree(void); /* private routine definition */ int redcloud_init_msr_devices(MSR aDev[], unsigned int array_size); /* private routine definition */ @@ -212,7 +212,7 @@ redcloud_build_mbus_tree(void) MBIU0[port].deviceId = NOT_POPULATED; else { MSR_READ(MBD_MSR_CAP, MBIU0[port].address, &(msrValue.high), - &(msrValue.low)); + &(msrValue.low)); MBIU0[port].deviceId = GET_DEVICE_ID(msrValue.high, msrValue.low); } } @@ -253,7 +253,7 @@ redcloud_build_mbus_tree(void) MBIU1[port].deviceId = NOT_POPULATED; else { MSR_READ(MBD_MSR_CAP, MBIU1[port].address, &(msrValue.high), - &(msrValue.low)); + &(msrValue.low)); MBIU1[port].deviceId = GET_DEVICE_ID(msrValue.high, msrValue.low); } } @@ -273,8 +273,7 @@ redcloud_build_mbus_tree(void) /* Query the MBIU for the port through which we are communicating. */ /* We will avoid accesses to this port to avoid a self-reference. */ - MSR_READ(MBIU_WHOAMI, CP_MB0_MBIU0, &(msrValue.high), - &(msrValue.low)); + MSR_READ(MBIU_WHOAMI, CP_MB0_MBIU0, &(msrValue.high), &(msrValue.low)); reflective = msrValue.low & WHOAMI_MASK; /* ENUMERATE ALL PORTS */ @@ -298,12 +297,13 @@ redcloud_build_mbus_tree(void) MBIU2[port].deviceId = NOT_POPULATED; else { MSR_READ(MBD_MSR_CAP, MBIU2[port].address, &(msrValue.high), - &(msrValue.low)); + &(msrValue.low)); MBIU2[port].deviceId = GET_DEVICE_ID(msrValue.high, msrValue.low); } } - } else { + } + else { /* NO 5535 */ /* If the CS5535 is not installed, fill in the cached table */ /* with the 'NOT_INSTALLED' flag. Also, fill in the device */ @@ -544,10 +544,12 @@ gfx_get_glink_id_at_address(unsigned int *device, unsigned long address) if (MBIU0[port].address == address) { *device = MBIU0[port].deviceId; return FOUND; - } else if (MBIU1[port].address == address) { + } + else if (MBIU1[port].address == address) { *device = MBIU1[port].deviceId; return FOUND; - } else if (MBIU2[port].address == address) { + } + else if (MBIU2[port].address == address) { *device = MBIU2[port].deviceId; return FOUND; } @@ -577,7 +579,7 @@ gfx_get_glink_id_at_address(unsigned int *device, unsigned long address) #if GFX_MSR_DYNAMIC DEV_STATUS redcloud_msr_read(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) + Q_WORD * msrValue) #else DEV_STATUS gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) @@ -586,7 +588,7 @@ gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) if (device < NUM_DEVS) { if (msrDev[device].Present == FOUND) MSR_READ(msrRegister, msrDev[device].Address, &(msrValue->high), - &(msrValue->low)); + &(msrValue->low)); return msrDev[device].Present; } @@ -614,17 +616,16 @@ gfx_msr_read(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) #if GFX_MSR_DYNAMIC DEV_STATUS redcloud_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) + Q_WORD * msrValue) #else DEV_STATUS -gfx_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue) +gfx_msr_write(unsigned int device, unsigned int msrRegister, Q_WORD * msrValue) #endif { if (device < NUM_DEVS) { if (msrDev[device].Present == FOUND) MSR_WRITE(msrRegister, msrDev[device].Address, &(msrValue->high), - &(msrValue->low)); + &(msrValue->low)); return msrDev[device].Present; } diff --git a/driver/xf86-video-geode/src/gfx/rndr_gu1.c b/driver/xf86-video-geode/src/gfx/rndr_gu1.c index 5ad5af1c9..57fe9b10a 100644 --- a/driver/xf86-video-geode/src/gfx/rndr_gu1.c +++ b/driver/xf86-video-geode/src/gfx/rndr_gu1.c @@ -104,7 +104,8 @@ gfx_set_bpp(unsigned short bpp) } if ((gfx_cpu_version == GFX_CPU_PYRAMID) && (pitch > 2048)) { control |= BC_FB_WIDTH_4096; - } else if (pitch > 1024) { + } + else if (pitch > 1024) { control |= BC_FB_WIDTH_2048; } GFX_WAIT_BUSY; @@ -143,8 +144,8 @@ gfx_set_solid_source(unsigned long color) /* POLL UNTIL ABLE TO WRITE THE SOURCE COLOR */ GFX_WAIT_PENDING; - WRITE_REG16(GP_SRC_COLOR_0, (unsigned short)color); - WRITE_REG16(GP_SRC_COLOR_1, (unsigned short)color); + WRITE_REG16(GP_SRC_COLOR_0, (unsigned short) color); + WRITE_REG16(GP_SRC_COLOR_1, (unsigned short) color); } /* @@ -159,11 +160,11 @@ gfx_set_solid_source(unsigned long color) #if GFX_2DACCEL_DYNAMIC void gu1_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent) + unsigned short transparent) #else void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent) + unsigned short transparent) #endif { /* SET TRANSPARENCY FLAG */ @@ -183,8 +184,8 @@ gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, /* POLL UNTIL ABLE TO WRITE THE SOURCE COLOR */ GFX_WAIT_PENDING; - WRITE_REG16(GP_SRC_COLOR_0, (unsigned short)bgcolor); - WRITE_REG16(GP_SRC_COLOR_1, (unsigned short)fgcolor); + WRITE_REG16(GP_SRC_COLOR_0, (unsigned short) bgcolor); + WRITE_REG16(GP_SRC_COLOR_1, (unsigned short) fgcolor); } /* @@ -231,7 +232,7 @@ gfx_set_solid_pattern(unsigned long color) /* POLL UNTIL ABLE TO WRITE THE PATTERN COLOR */ GFX_WAIT_PENDING; - WRITE_REG16(GP_PAT_COLOR_0, (unsigned short)color); + WRITE_REG16(GP_PAT_COLOR_0, (unsigned short) color); } /* @@ -244,11 +245,13 @@ gfx_set_solid_pattern(unsigned long color) #if GFX_2DACCEL_DYNAMIC void gu1_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned char transparent) #else void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned char transparent) #endif { /* CLEAR TRANSPARENCY FLAG */ @@ -273,8 +276,8 @@ gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, /* POLL UNTIL ABLE TO WRITE THE PATTERN COLORS AND DATA */ GFX_WAIT_PENDING; - WRITE_REG16(GP_PAT_COLOR_0, (unsigned short)bgcolor); - WRITE_REG16(GP_PAT_COLOR_1, (unsigned short)fgcolor); + WRITE_REG16(GP_PAT_COLOR_0, (unsigned short) bgcolor); + WRITE_REG16(GP_PAT_COLOR_1, (unsigned short) fgcolor); WRITE_REG32(GP_PAT_DATA_0, data0); WRITE_REG32(GP_PAT_DATA_1, data1); } @@ -289,13 +292,15 @@ gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, #if GFX_2DACCEL_DYNAMIC void gu1_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparent) #else void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparent) #endif { /* CLEAR TRANSPARENCY FLAG */ @@ -321,8 +326,8 @@ gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, /* POLL UNTIL ABLE TO WRITE THE PATTERN COLORS AND DATA */ GFX_WAIT_PENDING; - WRITE_REG16(GP_PAT_COLOR_0, (unsigned short)bgcolor); - WRITE_REG16(GP_PAT_COLOR_1, (unsigned short)fgcolor); + WRITE_REG16(GP_PAT_COLOR_0, (unsigned short) bgcolor); + WRITE_REG16(GP_PAT_COLOR_1, (unsigned short) fgcolor); WRITE_REG32(GP_PAT_DATA_0, data0); WRITE_REG32(GP_PAT_DATA_1, data1); if (GFXbpp > 8) { @@ -392,7 +397,7 @@ gfx_set_raster_operation(unsigned char rop) /* GENERATE 16-BIT VERSION OF ROP WITH PATTERN FLAGS */ - rop16 = (unsigned short)rop | GFXpatternFlags; + rop16 = (unsigned short) rop | GFXpatternFlags; if ((rop & 0x33) ^ ((rop >> 2) & 0x33)) rop16 |= GFXsourceFlags; @@ -440,7 +445,7 @@ gfx_set_raster_operation(unsigned char rop) */ void gu1_solid_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long color) + unsigned short width, unsigned short height, unsigned long color) { unsigned short section; @@ -455,7 +460,7 @@ gu1_solid_fill(unsigned short x, unsigned short y, WRITE_REG16(GP_DST_YCOOR, y); WRITE_REG16(GP_HEIGHT, height); WRITE_REG16(GP_RASTER_MODE, 0x00F0); /* PATCOPY */ - WRITE_REG16(GP_PAT_COLOR_0, (unsigned short)color); + WRITE_REG16(GP_PAT_COLOR_0, (unsigned short) color); /* CHECK WIDTH FOR GX BUG WORKAROUND */ @@ -464,7 +469,8 @@ gu1_solid_fill(unsigned short x, unsigned short y, WRITE_REG16(GP_WIDTH, width); WRITE_REG16(GP_BLIT_MODE, 0); - } else { + } + else { /* DRAW FIRST PART OF RECTANGLE */ /* Get to a 16 pixel boundary. */ @@ -500,11 +506,11 @@ gu1_solid_fill(unsigned short x, unsigned short y, #if GFX_2DACCEL_DYNAMIC void gu1_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #else void gfx_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #endif { unsigned short section, buffer_width, blit_mode; @@ -517,10 +523,10 @@ gfx_pattern_fill(unsigned short x, unsigned short y, /* Need hardware workaround for fast "burst write" cases. */ case 0x00F0: - gu1_solid_fill(x, y, width, height, (unsigned short)GFXsavedColor); + gu1_solid_fill(x, y, width, height, (unsigned short) GFXsavedColor); break; case 0x000F: - gu1_solid_fill(x, y, width, height, (unsigned short)~GFXsavedColor); + gu1_solid_fill(x, y, width, height, (unsigned short) ~GFXsavedColor); break; case 0x0000: gu1_solid_fill(x, y, width, height, 0x0000); @@ -605,11 +611,13 @@ gfx_pattern_fill(unsigned short x, unsigned short y, #if GFX_2DACCEL_DYNAMIC void gu1_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern) + unsigned short width, unsigned short height, + unsigned long *pattern) #else void gfx_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern) + unsigned short width, unsigned short height, + unsigned long *pattern) #endif { unsigned short blit_mode, passes, cur_y, pat_y, i; @@ -632,7 +640,8 @@ gfx_color_pattern_fill(unsigned short x, unsigned short y, GFX_WAIT_PENDING; WRITE_REG16(GP_RASTER_MODE, - (GFXsavedRop & ~RM_PAT_MASK & ~RM_PAT_TRANSPARENT) | RM_PAT_COLOR); + (GFXsavedRop & ~RM_PAT_MASK & ~RM_PAT_TRANSPARENT) | + RM_PAT_COLOR); /* WRITE THE REGISTERS THAT DO NOT CHANGE */ /* If destination data is required, the width and */ @@ -695,7 +704,8 @@ gfx_color_pattern_fill(unsigned short x, unsigned short y, line_width -= section; } - } else { + } + else { while (cur_y < y + height) { GFX_WAIT_PENDING; WRITE_REG16(GP_DST_YCOOR, cur_y); @@ -731,13 +741,13 @@ gfx_color_pattern_fill(unsigned short x, unsigned short y, #if GFX_2DACCEL_DYNAMIC void gu1_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height) #else void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height) #endif { unsigned short section, buffer_width; @@ -811,7 +821,8 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, WRITE_REG16(GP_SRC_XCOOR, srcx); WRITE_REG16(GP_DST_XCOOR, dstx); WRITE_REG16(GP_BLIT_MODE, blit_mode); - } else { + } + else { /* POSITIVE X DIRECTION */ WRITE_REG16(GP_SRC_XCOOR, srcx); @@ -843,13 +854,15 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu1_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color) #else void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color) #endif { unsigned short section, buffer_width; @@ -947,7 +960,8 @@ gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, WRITE_REG16(GP_SRC_XCOOR, srcx); WRITE_REG16(GP_DST_XCOOR, dstx); WRITE_REG16(GP_BLIT_MODE, blit_mode); - } else { + } + else { /* POSITIVE X DIRECTION */ WRITE_REG16(GP_SRC_XCOOR, srcx); @@ -985,13 +999,15 @@ gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu1_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch) #else void gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch) #endif { unsigned short section, buffer_width; @@ -1048,7 +1064,7 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, /* CALCULATE THE BITMAP OFFSET */ array_offset = - (unsigned long)srcy *(long)pitch + ((long)srcx << bpp_shift); + (unsigned long) srcy *(long) pitch + ((long) srcx << bpp_shift); while (temp_height--) { GFX_WAIT_PIPELINE; @@ -1059,7 +1075,7 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, * */ WRITE_SCRATCH_STRING(dword_bytes_needed, bytes_extra, data, - array_offset); + array_offset); WRITE_REG16(GP_BLIT_MODE, blit_mode); array_offset += pitch; @@ -1094,15 +1110,17 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu1_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch, + unsigned long color) #else void gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch, + unsigned long color) #endif { unsigned short section, buffer_width; @@ -1178,7 +1196,7 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, /* CALCULATE THE BITMAP OFFSET */ array_offset = - (unsigned long)srcy *(long)pitch + ((long)srcx << bpp_shift); + (unsigned long) srcy *(long) pitch + ((long) srcx << bpp_shift); while (temp_height--) { GFX_WAIT_PIPELINE; @@ -1188,7 +1206,7 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, /* scratchpad offset set by the SET_SCRATCH_BASE macro. */ WRITE_SCRATCH_STRING(dword_bytes_needed, bytes_extra, data, - array_offset); + array_offset); WRITE_REG16(GP_BLIT_MODE, BM_READ_SRC_BB0); array_offset += pitch; @@ -1219,13 +1237,15 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu1_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) #else void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) #endif { unsigned short section, buffer_width; @@ -1242,7 +1262,8 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, if (GFXusesDstData) { buffer_width = GFXbufferWidthPixels; blit_mode |= BM_READ_DST_FB1; - } else + } + else buffer_width = 3200; /* CHECK IF DATA ALREADY IN BLIT BUFFER */ @@ -1297,7 +1318,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, /* CALCULATE THE BITMAP OFFSET */ - array_offset = (unsigned long)srcy *(long)pitch + ((long)srcx >> 3); + array_offset = (unsigned long) srcy *(long) pitch + ((long) srcx >> 3); while (temp_height--) { GFX_WAIT_PIPELINE; @@ -1307,7 +1328,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, /* scratchpad offset set by the SET_SCRATCH_BASE macro. */ WRITE_SCRATCH_STRING(dword_bytes_needed, bytes_extra, data, - array_offset); + array_offset); WRITE_REG16(GP_BLIT_MODE, blit_mode); array_offset += pitch; @@ -1335,11 +1356,11 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu1_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #else void gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #endif { unsigned long dword_bytes_needed, bytes_extra; @@ -1348,7 +1369,7 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, /* CALCULATE DATA SIZE */ pitch = (width + 7) >> 3; - data_bytes = (long)height *pitch; + data_bytes = (long) height *pitch; /* CHECK FOR SIMPLE CASE */ /* This routine is designed to render a source copy text glyph. If @@ -1363,7 +1384,7 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, if (GFXusesDstData || data_bytes > buffer_bytes) { gfx_mono_bitmap_to_screen_blt(0, 0, dstx, dsty, width, height, data, - (short)pitch); + (short) pitch); return; } @@ -1415,13 +1436,15 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, #if GFX_2DACCEL_DYNAMIC void gu1_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #else void gfx_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #endif { unsigned short vector_mode = flags; diff --git a/driver/xf86-video-geode/src/gfx/rndr_gu2.c b/driver/xf86-video-geode/src/gfx/rndr_gu2.c index db3ccf31a..a8126fb41 100644 --- a/driver/xf86-video-geode/src/gfx/rndr_gu2.c +++ b/driver/xf86-video-geode/src/gfx/rndr_gu2.c @@ -214,11 +214,11 @@ gfx_set_solid_source(unsigned long color) #if GFX_2DACCEL_DYNAMIC void gu2_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent) + unsigned short transparent) #else void gfx_set_mono_source(unsigned long bgcolor, unsigned long fgcolor, - unsigned short transparent) + unsigned short transparent) #endif { /* SET TRANSPARENCY FLAG */ @@ -277,11 +277,13 @@ gfx_set_solid_pattern(unsigned long color) #if GFX_2DACCEL_DYNAMIC void gu2_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned char transparent) #else void gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned char transparent) #endif { /* CLEAR TRANSPARENCY FLAG */ @@ -315,13 +317,15 @@ gfx_set_mono_pattern(unsigned long bgcolor, unsigned long fgcolor, #if GFX_2DACCEL_DYNAMIC void gu2_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparent) #else void gfx_set_color_pattern(unsigned long bgcolor, unsigned long fgcolor, - unsigned long data0, unsigned long data1, unsigned long data2, - unsigned long data3, unsigned char transparent) + unsigned long data0, unsigned long data1, + unsigned long data2, unsigned long data3, + unsigned char transparent) #endif { /* REMOVE */ @@ -358,7 +362,7 @@ gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8) GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, - (gu2_rop32 & ~MGP_RM_PAT_FLAGS) | MGP_RM_PAT_COLOR); + (gu2_rop32 & ~MGP_RM_PAT_FLAGS) | MGP_RM_PAT_COLOR); /* LOAD THE PATTERN DATA */ /* This routine is designed to work in tandem with gfx_pattern_fill. */ @@ -384,7 +388,8 @@ gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8) WRITE_GP32(MGP_PAT_COLOR_2, temp2); WRITE_GP32(MGP_PAT_COLOR_5, temp1); WRITE_GP32(MGP_PAT_COLOR_4, temp2); - } else if (gu2_xshift == 1) { + } + else if (gu2_xshift == 1) { pattern_8x8 += (y & 7) << 2; temp1 = WORD_SWIZZLE(pattern_8x8[0]); temp2 = WORD_SWIZZLE(pattern_8x8[1]); @@ -401,7 +406,8 @@ gfx_load_color_pattern_line(short y, unsigned long *pattern_8x8) WRITE_GP32(MGP_PAT_COLOR_4, temp2); WRITE_GP32(MGP_PAT_COLOR_3, temp3); WRITE_GP32(MGP_PAT_COLOR_2, temp4); - } else { + } + else { pattern_8x8 += (y & 7) << 3; WRITE_GP32(MGP_PAT_COLOR_1, pattern_8x8[4]); @@ -441,7 +447,7 @@ gfx_set_raster_operation(unsigned char rop) /* GENERATE 32-BIT VERSION OF ROP WITH PATTERN FLAGS */ - gu2_rop32 = (unsigned long)rop | GFXpatternFlags | gu2_bpp; + gu2_rop32 = (unsigned long) rop | GFXpatternFlags | gu2_bpp; /* CHECK IF SOURCE FLAGS SHOULD BE MERGED */ @@ -457,7 +463,8 @@ gfx_set_raster_operation(unsigned char rop) if ((rop & 0x55) ^ ((rop >> 1) & 0x55)) { gu2_blt_mode |= MGP_BM_DST_REQ; gu2_vector_mode = MGP_VM_DST_REQ; - } else { + } + else { gu2_vector_mode = 0; } } @@ -480,28 +487,28 @@ gfx_set_raster_operation(unsigned char rop) #if GFX_2DACCEL_DYNAMIC void gu2_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #else void gfx_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #endif { unsigned long offset = 0, size; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE STARTING OFFSET */ - offset = (unsigned long)y *gu2_pitch + (((unsigned long)x) << gu2_xshift); + offset = (unsigned long) y *gu2_pitch + (((unsigned long) x) << gu2_xshift); /* CHECK IF PATTERN ORIGINS NEED TO BE SET */ if (GFXpatternFlags) { /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - offset |= ((unsigned long)(x & 7)) << 26; - offset |= ((unsigned long)(y & 7)) << 29; + offset |= ((unsigned long) (x & 7)) << 26; + offset |= ((unsigned long) (y & 7)) << 29; } /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */ @@ -534,22 +541,24 @@ gfx_pattern_fill(unsigned short x, unsigned short y, #if GFX_2DACCEL_DYNAMIC void gu2_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern) + unsigned short width, unsigned short height, + unsigned long *pattern) #else void gfx_color_pattern_fill(unsigned short x, unsigned short y, - unsigned short width, unsigned short height, unsigned long *pattern) + unsigned short width, unsigned short height, + unsigned long *pattern) #endif { /* CALL GFX2 ROUTINE TO AVOID DUPLICATION OF CODE */ - unsigned long offset = (unsigned long)y * gu2_pitch + - (((unsigned long)x) << gu2_xshift); + unsigned long offset = (unsigned long) y * gu2_pitch + + (((unsigned long) x) << gu2_xshift); unsigned long origin = gu2_pattern_origin; unsigned long pitch = gu2_dst_pitch; gfx2_set_pattern_origin(x, y); - gfx2_set_destination_stride((unsigned short)gu2_pitch); + gfx2_set_destination_stride((unsigned short) gu2_pitch); gfx2_color_pattern_fill(offset, width, height, pattern); /* RESTORE GFX2 VALUES */ @@ -576,19 +585,19 @@ gfx_color_pattern_fill(unsigned short x, unsigned short y, #if GFX_2DACCEL_DYNAMIC void gu2_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height) #else void gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height) #endif { unsigned long srcoffset, dstoffset, size; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE THE DIRECTION OF THE BLT */ @@ -606,10 +615,10 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, /* CALCULATE STARTING OFFSETS */ - srcoffset = (unsigned long)srcy *gu2_pitch + - (((unsigned long)srcx) << gu2_xshift); - dstoffset = ((unsigned long)dsty * gu2_pitch + - (((unsigned long)dstx) << gu2_xshift)) & 0xFFFFFF; + srcoffset = (unsigned long) srcy *gu2_pitch + + (((unsigned long) srcx) << gu2_xshift); + dstoffset = ((unsigned long) dsty * gu2_pitch + + (((unsigned long) dstx) << gu2_xshift)) & 0xFFFFFF; /* MERGE PATTERN INFORMATION */ /* This must be done after the x and y coordinates have been updated, */ @@ -618,8 +627,8 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, if (GFXpatternFlags) { /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - dstoffset |= ((unsigned long)(dstx & 7)) << 26; - dstoffset |= ((unsigned long)(dsty & 7)) << 29; + dstoffset |= ((unsigned long) (dstx & 7)) << 26; + dstoffset |= ((unsigned long) (dsty & 7)) << 29; } /* TURN INTO BYTE ADDRESS IF NEGATIVE X DIRECTION */ @@ -661,13 +670,15 @@ gfx_screen_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu2_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color) #else void gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned long color) #endif { unsigned long rop32; @@ -720,13 +731,15 @@ gfx_screen_to_screen_xblt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch) #else void gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch) #endif { unsigned long dstoffset, srcoffset, size, bytes; @@ -735,22 +748,22 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, unsigned short blt_mode; blt_mode = (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK) | MGP_BM_SRC_FB; - size = (((unsigned long)width) << 16) | 1; + size = (((unsigned long) width) << 16) | 1; /* CALCULATE STARTING OFFSETS */ - offset = (unsigned long)srcy *pitch + ((unsigned long)srcx << gu2_xshift); + offset = (unsigned long) srcy *pitch + ((unsigned long) srcx << gu2_xshift); - dstoffset = (unsigned long)dsty *gu2_pitch + - (((unsigned long)dstx) << gu2_xshift); + dstoffset = (unsigned long) dsty *gu2_pitch + + (((unsigned long) dstx) << gu2_xshift); /* CHECK IF PATTERN ORIGINS NEED TO BE SET */ if (GFXpatternFlags) { /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - dstoffset |= ((unsigned long)(dstx & 7)) << 26; - dstoffset |= ((unsigned long)(dsty & 7)) << 29; + dstoffset |= ((unsigned long) (dstx & 7)) << 26; + dstoffset |= ((unsigned long) (dsty & 7)) << 29; } bytes = width << gu2_xshift; @@ -786,13 +799,12 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, dstoffset += gu2_pitch; dstoffset += 0x20000000; - WRITE_FRAME_BUFFER_STRING32(srcoffset, dword_bytes, data, - temp_offset); + WRITE_FRAME_BUFFER_STRING32(srcoffset, dword_bytes, data, temp_offset); if (bytes_extra) { temp_offset += dword_bytes; srcoffset += dword_bytes; WRITE_FRAME_BUFFER_STRING8(srcoffset, bytes_extra, data, - temp_offset); + temp_offset); } WRITE_GP16(MGP_BLT_MODE, blt_mode); offset += pitch; @@ -823,15 +835,17 @@ gfx_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu2_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch, + unsigned long color) #else void gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, long pitch, - unsigned long color) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, long pitch, + unsigned long color) #endif { unsigned long rop32; @@ -856,7 +870,7 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, /* CALL NORMAL COLOR BITMAP TO SCREEN BLT ROUTINE */ gfx_color_bitmap_to_screen_blt(srcx, srcy, dstx, dsty, width, height, - data, pitch); + data, pitch); /* RESTORE RASTER SETTINGS */ @@ -882,13 +896,15 @@ gfx_color_bitmap_to_screen_xblt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) #else void gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) #endif { unsigned long dstoffset, size, bytes; @@ -896,22 +912,22 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, unsigned long i, j = 0, fifo_lines, dwords_extra, bytes_extra; unsigned long shift = 0; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE STARTING OFFSETS */ - offset = (unsigned long)srcy *pitch + ((unsigned long)srcx >> 3); + offset = (unsigned long) srcy *pitch + ((unsigned long) srcx >> 3); - dstoffset = (unsigned long)dsty *gu2_pitch + - (((unsigned long)dstx) << gu2_xshift); + dstoffset = (unsigned long) dsty *gu2_pitch + + (((unsigned long) dstx) << gu2_xshift); /* CHECK IF PATTERN ORIGINS NEED TO BE SET */ if (GFXpatternFlags) { /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - dstoffset |= ((unsigned long)(dstx & 7)) << 26; - dstoffset |= ((unsigned long)(dsty & 7)) << 29; + dstoffset |= ((unsigned long) (dstx & 7)) << 26; + dstoffset |= ((unsigned long) (dsty & 7)) << 29; } bytes = ((srcx & 7) + width + 7) >> 3; @@ -927,13 +943,13 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); - WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long)srcx & 7) << 26); + WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long) srcx & 7) << 26); WRITE_GP32(MGP_DST_OFFSET, dstoffset); WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_pitch); WRITE_GP16(MGP_BLT_MODE, - (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK) | MGP_BM_SRC_HOST | - MGP_BM_SRC_MONO); + (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK) | MGP_BM_SRC_HOST | + MGP_BM_SRC_MONO); /* WAIT FOR BLT TO BE LATCHED */ @@ -949,7 +965,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, for (i = 0; i < fifo_lines; i++) { GU2_WAIT_HALF_EMPTY; WRITE_GPREG_STRING32(MGP_HST_SOURCE, 8, j, data, temp_offset, - temp1); + temp1); temp_offset += 32; } @@ -958,7 +974,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, GU2_WAIT_HALF_EMPTY; if (dwords_extra) { WRITE_GPREG_STRING32(MGP_HST_SOURCE, dwords_extra, i, data, - temp_offset, temp1); + temp_offset, temp1); temp_offset += (dwords_extra << 2); } @@ -967,7 +983,7 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, shift = 0; if (bytes_extra) WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, - temp_offset, temp1, temp2); + temp_offset, temp1, temp2); offset += pitch; } @@ -983,11 +999,11 @@ gfx_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu2_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #else void gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #endif { unsigned long size, bytes; @@ -995,18 +1011,18 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, unsigned long i, j = 0, fifo_lines, dwords_extra, bytes_extra; unsigned long shift; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; - dstoffset = (unsigned long)dsty *gu2_pitch + - (((unsigned long)dstx) << gu2_xshift); + dstoffset = (unsigned long) dsty *gu2_pitch + + (((unsigned long) dstx) << gu2_xshift); /* CHECK IF PATTERN ORIGINS NEED TO BE SET */ if (GFXpatternFlags) { /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - dstoffset |= ((unsigned long)(dstx & 7)) << 26; - dstoffset |= ((unsigned long)(dsty & 7)) << 29; + dstoffset |= ((unsigned long) (dstx & 7)) << 26; + dstoffset |= ((unsigned long) (dsty & 7)) << 29; } /* CALCULATE STARTING OFFSETS */ @@ -1025,8 +1041,8 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_pitch); WRITE_GP16(MGP_BLT_MODE, - (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK) | MGP_BM_SRC_HOST | - MGP_BM_SRC_BP_MONO); + (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK) | MGP_BM_SRC_HOST | + MGP_BM_SRC_BP_MONO); /* WAIT FOR BLT TO BE LATCHED */ @@ -1046,13 +1062,13 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, GU2_WAIT_HALF_EMPTY; if (dwords_extra) { WRITE_GPREG_STRING32(MGP_HST_SOURCE, dwords_extra, i, data, - temp_offset, temp1); + temp_offset, temp1); temp_offset += (dwords_extra << 2); } if (bytes_extra) { shift = 0; WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, - temp_offset, temp1, temp2); + temp_offset, temp1, temp2); } } } @@ -1079,23 +1095,25 @@ gfx_text_blt(unsigned short dstx, unsigned short dsty, unsigned short width, #if GFX_2DACCEL_DYNAMIC void gu2_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #else void gfx_bresenham_line(unsigned short x, unsigned short y, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #endif { unsigned long offset; - unsigned long data1 = (((unsigned long)axialerr) << 16) | diagerr; - unsigned long data2 = (((unsigned long)length) << 16) | initerr; + unsigned long data1 = (((unsigned long) axialerr) << 16) | diagerr; + unsigned long data2 = (((unsigned long) length) << 16) | initerr; unsigned short vector_mode = gu2_vector_mode | flags; /* CALCULATE STARTING OFFSET */ - offset = (unsigned long)y *gu2_pitch + (((unsigned long)x) << gu2_xshift); + offset = (unsigned long) y *gu2_pitch + (((unsigned long) x) << gu2_xshift); /* CHECK NULL LENGTH */ @@ -1129,7 +1147,7 @@ void gfx_wait_until_idle(void) #endif { - while (READ_GP32(MGP_BLT_STATUS) & MGP_BS_BLT_BUSY) ; + while (READ_GP32(MGP_BLT_STATUS) & MGP_BS_BLT_BUSY); } /*--------------------------------------------------------------------------- @@ -1177,7 +1195,7 @@ gfx2_set_source_stride(unsigned short stride) { /* SAVE STRIDE TO BE USED LATER */ - gu2_src_pitch = (unsigned long)stride; + gu2_src_pitch = (unsigned long) stride; } /*--------------------------------------------------------------------------- @@ -1196,7 +1214,7 @@ gfx2_set_destination_stride(unsigned short stride) { /* SAVE STRIDE TO BE USED LATER */ - gu2_dst_pitch = (unsigned long)stride; + gu2_dst_pitch = (unsigned long) stride; } /*--------------------------------------------------------------------------- @@ -1216,8 +1234,8 @@ gfx2_set_pattern_origin(int x, int y) { /* STORE IN FORMAT THAT CAN BE COMBINED WITH THE DESTINATION OFFSET */ - gu2_pattern_origin = (((unsigned long)(x & 7)) << 26) | - (((unsigned long)(y & 7)) << 29); + gu2_pattern_origin = (((unsigned long) (x & 7)) << 26) | + (((unsigned long) (y & 7)) << 29); } /*--------------------------------------------------------------------------- @@ -1285,7 +1303,7 @@ gfx2_set_alpha_value(unsigned char value) { /* SAVE ALPHA VALUE TO BE USED LATER */ - gu2_alpha_value = (unsigned long)value; + gu2_alpha_value = (unsigned long) value; /* SET GLOBAL FLAG */ /* gfx2_* routines will use this flag to program alpha values */ @@ -1372,16 +1390,16 @@ gfx2_set_alpha_value(unsigned char value) #if GFX_2DACCEL_DYNAMIC void gu22_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height) + unsigned short height) #else void gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height) + unsigned short height) #endif { unsigned long size; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */ /* Put off poll for as long as possible (do most calculations first). */ @@ -1408,11 +1426,11 @@ gfx2_pattern_fill(unsigned long dstoffset, unsigned short width, #if GFX_2DACCEL_DYNAMIC void gu22_color_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned long *pattern) + unsigned short height, unsigned long *pattern) #else void gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned long *pattern) + unsigned short height, unsigned long *pattern) #endif { int pass; @@ -1427,7 +1445,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, - (gu2_rop32 & ~MGP_RM_PAT_FLAGS) | MGP_RM_PAT_COLOR); + (gu2_rop32 & ~MGP_RM_PAT_FLAGS) | MGP_RM_PAT_COLOR); /* ATTEMPT TO OPTIMIZE */ /* If possible, we can perform the pattern fill in only a few passes */ @@ -1439,7 +1457,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, /* HANDLE VARIOUS COLOR DEPTHS DIFFERENTLY */ switch (gu2_xshift) { - case 0: /* 8 BPP */ + case 0: /* 8 BPP */ /* TWO PASSES FOR 8 BPP */ /* Render every other line per pass by doubling the pitch. */ @@ -1453,16 +1471,16 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, lines = (height + 1 - pass) >> 1; if (!lines) break; - size = (((unsigned long)width) << 16) | lines; + size = (((unsigned long) width) << 16) | lines; WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_dst_pitch << 1); WRITE_GP32(MGP_PAT_DATA_1, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_DATA_0, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 4) & 0x0E; WRITE_GP32(MGP_PAT_COLOR_1, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_0, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 4) & 0x0E; /* NEED TO WAIT UNTIL IDLE FOR COLORS 2 THROUGH 5 */ @@ -1471,11 +1489,11 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, GU2_WAIT_BUSY; WRITE_GP32(MGP_PAT_COLOR_3, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_2, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 4) & 0x0E; WRITE_GP32(MGP_PAT_COLOR_5, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_4, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); WRITE_GP16(MGP_BLT_MODE, gu2_blt_mode | gu2_bm_throttle); gu2_bm_throttle = 0; gu2_vm_throttle = 0; @@ -1487,7 +1505,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, } break; - case 1: /* 12, 15, OR 16 BPP */ + case 1: /* 12, 15, OR 16 BPP */ /* FOUR PASSES FOR 16 BPP */ /* Render every 4th line per pass by quadrupling the pitch. */ @@ -1501,16 +1519,16 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, lines = (height + 3 - pass) >> 2; if (!lines) break; - size = (((unsigned long)width) << 16) | lines; + size = (((unsigned long) width) << 16) | lines; WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_dst_pitch << 2); WRITE_GP32(MGP_PAT_COLOR_1, WORD_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_0, - WORD_SWIZZLE(pattern[patoffset + 1])); + WORD_SWIZZLE(pattern[patoffset + 1])); WRITE_GP32(MGP_PAT_DATA_1, - WORD_SWIZZLE(pattern[patoffset + 2])); + WORD_SWIZZLE(pattern[patoffset + 2])); WRITE_GP32(MGP_PAT_DATA_0, - WORD_SWIZZLE(pattern[patoffset + 3])); + WORD_SWIZZLE(pattern[patoffset + 3])); patoffset = (patoffset + 16) & 0x1C; /* NEED TO WAIT UNTIL IDLE FOR COLORS 2 THROUGH 5 */ @@ -1519,11 +1537,11 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, GU2_WAIT_BUSY; WRITE_GP32(MGP_PAT_COLOR_5, WORD_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_4, - WORD_SWIZZLE(pattern[patoffset + 1])); + WORD_SWIZZLE(pattern[patoffset + 1])); WRITE_GP32(MGP_PAT_COLOR_3, - WORD_SWIZZLE(pattern[patoffset + 2])); + WORD_SWIZZLE(pattern[patoffset + 2])); WRITE_GP32(MGP_PAT_COLOR_2, - WORD_SWIZZLE(pattern[patoffset + 3])); + WORD_SWIZZLE(pattern[patoffset + 3])); WRITE_GP16(MGP_BLT_MODE, gu2_blt_mode | gu2_bm_throttle); gu2_bm_throttle = 0; gu2_vm_throttle = 0; @@ -1535,7 +1553,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, } break; - case 2: /* 32 BPP */ + case 2: /* 32 BPP */ /* EIGHT PASSES FOR 32 BPP */ /* Render every 8th line per pass by setting pitch * 8. */ @@ -1549,7 +1567,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, lines = (height + 7 - pass) >> 3; if (!lines) break; - size = (((unsigned long)width) << 16) | lines; + size = (((unsigned long) width) << 16) | lines; WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_dst_pitch << 3); WRITE_GP32(MGP_PAT_COLOR_1, pattern[patoffset + 4]); @@ -1582,7 +1600,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, WRITE_GP32(MGP_STRIDE, gu2_dst_pitch); switch (gu2_xshift) { - case 0: /* 8 BPP - 4 LINES PER PASS */ + case 0: /* 8 BPP - 4 LINES PER PASS */ patoffset = (gu2_pattern_origin >> 28) & 0x0E; while (height) { @@ -1592,14 +1610,14 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, WRITE_GP32(MGP_DST_OFFSET, dstoffset | patxorigin); WRITE_GP32(MGP_WID_HEIGHT, - (((unsigned long)width) << 16) | lines); + (((unsigned long) width) << 16) | lines); WRITE_GP32(MGP_PAT_DATA_1, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_DATA_0, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 2) & 0x0E; WRITE_GP32(MGP_PAT_COLOR_1, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_0, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 2) & 0x0E; /* NEED TO WAIT UNTIL IDLE FOR COLORS 2 THROUGH 5 */ @@ -1608,22 +1626,22 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, GU2_WAIT_BUSY; WRITE_GP32(MGP_PAT_COLOR_3, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_2, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 2) & 0x0E; WRITE_GP32(MGP_PAT_COLOR_5, BYTE_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_4, - BYTE_SWIZZLE(pattern[patoffset + 1])); + BYTE_SWIZZLE(pattern[patoffset + 1])); patoffset = (patoffset + 2) & 0x0E; WRITE_GP16(MGP_BLT_MODE, gu2_blt_mode | gu2_bm_throttle); /* ADJUST FOR NEXT PASS */ dstoffset += gu2_dst_pitch << 2; - height -= (unsigned short)lines; + height -= (unsigned short) lines; } break; - case 1: /* 12, 15 AND 16 BPP - 2 LINES PER PASS */ + case 1: /* 12, 15 AND 16 BPP - 2 LINES PER PASS */ patoffset = (gu2_pattern_origin >> 27) & 0x1C; while (height) { @@ -1633,14 +1651,14 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, WRITE_GP32(MGP_DST_OFFSET, dstoffset | patxorigin); WRITE_GP32(MGP_WID_HEIGHT, - (((unsigned long)width) << 16) | lines); + (((unsigned long) width) << 16) | lines); WRITE_GP32(MGP_PAT_COLOR_1, WORD_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_0, - WORD_SWIZZLE(pattern[patoffset + 1])); + WORD_SWIZZLE(pattern[patoffset + 1])); WRITE_GP32(MGP_PAT_DATA_1, - WORD_SWIZZLE(pattern[patoffset + 2])); + WORD_SWIZZLE(pattern[patoffset + 2])); WRITE_GP32(MGP_PAT_DATA_0, - WORD_SWIZZLE(pattern[patoffset + 3])); + WORD_SWIZZLE(pattern[patoffset + 3])); patoffset = (patoffset + 4) & 0x1C; /* NEED TO WAIT UNTIL IDLE FOR COLORS 2 THROUGH 5 */ @@ -1649,22 +1667,22 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, GU2_WAIT_BUSY; WRITE_GP32(MGP_PAT_COLOR_5, WORD_SWIZZLE(pattern[patoffset])); WRITE_GP32(MGP_PAT_COLOR_4, - WORD_SWIZZLE(pattern[patoffset + 1])); + WORD_SWIZZLE(pattern[patoffset + 1])); WRITE_GP32(MGP_PAT_COLOR_3, - WORD_SWIZZLE(pattern[patoffset + 2])); + WORD_SWIZZLE(pattern[patoffset + 2])); WRITE_GP32(MGP_PAT_COLOR_2, - WORD_SWIZZLE(pattern[patoffset + 3])); + WORD_SWIZZLE(pattern[patoffset + 3])); patoffset = (patoffset + 4) & 0x1C; WRITE_GP16(MGP_BLT_MODE, gu2_blt_mode | gu2_bm_throttle); /* ADJUST FOR NEXT PASS */ dstoffset += gu2_dst_pitch << 1; - height -= (unsigned short)lines; + height -= (unsigned short) lines; } break; - case 2: /* 32 BPP - 1 LINE PER PASS */ + case 2: /* 32 BPP - 1 LINE PER PASS */ patoffset = (gu2_pattern_origin >> 26) & 0x38; while (height) { @@ -1672,7 +1690,7 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, WRITE_GP32(MGP_DST_OFFSET, dstoffset | patxorigin); WRITE_GP32(MGP_WID_HEIGHT, - (((unsigned long)width) << 16) | 1l); + (((unsigned long) width) << 16) | 1l); WRITE_GP32(MGP_PAT_COLOR_1, pattern[patoffset + 4]); WRITE_GP32(MGP_PAT_COLOR_0, pattern[patoffset + 5]); WRITE_GP32(MGP_PAT_DATA_1, pattern[patoffset + 6]); @@ -1712,17 +1730,19 @@ gfx2_color_pattern_fill(unsigned long dstoffset, unsigned short width, #if GFX_2DACCEL_DYNAMIC void gu22_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, - unsigned short width, unsigned short height, int flags) + unsigned short width, unsigned short height, + int flags) #else void gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, - unsigned short width, unsigned short height, int flags) + unsigned short width, unsigned short height, + int flags) #endif { unsigned long size, xbytes; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* USE ALPHA SETTINGS, IF REQUESTED */ @@ -1762,7 +1782,8 @@ gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, if (gu2_alpha_active) { WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else { + } + else { WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); } @@ -1787,26 +1808,28 @@ gfx2_screen_to_screen_blt(unsigned long srcoffset, unsigned long dstoffset, #if GFX_2DACCEL_DYNAMIC void gu22_mono_expand_blt(unsigned long srcbase, unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, int byte_packed) + unsigned short srcy, unsigned long dstoffset, + unsigned short width, unsigned short height, + int byte_packed) #else void gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, - unsigned short srcy, unsigned long dstoffset, unsigned short width, - unsigned short height, int byte_packed) + unsigned short srcy, unsigned long dstoffset, + unsigned short width, unsigned short height, + int byte_packed) #endif { unsigned long size, srcoffset; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE SOURCE OFFSET */ - srcoffset = srcbase + (unsigned long)srcy *gu2_src_pitch; + srcoffset = srcbase + (unsigned long) srcy *gu2_src_pitch; srcoffset += srcx >> 3; - srcoffset |= ((unsigned long)srcx & 7) << 26; + srcoffset |= ((unsigned long) srcx & 7) << 26; /* POLL UNTIL ABLE TO WRITE TO THE REGISTERS */ /* Put off poll for as long as possible (do most calculations first). */ @@ -1817,7 +1840,8 @@ gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, blt_mode = gu2_alpha_blt_mode; WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else { + } + else { blt_mode = (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK); WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); @@ -1848,13 +1872,15 @@ gfx2_mono_expand_blt(unsigned long srcbase, unsigned short srcx, #if GFX_2DACCEL_DYNAMIC void gu22_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) #else void gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) #endif { unsigned long size, bytes; @@ -1862,11 +1888,11 @@ gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, unsigned long srcoffset, dword_bytes, bytes_extra; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | 1; + size = (((unsigned long) width) << 16) | 1; /* CALCULATE STARTING OFFSETS */ - offset = (unsigned long)srcy *pitch + ((unsigned long)srcx << gu2_xshift); + offset = (unsigned long) srcy *pitch + ((unsigned long) srcx << gu2_xshift); dstoffset |= gu2_pattern_origin; @@ -1886,7 +1912,8 @@ gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, blt_mode = gu2_alpha_blt_mode; WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else { + } + else { blt_mode = (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK); WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); @@ -1916,13 +1943,12 @@ gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, dstoffset += gu2_dst_pitch; dstoffset += 0x20000000; - WRITE_FRAME_BUFFER_STRING32(srcoffset, dword_bytes, data, - temp_offset); + WRITE_FRAME_BUFFER_STRING32(srcoffset, dword_bytes, data, temp_offset); if (bytes_extra) { temp_offset += dword_bytes; srcoffset += dword_bytes; WRITE_FRAME_BUFFER_STRING8(srcoffset, bytes_extra, data, - temp_offset); + temp_offset); } WRITE_GP16(MGP_BLT_MODE, blt_mode); offset += pitch; @@ -1940,11 +1966,11 @@ gfx2_color_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu22_text_blt(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #else void gfx2_text_blt(unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data) + unsigned short height, unsigned char *data) #endif { unsigned long size, bytes; @@ -1953,7 +1979,7 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, unsigned long shift; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE STARTING OFFSETS */ @@ -1970,7 +1996,8 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, blt_mode = gu2_alpha_blt_mode; WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else { + } + else { blt_mode = (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK); WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); @@ -1981,7 +2008,7 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_dst_pitch); WRITE_GP16(MGP_BLT_MODE, blt_mode | MGP_BM_SRC_HOST | - MGP_BM_SRC_BP_MONO | gu2_bm_throttle); + MGP_BM_SRC_BP_MONO | gu2_bm_throttle); gu2_bm_throttle = 0; gu2_vm_throttle = 0; @@ -2003,13 +2030,13 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, GU2_WAIT_HALF_EMPTY; if (dwords_extra) { WRITE_GPREG_STRING32(MGP_HST_SOURCE, dwords_extra, i, data, - temp_offset, temp1); + temp_offset, temp1); temp_offset += (dwords_extra << 2); } if (bytes_extra) { shift = 0; WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, - temp_offset, temp1, temp2); + temp_offset, temp1, temp2); } } } @@ -2024,13 +2051,15 @@ gfx2_text_blt(unsigned long dstoffset, unsigned short width, #if GFX_2DACCEL_DYNAMIC void gu22_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) #else void gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, - unsigned long dstoffset, unsigned short width, - unsigned short height, unsigned char *data, short pitch) + unsigned long dstoffset, unsigned short width, + unsigned short height, unsigned char *data, + short pitch) #endif { unsigned long size, bytes; @@ -2039,11 +2068,11 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, unsigned long shift = 0; unsigned short blt_mode; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE STARTING OFFSETS */ - offset = (unsigned long)srcy *pitch + ((unsigned long)srcx >> 3); + offset = (unsigned long) srcy *pitch + ((unsigned long) srcx >> 3); bytes = ((srcx & 7) + width + 7) >> 3; fifo_lines = bytes >> 5; @@ -2058,18 +2087,19 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, blt_mode = gu2_alpha_blt_mode; WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else { + } + else { blt_mode = (gu2_blt_mode & ~MGP_BM_SRC_TYPE_MASK); WRITE_GP32(MGP_RASTER_MODE, gu2_rop32 | GFXsourceFlags); } - WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long)srcx & 7) << 26); + WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long) srcx & 7) << 26); WRITE_GP32(MGP_DST_OFFSET, dstoffset | gu2_pattern_origin); WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_dst_pitch); WRITE_GP16(MGP_BLT_MODE, blt_mode | MGP_BM_SRC_HOST | - MGP_BM_SRC_MONO | gu2_bm_throttle); + MGP_BM_SRC_MONO | gu2_bm_throttle); gu2_bm_throttle = 0; gu2_vm_throttle = 0; @@ -2087,7 +2117,7 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, for (i = 0; i < fifo_lines; i++) { GU2_WAIT_HALF_EMPTY; WRITE_GPREG_STRING32(MGP_HST_SOURCE, 8, j, data, temp_offset, - temp1); + temp1); temp_offset += 32; } @@ -2096,7 +2126,7 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, GU2_WAIT_HALF_EMPTY; if (dwords_extra) WRITE_GPREG_STRING32(MGP_HST_SOURCE, dwords_extra, i, data, - temp_offset, temp1); + temp_offset, temp1); temp_offset += (dwords_extra << 2); /* WRITE REMAINING BYTES */ @@ -2104,7 +2134,7 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, shift = 0; if (bytes_extra) WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, - temp_offset, temp1, temp2); + temp_offset, temp1, temp2); offset += pitch; } @@ -2120,18 +2150,20 @@ gfx2_mono_bitmap_to_screen_blt(unsigned short srcx, unsigned short srcy, #if GFX_2DACCEL_DYNAMIC void gu22_bresenham_line(unsigned long dstoffset, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #else void gfx2_bresenham_line(unsigned long dstoffset, - unsigned short length, unsigned short initerr, - unsigned short axialerr, unsigned short diagerr, unsigned short flags) + unsigned short length, unsigned short initerr, + unsigned short axialerr, unsigned short diagerr, + unsigned short flags) #endif { unsigned long vector_mode = gu2_vector_mode | flags; - unsigned long data1 = (((unsigned long)axialerr) << 16) | diagerr; - unsigned long data2 = (((unsigned long)length) << 16) | initerr; + unsigned long data1 = (((unsigned long) axialerr) << 16) | diagerr; + unsigned long data2 = (((unsigned long) length) << 16) | initerr; /* CHECK NULL LENGTH */ @@ -2147,7 +2179,8 @@ gfx2_bresenham_line(unsigned long dstoffset, vector_mode = gu2_alpha_vec_mode | flags; WRITE_GP32(MGP_RASTER_MODE, gu2_alpha32); - } else + } + else WRITE_GP32(MGP_RASTER_MODE, gu2_rop32); WRITE_GP32(MGP_DST_OFFSET, dstoffset | gu2_pattern_origin); diff --git a/driver/xf86-video-geode/src/gfx/saa7114.c b/driver/xf86-video-geode/src/gfx/saa7114.c index df516bcaf..6e9ab8d91 100644 --- a/driver/xf86-video-geode/src/gfx/saa7114.c +++ b/driver/xf86-video-geode/src/gfx/saa7114.c @@ -31,8 +31,7 @@ /* TABLE OF DEFAULT VALUES */ /*---------------------------*/ -typedef struct tagGFX_SAA7114_INIT -{ +typedef struct tagGFX_SAA7114_INIT { unsigned char index; unsigned char value; } GFX_SAA7114_INIT; @@ -97,8 +96,7 @@ GFX_SAA7114_INIT gfx_saa7114_init_values[] = { int optimize_for_aliasing = 0; -typedef struct tagGFX_SAA7114_FIR_PREFILTER -{ +typedef struct tagGFX_SAA7114_FIR_PREFILTER { unsigned char prescaler; unsigned char acl_low; unsigned char prefilter_low; @@ -255,7 +253,7 @@ gfx_set_decoder_defaults(void) for (i = 0; i < GFX_NUM_SAA7114_INIT_VALUES; i++) { saa7114_write_reg(gfx_saa7114_init_values[i].index, - gfx_saa7114_init_values[i].value); + gfx_saa7114_init_values[i].value); } gfx_decoder_software_reset(); @@ -312,7 +310,7 @@ int gfx_set_decoder_contrast(unsigned char contrast) #endif { - saa7114_write_reg(SAA7114_CONTRAST, (unsigned char)(contrast >> 1)); + saa7114_write_reg(SAA7114_CONTRAST, (unsigned char) (contrast >> 1)); return (0); } @@ -330,7 +328,7 @@ int gfx_set_decoder_hue(char hue) #endif { - saa7114_write_reg(SAA7114_HUE, (unsigned char)hue); + saa7114_write_reg(SAA7114_HUE, (unsigned char) hue); return (0); } @@ -348,7 +346,7 @@ int gfx_set_decoder_saturation(unsigned char saturation) #endif { - saa7114_write_reg(SAA7114_SATURATION, (unsigned char)(saturation >> 1)); + saa7114_write_reg(SAA7114_SATURATION, (unsigned char) (saturation >> 1)); return (0); } @@ -368,10 +366,10 @@ gfx_set_decoder_input_offset(unsigned short x, unsigned short y) { /* SET THE INPUT WINDOW OFFSET */ - saa7114_write_reg(SAA7114_HORZ_OFFSET_LO, (unsigned char)(x & 0x00FF)); - saa7114_write_reg(SAA7114_HORZ_OFFSET_HI, (unsigned char)(x >> 8)); - saa7114_write_reg(SAA7114_VERT_OFFSET_LO, (unsigned char)(y & 0x00FF)); - saa7114_write_reg(SAA7114_VERT_OFFSET_HI, (unsigned char)(y >> 8)); + saa7114_write_reg(SAA7114_HORZ_OFFSET_LO, (unsigned char) (x & 0x00FF)); + saa7114_write_reg(SAA7114_HORZ_OFFSET_HI, (unsigned char) (x >> 8)); + saa7114_write_reg(SAA7114_VERT_OFFSET_LO, (unsigned char) (y & 0x00FF)); + saa7114_write_reg(SAA7114_VERT_OFFSET_HI, (unsigned char) (y >> 8)); gfx_decoder_software_reset(); return (0); @@ -397,11 +395,10 @@ gfx_set_decoder_input_size(unsigned short width, unsigned short height) /* SET THE INPUT WINDOW SIZE */ - saa7114_write_reg(SAA7114_HORZ_INPUT_LO, (unsigned char)(width & 0x00FF)); - saa7114_write_reg(SAA7114_HORZ_INPUT_HI, (unsigned char)(width >> 8)); - saa7114_write_reg(SAA7114_VERT_INPUT_LO, - (unsigned char)(height & 0x00FF)); - saa7114_write_reg(SAA7114_VERT_INPUT_HI, (unsigned char)(height >> 8)); + saa7114_write_reg(SAA7114_HORZ_INPUT_LO, (unsigned char) (width & 0x00FF)); + saa7114_write_reg(SAA7114_HORZ_INPUT_HI, (unsigned char) (width >> 8)); + saa7114_write_reg(SAA7114_VERT_INPUT_LO, (unsigned char) (height & 0x00FF)); + saa7114_write_reg(SAA7114_VERT_INPUT_HI, (unsigned char) (height >> 8)); gfx_decoder_software_reset(); return (0); @@ -431,12 +428,11 @@ gfx_set_decoder_output_size(unsigned short width, unsigned short height) /* SET THE OUTPUT WINDOW SIZE */ - saa7114_write_reg(SAA7114_HORZ_OUTPUT_LO, - (unsigned char)(width & 0x00FF)); - saa7114_write_reg(SAA7114_HORZ_OUTPUT_HI, (unsigned char)(width >> 8)); + saa7114_write_reg(SAA7114_HORZ_OUTPUT_LO, (unsigned char) (width & 0x00FF)); + saa7114_write_reg(SAA7114_HORZ_OUTPUT_HI, (unsigned char) (width >> 8)); saa7114_write_reg(SAA7114_VERT_OUTPUT_LO, - (unsigned char)(height & 0x00FF)); - saa7114_write_reg(SAA7114_VERT_OUTPUT_HI, (unsigned char)(height >> 8)); + (unsigned char) (height & 0x00FF)); + saa7114_write_reg(SAA7114_VERT_OUTPUT_HI, (unsigned char) (height >> 8)); gfx_decoder_software_reset(); return (0); @@ -451,11 +447,11 @@ gfx_set_decoder_output_size(unsigned short width, unsigned short height) #if GFX_DECODER_DYNAMIC int saa7114_set_decoder_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #else int gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #endif { unsigned char prescale = 0; @@ -465,7 +461,7 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, /* Downscale from 1 to 1/63 source size. */ if (dstw) - prescale = (unsigned char)(srcw / dstw); + prescale = (unsigned char) (srcw / dstw); if (!prescale) prescale = 1; if (prescale > 63) @@ -477,27 +473,32 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, if (prescale < 36) { if (optimize_for_aliasing) { saa7114_write_reg(SAA7114_HORZ_ACL, - gfx_saa7114_fir_values[prescale - 1].acl_low); + gfx_saa7114_fir_values[prescale - 1].acl_low); saa7114_write_reg(SAA7114_HORZ_FIR_PREFILTER, - gfx_saa7114_fir_values[prescale - 1].prefilter_low); - } else { + gfx_saa7114_fir_values[prescale - + 1].prefilter_low); + } + else { saa7114_write_reg(SAA7114_HORZ_ACL, - gfx_saa7114_fir_values[prescale - 1].acl_high); + gfx_saa7114_fir_values[prescale - 1].acl_high); saa7114_write_reg(SAA7114_HORZ_FIR_PREFILTER, - gfx_saa7114_fir_values[prescale - 1].prefilter_high); + gfx_saa7114_fir_values[prescale - + 1].prefilter_high); } - } else { + } + else { /* SAME SETTINGS FOR RATIO 1/35 DOWNTO 1/63 */ if (optimize_for_aliasing) { saa7114_write_reg(SAA7114_HORZ_ACL, - gfx_saa7114_fir_values[34].acl_low); + gfx_saa7114_fir_values[34].acl_low); saa7114_write_reg(SAA7114_HORZ_FIR_PREFILTER, - gfx_saa7114_fir_values[34].prefilter_low); - } else { + gfx_saa7114_fir_values[34].prefilter_low); + } + else { saa7114_write_reg(SAA7114_HORZ_ACL, - gfx_saa7114_fir_values[34].acl_high); + gfx_saa7114_fir_values[34].acl_high); saa7114_write_reg(SAA7114_HORZ_FIR_PREFILTER, - gfx_saa7114_fir_values[34].prefilter_high); + gfx_saa7114_fir_values[34].prefilter_high); } } @@ -508,13 +509,12 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, scale = ((1024 * srcw * 1000) / (dstw * prescale)) / 1000; if ((scale > 8191) || (scale < 300)) return (1); - saa7114_write_reg(SAA7114_HSCALE_LUMA_LO, - (unsigned char)(scale & 0x00FF)); - saa7114_write_reg(SAA7114_HSCALE_LUMA_HI, (unsigned char)(scale >> 8)); + saa7114_write_reg(SAA7114_HSCALE_LUMA_LO, (unsigned char) (scale & 0x00FF)); + saa7114_write_reg(SAA7114_HSCALE_LUMA_HI, (unsigned char) (scale >> 8)); scale >>= 1; saa7114_write_reg(SAA7114_HSCALE_CHROMA_LO, - (unsigned char)(scale & 0x00FF)); - saa7114_write_reg(SAA7114_HSCALE_CHROMA_HI, (unsigned char)(scale >> 8)); + (unsigned char) (scale & 0x00FF)); + saa7114_write_reg(SAA7114_HSCALE_CHROMA_HI, (unsigned char) (scale >> 8)); /* SET THE VERTICAL SCALING (INTERPOLATION MODE) */ @@ -526,13 +526,12 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, dsth = ((dsth + 1) >> 1) << 1; - scale = (int)((1024 * srch) / dsth); - saa7114_write_reg(SAA7114_VSCALE_LUMA_LO, - (unsigned char)(scale & 0x00FF)); - saa7114_write_reg(SAA7114_VSCALE_LUMA_HI, (unsigned char)(scale >> 8)); + scale = (int) ((1024 * srch) / dsth); + saa7114_write_reg(SAA7114_VSCALE_LUMA_LO, (unsigned char) (scale & 0x00FF)); + saa7114_write_reg(SAA7114_VSCALE_LUMA_HI, (unsigned char) (scale >> 8)); saa7114_write_reg(SAA7114_VSCALE_CHROMA_LO, - (unsigned char)(scale & 0x00FF)); - saa7114_write_reg(SAA7114_VSCALE_CHROMA_HI, (unsigned char)(scale >> 8)); + (unsigned char) (scale & 0x00FF)); + saa7114_write_reg(SAA7114_VSCALE_CHROMA_HI, (unsigned char) (scale >> 8)); if (dsth >= (srch >> 1)) { /* USE INTERPOLATION MODE FOR SCALE FACTOR ABOVE 0.5 */ @@ -545,22 +544,27 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, saa7114_write_reg(SAA7114_VSCALE_CHROMA_OFFS0, SAA7114_VSCALE_PHO); saa7114_write_reg(SAA7114_VSCALE_CHROMA_OFFS1, SAA7114_VSCALE_PHO); saa7114_write_reg(SAA7114_VSCALE_CHROMA_OFFS2, - (unsigned char)(SAA7114_VSCALE_PHO + scale / 64 - 16)); + (unsigned char) (SAA7114_VSCALE_PHO + scale / 64 - + 16)); saa7114_write_reg(SAA7114_VSCALE_CHROMA_OFFS3, - (unsigned char)(SAA7114_VSCALE_PHO + scale / 64 - 16)); + (unsigned char) (SAA7114_VSCALE_PHO + scale / 64 - + 16)); saa7114_write_reg(SAA7114_VSCALE_LUMINA_OFFS0, SAA7114_VSCALE_PHO); saa7114_write_reg(SAA7114_VSCALE_LUMINA_OFFS1, SAA7114_VSCALE_PHO); saa7114_write_reg(SAA7114_VSCALE_LUMINA_OFFS2, - (unsigned char)(SAA7114_VSCALE_PHO + scale / 64 - 16)); + (unsigned char) (SAA7114_VSCALE_PHO + scale / 64 - + 16)); saa7114_write_reg(SAA7114_VSCALE_LUMINA_OFFS3, - (unsigned char)(SAA7114_VSCALE_PHO + scale / 64 - 16)); + (unsigned char) (SAA7114_VSCALE_PHO + scale / 64 - + 16)); /* RESTORE CONTRAST AND SATURATION FOR INTERPOLATION MODE */ - saa7114_write_reg(SAA7114_FILTER_CONTRAST, (unsigned char)0x40); - saa7114_write_reg(SAA7114_FILTER_SATURATION, (unsigned char)0x40); - } else { + saa7114_write_reg(SAA7114_FILTER_CONTRAST, (unsigned char) 0x40); + saa7114_write_reg(SAA7114_FILTER_SATURATION, (unsigned char) 0x40); + } + else { /* USE ACCUMULATION MODE FOR DOWNSCALING BY MORE THAN 2x */ saa7114_write_reg(SAA7114_VSCALE_CONTROL, 0x01); @@ -580,8 +584,8 @@ gfx_set_decoder_scale(unsigned short srcw, unsigned short srch, if (srch) scale = (64 * dsth) / srch; - saa7114_write_reg(SAA7114_FILTER_CONTRAST, (unsigned char)scale); - saa7114_write_reg(SAA7114_FILTER_SATURATION, (unsigned char)scale); + saa7114_write_reg(SAA7114_FILTER_CONTRAST, (unsigned char) scale); + saa7114_write_reg(SAA7114_FILTER_SATURATION, (unsigned char) scale); } gfx_decoder_software_reset(); @@ -610,20 +614,20 @@ gfx_set_decoder_vbi_format(int start, int end, int format) switch (format) { case VBI_FORMAT_VIDEO: data = 0xFF; - break; /* Active video */ + break; /* Active video */ case VBI_FORMAT_RAW: data = 0x77; - break; /* Raw VBI data */ + break; /* Raw VBI data */ case VBI_FORMAT_CC: data = 0x55; - break; /* US CC */ + break; /* US CC */ case VBI_FORMAT_NABTS: data = 0xCC; - break; /* US NABTS */ + break; /* US NABTS */ default: return GFX_STATUS_BAD_PARAMETER; } - saa7114_write_reg((unsigned char)(0x3F + i), data); + saa7114_write_reg((unsigned char) (0x3F + i), data); } return GFX_STATUS_OK; } @@ -701,7 +705,7 @@ gfx_set_decoder_luminance_filter(unsigned char lufi) saa7114_read_reg(SAA7114_LUMINANCE_CONTROL, &data); saa7114_write_reg(SAA7114_LUMINANCE_CONTROL, - (unsigned char)((data & ~0x0F) | (lufi & 0x0F))); + (unsigned char) ((data & ~0x0F) | (lufi & 0x0F))); return (0); } @@ -769,7 +773,7 @@ gfx_get_decoder_hue(void) unsigned char hue = 0; saa7114_read_reg(SAA7114_HUE, &hue); - return ((char)hue); + return ((char) hue); } /*---------------------------------------------------------------------------- @@ -811,13 +815,13 @@ gfx_get_decoder_input_offset(void) unsigned char data; saa7114_read_reg(SAA7114_HORZ_OFFSET_LO, &data); - value = (unsigned long)data; + value = (unsigned long) data; saa7114_read_reg(SAA7114_HORZ_OFFSET_HI, &data); - value |= ((unsigned long)data) << 8; + value |= ((unsigned long) data) << 8; saa7114_read_reg(SAA7114_VERT_OFFSET_LO, &data); - value |= ((unsigned long)data) << 16; + value |= ((unsigned long) data) << 16; saa7114_read_reg(SAA7114_VERT_OFFSET_HI, &data); - value |= ((unsigned long)data) << 24; + value |= ((unsigned long) data) << 24; return (value); } @@ -839,13 +843,13 @@ gfx_get_decoder_input_size(void) unsigned char data; saa7114_read_reg(SAA7114_HORZ_INPUT_LO, &data); - value = (unsigned long)data; + value = (unsigned long) data; saa7114_read_reg(SAA7114_HORZ_INPUT_HI, &data); - value |= ((unsigned long)data) << 8; + value |= ((unsigned long) data) << 8; saa7114_read_reg(SAA7114_VERT_INPUT_LO, &data); - value |= ((unsigned long)data) << 17; + value |= ((unsigned long) data) << 17; saa7114_read_reg(SAA7114_VERT_INPUT_HI, &data); - value |= ((unsigned long)data) << 25; + value |= ((unsigned long) data) << 25; return (value); } @@ -867,13 +871,13 @@ gfx_get_decoder_output_size(void) unsigned char data; saa7114_read_reg(SAA7114_HORZ_OUTPUT_LO, &data); - value = (unsigned long)data; + value = (unsigned long) data; saa7114_read_reg(SAA7114_HORZ_OUTPUT_HI, &data); - value |= ((unsigned long)data) << 8; + value |= ((unsigned long) data) << 8; saa7114_read_reg(SAA7114_VERT_OUTPUT_LO, &data); - value |= ((unsigned long)data) << 17; + value |= ((unsigned long) data) << 17; saa7114_read_reg(SAA7114_VERT_OUTPUT_HI, &data); - value |= ((unsigned long)data) << 25; + value |= ((unsigned long) data) << 25; return (value); } @@ -893,24 +897,24 @@ gfx_get_decoder_vbi_format(int line) { unsigned char format = 0, data; - saa7114_read_reg((unsigned char)(0x3F + line), &data); + saa7114_read_reg((unsigned char) (0x3F + line), &data); switch (data) { case 0xFF: format = VBI_FORMAT_VIDEO; - break; /* Active video */ + break; /* Active video */ case 0x77: format = VBI_FORMAT_RAW; - break; /* Raw VBI data */ + break; /* Raw VBI data */ case 0x55: format = VBI_FORMAT_CC; - break; /* US CC */ + break; /* US CC */ case 0xCC: format = VBI_FORMAT_NABTS; - break; /* US NABTS */ + break; /* US NABTS */ } return (format); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/tv_1200.c b/driver/xf86-video-geode/src/gfx/tv_1200.c index a75cc327f..8ebcffce9 100644 --- a/driver/xf86-video-geode/src/gfx/tv_1200.c +++ b/driver/xf86-video-geode/src/gfx/tv_1200.c @@ -47,7 +47,7 @@ gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution) /* Save TV output mode */ ctrl2 = READ_VID32(SC1200_TVENC_TIM_CTRL_2) & (SC1200_TVENC_OUTPUT_YCBCR | - SC1200_TVENC_CFS_MASK); + SC1200_TVENC_CFS_MASK); /* Save flicker filter setting */ mode = READ_VID32(SC1200_TVOUT_HORZ_SCALING) & @@ -105,7 +105,8 @@ gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution) /* Horizontal display end is 919, i.e. 720 active pixels */ /* Total number of display lines per field is 240 */ WRITE_VID32(SC1200_TVOUT_LINE_END, 0x039700f0); - } else { /* Use new scaler available in Rev. C */ + } + else { /* Use new scaler available in Rev. C */ /* Horizontal Display start is 111 */ /* Total number of pixels per line is 857 */ WRITE_VID32(SC1200_TVOUT_HORZ_TIM, 0x006f0359); @@ -214,7 +215,8 @@ gfx_set_tv_format(TVStandardType format, GfxOnTVType resolution) /* Horizontal display end is 906, i.e. 704 active pixels */ /* Total number of display lines per field is 288 */ WRITE_VID32(SC1200_TVOUT_LINE_END, 0x038a0120); - } else { + } + else { /* HSYNC generated in the TV Encoder module */ /* Interval between resets of TV Encoder is once every odd * field */ @@ -260,8 +262,7 @@ gfx_set_tv_output(int output) ctrl2 = READ_VID32(SC1200_TVENC_TIM_CTRL_2); ctrl3 = READ_VID32(SC1200_TVENC_TIM_CTRL_3); ctrl2 &= ~(SC1200_TVENC_OUTPUT_YCBCR | SC1200_TVENC_CFS_MASK); - ctrl3 &= - ~(SC1200_TVENC_CM | SC1200_TVENC_SYNCMODE_MASK | SC1200_TVENC_CS); + ctrl3 &= ~(SC1200_TVENC_CM | SC1200_TVENC_SYNCMODE_MASK | SC1200_TVENC_CS); switch (output) { case TV_OUTPUT_COMPOSITE: /* Analog outputs provide Y, C and CVBS */ @@ -279,16 +280,17 @@ gfx_set_tv_output(int output) /* Analog outputs provide Y, Cb and Cr */ /* A 7.5 IRE setup is applied to the output */ WRITE_VID32(SC1200_TVENC_TIM_CTRL_2, - ctrl2 | SC1200_TVENC_OUTPUT_YCBCR | SC1200_TVENC_CFS_BYPASS); + ctrl2 | SC1200_TVENC_OUTPUT_YCBCR | + SC1200_TVENC_CFS_BYPASS); WRITE_VID32(SC1200_TVENC_TIM_CTRL_3, - ctrl3 | SC1200_TVENC_CM | SC1200_TVENC_CS); + ctrl3 | SC1200_TVENC_CM | SC1200_TVENC_CS); break; case TV_OUTPUT_SCART: /* Analog outputs provide SCART (RGB and CVBS) */ /* Sync is added to green signal */ WRITE_VID32(SC1200_TVENC_TIM_CTRL_2, ctrl2 | SC1200_TVENC_CFS_CVBS); WRITE_VID32(SC1200_TVENC_TIM_CTRL_3, - ctrl3 | SC1200_TVENC_CM | SC1200_TVENC_SYNC_ON_GREEN); + ctrl3 | SC1200_TVENC_CM | SC1200_TVENC_SYNC_ON_GREEN); break; default: return (GFX_STATUS_BAD_PARAMETER); @@ -336,7 +338,8 @@ gfx_set_tv_enable(int enable) value_dac &= ~SC1200_TVENC_POWER_DOWN; /* ENABLE GRAPHICS DISPLAY LOGIC IN VIDEO PROCESSOR */ gfx_set_screen_enable(1); - } else { + } + else { value_tim &= ~SC1200_TVENC_VIDEO_TIMING_ENABLE; value_dac |= SC1200_TVENC_POWER_DOWN; /* Do not disable the graphics display logic because it might be @@ -370,15 +373,15 @@ gfx_set_tv_flicker_filter(int ff) switch (ff) { case TV_FLICKER_FILTER_NONE: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - mode | SC1200_TVOUT_FLICKER_FILTER_DISABLED); + mode | SC1200_TVOUT_FLICKER_FILTER_DISABLED); break; case TV_FLICKER_FILTER_NORMAL: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - mode | SC1200_TVOUT_FLICKER_FILTER_FOURTH_HALF_FOURTH); + mode | SC1200_TVOUT_FLICKER_FILTER_FOURTH_HALF_FOURTH); break; case TV_FLICKER_FILTER_INTERLACED: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - mode | SC1200_TVOUT_FLICKER_FILTER_HALF_ONE_HALF); + mode | SC1200_TVOUT_FLICKER_FILTER_HALF_ONE_HALF); break; default: return GFX_STATUS_BAD_PARAMETER; @@ -407,19 +410,19 @@ gfx_set_tv_sub_carrier_reset(int screset) switch (screset) { case TV_SUB_CARRIER_RESET_NEVER: WRITE_VID32(SC1200_TVENC_TIM_CTRL_1, - mode | SC1200_TVENC_SUB_CARRIER_RESET_NEVER); + mode | SC1200_TVENC_SUB_CARRIER_RESET_NEVER); break; case TV_SUB_CARRIER_RESET_EVERY_TWO_LINES: WRITE_VID32(SC1200_TVENC_TIM_CTRL_1, - mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_TWO_LINES); + mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_TWO_LINES); break; case TV_SUB_CARRIER_RESET_EVERY_TWO_FRAMES: WRITE_VID32(SC1200_TVENC_TIM_CTRL_1, - mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_TWO_FRAMES); + mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_TWO_FRAMES); break; case TV_SUB_CARRIER_RESET_EVERY_FOUR_FRAMES: WRITE_VID32(SC1200_TVENC_TIM_CTRL_1, - mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_FOUR_FRAMES); + mode | SC1200_TVENC_SUB_CARRIER_RESET_EVERY_FOUR_FRAMES); break; default: return GFX_STATUS_BAD_PARAMETER; @@ -474,19 +477,19 @@ gfx_set_tv_YC_delay(int delay) switch (delay) { case TV_YC_DELAY_NONE: WRITE_VID32(SC1200_TVOUT_HORZ_PRE_ENCODER_SCALE, - mode | SC1200_TVOUT_YC_DELAY_NONE); + mode | SC1200_TVOUT_YC_DELAY_NONE); break; case TV_Y_DELAY_ONE_PIXEL: WRITE_VID32(SC1200_TVOUT_HORZ_PRE_ENCODER_SCALE, - mode | SC1200_TVOUT_Y_DELAY_ONE_PIXEL); + mode | SC1200_TVOUT_Y_DELAY_ONE_PIXEL); break; case TV_C_DELAY_ONE_PIXEL: WRITE_VID32(SC1200_TVOUT_HORZ_PRE_ENCODER_SCALE, - mode | SC1200_TVOUT_C_DELAY_ONE_PIXEL); + mode | SC1200_TVOUT_C_DELAY_ONE_PIXEL); break; case TV_C_DELAY_TWO_PIXELS: WRITE_VID32(SC1200_TVOUT_HORZ_PRE_ENCODER_SCALE, - mode | SC1200_TVOUT_C_DELAY_TWO_PIXELS); + mode | SC1200_TVOUT_C_DELAY_TWO_PIXELS); break; default: return GFX_STATUS_BAD_PARAMETER; @@ -516,23 +519,23 @@ gfx_set_tvenc_reset_interval(int interval) switch (interval) { case TVENC_RESET_EVERY_ODD_FIELD: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - value | SC1200_TVENC_EXTERNAL_RESET_EVERY_ODD_FIELD); + value | SC1200_TVENC_EXTERNAL_RESET_EVERY_ODD_FIELD); break; case TVENC_RESET_EVERY_EVEN_FIELD: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - value | SC1200_TVENC_EXTERNAL_RESET_EVERY_EVEN_FIELD); + value | SC1200_TVENC_EXTERNAL_RESET_EVERY_EVEN_FIELD); break; case TVENC_RESET_NEXT_ODD_FIELD: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - value | SC1200_TVENC_EXTERNAL_RESET_NEXT_ODD_FIELD); + value | SC1200_TVENC_EXTERNAL_RESET_NEXT_ODD_FIELD); break; case TVENC_RESET_NEXT_EVEN_FIELD: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - value | SC1200_TVENC_EXTERNAL_RESET_NEXT_EVEN_FIELD); + value | SC1200_TVENC_EXTERNAL_RESET_NEXT_EVEN_FIELD); break; case TVENC_RESET_EVERY_FIELD: WRITE_VID32(SC1200_TVOUT_HORZ_SCALING, - value | SC1200_TVENC_EXTERNAL_RESET_EVERY_FIELD); + value | SC1200_TVENC_EXTERNAL_RESET_EVERY_FIELD); break; case TVENC_RESET_EVERY_X_ODD_FIELDS: case TVENC_RESET_EVERY_X_EVEN_FIELDS: @@ -588,8 +591,8 @@ gfx_set_tv_display(int width, int height) for (i = 0; i < NUM_TV_MODES; i++) { pMode = &TVTimings[i]; - if ((unsigned)width == pMode->hactive - && (unsigned)height == pMode->vactive) + if ((unsigned) width == pMode->hactive + && (unsigned) height == pMode->vactive) break; } @@ -597,10 +600,12 @@ gfx_set_tv_display(int width, int height) return 0; gfx_set_display_timings(gfx_get_display_bpp(), - (unsigned short)pMode->flags, pMode->hactive, pMode->hblankstart, - pMode->hsyncstart, pMode->hsyncend, pMode->hblankend, pMode->htotal, - pMode->vactive, pMode->vblankstart, pMode->vsyncstart, - pMode->vsyncend, pMode->vblankend, pMode->vtotal, pMode->frequency); + (unsigned short) pMode->flags, pMode->hactive, + pMode->hblankstart, pMode->hsyncstart, + pMode->hsyncend, pMode->hblankend, pMode->htotal, + pMode->vactive, pMode->vblankstart, + pMode->vsyncstart, pMode->vsyncend, + pMode->vblankend, pMode->vtotal, pMode->frequency); return 1; } @@ -719,7 +724,8 @@ gfx_set_tv_field_status_invert(int enable) if (enable) { value |= SC1200_TVOUT_FIELD_STATUS_INVERT; - } else { + } + else { value &= ~(SC1200_TVOUT_FIELD_STATUS_INVERT); } @@ -744,8 +750,7 @@ gfx_get_tv_vphase(void) { unsigned long mode = READ_VID32(SC1200_TVENC_TIM_CTRL_1); - return (int)((mode & SC1200_TVENC_VPHASE_MASK) >> - SC1200_TVENC_VPHASE_POS); + return (int) ((mode & SC1200_TVENC_VPHASE_MASK) >> SC1200_TVENC_VPHASE_POS); } /*--------------------------------------------------------------------------- @@ -764,7 +769,7 @@ gfx_get_tv_enable(unsigned int *p_on) { unsigned long control = READ_VID32(SC1200_TVENC_DAC_CONTROL); - *p_on = (unsigned int)(!(control & SC1200_TVENC_POWER_DOWN)); + *p_on = (unsigned int) (!(control & SC1200_TVENC_POWER_DOWN)); return GFX_STATUS_OK; } @@ -863,8 +868,8 @@ gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz) frequency = gfx_get_clock_frequency(); for (mode = 0; mode < NUM_TV_MODES; mode++) { - if (TVTimings[mode].hactive == (unsigned short)(*width) && - TVTimings[mode].vactive == (unsigned short)(*height) && + if (TVTimings[mode].hactive == (unsigned short) (*width) && + TVTimings[mode].vactive == (unsigned short) (*height) && TVTimings[mode].frequency == frequency) { flags = TVTimings[mode].flags; @@ -890,11 +895,12 @@ gfx_get_tv_display_mode(int *width, int *height, int *bpp, int *hz) #if GFX_TV_DYNAMIC int sc1200_get_tv_display_mode_frequency(unsigned short width, - unsigned short height, TVStandardType format, int *frequency) + unsigned short height, + TVStandardType format, int *frequency) #else int gfx_get_tv_display_mode_frequency(unsigned short width, unsigned short height, - TVStandardType format, int *frequency) + TVStandardType format, int *frequency) #endif { unsigned long mode, flag; @@ -933,11 +939,12 @@ gfx_get_tv_display_mode_frequency(unsigned short width, unsigned short height, #if GFX_TV_DYNAMIC int sc1200_is_tv_display_mode_supported(unsigned short width, - unsigned short height, TVStandardType format) + unsigned short height, + TVStandardType format) #else int gfx_is_tv_display_mode_supported(unsigned short width, unsigned short height, - TVStandardType format) + TVStandardType format) #endif { unsigned long mode, flag; @@ -957,7 +964,7 @@ gfx_is_tv_display_mode_supported(unsigned short width, unsigned short height, if (TVTimings[mode].hactive == width && TVTimings[mode].vactive == height && (TVTimings[mode].flags & flag)) { - return ((int)mode); + return ((int) mode); } } diff --git a/driver/xf86-video-geode/src/gfx/tv_fs450.c b/driver/xf86-video-geode/src/gfx/tv_fs450.c index 942907b42..24e7446b5 100644 --- a/driver/xf86-video-geode/src/gfx/tv_fs450.c +++ b/driver/xf86-video-geode/src/gfx/tv_fs450.c @@ -51,8 +51,7 @@ #define WRITE 2 #define READ_WRITE (READ | WRITE) -typedef struct -{ +typedef struct { char *name; unsigned long offset; unsigned char bit_length; @@ -61,8 +60,7 @@ typedef struct char *bitfield_names[MAX_BITS]; } S_REGISTER_DESCRIP; -typedef struct -{ +typedef struct { int source; char *name; S_REGISTER_DESCRIP registers[MAX_REGISTERS]; @@ -247,8 +245,7 @@ const S_SET_DESCRIP *gcc_regs(void); */ #define TRACE(parameters) {} /* GCC timing structure */ -typedef struct _S_TIMING_SPECS -{ +typedef struct _S_TIMING_SPECS { int vga_width; int vga_lines; int tv_width; @@ -302,15 +299,15 @@ DMAL_WriteUInt32(unsigned long phys_addr, unsigned long data) static int houston_ReadReg(unsigned int reg, unsigned long *p_value, unsigned int bytes) { - return gfx_i2c_read(1, PLAL_FS450_i2c_address(), (unsigned char)reg, - (unsigned char)bytes, (unsigned char *)p_value); + return gfx_i2c_read(1, PLAL_FS450_i2c_address(), (unsigned char) reg, + (unsigned char) bytes, (unsigned char *) p_value); } static int houston_WriteReg(unsigned int reg, unsigned long value, unsigned int bytes) { - return gfx_i2c_write(1, PLAL_FS450_i2c_address(), (unsigned char)reg, - (unsigned char)bytes, (unsigned char *)&value); + return gfx_i2c_write(1, PLAL_FS450_i2c_address(), (unsigned char) reg, + (unsigned char) bytes, (unsigned char *) &value); } /* TV configuration functions. */ @@ -324,7 +321,8 @@ static unsigned long supported_standards(void); static void config_tvout_mode(unsigned long tvout_mode); static void conget_tvout_mode(unsigned long *p_tvout_mode); static void config_overscan_xy(unsigned long tv_std, unsigned long vga_mode, - int overscan_x, int overscan_y, int pos_x, int pos_y); + int overscan_x, int overscan_y, int pos_x, + int pos_y); static void config_nco(unsigned long tv_std, unsigned long vga_mode); static void config_sharpness(int sharpness); static void conget_sharpness(int *p_sharpness); @@ -333,20 +331,21 @@ static void conget_flicker(int *p_flicker); static void config_color(int color); static void conget_color(int *p_color); static void config_brightness_contrast(unsigned long tv_std, - unsigned int trigger_bits, int brightness, int contrast); + unsigned int trigger_bits, + int brightness, int contrast); static void conget_brightness_contrast(unsigned long tv_std, - unsigned int trigger_bits, int *p_brightness, int *p_contrast); + unsigned int trigger_bits, + int *p_brightness, int *p_contrast); static void config_yc_filter(unsigned long tv_std, int luma_filter, - int chroma_filter); + int chroma_filter); static void conget_yc_filter(int *p_luma_filter, int *p_chroma_filter); static void config_macrovision(unsigned long tv_std, - unsigned int cp_trigger_bits); + unsigned int cp_trigger_bits); static void conget_macrovision(unsigned long tv_std, - unsigned int *p_cp_trigger_bits); + unsigned int *p_cp_trigger_bits); /* Device settings. */ -typedef struct _S_DEVICE_SETTINGS -{ +typedef struct _S_DEVICE_SETTINGS { int tv_on; unsigned long vga_mode; unsigned long tv_std; @@ -372,8 +371,7 @@ static S_DEVICE_SETTINGS d; *========================================================================== * */ -static const struct -{ +static const struct { unsigned long chroma_freq[5]; unsigned short chroma_phase[5]; unsigned short cphase_rst[5]; @@ -496,8 +494,7 @@ static const struct /* MediaGX default underscan and centered position setups. */ #define SCANTABLE_ENTRIES 5 -struct _scantable -{ +struct _scantable { unsigned long mode; unsigned short v_total[5]; unsigned short v_sync[5]; @@ -508,56 +505,54 @@ struct _scantable static struct _scantable scantable[SCANTABLE_ENTRIES] = { { - GFX_VGA_MODE_640X480, - {617, 624, 617, 624, 624}, /* v_total */ - {69, 88, 69, 88, 88}, /* v_sync */ - {720, 720, 720, 720, 720}, /* iha */ - {0, 0, 0, 0, 0}, /* iho */ - {-12, 0, -6, 0, 0} /* hsc */ - }, + GFX_VGA_MODE_640X480, + {617, 624, 617, 624, 624}, /* v_total */ + {69, 88, 69, 88, 88}, /* v_sync */ + {720, 720, 720, 720, 720}, /* iha */ + {0, 0, 0, 0, 0}, /* iho */ + {-12, 0, -6, 0, 0} /* hsc */ + }, { - GFX_VGA_MODE_800X600, - {740, 740, 740, 740, 740}, /* v_total */ - {90, 88, 90, 88, 88}, /* v_sync */ - {720, 720, 508, 720, 720}, /* iha */ - {-8, 11, -8, -8, 11}, /* iho */ - {-27, -27, -27, -27, -27} /* hsc */ - }, + GFX_VGA_MODE_800X600, + {740, 740, 740, 740, 740}, /* v_total */ + {90, 88, 90, 88, 88}, /* v_sync */ + {720, 720, 508, 720, 720}, /* iha */ + {-8, 11, -8, -8, 11}, /* iho */ + {-27, -27, -27, -27, -27} /* hsc */ + }, { - GFX_VGA_MODE_720X487, - {525, 720, 525, 720, 720}, /* v_total */ - {23, 230, 23, 230, 230}, /* v_sync */ - {720, 720, 720, 720, 720}, /* iha */ - {0xa2, 0xa2, 0xa2, 0xa2, 0xa2}, /* iho */ - {0, 0, 0, 0, 0} /* hsc */ - }, + GFX_VGA_MODE_720X487, + {525, 720, 525, 720, 720}, /* v_total */ + {23, 230, 23, 230, 230}, /* v_sync */ + {720, 720, 720, 720, 720}, /* iha */ + {0xa2, 0xa2, 0xa2, 0xa2, 0xa2}, /* iho */ + {0, 0, 0, 0, 0} /* hsc */ + }, { - GFX_VGA_MODE_720X576, - {720, 625, 720, 625, 625}, /* v_total */ - {129, 25, 129, 25, 25}, /* v_sync */ - {720, 720, 720, 720, 720}, /* iha */ - {0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, /* iho */ - {0, 0, 0, 0, 0} /* hsc */ - }, + GFX_VGA_MODE_720X576, + {720, 625, 720, 625, 625}, /* v_total */ + {129, 25, 129, 25, 25}, /* v_sync */ + {720, 720, 720, 720, 720}, /* iha */ + {0xaa, 0xaa, 0xaa, 0xaa, 0xaa}, /* iho */ + {0, 0, 0, 0, 0} /* hsc */ + }, { - GFX_VGA_MODE_1024X768, - {933, 942, 933, 806, 806}, /* v_total */ - {121, 112, 121, 88, 88}, /* v_sync */ - {600, 600, 600, 600, 600}, /* iha */ - {0x3c, 0x23, 0x3c, 0x65, 0x65}, /* iho */ - {35, 26, 35, 26, 26} /* hsc */ - }, + GFX_VGA_MODE_1024X768, + {933, 942, 933, 806, 806}, /* v_total */ + {121, 112, 121, 88, 88}, /* v_sync */ + {600, 600, 600, 600, 600}, /* iha */ + {0x3c, 0x23, 0x3c, 0x65, 0x65}, /* iho */ + {35, 26, 35, 26, 26} /* hsc */ + }, }; /* Houston fifo configuration constants. */ -struct _ffolat -{ +struct _ffolat { int v_total; unsigned short ffolat; }; -struct _ffolativo -{ +struct _ffolativo { int v_total; unsigned short ivo; unsigned short ffolat; @@ -668,7 +663,7 @@ static struct _ffolat ffo7x5pal[SIZE7X5PAL + 1] = { /* h_total=1056, vga_lines=600 */ #define SIZE8X6NTSC 37 static struct _ffolat ffo8x6ntsc[SIZE8X6NTSC + 1] = { - {620, 0x40}, /* v_total_min >= vsync+10 >= vga_lines+10 = 610 */ + {620, 0x40}, /* v_total_min >= vsync+10 >= vga_lines+10 = 610 */ {625, 0x58}, {630, 0x40}, {635, 0x40}, {640, 0x40}, {645, 0x46}, {650, 0x46}, {655, 0x4f}, {660, 0x4c}, {665, 0x4a}, {670, 0x50}, {675, 0x2f}, {680, 0x48}, @@ -862,7 +857,7 @@ FS450_init(void) d.brightness = 50; d.contrast = 60; config_brightness_contrast(d.tv_std, d.aps_trigger_bits, d.brightness, - d.contrast); + d.contrast); /* get the current yc filtering */ { @@ -949,8 +944,9 @@ write_config(int req) if (REQ_OVERSCAN_POSITION_BIT & req) { config_overscan_xy(d.tv_std, - d.vga_mode, - d.overscan_x, d.overscan_y, d.position_x, d.position_y); + d.vga_mode, + d.overscan_x, d.overscan_y, d.position_x, + d.position_y); /*h_timing and v_timing and syncs. */ if (PLAL_IsTVOn()) @@ -971,13 +967,14 @@ write_config(int req) if (REQ_BRIGHTNESS_CONTRAST_BIT & req) { config_brightness_contrast(d.tv_std, - d.aps_trigger_bits, d.brightness, d.contrast); + d.aps_trigger_bits, d.brightness, + d.contrast); } if (REQ_YC_FILTER_BIT & req) { config_yc_filter(d.tv_std, - (d.yc_filter & GFX_LUMA_FILTER), - (d.yc_filter & GFX_CHROMA_FILTER)); + (d.yc_filter & GFX_LUMA_FILTER), + (d.yc_filter & GFX_CHROMA_FILTER)); } if (REQ_MACROVISION_BIT & req) @@ -1054,9 +1051,9 @@ gfx_set_tv_enable(int on) /*configure encoder and nco. */ write_config(REQ_VGA_MODE | - REQ_TV_STANDARD | - REQ_TVOUT_MODE | - REQ_OVERSCAN_POSITION | REQ_YC_FILTER | REQ_MACROVISION); + REQ_TV_STANDARD | + REQ_TVOUT_MODE | + REQ_OVERSCAN_POSITION | REQ_YC_FILTER | REQ_MACROVISION); /*set LP_EN and UIM */ houston_ReadReg(HOUSTON_CR, ®, 2); @@ -1664,19 +1661,19 @@ FS450_ReadRegister(S_REG_INFO * p_reg) switch (p_reg->size) { case 1: case 2: - { - houston_ReadReg((int)p_reg->offset, &tmp, (int)p_reg->size); - p_reg->value = tmp; - } + { + houston_ReadReg((int) p_reg->offset, &tmp, (int) p_reg->size); + p_reg->value = tmp; + } return 0; case 4: - { - houston_ReadReg((unsigned int)p_reg->offset, &tmp, 2); - p_reg->value = (tmp << 16); - houston_ReadReg((unsigned int)(p_reg->offset + 2), &tmp, 2); - p_reg->value |= tmp; - } + { + houston_ReadReg((unsigned int) p_reg->offset, &tmp, 2); + p_reg->value = (tmp << 16); + houston_ReadReg((unsigned int) (p_reg->offset + 2), &tmp, 2); + p_reg->value |= tmp; + } return 0; } } @@ -1691,8 +1688,8 @@ FS450_WriteRegister(S_REG_INFO * p_reg) return 0; if (SOURCE_HOUSTON == p_reg->source) { - houston_WriteReg((unsigned int)p_reg->offset, p_reg->value, - p_reg->size); + houston_WriteReg((unsigned int) p_reg->offset, p_reg->value, + p_reg->size); return 0; } @@ -1736,7 +1733,7 @@ houston_init(void) /*read chip revision. */ houston_ReadReg(HOUSTON_REV, &read, 2); - g_houston_rev = (int)read; + g_houston_rev = (int) read; /*ok. */ return 0; @@ -1793,8 +1790,7 @@ z2w10bit(unsigned short z) /* TV Standards */ /*==========================================================================*/ -static const struct -{ +static const struct { unsigned long standard; int tvsetup_index; } g_tv_standards[] = { @@ -1853,7 +1849,8 @@ config_power(int on) houston_WriteReg(HOUSTON_CR, reg, 2); reg &= ~CR_RESET; houston_WriteReg(HOUSTON_CR, reg, 2); - } else { + } + else { houston_ReadReg(HOUSTON_CR, ®, 2); reg |= CR_CLKOFF; houston_WriteReg(HOUSTON_CR, reg, 2); @@ -1877,7 +1874,8 @@ config_power(int on) houston_ReadReg(HOUSTON_MISC, ®, 2); reg &= ~MISC_GTLIO_PD; houston_WriteReg(HOUSTON_MISC, reg, 2); - } else { + } + else { /* CLKOFF, COMPOFF, YCOFF */ houston_ReadReg(HOUSTON_CR, ®, 2); reg |= (CR_CLKOFF | CR_COMPOFF | CR_YCOFF); @@ -1899,8 +1897,7 @@ config_vga_mode(unsigned long vga_mode) { /*h_total must be evenly divisible by 32? */ - static struct - { + static struct { unsigned long mode; int width; int lines; @@ -1940,7 +1937,8 @@ config_vga_mode(unsigned long vga_mode) /*XGA*/ cr |= CR_UIM_DEC; misc |= MISC_VGACKDIV; byp |= (BYP_HDS_BYPASS | BYP_CAC_BYPASS); - } else { + } + else { /*VGA,SVGA */ cr &= ~CR_UIM_DEC; misc &= ~MISC_VGACKDIV; @@ -1981,10 +1979,10 @@ config_tv_std(unsigned long tv_std, unsigned int trigger_bits) /*setup the encoder. */ l = tvsetup.chroma_freq[k]; - houston_WriteReg(ENC_CHROMA_FREQ, (int)(l & 0x00ff), 1); - houston_WriteReg(ENC_CHROMA_FREQ + 1, (int)((l >> 8) & 0x00ff), 1); - houston_WriteReg(ENC_CHROMA_FREQ + 2, (int)((l >> 16) & 0x00ff), 1); - houston_WriteReg(ENC_CHROMA_FREQ + 3, (int)((l >> 24) & 0x00ff), 1); + houston_WriteReg(ENC_CHROMA_FREQ, (int) (l & 0x00ff), 1); + houston_WriteReg(ENC_CHROMA_FREQ + 1, (int) ((l >> 8) & 0x00ff), 1); + houston_WriteReg(ENC_CHROMA_FREQ + 2, (int) ((l >> 16) & 0x00ff), 1); + houston_WriteReg(ENC_CHROMA_FREQ + 3, (int) ((l >> 24) & 0x00ff), 1); houston_WriteReg(ENC_CHROMA_PHASE, tvsetup.chroma_phase[k], 1); houston_WriteReg(ENC_REG05, 0x00, 1); /*reg 0x05 */ @@ -1999,11 +1997,11 @@ config_tv_std(unsigned long tv_std, unsigned int trigger_bits) if (trigger_bits == 0) w = w10bit2z(tvsetup.blank_level[k]); /*blank level */ else - w = w10bit2z((unsigned short)(tvsetup.blank_level[k] - - tvsetup.hamp_offset[k])); + w = w10bit2z((unsigned short) (tvsetup.blank_level[k] - + tvsetup.hamp_offset[k])); houston_WriteReg(ENC_BLANK_LEVEL, w & 0x00ff, 1); houston_WriteReg(ENC_BLANK_LEVEL + 1, w >> 8, 1); - w = w10bit2z(tvsetup.tv_lines[k]); /*num_lines */ + w = w10bit2z(tvsetup.tv_lines[k]); /*num_lines */ houston_WriteReg(ENC_NUM_LINES, w & 0x00ff, 1); houston_WriteReg(ENC_NUM_LINES + 1, w >> 8, 1); @@ -2022,7 +2020,7 @@ config_tv_std(unsigned long tv_std, unsigned int trigger_bits) if (trigger_bits == 0) w = w10bit2z(tvsetup.vbi_blank_level[k]); /*blank level */ else - w = w10bit2z((unsigned short)(tvsetup.vbi_blank_level[k] - 1)); + w = w10bit2z((unsigned short) (tvsetup.vbi_blank_level[k] - 1)); houston_WriteReg(ENC_VBI_BLANK_LEVEL, w & 0x00ff, 1); houston_WriteReg(ENC_VBI_BLANK_LEVEL + 1, w >> 8, 1); } @@ -2115,7 +2113,8 @@ conget_tvout_mode(unsigned long *p_tvout_mode) static void get_ffolat_ivo(unsigned long vga_mode, - unsigned long tv_std, long i, unsigned short *ffolat, unsigned short *ivo) + unsigned long tv_std, long i, unsigned short *ffolat, + unsigned short *ivo) { switch (vga_mode) { case GFX_VGA_MODE_640X480: @@ -2124,7 +2123,8 @@ get_ffolat_ivo(unsigned long vga_mode, i = SIZE6X4NTSC - 1; *ffolat = ffo6x4ntsc[i].ffolat; *ivo = 0x20; - } else { + } + else { if (i > SIZE6X4PAL - 1) i = SIZE6X4PAL - 1; *ffolat = ffo6x4pal[i].ffolat; @@ -2138,7 +2138,8 @@ get_ffolat_ivo(unsigned long vga_mode, i = SIZE8X6NTSC - 1; *ffolat = ffo8x6ntsc[i].ffolat; *ivo = 0x3a; - } else { + } + else { if (i > SIZE8X6PAL - 1) i = SIZE8X6PAL - 1; *ffolat = ffo8x6pal[i].ffolat; @@ -2147,12 +2148,12 @@ get_ffolat_ivo(unsigned long vga_mode, break; case GFX_VGA_MODE_720X487: - *ffolat = 0x40; /*FFO7x4; */ + *ffolat = 0x40; /*FFO7x4; */ *ivo = 0x1a; break; case GFX_VGA_MODE_720X576: - *ffolat = 0x40; /*FFO7x5; */ + *ffolat = 0x40; /*FFO7x5; */ *ivo = 0x1a; break; @@ -2163,7 +2164,8 @@ get_ffolat_ivo(unsigned long vga_mode, i = SIZE10X7NTSC - 1; *ffolat = ffo10x7ntsc[i].ffolat; *ivo = ffo10x7ntsc[i].ivo; - } else { + } + else { if (i > SIZE10X7PAL - 1) i = SIZE10X7PAL - 1; *ffolat = ffo10x7pal[i].ffolat; @@ -2177,7 +2179,8 @@ get_ffolat_ivo(unsigned long vga_mode, static void get_vtotal_min_max(unsigned long vga_mode, - unsigned long tv_std, int *v_total_min, int *v_total_max, int *v_step) + unsigned long tv_std, int *v_total_min, int *v_total_max, + int *v_step) { int k = map_tvstd_to_index(tv_std); @@ -2186,7 +2189,8 @@ get_vtotal_min_max(unsigned long vga_mode, if (IS_NTSC(tv_std)) { *v_total_min = ffo6x4ntsc[0].v_total; *v_total_max = ffo6x4ntsc[SIZE6X4NTSC - 1].v_total; - } else { + } + else { *v_total_min = ffo6x4pal[0].v_total; *v_total_max = ffo6x4pal[SIZE6X4PAL - 1].v_total; } @@ -2197,7 +2201,8 @@ get_vtotal_min_max(unsigned long vga_mode, if (IS_NTSC(tv_std)) { *v_total_min = ffo8x6ntsc[0].v_total; *v_total_max = ffo8x6ntsc[SIZE8X6NTSC - 1].v_total; - } else { + } + else { *v_total_min = ffo8x6pal[0].v_total; *v_total_max = ffo8x6pal[SIZE8X6PAL - 1].v_total; } @@ -2215,7 +2220,8 @@ get_vtotal_min_max(unsigned long vga_mode, if (IS_NTSC(tv_std)) { *v_total_min = ffo10x7ntsc[0].v_total; *v_total_max = ffo10x7ntsc[SIZE10X7NTSC - 1].v_total; - } else { + } + else { *v_total_min = ffo10x7pal[0].v_total; *v_total_max = ffo10x7pal[SIZE10X7PAL - 1].v_total; } @@ -2226,8 +2232,8 @@ get_vtotal_min_max(unsigned long vga_mode, static void config_overscan_xy(unsigned long tv_std, - unsigned long vga_mode, - int overscan_x, int overscan_y, int pos_x, int pos_y) + unsigned long vga_mode, + int overscan_x, int overscan_y, int pos_x, int pos_y) { unsigned int vga_index; unsigned long reg; @@ -2266,7 +2272,7 @@ config_overscan_xy(unsigned long tv_std, TRACE(("v_total range = %d\n", range)) /*map +/-1000 overscan y into +/-range. */ - v_offset = (int)((((float)overscan_y * range) / 1000.f) + .5f); + v_offset = (int) ((((float) overscan_y * range) / 1000.f) + .5f); TRACE(("v_offset = %d\n", v_offset)) /*range limit v_total. */ @@ -2283,26 +2289,27 @@ config_overscan_xy(unsigned long tv_std, houston_WriteReg(HOUSTON_IVO, ivo, 2); /*scale base sync offset by scaling ratio. */ - r = (float)g_specs.v_total / (float)base_v_total; - v_offset = (int)(r * (float)scantable[vga_index].v_sync[k]); + r = (float) g_specs.v_total / (float) base_v_total; + v_offset = (int) (r * (float) scantable[vga_index].v_sync[k]); /*scale ivo. */ - f = (float)ivo; - v_offset -= (int)(f - f / r); + f = (float) ivo; + v_offset -= (int) (f - f / r); /*compensate for center screen. */ - f = (float)tvsetup.tv_active_lines[k] / 2.f; - v_offset += (int)(f * r - f); + f = (float) tvsetup.tv_active_lines[k] / 2.f; + v_offset += (int) (f * r - f); /*calculate vsync. */ g_specs.v_sync = g_specs.v_total - v_offset + pos_y; TRACE(("desired v_total=%d, desired v_sync=%d\n", g_specs.v_total, - g_specs.v_sync)) + g_specs.v_sync)) if (g_specs.v_sync < g_specs.vga_lines + 10) { TRACE(("vsync too low\n")) /*d.v_total += d.vga_lines+10-d.v_sync; */ g_specs.v_sync = g_specs.vga_lines + 10; - } else if (g_specs.v_sync > g_specs.v_total - 10) { + } + else if (g_specs.v_sync > g_specs.v_total - 10) { TRACE(("vsync too high\n")) g_specs.v_sync = g_specs.v_total - 10; } @@ -2314,11 +2321,12 @@ config_overscan_xy(unsigned long tv_std, /* VSC. */ vsc = (65536.0f * (1.0f - - (double)g_specs.tv_lines / (double)g_specs.v_total)) + 0.5f; - reg = ((unsigned long)-vsc) & 0xffff; + (double) g_specs.tv_lines / (double) g_specs.v_total)) + + 0.5f; + reg = ((unsigned long) -vsc) & 0xffff; TRACE(("vsc=%04x, tv_lines=%d, v_total=%d\n", reg, g_specs.tv_lines, - g_specs.v_total)) - houston_WriteReg(HOUSTON_VSC, (int)reg, 2); + g_specs.v_total)) + houston_WriteReg(HOUSTON_VSC, (int) reg, 2); /* horizontal scaling. */ @@ -2333,22 +2341,22 @@ config_overscan_xy(unsigned long tv_std, hscale_max = (720.0f / vga_pixels); hscale_min = fsmax((0.75f * hscale_max), (1.0f - (63.0f / 128.0f))); TRACE(("hscale_min = %u.%u, hscale_max = %u.%u\n", - (int)hscale_min, - (int)((hscale_min - (int)hscale_min) * 1000), - (int)hscale_max, (int)((hscale_max - (int)hscale_max) * 1000))) + (int) hscale_min, + (int) ((hscale_min - (int) hscale_min) * 1000), + (int) hscale_max, (int) ((hscale_max - (int) hscale_max) * 1000))) /* map overscan_x into min to max. */ hscale = hscale_min + ((overscan_x + 1000.0f) / 2000.0f) * (hscale_max - - hscale_min); - TRACE(("hscale = %u.%u\n", (int)hscale, - (int)((hscale - (int)hscale) * 1000))) + hscale_min); + TRACE(("hscale = %u.%u\n", (int) hscale, + (int) ((hscale - (int) hscale) * 1000))) /* determine hsc where hscale = (1 + hsc/128) */ if (hscale >= 1.0f) - hsc = (int)(128.f * (hscale - 1.0f) + .5f); + hsc = (int) (128.f * (hscale - 1.0f) + .5f); else - hsc = (int)(128.f * (hscale - 1.0f) - .5f); + hsc = (int) (128.f * (hscale - 1.0f) - .5f); TRACE(("hsc = %d\n", hsc)) if (hsc >= 0) @@ -2358,15 +2366,15 @@ config_overscan_xy(unsigned long tv_std, /* recalculate hscale for future formulas */ hscale = 1.0f + (hsc / 128.0f); - TRACE(("recalculated hscale = %u.%u\n", (int)hscale, - (int)((hscale - (int)hscale) * 1000))) + TRACE(("recalculated hscale = %u.%u\n", (int) hscale, + (int) ((hscale - (int) hscale) * 1000))) /* horizontal offset. */ /* place hsync 40 before halfway from vga_width to htotal */ /* but not less than vga_width + 10 */ g_specs.h_sync = fsmax((g_specs.h_total + g_specs.vga_width) / 2 - 40, - g_specs.vga_width + 10); + g_specs.vga_width + 10); /* also, make it even */ g_specs.h_sync &= ~1; TRACE(("hsync = %u\n", g_specs.h_sync)) @@ -2380,13 +2388,13 @@ config_overscan_xy(unsigned long tv_std, /* to skip, or subtract. iho=0 maps to farthest right. */ /* map -pos_x = +/-1000 into (0 to iho_max) */ pre_pixels = - (int)((long)(g_specs.h_total - - g_specs.h_sync) * vga_pixels / g_specs.vga_width); - iho_max = (2 * pre_pixels) - ((int)(720.0f / hscale + 0.5f) - vga_pixels); + (int) ((long) (g_specs.h_total - + g_specs.h_sync) * vga_pixels / g_specs.vga_width); + iho_max = (2 * pre_pixels) - ((int) (720.0f / hscale + 0.5f) - vga_pixels); TRACE(("iho_max = %u\n", iho_max)) iho = - (int)range_limit(((long)(1000 - pos_x) * iho_max / 2000) + - scantable[vga_index].iho[k], 0, iho_max); + (int) range_limit(((long) (1000 - pos_x) * iho_max / 2000) + + scantable[vga_index].iho[k], 0, iho_max); TRACE(("iho = %u\n", iho)) houston_WriteReg(HOUSTON_IHO, iho, 2); @@ -2396,17 +2404,17 @@ config_overscan_xy(unsigned long tv_std, /* additionally, ihw cannot exceed tv width / hscale */ /* and if hsc is negative, (ihw)(-hsc/128) cannot exceed ~250. */ /* and ihw should be even. */ - ihw = fsmin(vga_pixels + pre_pixels - iho, (int)(720.0f / hscale)); + ihw = fsmin(vga_pixels + pre_pixels - iho, (int) (720.0f / hscale)); if (hsc < 0) - ihw = (int)fsmin(ihw, 253L * 128 / (-hsc)); + ihw = (int) fsmin(ihw, 253L * 128 / (-hsc)); ihw &= ~1; TRACE(("ihw = %u\n", ihw)) houston_WriteReg(HOUSTON_IHA, ihw, 2); - f = (((float)g_specs.h_total * g_specs.v_total) * 27.f) / - ((float)g_specs.tv_width * g_specs.tv_lines); + f = (((float) g_specs.h_total * g_specs.v_total) * 27.f) / + ((float) g_specs.tv_width * g_specs.tv_lines); - TRACE(("freq=%u.%uMHz\n", (int)f, (int)((f - (int)f) * 1000))) + TRACE(("freq=%u.%uMHz\n", (int) f, (int) ((f - (int) f) * 1000))) } /*==========================================================================*/ @@ -2452,20 +2460,21 @@ config_nco(unsigned long tv_std, unsigned long vga_mode) houston_WriteReg(HOUSTON_MISC, misc, 2); /*NCON. */ - reg = ((unsigned long)g_specs.v_total * g_specs.h_total) / 2; + reg = ((unsigned long) g_specs.v_total * g_specs.h_total) / 2; houston_WriteReg(HOUSTON_NCONH, reg >> 16, 2); houston_WriteReg(HOUSTON_NCONL, reg & 0xffff, 2); /*NCOD. */ houston_WriteReg(HOUSTON_NCODL, tvsetup.houston_ncodl[k], 2); houston_WriteReg(HOUSTON_NCODH, tvsetup.houston_ncodh[k], 2); - } else { + } + else { /*setup for M and N load (Nco_load=2). */ misc |= (MISC_NCO_LOAD1); houston_WriteReg(HOUSTON_MISC, misc, 2); /*NCON. */ - reg = (unsigned long)g_specs.v_total * g_specs.h_total; + reg = (unsigned long) g_specs.v_total * g_specs.h_total; houston_WriteReg(HOUSTON_NCONH, reg >> 16, 2); houston_WriteReg(HOUSTON_NCONL, reg & 0xffff, 2); @@ -2474,12 +2483,12 @@ config_nco(unsigned long tv_std, unsigned long vga_mode) houston_WriteReg(HOUSTON_NCODH, tvsetup.houston_ncodh[k], 2); TRACE(("NCON = %lu (0x%08lx), NCOD = %lu (0x%08lx)\n", - reg, - reg, - ((unsigned long)tvsetup.houston_ncodh[k] << 16) + - tvsetup.houston_ncodl[k], - ((unsigned long)tvsetup.houston_ncodh[k] << 16) + - tvsetup.houston_ncodl[k])) + reg, + reg, + ((unsigned long) tvsetup.houston_ncodh[k] << 16) + + tvsetup.houston_ncodl[k], + ((unsigned long) tvsetup.houston_ncodh[k] << 16) + + tvsetup.houston_ncodl[k])) } /*latch M/N and NCON/NCOD in. */ @@ -2499,7 +2508,7 @@ config_sharpness(int sharpness) unsigned int shp; /*map 0-1000 to 0-20. */ - shp = (unsigned int)(0.5f + ((float)sharpness * 20.0f / 1000.0f)); + shp = (unsigned int) (0.5f + ((float) sharpness * 20.0f / 1000.0f)); shp = range_limit(shp, 0, 20); houston_WriteReg(HOUSTON_SHP, shp, 2); @@ -2516,7 +2525,7 @@ conget_sharpness(int *p_sharpness) houston_ReadReg(HOUSTON_SHP, &shp, 2); /*map 0-20 to 0-1000. */ - *p_sharpness = (int)(0.5f + ((float)shp * 1000.0f / 20.0f)); + *p_sharpness = (int) (0.5f + ((float) shp * 1000.0f / 20.0f)); } /*==========================================================================*/ @@ -2529,7 +2538,7 @@ config_flicker(int flicker) unsigned int flk; /*map 0-1000 to 0-16. */ - flk = (unsigned int)(0.5f + ((float)flicker * 16.0f / 1000.0f)); + flk = (unsigned int) (0.5f + ((float) flicker * 16.0f / 1000.0f)); flk = range_limit(flk, 0, 16); houston_WriteReg(HOUSTON_FLK, flk, 2); @@ -2546,7 +2555,7 @@ conget_flicker(int *p_flicker) houston_ReadReg(HOUSTON_FLK, &flk, 2); /*map 0-16 to 0-1000. */ - *p_flicker = (int)(0.5f + ((float)flk * 1000.0f / 16.0f)); + *p_flicker = (int) (0.5f + ((float) flk * 1000.0f / 16.0f)); } /*==========================================================================*/ @@ -2561,7 +2570,7 @@ config_color(int color) /*map 0-100 to 0-255. */ /*montreal production test needs 169 to be mappable, so */ /*use .8 rounding factor, 169=(int)(66.*2.55+.8). */ - clr = (unsigned long)(0.8f + ((float)color * 255.0f / 100.0f)); + clr = (unsigned long) (0.8f + ((float) color * 255.0f / 100.0f)); clr = range_limit(clr, 0, 255); houston_WriteReg(ENC_CR_GAIN, clr, 1); @@ -2580,7 +2589,7 @@ conget_color(int *p_color) houston_ReadReg(ENC_CR_GAIN, &cr_gain, 1); /*map 0-255 to 0-100. */ - *p_color = (int)(0.5f + ((float)cr_gain * 100.0f / 255.0f)); + *p_color = (int) (0.5f + ((float) cr_gain * 100.0f / 255.0f)); } /*==========================================================================*/ @@ -2594,7 +2603,7 @@ static const int max_white_level = 1023; static void config_brightness_contrast(unsigned long tv_std, unsigned int trigger_bits, - int brightness, int contrast) + int brightness, int contrast) { int brightness_off; float contrast_mult; @@ -2604,10 +2613,10 @@ config_brightness_contrast(unsigned long tv_std, unsigned int trigger_bits, /*0-100 maps to +/-220. */ brightness_off = - (int)(0.5f + ((float)brightness * 440.0f / 100.0f)) - 220; + (int) (0.5f + ((float) brightness * 440.0f / 100.0f)) - 220; /*0-100 maps to .75-1.25. */ - contrast_mult = ((float)contrast * 0.5f / 100.0f) + 0.75f; + contrast_mult = ((float) contrast * 0.5f / 100.0f) + 0.75f; black = tvsetup.black_level[k]; if (trigger_bits != 0) @@ -2617,24 +2626,24 @@ config_brightness_contrast(unsigned long tv_std, unsigned int trigger_bits, if (trigger_bits != 0) white -= tvsetup.hamp_offset[k]; - black = (int)((float)(black + brightness_off) * contrast_mult); - white = (int)((float)(white + brightness_off) * contrast_mult); + black = (int) ((float) (black + brightness_off) * contrast_mult); + white = (int) ((float) (white + brightness_off) * contrast_mult); if (black < min_black_level) black = min_black_level; if (white > max_white_level) white = max_white_level; - w = w10bit2z((unsigned short)black); + w = w10bit2z((unsigned short) black); houston_WriteReg(ENC_BLACK_LEVEL, w & 0x00ff, 1); houston_WriteReg(ENC_BLACK_LEVEL + 1, w >> 8, 1); - w = w10bit2z((unsigned short)white); + w = w10bit2z((unsigned short) white); houston_WriteReg(ENC_WHITE_LEVEL, w & 0x00ff, 1); houston_WriteReg(ENC_WHITE_LEVEL + 1, w >> 8, 1); } static void conget_brightness_contrast(unsigned long tv_std, unsigned int trigger_bits, - int *p_brightness, int *p_contrast) + int *p_brightness, int *p_contrast) { int brightness_off; float contrast_mult; @@ -2649,32 +2658,32 @@ conget_brightness_contrast(unsigned long tv_std, unsigned int trigger_bits, houston_ReadReg(ENC_BLACK_LEVEL, &zl, 1); houston_ReadReg(ENC_BLACK_LEVEL + 1, &zh, 1); - black = z2w10bit((unsigned short)(zl + (zh << 8))); + black = z2w10bit((unsigned short) (zl + (zh << 8))); if (trigger_bits != 0) black += tvsetup.hamp_offset[k]; houston_ReadReg(ENC_WHITE_LEVEL, &zl, 1); houston_ReadReg(ENC_WHITE_LEVEL + 1, &zh, 1); - white = z2w10bit((unsigned short)(zl + (zh << 8))); + white = z2w10bit((unsigned short) (zl + (zh << 8))); if (trigger_bits != 0) white += tvsetup.hamp_offset[k]; /*this reverse computation does not account for clipping, but should */ /*provide somewhat reasonable numbers */ contrast_mult = - ((float)white - (float)black) / ((float)tvsetup.white_level[k] - - (float)tvsetup.black_level[k]); + ((float) white - (float) black) / ((float) tvsetup.white_level[k] - + (float) tvsetup.black_level[k]); brightness_off = - (int)(((float)black / contrast_mult) - tvsetup.black_level[k]); + (int) (((float) black / contrast_mult) - tvsetup.black_level[k]); /*+/-220 maps to 0-100. */ *p_brightness = - range_limit((int)(0.5f + ((float)(brightness_off + - 220) * 100.0f / 440.0f)), 0, 100); + range_limit((int) (0.5f + ((float) (brightness_off + + 220) * 100.0f / 440.0f)), 0, 100); /*.75-1.25 maps to 0-100. */ *p_contrast = - range_limit((int)(0.5f + ((float)(contrast_mult - - 0.75f) * 100.0f / 0.5f)), 0, 100); + range_limit((int) (0.5f + ((float) (contrast_mult - + 0.75f) * 100.0f / 0.5f)), 0, 100); } /*==========================================================================*/ @@ -2702,7 +2711,8 @@ config_yc_filter(unsigned long tv_std, int luma_filter, int chroma_filter) if (chroma_filter) { reg07 &= ~0x08; reg34 &= ~0x20; - } else { + } + else { reg07 |= 0x08; reg34 |= 0x20; } @@ -2742,17 +2752,16 @@ static void config_macrovision(unsigned long tv_std, unsigned int trigger_bits) { /*Constants to index into mvsetup columns.*/ -#define nNTSC_APS00 0 /*ntsc mv off. */ -#define nNTSC_APS01 1 /*ntsc AGC only. */ -#define nNTSC_APS10 2 /*ntsc AGC + 2-line CS. */ -#define nNTSC_APS11 3 /*ntsc AGC + 4-line CS. */ -#define nPAL_APS00 4 /*pal mv off. */ -#define nPAL_APSXX 5 /*pal mv on. */ +#define nNTSC_APS00 0 /*ntsc mv off. */ +#define nNTSC_APS01 1 /*ntsc AGC only. */ +#define nNTSC_APS10 2 /*ntsc AGC + 2-line CS. */ +#define nNTSC_APS11 3 /*ntsc AGC + 4-line CS. */ +#define nPAL_APS00 4 /*pal mv off. */ +#define nPAL_APSXX 5 /*pal mv on. */ #define nMVModes 6 /*Macrovision setup table. */ - static const struct mvparms - { + static const struct mvparms { unsigned short n0[nMVModes]; unsigned short n1[nMVModes]; unsigned short n2[nMVModes]; @@ -2778,9 +2787,7 @@ config_macrovision(unsigned long tv_std, unsigned int trigger_bits) unsigned short n22[nMVModes]; unsigned short agc_pulse_level[nMVModes]; unsigned short bp_pulse_level[nMVModes]; - } - - mvsetup = { + } mvsetup = { /* ntsc ntsc ntsc ntsc pal pal */ /* MV AGC AGC + AGC + MV MV */ /* off. only 2-line 4-line off. on. */ @@ -2849,22 +2856,27 @@ config_macrovision(unsigned long tv_std, unsigned int trigger_bits) if (trigger_bits == 0) { /*turn Macrovision OFF. */ nMode = nNTSC_APS00; - } else if (trigger_bits == 1) { + } + else if (trigger_bits == 1) { /*AGC Only. */ nMode = nNTSC_APS01; - } else if (trigger_bits == 2) { + } + else if (trigger_bits == 2) { /*AGC + 2-line CS. */ nMode = nNTSC_APS10; - } else { + } + else { /*AGC + 4-line CS. */ nMode = nNTSC_APS11; } - } else { + } + else { /*PAL TV Standard. */ if (trigger_bits == 0) { /*turn Macrovision OFF. */ nMode = nPAL_APS00; - } else { + } + else { /*APS 01, 10, or 11. */ nMode = nPAL_APSXX; } @@ -2943,15 +2955,16 @@ conget_macrovision(unsigned long tv_std, unsigned int *p_cp_trigger_bits) break; case 0x3E: - { - if (0x1D == n1) - *p_cp_trigger_bits = 2; - else - *p_cp_trigger_bits = 3; - } + { + if (0x1D == n1) + *p_cp_trigger_bits = 2; + else + *p_cp_trigger_bits = 3; + } break; } - } else if (IS_PAL(tv_std)) { + } + else if (IS_PAL(tv_std)) { if (0 == n0) *p_cp_trigger_bits = 0; else { @@ -3178,7 +3191,7 @@ PLAL_PrepForTVout(void) WriteGx(CX_TV_CONFIG, reg); /*invert FP clock */ - reg = (int)ReadGx(CX_TV_CONFIG); + reg = (int) ReadGx(CX_TV_CONFIG); reg |= CX_INVERT_FPCLK; WriteGx(CX_TV_CONFIG, reg); @@ -3240,12 +3253,12 @@ PLAL_FinalEnableTVout(unsigned long vga_mode) unsigned int reg; /*Cx5530 select tv dot clock. */ - reg = (int)ReadGx(CX_DOT_CLK); + reg = (int) ReadGx(CX_DOT_CLK); reg |= CX_TVCLK_SELECT; WriteGx(CX_DOT_CLK, reg); /*2 x dclk (actually 1x) */ - reg = (int)ReadGx(DC_GENERAL_CFG); + reg = (int) ReadGx(DC_GENERAL_CFG); reg &= ~GX_DCLK_MUL; WriteGx(DC_GENERAL_CFG, reg); @@ -3253,7 +3266,7 @@ PLAL_FinalEnableTVout(unsigned long vga_mode) WriteGx(DC_GENERAL_CFG, reg); /*Cx5530 display configuration register. */ - reg = (int)ReadGx(CX_DISPLAY_CONFIG); + reg = (int) ReadGx(CX_DISPLAY_CONFIG); reg |= (CX_FPVSYNC_POL | CX_FPHSYNC_POL | CX_FPDATA_ENB | CX_FPPOWER_ENB); WriteGx(CX_DISPLAY_CONFIG, reg); diff --git a/driver/xf86-video-geode/src/gfx/tv_fs450.h b/driver/xf86-video-geode/src/gfx/tv_fs450.h index 7e917c035..4da7a215c 100644 --- a/driver/xf86-video-geode/src/gfx/tv_fs450.h +++ b/driver/xf86-video-geode/src/gfx/tv_fs450.h @@ -31,8 +31,7 @@ #define __FS450_H__ #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /*==========================================================================*/ @@ -171,8 +170,7 @@ extern "C" #define SOURCE_HOUSTON 0 #define SOURCE_GCC 1 - typedef struct _S_REG_INFO - { + typedef struct _S_REG_INFO { int source; unsigned int size; unsigned long offset; @@ -202,5 +200,4 @@ extern "C" #ifdef __cplusplus } #endif - #endif diff --git a/driver/xf86-video-geode/src/gfx/vga_gu1.c b/driver/xf86-video-geode/src/gfx/vga_gu1.c index 20cf232eb..8cbfe4f6f 100644 --- a/driver/xf86-video-geode/src/gfx/vga_gu1.c +++ b/driver/xf86-video-geode/src/gfx/vga_gu1.c @@ -60,189 +60,189 @@ int gu1_detect_vsa2(void); gfx_vga_struct gfx_vga_modes[] = { /*--------------------------------------------------------------------------*/ { - 640, 480, 60, /* 640x480 */ - 25, /* 25 MHz clock = 60 Hz refresh rate */ - 0xE3, /* miscOutput register */ - { - 0x5F, 0x4F, 0x50, 0x82, 0x54, 0x80, 0x0B, 0x3E, - /* standard CRTC */ - 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xEA, 0x0C, 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00} - }, + 640, 480, 60, /* 640x480 */ + 25, /* 25 MHz clock = 60 Hz refresh rate */ + 0xE3, /* miscOutput register */ + { + 0x5F, 0x4F, 0x50, 0x82, 0x54, 0x80, 0x0B, 0x3E, + /* standard CRTC */ + 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xEA, 0x0C, 0xDF, 0x50, 0x00, 0xE7, 0x04, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 640, 480, 72, /* 640x480 */ - 29, /* 29 MHz clock = 72 Hz refresh rate */ - 0xE3, /* miscOutput register */ - { - 0x63, 0x4f, 0x50, 0x86, 0x55, 0x99, 0x06, 0x3e, - /* standard CRTC */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xe9, 0x0c, 0xdf, 0x00, 0x00, 0xe7, 0x00, 0xe3, 0xff}, - { - 0x6D, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x01, 0x08, 0x80, 0x1F, 0x00, 0x4B} - }, + 640, 480, 72, /* 640x480 */ + 29, /* 29 MHz clock = 72 Hz refresh rate */ + 0xE3, /* miscOutput register */ + { + 0x63, 0x4f, 0x50, 0x86, 0x55, 0x99, 0x06, 0x3e, + /* standard CRTC */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe9, 0x0c, 0xdf, 0x00, 0x00, 0xe7, 0x00, 0xe3, 0xff}, + { + 0x6D, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x01, 0x08, 0x80, 0x1F, 0x00, 0x4B} + }, /*--------------------------------------------------------------------------*/ { - 640, 480, 75, /* 640x480 */ - 31, - /* 31.5 MHz clock = 75 Hz refresh rate */ - 0xE3, /* miscOutput register */ - { - 0x64, 0x4F, 0x4F, 0x88, 0x54, 0x9B, 0xF2, 0x1F, - /* standard CRTC */ - 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xE1, 0x04, 0xDF, 0x50, 0x00, 0xDF, 0xF3, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x1F, 0x00, 0x00} - }, + 640, 480, 75, /* 640x480 */ + 31, + /* 31.5 MHz clock = 75 Hz refresh rate */ + 0xE3, /* miscOutput register */ + { + 0x64, 0x4F, 0x4F, 0x88, 0x54, 0x9B, 0xF2, 0x1F, + /* standard CRTC */ + 0x80, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xE1, 0x04, 0xDF, 0x50, 0x00, 0xDF, 0xF3, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x1F, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 800, 600, 60, /* 800x600 */ - 40, /* 40 MHz clock = 60 Hz refresh rate */ - 0x23, /* miscOutput register */ - { - 0x7F, 0x63, 0x64, 0x82, 0x6B, 0x1B, 0x72, 0xF0, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x59, 0x0D, 0x57, 0x64, 0x00, 0x57, 0x73, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x28, 0x00, 0x00} - }, + 800, 600, 60, /* 800x600 */ + 40, /* 40 MHz clock = 60 Hz refresh rate */ + 0x23, /* miscOutput register */ + { + 0x7F, 0x63, 0x64, 0x82, 0x6B, 0x1B, 0x72, 0xF0, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x59, 0x0D, 0x57, 0x64, 0x00, 0x57, 0x73, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x28, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 800, 600, 72, /* 800x600 */ - 47, /* 47 MHz clock = 72 Hz refresh rate */ - 0x2B, /* miscOutput register */ - { - 0x7D, 0x63, 0x63, 0x81, 0x6D, 0x1B, 0x98, 0xF0, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x7D, 0x03, 0x57, 0x00, 0x00, 0x57, 0x9A, 0xE3, 0xFF}, - { - 0x6F, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x01, 0x08, 0x80, 0x32, 0x00, 0x4B} - }, + 800, 600, 72, /* 800x600 */ + 47, /* 47 MHz clock = 72 Hz refresh rate */ + 0x2B, /* miscOutput register */ + { + 0x7D, 0x63, 0x63, 0x81, 0x6D, 0x1B, 0x98, 0xF0, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x7D, 0x03, 0x57, 0x00, 0x00, 0x57, 0x9A, 0xE3, 0xFF}, + { + 0x6F, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x01, 0x08, 0x80, 0x32, 0x00, 0x4B} + }, /*--------------------------------------------------------------------------*/ { - 800, 600, 75, /* 800x600 */ - 49, - /* 49.5 MHz clock = 75 Hz refresh rate */ - 0x23, /* miscOutput register */ - { - 0x7F, 0x63, 0x63, 0x83, 0x68, 0x11, 0x6F, 0xF0, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x59, 0x1C, 0x57, 0x64, 0x00, 0x57, 0x70, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x31, 0x00, 0x00} - }, + 800, 600, 75, /* 800x600 */ + 49, + /* 49.5 MHz clock = 75 Hz refresh rate */ + 0x23, /* miscOutput register */ + { + 0x7F, 0x63, 0x63, 0x83, 0x68, 0x11, 0x6F, 0xF0, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x59, 0x1C, 0x57, 0x64, 0x00, 0x57, 0x70, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x31, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 1024, 768, 60, /* 1024x768 */ - 65, /* 65 MHz clock = 60 Hz refresh rate */ - 0xE3, /* miscOutput register */ - { - 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96, 0x24, 0xF5, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x04, 0x0A, 0xFF, 0x80, 0x00, 0xFF, 0x25, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x41, 0x00, 0x00} - }, + 1024, 768, 60, /* 1024x768 */ + 65, /* 65 MHz clock = 60 Hz refresh rate */ + 0xE3, /* miscOutput register */ + { + 0xA3, 0x7F, 0x80, 0x86, 0x85, 0x96, 0x24, 0xF5, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x04, 0x0A, 0xFF, 0x80, 0x00, 0xFF, 0x25, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x41, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 1024, 768, 70, /* 1024x768 */ - 76, /* 76 MHz clock = 70 Hz refresh rate */ - 0x2B, /* miscOutput register */ - { - 0xA1, 0x7F, 0x7F, 0x85, 0x85, 0x95, 0x24, 0xF5, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x03, 0x09, 0xFF, 0x00, 0x00, 0xFF, 0x26, 0xE3, 0xFF}, - { - 0x62, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x01, 0x02, 0x80, 0x4B, 0x00, 0x4B} - }, + 1024, 768, 70, /* 1024x768 */ + 76, /* 76 MHz clock = 70 Hz refresh rate */ + 0x2B, /* miscOutput register */ + { + 0xA1, 0x7F, 0x7F, 0x85, 0x85, 0x95, 0x24, 0xF5, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x09, 0xFF, 0x00, 0x00, 0xFF, 0x26, 0xE3, 0xFF}, + { + 0x62, 0x00, 0x00, 0x03, 0x00, 0x01, 0x01, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x01, 0x02, 0x80, 0x4B, 0x00, 0x4B} + }, /*--------------------------------------------------------------------------*/ { - 1024, 768, 75, /* 1024x768 */ - 79, /* 79 MHz clock = 75 Hz refresh rate */ - 0xE3, /* miscOutput register */ - { - 0x9F, 0x7F, 0x7F, 0x83, 0x84, 0x8F, 0x1E, 0xF5, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x04, 0xFF, 0x80, 0x00, 0xFF, 0x1F, 0xE3, 0xFF}, - { - 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x4F, 0x00, 0x00} - }, + 1024, 768, 75, /* 1024x768 */ + 79, /* 79 MHz clock = 75 Hz refresh rate */ + 0xE3, /* miscOutput register */ + { + 0x9F, 0x7F, 0x7F, 0x83, 0x84, 0x8F, 0x1E, 0xF5, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x04, 0xFF, 0x80, 0x00, 0xFF, 0x1F, 0xE3, 0xFF}, + { + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x4F, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 1280, 1024, 60, /* 1280x1024 */ - 108, - /* 108 MHz clock = 60 Hz refresh rate */ - 0x23, /* miscOutput register */ - { - 0xCF, 0x9F, 0xA0, 0x92, 0xAA, 0x19, 0x28, 0x52, - /* standard CRTC */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF}, - { - 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x6C, 0x00, 0x00} - }, + 1280, 1024, 60, /* 1280x1024 */ + 108, + /* 108 MHz clock = 60 Hz refresh rate */ + 0x23, /* miscOutput register */ + { + 0xCF, 0x9F, 0xA0, 0x92, 0xAA, 0x19, 0x28, 0x52, + /* standard CRTC */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF}, + { + 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x6C, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 1280, 1024, 75, /* 1280x1024 */ - 135, - /* 135 MHz clock = 75 Hz refresh rate */ - 0x23, /* miscOutput register */ - { - 0xCE, 0x9F, 0x9F, 0x92, 0xA4, 0x15, 0x28, 0x52, - /* standard CRTC */ - 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF}, - { - 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x00, 0x03, 0x80, 0x87, 0x00, 0x00} - }, + 1280, 1024, 75, /* 1280x1024 */ + 135, + /* 135 MHz clock = 75 Hz refresh rate */ + 0x23, /* miscOutput register */ + { + 0xCE, 0x9F, 0x9F, 0x92, 0xA4, 0x15, 0x28, 0x52, + /* standard CRTC */ + 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x04, 0xFF, 0xA0, 0x00, 0x00, 0x29, 0xE3, 0xFF}, + { + 0x00, 0x51, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x00, 0x03, 0x80, 0x87, 0x00, 0x00} + }, /*--------------------------------------------------------------------------*/ { - 1280, 1024, 85, /* 1280x1024 */ - 159, - /* 159 MHz clock = 85 Hz refresh rate */ - 0x2B, /* miscOutput register */ - { - 0xD3, 0x9F, 0xA0, 0x98, 0xA8, 0x9C, 0x2E, 0x5A, - /* standard CRTC */ - 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x01, 0x04, 0xFF, 0x00, 0x00, 0xFF, 0x30, 0xE3, 0xFF}, - { - 0x6B, 0x41, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, - /* extended CRTC */ - 0x00, 0x00, 0x01, 0x00, 0x80, 0x9D, 0x00, 0x4B} - }, + 1280, 1024, 85, /* 1280x1024 */ + 159, + /* 159 MHz clock = 85 Hz refresh rate */ + 0x2B, /* miscOutput register */ + { + 0xD3, 0x9F, 0xA0, 0x98, 0xA8, 0x9C, 0x2E, 0x5A, + /* standard CRTC */ + 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x04, 0xFF, 0x00, 0x00, 0xFF, 0x30, 0xE3, 0xFF}, + { + 0x6B, 0x41, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, + /* extended CRTC */ + 0x00, 0x00, 0x01, 0x00, 0x80, 0x9D, 0x00, 0x4B} + }, /*--------------------------------------------------------------------------*/ }; @@ -314,7 +314,7 @@ gfx_vga_get_pci_command(void) unsigned long value; value = gfx_pci_config_read(0x80009404); - return ((unsigned char)value); + return ((unsigned char) value); } /*---------------------------------------------------------------------------- @@ -333,7 +333,7 @@ gfx_vga_set_pci_command(unsigned char command) unsigned long value; value = gfx_pci_config_read(0x80009404) & 0xFFFFFF00; - value |= (unsigned long)command; + value |= (unsigned long) command; gfx_pci_config_write(0x80009404, value); return (GFX_STATUS_OK); } @@ -351,7 +351,7 @@ int gfx_vga_seq_reset(int reset) { OUTB(0x3C4, 0); - OUTB(0x3C5, (unsigned char)(reset ? 0x00 : 0x03)); + OUTB(0x3C5, (unsigned char) (reset ? 0x00 : 0x03)); return (GFX_STATUS_OK); } @@ -377,7 +377,7 @@ gfx_vga_set_graphics_bits(void) /* SET GRAPHICS BIT IN ATTRIBUTE CONTROLLER REG 0x10 */ - INB(0x3BA); /* Reset flip-flop */ + INB(0x3BA); /* Reset flip-flop */ INB(0x3DA); OUTB(0x3C0, 0x10); OUTB(0x3C0, 0x01); @@ -409,15 +409,15 @@ gfx_vga_mode(gfx_vga_struct * vga, int xres, int yres, int bpp, int hz) /* SET PITCH TO 1K OR 2K */ /* CRTC_EXTENDED_OFFSET index is 0x45, so offset = 0x05 */ - pitch = (unsigned short)xres; + pitch = (unsigned short) xres; if (bpp > 8) pitch <<= 1; if (pitch <= 1024) pitch = 1024 >> 3; else pitch = 2048 >> 3; - vga->stdCRTCregs[0x13] = (unsigned char)pitch; - vga->extCRTCregs[0x05] = (unsigned char)((pitch >> 8) & 0x03); + vga->stdCRTCregs[0x13] = (unsigned char) pitch; + vga->extCRTCregs[0x05] = (unsigned char) ((pitch >> 8) & 0x03); /* SET PROPER COLOR DEPTH VALUE */ /* CRTC_EXTENDED_COLOR_CONTROL index is 0x46, so offset = 0x06 */ @@ -450,8 +450,8 @@ int gfx_vga_pitch(gfx_vga_struct * vga, unsigned short pitch) { pitch >>= 3; - vga->stdCRTCregs[0x13] = (unsigned char)pitch; - vga->extCRTCregs[0x05] = (unsigned char)((pitch >> 8) & 0x03); + vga->stdCRTCregs[0x13] = (unsigned char) pitch; + vga->extCRTCregs[0x05] = (unsigned char) ((pitch >> 8) & 0x03); return (0); } @@ -486,7 +486,7 @@ gfx_vga_save(gfx_vga_struct * vga, int flags) /* SAVE STANDARD CRTC REGISTERS */ for (i = 0; i < GFX_STD_CRTC_REGS; i++) { - OUTB(crtcindex, (unsigned char)i); + OUTB(crtcindex, (unsigned char) i); vga->stdCRTCregs[i] = INB(crtcdata); } } @@ -497,7 +497,7 @@ gfx_vga_save(gfx_vga_struct * vga, int flags) /* SAVE EXTENDED CRTC REGISTERS */ for (i = 0; i < GFX_EXT_CRTC_REGS; i++) { - OUTB(crtcindex, (unsigned char)(0x40 + i)); + OUTB(crtcindex, (unsigned char) (0x40 + i)); vga->extCRTCregs[i] = INB(crtcdata); } } @@ -524,7 +524,7 @@ gfx_vga_clear_extended(void) OUTB(crtcdata, 0x57); OUTB(crtcdata, 0x4C); for (i = 0x40; i <= 0x4F; i++) { - OUTB(crtcindex, (unsigned char)i); + OUTB(crtcindex, (unsigned char) i); OUTB(crtcdata, 0); } OUTB(crtcindex, 0x30); @@ -567,7 +567,7 @@ gfx_vga_restore(gfx_vga_struct * vga, int flags) /* RESTORE STANDARD CRTC REGISTERS */ for (i = 0; i < GFX_STD_CRTC_REGS; i++) { - OUTB(crtcindex, (unsigned char)i); + OUTB(crtcindex, (unsigned char) i); OUTB(crtcdata, vga->stdCRTCregs[i]); } } @@ -584,7 +584,7 @@ gfx_vga_restore(gfx_vga_struct * vga, int flags) /* RESTORE EXTENDED CRTC REGISTERS */ for (i = 0; i < GFX_EXT_CRTC_REGS; i++) { - OUTB(crtcindex, (unsigned char)(0x40 + i)); + OUTB(crtcindex, (unsigned char) (0x40 + i)); OUTB(crtcdata, vga->extCRTCregs[i]); } @@ -600,7 +600,7 @@ gfx_vga_restore(gfx_vga_struct * vga, int flags) /* This really should be another thing saved/restored, but */ /* Durango currently doesn't do the attr controller registers. */ - INB(0x3BA); /* Reset flip-flop */ + INB(0x3BA); /* Reset flip-flop */ INB(0x3DA); OUTB(0x3C0, 0x11); OUTB(0x3C0, 0x00); @@ -636,7 +636,7 @@ gfx_vga_mode_switch(int active) OUTB(crtcindex, CRTC_MODE_SWITCH_CONTROL); active = active ? 1 : 0; - OUTB(crtcdata, (unsigned char)active); + OUTB(crtcdata, (unsigned char) active); /* WAIT UNTIL SOFTVGA HAS VALIDATED MODE IF ENDING MODE SWITCH */ /* This is for VSA1 only, where SoftVGA waits until the next */ @@ -644,7 +644,7 @@ gfx_vga_mode_switch(int active) if ((!active) && (!(gu1_detect_vsa2()))) { OUTB(crtcindex, 0x33); - while (INB(crtcdata) & 0x80) ; + while (INB(crtcdata) & 0x80); } /* LOCK EXTENDED CRTC REGISTERS */ diff --git a/driver/xf86-video-geode/src/gfx/vid_1200.c b/driver/xf86-video-geode/src/gfx/vid_1200.c index 5eb5793ba..abc1b54d1 100644 --- a/driver/xf86-video-geode/src/gfx/vid_1200.c +++ b/driver/xf86-video-geode/src/gfx/vid_1200.c @@ -83,10 +83,9 @@ unsigned long gfx_gamma_ram_1200[] = { *---------------------------------------------------------------------------- */ -typedef struct tagSC1200PLL -{ - long frequency; /* 16.16 fixed point frequency */ - unsigned long clock_select; /* clock select register (0x2C) */ +typedef struct tagSC1200PLL { + long frequency; /* 16.16 fixed point frequency */ + unsigned long clock_select; /* clock select register (0x2C) */ } SC1200PLL; SC1200PLL gfx_sc1200_clock_table[] = { @@ -132,20 +131,20 @@ SC1200PLL gfx_sc1200_clock_table[] = { {(232L << 16) | ((0000L * 65536L) / 10000L), 0x0010AA04}, /* 232.50 */ /* Precomputed inidces in the hardware */ - {0x0018EC4D, 0x000F0000}, /* 24.923052 */ - {0x00192CCC, 0x00000000}, /* 25.1750 */ - {0x001B0000, 0x00300100}, /* 27.0000 */ - {0x001F8000, 0x00010000}, /* 31.5000 */ - {0x00240000, 0x00020000}, /* 36.0000 */ - {0x00280000, 0x00030000}, /* 40.0000 */ - {0x00318000, 0x00050000}, /* 49.5000 */ - {0x00320000, 0x00040000}, /* 50.0000 */ - {0x00384000, 0x00060000}, /* 56.2500 */ - {0x00410000, 0x00080000}, /* 65.0000 */ - {0x004E8000, 0x000A0000}, /* 78.5000 */ - {0x005E8000, 0x000B0000}, /* 94.5000 */ - {0x006C0000, 0x000C0000}, /* 108.0000 */ - {0x00870000, 0x000D0000}, /* 135.0000 */ + {0x0018EC4D, 0x000F0000}, /* 24.923052 */ + {0x00192CCC, 0x00000000}, /* 25.1750 */ + {0x001B0000, 0x00300100}, /* 27.0000 */ + {0x001F8000, 0x00010000}, /* 31.5000 */ + {0x00240000, 0x00020000}, /* 36.0000 */ + {0x00280000, 0x00030000}, /* 40.0000 */ + {0x00318000, 0x00050000}, /* 49.5000 */ + {0x00320000, 0x00040000}, /* 50.0000 */ + {0x00384000, 0x00060000}, /* 56.2500 */ + {0x00410000, 0x00080000}, /* 65.0000 */ + {0x004E8000, 0x000A0000}, /* 78.5000 */ + {0x005E8000, 0x000B0000}, /* 94.5000 */ + {0x006C0000, 0x000C0000}, /* 108.0000 */ + {0x00870000, 0x000D0000}, /* 135.0000 */ }; #define NUM_SC1200_FREQUENCIES \ @@ -186,10 +185,10 @@ gfx_reset_video(void) gfx_set_display_video_size(0, 0); if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); } } @@ -222,11 +221,11 @@ gfx_set_display_control(int sync_polarities) dcfg = READ_VID32(SC1200_DISPLAY_CONFIG); dcfg &= ~(SC1200_DCFG_CRT_SYNC_SKW_MASK | SC1200_DCFG_PWR_SEQ_DLY_MASK | - SC1200_DCFG_CRT_HSYNC_POL | SC1200_DCFG_CRT_VSYNC_POL | - SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN); + SC1200_DCFG_CRT_HSYNC_POL | SC1200_DCFG_CRT_VSYNC_POL | + SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN); dcfg |= (SC1200_DCFG_CRT_SYNC_SKW_INIT | - SC1200_DCFG_PWR_SEQ_DLY_INIT | SC1200_DCFG_GV_PAL_BYP); + SC1200_DCFG_PWR_SEQ_DLY_INIT | SC1200_DCFG_GV_PAL_BYP); if (PanelEnable) dcfg |= SC1200_DCFG_FP_PWR_EN; @@ -267,11 +266,11 @@ gfx_set_clock_frequency(unsigned long frequency) /* Search the table for the closest frequency (16.16 format). */ value = gfx_sc1200_clock_table[0].clock_select; - min = (long)gfx_sc1200_clock_table[0].frequency - frequency; + min = (long) gfx_sc1200_clock_table[0].frequency - frequency; if (min < 0L) min = -min; for (index = 1; index < NUM_SC1200_FREQUENCIES; index++) { - diff = (long)gfx_sc1200_clock_table[index].frequency - frequency; + diff = (long) gfx_sc1200_clock_table[index].frequency - frequency; if (diff < 0L) diff = -diff; if (diff < min) { @@ -338,30 +337,31 @@ gfx_set_crt_enable(int enable) */ switch (enable) { - case CRT_DISABLE: /* HSync:Off VSync:Off */ + case CRT_DISABLE: /* HSync:Off VSync:Off */ WRITE_VID32(SC1200_DISPLAY_CONFIG, config & ~(SC1200_DCFG_HSYNC_EN - | SC1200_DCFG_VSYNC_EN | SC1200_DCFG_DAC_BL_EN)); + | SC1200_DCFG_VSYNC_EN | + SC1200_DCFG_DAC_BL_EN)); WRITE_VID32(SC1200_VID_MISC, misc | SC1200_DAC_POWER_DOWN); break; - case CRT_ENABLE: /* Enable CRT display, including - * display logic */ + case CRT_ENABLE: /* Enable CRT display, including + * display logic */ WRITE_VID32(SC1200_DISPLAY_CONFIG, config | SC1200_DCFG_HSYNC_EN - | SC1200_DCFG_VSYNC_EN | SC1200_DCFG_DAC_BL_EN); + | SC1200_DCFG_VSYNC_EN | SC1200_DCFG_DAC_BL_EN); WRITE_VID32(SC1200_VID_MISC, misc & ~SC1200_DAC_POWER_DOWN); /* ENABLE GRAPHICS DISPLAY LOGIC */ gfx_set_screen_enable(1); break; - case CRT_STANDBY: /* HSync:Off VSync:On */ + case CRT_STANDBY: /* HSync:Off VSync:On */ WRITE_VID32(SC1200_DISPLAY_CONFIG, (config & ~(SC1200_DCFG_HSYNC_EN - | SC1200_DCFG_DAC_BL_EN)) - | SC1200_DCFG_VSYNC_EN); + | SC1200_DCFG_DAC_BL_EN)) + | SC1200_DCFG_VSYNC_EN); WRITE_VID32(SC1200_VID_MISC, misc | SC1200_DAC_POWER_DOWN); break; - case CRT_SUSPEND: /* HSync:On VSync:Off */ + case CRT_SUSPEND: /* HSync:On VSync:Off */ WRITE_VID32(SC1200_DISPLAY_CONFIG, (config & ~(SC1200_DCFG_VSYNC_EN - | SC1200_DCFG_DAC_BL_EN)) - | SC1200_DCFG_HSYNC_EN); + | SC1200_DCFG_DAC_BL_EN)) + | SC1200_DCFG_HSYNC_EN); WRITE_VID32(SC1200_VID_MISC, misc | SC1200_DAC_POWER_DOWN); break; default: @@ -391,9 +391,9 @@ gfx_set_video_enable(int enable) if (gfx_test_timing_active()) { if (!gfx_test_vertical_active()) { - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); } - while (gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); } vcfg = READ_VID32(SC1200_VIDEO_CONFIG); @@ -402,7 +402,8 @@ gfx_set_video_enable(int enable) vcfg |= SC1200_VCFG_VID_EN; WRITE_VID32(SC1200_VIDEO_CONFIG, vcfg); - } else { + } + else { /* DISABLE SC1200 VIDEO OVERLAY */ vcfg &= ~SC1200_VCFG_VID_EN; @@ -531,7 +532,7 @@ gfx_set_video_size(unsigned short width, unsigned short height) /* Use private routine to abstract the display controller. */ /* Add 1 line to bypass issue #803 */ - gfx_set_display_video_size(width, (unsigned short)(height + 2)); + gfx_set_display_video_size(width, (unsigned short) (height + 2)); return (0); } @@ -571,11 +572,11 @@ gfx_set_video_offset(unsigned long offset) #if GFX_VIDEO_DYNAMIC int sc1200_set_video_upscale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #else int gfx_set_video_upscale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #endif { unsigned long xscale, yscale; @@ -625,7 +626,7 @@ gfx_set_video_upscale(unsigned short srcw, unsigned short srch, /* amount of data that needs to be transferred. */ gfx_set_video_window(gfx_vid_xpos, gfx_vid_ypos, gfx_vid_width, - gfx_vid_height); + gfx_vid_height); return (0); } @@ -639,11 +640,11 @@ gfx_set_video_upscale(unsigned short srcw, unsigned short srch, #if GFX_VIDEO_DYNAMIC int sc1200_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #else int gfx_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #endif { return gfx_set_video_upscale(srcw, srch, dstw, dsth); @@ -673,7 +674,7 @@ gfx_set_video_downscale_config(unsigned short type, unsigned short m) downscale = READ_VID32(SC1200_VIDEO_DOWNSCALER_CONTROL); downscale &= ~(SC1200_VIDEO_DOWNSCALE_FACTOR_MASK | - SC1200_VIDEO_DOWNSCALE_TYPE_MASK); + SC1200_VIDEO_DOWNSCALE_TYPE_MASK); downscale |= ((m - 1l) << SC1200_VIDEO_DOWNSCALE_FACTOR_POS); switch (type) { case VIDEO_DOWNSCALE_KEEP_1_OF: @@ -698,21 +699,24 @@ gfx_set_video_downscale_config(unsigned short type, unsigned short m) #if GFX_VIDEO_DYNAMIC int sc1200_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4) + unsigned short coef2, + unsigned short coef3, + unsigned short coef4) #else int gfx_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4) + unsigned short coef2, unsigned short coef3, + unsigned short coef4) #endif { if ((coef1 + coef2 + coef3 + coef4) != 16) return GFX_STATUS_BAD_PARAMETER; WRITE_VID32(SC1200_VIDEO_DOWNSCALER_COEFFICIENTS, - ((unsigned long)coef1 << SC1200_VIDEO_DOWNSCALER_COEF1_POS) | - ((unsigned long)coef2 << SC1200_VIDEO_DOWNSCALER_COEF2_POS) | - ((unsigned long)coef3 << SC1200_VIDEO_DOWNSCALER_COEF3_POS) | - ((unsigned long)coef4 << SC1200_VIDEO_DOWNSCALER_COEF4_POS)); + ((unsigned long) coef1 << SC1200_VIDEO_DOWNSCALER_COEF1_POS) | + ((unsigned long) coef2 << SC1200_VIDEO_DOWNSCALER_COEF2_POS) | + ((unsigned long) coef3 << SC1200_VIDEO_DOWNSCALER_COEF3_POS) | + ((unsigned long) coef4 << SC1200_VIDEO_DOWNSCALER_COEF4_POS)); return (0); } @@ -786,37 +790,37 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) /* HORIZONTAL START */ - xstart = (unsigned long)x + hadjust; + xstart = (unsigned long) x + hadjust; /* HORIZONTAL END */ /* End positions in register are non-inclusive (one more than the actual * end) */ if ((x + w) < gfx_get_hactive()) - xend = (unsigned long)x + (unsigned long)w + hadjust; - else /* right clipping needed */ - xend = (unsigned long)gfx_get_hactive() + hadjust; + xend = (unsigned long) x + (unsigned long) w + hadjust; + else /* right clipping needed */ + xend = (unsigned long) gfx_get_hactive() + hadjust; /* VERTICAL START */ - ystart = (unsigned long)y + vadjust; + ystart = (unsigned long) y + vadjust; /* VERTICAL END */ if ((y + h) < gfx_get_vactive()) - yend = (unsigned long)y + (unsigned long)h + vadjust; - else /* bottom clipping needed */ - yend = (unsigned long)gfx_get_vactive() + vadjust; + yend = (unsigned long) y + (unsigned long) h + vadjust; + else /* bottom clipping needed */ + yend = (unsigned long) gfx_get_vactive() + vadjust; /* SET VIDEO LINE INVERT BIT */ control = READ_VID32(SC1200_VID_ALPHA_CONTROL); if (y & 0x1) WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - control | SC1200_VIDEO_LINE_OFFSET_ODD); + control | SC1200_VIDEO_LINE_OFFSET_ODD); else WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - control & ~SC1200_VIDEO_LINE_OFFSET_ODD); + control & ~SC1200_VIDEO_LINE_OFFSET_ODD); /* SET VIDEO POSITION */ @@ -849,7 +853,7 @@ gfx_set_video_left_crop(unsigned short x) /* Adjust initial read for scale, checking for divide by zero */ if (gfx_vid_dstw) - initread = (unsigned long)x *gfx_vid_srcw / gfx_vid_dstw; + initread = (unsigned long) x *gfx_vid_srcw / gfx_vid_dstw; else initread = 0l; @@ -879,8 +883,7 @@ gfx_set_video_left_crop(unsigned short x) */ #if GFX_VIDEO_DYNAMIC int -sc1200_set_video_color_key(unsigned long key, unsigned long mask, - int graphics) +sc1200_set_video_color_key(unsigned long key, unsigned long mask, int graphics) #else int gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics) @@ -956,9 +959,9 @@ gfx_set_video_palette(unsigned long *palette) if (gfx_test_timing_active()) { if (gfx_test_vertical_active()) { - while (gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); } - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); } /* LOAD SC1200 VIDEO PALETTE */ @@ -1012,9 +1015,9 @@ gfx_set_video_palette_entry(unsigned long index, unsigned long palette) if (gfx_test_timing_active()) { if (gfx_test_vertical_active()) { - while (gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); } - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); } /* SET A SINGLE ENTRY */ @@ -1091,8 +1094,8 @@ gfx_set_video_request(short x, short y) return GFX_STATUS_BAD_PARAMETER; WRITE_VID32(SC1200_VIDEO_REQUEST, - ((unsigned long)x << SC1200_VIDEO_X_REQUEST_POS) | ((unsigned long)y - << SC1200_VIDEO_Y_REQUEST_POS)); + ((unsigned long) x << SC1200_VIDEO_X_REQUEST_POS) | + ((unsigned long) y << SC1200_VIDEO_Y_REQUEST_POS)); return (0); } @@ -1118,13 +1121,13 @@ gfx_set_video_source(VideoSourceType source) switch (source) { case VIDEO_SOURCE_MEMORY: WRITE_VID32(SC1200_VIDEO_DISPLAY_MODE, - (display_mode & ~SC1200_VIDEO_SOURCE_MASK) | - SC1200_VIDEO_SOURCE_GX1); + (display_mode & ~SC1200_VIDEO_SOURCE_MASK) | + SC1200_VIDEO_SOURCE_GX1); break; case VIDEO_SOURCE_DVIP: WRITE_VID32(SC1200_VIDEO_DISPLAY_MODE, - (display_mode & ~SC1200_VIDEO_SOURCE_MASK) | - SC1200_VIDEO_SOURCE_DVIP); + (display_mode & ~SC1200_VIDEO_SOURCE_MASK) | + SC1200_VIDEO_SOURCE_DVIP); break; default: return GFX_STATUS_BAD_PARAMETER; @@ -1154,12 +1157,13 @@ gfx_set_vbi_source(VbiSourceType source) switch (source) { case VBI_SOURCE_MEMORY: WRITE_VID32(SC1200_VIDEO_DISPLAY_MODE, - (display_mode & ~SC1200_VBI_SOURCE_MASK) | SC1200_VBI_SOURCE_GX1); + (display_mode & ~SC1200_VBI_SOURCE_MASK) | + SC1200_VBI_SOURCE_GX1); break; case VBI_SOURCE_DVIP: WRITE_VID32(SC1200_VIDEO_DISPLAY_MODE, - (display_mode & ~SC1200_VBI_SOURCE_MASK) | - SC1200_VBI_SOURCE_DVIP); + (display_mode & ~SC1200_VBI_SOURCE_MASK) | + SC1200_VBI_SOURCE_DVIP); break; default: return GFX_STATUS_BAD_PARAMETER; @@ -1183,9 +1187,9 @@ gfx_set_vbi_lines(unsigned long even, unsigned long odd) { /* SET SC1200 VBI LINES */ WRITE_VID32(SC1200_VIDEO_EVEN_VBI_LINE_ENABLE, - even & SC1200_VIDEO_VBI_LINE_ENABLE_MASK); + even & SC1200_VIDEO_VBI_LINE_ENABLE_MASK); WRITE_VID32(SC1200_VIDEO_ODD_VBI_LINE_ENABLE, - odd & SC1200_VIDEO_VBI_LINE_ENABLE_MASK); + odd & SC1200_VIDEO_VBI_LINE_ENABLE_MASK); return (0); } @@ -1206,9 +1210,9 @@ gfx_set_vbi_total(unsigned long even, unsigned long odd) { /* SET SC1200 VBI TOTAL */ WRITE_VID32(SC1200_VIDEO_EVEN_VBI_TOTAL_COUNT, - even & SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); + even & SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); WRITE_VID32(SC1200_VIDEO_ODD_VBI_TOTAL_COUNT, - odd & SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); + odd & SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); return (0); } @@ -1233,10 +1237,10 @@ gfx_set_video_interlaced(int enable) /* SET INTERLACED VIDEO */ if (enable) WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - control | SC1200_VIDEO_IS_INTERLACED); + control | SC1200_VIDEO_IS_INTERLACED); else WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - control & ~SC1200_VIDEO_IS_INTERLACED); + control & ~SC1200_VIDEO_IS_INTERLACED); return (0); } @@ -1274,7 +1278,8 @@ gfx_set_color_space_YUV(int enable) if (control & SC1200_VIDEO_INPUT_IS_RGB) return (GFX_STATUS_UNSUPPORTED); /* Can't convert video from * RGB to YUV */ - } else { + } + else { /* RGB BLENDING */ control &= ~SC1200_CSC_GFX_RGB_TO_YUV; /* Leave graphics in RGB */ @@ -1314,12 +1319,14 @@ gfx_set_vertical_scaler_offset(char offset) /* Set shifting value */ control |= SC1200_VERTICAL_SCALER_SHIFT_EN; /* Enable odd frame shifting */ - } else if (offset == 0) { + } + else if (offset == 0) { control &= ~SC1200_VERTICAL_SCALER_SHIFT_EN; /* No shifting occurs */ control &= ~SC1200_VERTICAL_SCALER_SHIFT_MASK; /* Clear shifting value */ - } else + } + else return (GFX_STATUS_BAD_PARAMETER); /* TODO: how to program other values ? */ WRITE_VID32(SC1200_VID_ALPHA_CONTROL, control); @@ -1451,18 +1458,20 @@ gfx_set_genlock_enable(int flags) #if GFX_VIDEO_DYNAMIC int sc1200_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2) + unsigned short select_color2, unsigned long color1, + unsigned long color2) #else int gfx_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2) + unsigned short select_color2, unsigned long color1, + unsigned long color2) #endif { if (select_color2 > SC1200_CURSOR_COLOR_BITS) return GFX_STATUS_BAD_PARAMETER; key = - (key & SC1200_COLOR_MASK) | ((unsigned long)select_color2 << - SC1200_CURSOR_COLOR_KEY_OFFSET_POS); + (key & SC1200_COLOR_MASK) | ((unsigned long) select_color2 << + SC1200_CURSOR_COLOR_KEY_OFFSET_POS); WRITE_VID32(SC1200_CURSOR_COLOR_KEY, key); WRITE_VID32(SC1200_CURSOR_COLOR_MASK, mask); WRITE_VID32(SC1200_CURSOR_COLOR_1, color1); @@ -1488,7 +1497,7 @@ gfx_set_alpha_enable(int enable) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = SC1200_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 4); + address = SC1200_ALPHA_CONTROL_1 + ((unsigned long) gfx_alpha_select << 4); value = READ_VID32(address); if (enable) value |= (SC1200_ACTRL_WIN_ENABLE | SC1200_ACTRL_LOAD_ALPHA); @@ -1509,11 +1518,11 @@ gfx_set_alpha_enable(int enable) #if GFX_VIDEO_DYNAMIC int sc1200_set_alpha_window(short x, short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #else int gfx_set_alpha_window(short x, short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #endif { unsigned long address = 0; @@ -1532,15 +1541,15 @@ gfx_set_alpha_window(short x, short y, if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = SC1200_ALPHA_XPOS_1 + ((unsigned long)gfx_alpha_select << 4); + address = SC1200_ALPHA_XPOS_1 + ((unsigned long) gfx_alpha_select << 4); /* End positions in register are non-inclusive (one more than the actual * end) */ - WRITE_VID32(address, (unsigned long)x | - ((unsigned long)(x + width) << 16)); - WRITE_VID32(address + 4l, (unsigned long)y | - ((unsigned long)(y + height) << 16)); + WRITE_VID32(address, (unsigned long) x | + ((unsigned long) (x + width) << 16)); + WRITE_VID32(address + 4l, (unsigned long) y | + ((unsigned long) (y + height) << 16)); return (GFX_STATUS_OK); } @@ -1565,11 +1574,11 @@ gfx_set_alpha_value(unsigned char alpha, char delta) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = SC1200_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 4); + address = SC1200_ALPHA_CONTROL_1 + ((unsigned long) gfx_alpha_select << 4); value = READ_VID32(address); - value &= SC1200_ACTRL_WIN_ENABLE; /* keep only enable bit */ - value |= (unsigned long)alpha; - value |= (((unsigned long)delta) & 0xff) << 8; + value &= SC1200_ACTRL_WIN_ENABLE; /* keep only enable bit */ + value |= (unsigned long) alpha; + value |= (((unsigned long) delta) & 0xff) << 8; value |= SC1200_ACTRL_LOAD_ALPHA; WRITE_VID32(address, value); @@ -1580,12 +1589,12 @@ gfx_set_alpha_value(unsigned char alpha, char delta) /* WAIT FOR VERTICAL BLANK TO END */ if (gfx_test_timing_active()) { if (gfx_test_vertical_active()) - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); } new_value = - (unsigned char)((READ_VID32(SC1200_ALPHA_WATCH) >> - (gfx_alpha_select << 3)) & 0xff); + (unsigned char) ((READ_VID32(SC1200_ALPHA_WATCH) >> + (gfx_alpha_select << 3)) & 0xff); if (new_value == alpha) return GFX_STATUS_OK; if (++loop > 10) @@ -1619,7 +1628,7 @@ gfx_set_alpha_priority(int priority) value = READ_VID32(SC1200_VID_ALPHA_CONTROL); pos = 16 + (gfx_alpha_select << 1); value &= ~(0x03l << pos); - value |= (unsigned long)priority << pos; + value |= (unsigned long) priority << pos; WRITE_VID32(SC1200_VID_ALPHA_CONTROL, value); return (GFX_STATUS_OK); } @@ -1647,7 +1656,7 @@ gfx_set_alpha_color(unsigned long color) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = SC1200_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 4); + address = SC1200_ALPHA_COLOR_1 + ((unsigned long) gfx_alpha_select << 4); /* ONLY 24 VALID BITS */ color &= 0xffffffl; @@ -1676,7 +1685,7 @@ gfx_set_alpha_color_enable(int enable) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = SC1200_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 4); + address = SC1200_ALPHA_COLOR_1 + ((unsigned long) gfx_alpha_select << 4); color = READ_VID32(address); if (enable) color |= SC1200_ALPHA_COLOR_ENABLE; @@ -1712,10 +1721,10 @@ gfx_set_no_ck_outside_alpha(int enable) value = READ_VID32(SC1200_VID_ALPHA_CONTROL); if (enable) WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - value | SC1200_NO_CK_OUTSIDE_ALPHA); + value | SC1200_NO_CK_OUTSIDE_ALPHA); else WRITE_VID32(SC1200_VID_ALPHA_CONTROL, - value & ~SC1200_NO_CK_OUTSIDE_ALPHA); + value & ~SC1200_NO_CK_OUTSIDE_ALPHA); return (0); } @@ -1995,7 +2004,8 @@ gfx_get_video_format(void) case SC1200_VCFG_YVYU_FORMAT: return VIDEO_FORMAT_Y1Y2Y3Y0; } - } else { + } + else { switch (vcfg & SC1200_VCFG_VID_INP_FORMAT) { case SC1200_VCFG_UYVY_FORMAT: return VIDEO_FORMAT_UYVY; @@ -2158,8 +2168,8 @@ gfx_get_video_downscale_config(unsigned short *type, unsigned short *m) unsigned long downscale; downscale = READ_VID32(SC1200_VIDEO_DOWNSCALER_CONTROL); - *m = (unsigned short)((downscale & SC1200_VIDEO_DOWNSCALE_FACTOR_MASK) >> - SC1200_VIDEO_DOWNSCALE_FACTOR_POS) + 1; + *m = (unsigned short) ((downscale & SC1200_VIDEO_DOWNSCALE_FACTOR_MASK) >> + SC1200_VIDEO_DOWNSCALE_FACTOR_POS) + 1; switch (downscale & SC1200_VIDEO_DOWNSCALE_TYPE_MASK) { case SC1200_VIDEO_DOWNSCALE_TYPE_A: @@ -2184,28 +2194,32 @@ gfx_get_video_downscale_config(unsigned short *type, unsigned short *m) #if GFX_VIDEO_DYNAMIC void sc1200_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4) + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4) #else void gfx_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4) + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4) #endif { unsigned long coef; coef = READ_VID32(SC1200_VIDEO_DOWNSCALER_COEFFICIENTS); *coef1 = - (unsigned short)((coef >> SC1200_VIDEO_DOWNSCALER_COEF1_POS) & - SC1200_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> SC1200_VIDEO_DOWNSCALER_COEF1_POS) & + SC1200_VIDEO_DOWNSCALER_COEF_MASK); *coef2 = - (unsigned short)((coef >> SC1200_VIDEO_DOWNSCALER_COEF2_POS) & - SC1200_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> SC1200_VIDEO_DOWNSCALER_COEF2_POS) & + SC1200_VIDEO_DOWNSCALER_COEF_MASK); *coef3 = - (unsigned short)((coef >> SC1200_VIDEO_DOWNSCALER_COEF3_POS) & - SC1200_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> SC1200_VIDEO_DOWNSCALER_COEF3_POS) & + SC1200_VIDEO_DOWNSCALER_COEF_MASK); *coef4 = - (unsigned short)((coef >> SC1200_VIDEO_DOWNSCALER_COEF4_POS) & - SC1200_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> SC1200_VIDEO_DOWNSCALER_COEF4_POS) & + SC1200_VIDEO_DOWNSCALER_COEF_MASK); return; } @@ -2282,10 +2296,10 @@ gfx_get_video_position(void) /* Use routines to abstract version of display controller. */ hadjust = - (unsigned long)gfx_get_htotal() - (unsigned long)gfx_get_hsync_end() - + (unsigned long) gfx_get_htotal() - (unsigned long) gfx_get_hsync_end() - 14l; vadjust = - (unsigned long)gfx_get_vtotal() - (unsigned long)gfx_get_vsync_end() + + (unsigned long) gfx_get_vtotal() - (unsigned long) gfx_get_vsync_end() + 1l; xpos -= hadjust; ypos -= vadjust; @@ -2385,7 +2399,7 @@ gfx_get_video_request(short *x, short *y) { int request = 0; - request = (int)(READ_VID32(SC1200_VIDEO_REQUEST)); + request = (int) (READ_VID32(SC1200_VIDEO_REQUEST)); *x = (request >> SC1200_VIDEO_X_REQUEST_POS) & SC1200_VIDEO_REQUEST_MASK; *y = (request >> SC1200_VIDEO_Y_REQUEST_POS) & SC1200_VIDEO_REQUEST_MASK; @@ -2465,9 +2479,9 @@ gfx_get_vbi_lines(int odd) { if (odd) return (READ_VID32(SC1200_VIDEO_ODD_VBI_LINE_ENABLE) & - SC1200_VIDEO_VBI_LINE_ENABLE_MASK); + SC1200_VIDEO_VBI_LINE_ENABLE_MASK); return (READ_VID32(SC1200_VIDEO_EVEN_VBI_LINE_ENABLE) & - SC1200_VIDEO_VBI_LINE_ENABLE_MASK); + SC1200_VIDEO_VBI_LINE_ENABLE_MASK); } /*--------------------------------------------------------------------------- @@ -2486,9 +2500,9 @@ gfx_get_vbi_total(int odd) { if (odd) return (READ_VID32(SC1200_VIDEO_ODD_VBI_TOTAL_COUNT) & - SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); + SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); return (READ_VID32(SC1200_VIDEO_EVEN_VBI_TOTAL_COUNT) & - SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); + SC1200_VIDEO_VBI_TOTAL_COUNT_MASK); } /*--------------------------------------------------------------------------- @@ -2564,7 +2578,8 @@ gfx_get_vertical_scaler_offset(char *offset) else return GFX_STATUS_ERROR; /* TODO: find the interpretation of other values */ - } else + } + else *offset = 0; return (0); } @@ -2619,24 +2634,24 @@ gfx_get_genlock_enable(void) #if GFX_VIDEO_DYNAMIC int sc1200_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2) + unsigned short *select_color2, unsigned long *color1, + unsigned short *color2) #else int gfx_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2) + unsigned short *select_color2, unsigned long *color1, + unsigned short *color2) #endif { *select_color2 = - (unsigned short)(READ_VID32(SC1200_CURSOR_COLOR_KEY) >> - SC1200_CURSOR_COLOR_KEY_OFFSET_POS); + (unsigned short) (READ_VID32(SC1200_CURSOR_COLOR_KEY) >> + SC1200_CURSOR_COLOR_KEY_OFFSET_POS); *key = READ_VID32(SC1200_CURSOR_COLOR_KEY) & SC1200_COLOR_MASK; *mask = READ_VID32(SC1200_CURSOR_COLOR_MASK) & SC1200_COLOR_MASK; *color1 = READ_VID32(SC1200_CURSOR_COLOR_1) & SC1200_COLOR_MASK; *color2 = - (unsigned short)(READ_VID32(SC1200_CURSOR_COLOR_2) & - SC1200_COLOR_MASK); + (unsigned short) (READ_VID32(SC1200_CURSOR_COLOR_2) & + SC1200_COLOR_MASK); return (0); } @@ -2661,7 +2676,7 @@ gfx_read_crc(void) if (gfx_test_timing_active()) { /* WAIT UNTIL ACTIVE DISPLAY */ - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); /* RESET CRC DURING ACTIVE DISPLAY */ @@ -2670,10 +2685,10 @@ gfx_read_crc(void) /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */ - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); crc = READ_VID32(SC1200_VID_CRC) >> 8; } return (crc); @@ -2720,7 +2735,7 @@ gfx_get_alpha_enable(int *enable) if (gfx_alpha_select <= 2) { value = READ_VID32(SC1200_ALPHA_CONTROL_1 + - ((unsigned long)gfx_alpha_select << 4)); + ((unsigned long) gfx_alpha_select << 4)); if (value & SC1200_ACTRL_WIN_ENABLE) *enable = 1; } @@ -2736,11 +2751,11 @@ gfx_get_alpha_enable(int *enable) #if GFX_VIDEO_DYNAMIC void sc1200_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height) + unsigned short *width, unsigned short *height) #else void gfx_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height) + unsigned short *width, unsigned short *height) #endif { unsigned long value = 0; @@ -2752,14 +2767,14 @@ gfx_get_alpha_size(unsigned short *x, unsigned short *y, if (gfx_alpha_select <= 2) { value = READ_VID32(SC1200_ALPHA_XPOS_1 + - ((unsigned long)gfx_alpha_select << 4)); - *x = (unsigned short)(value & 0x000007FF); - *width = (unsigned short)((value >> 16) & 0x000007FF) - *x; + ((unsigned long) gfx_alpha_select << 4)); + *x = (unsigned short) (value & 0x000007FF); + *width = (unsigned short) ((value >> 16) & 0x000007FF) - *x; value = READ_VID32(SC1200_ALPHA_YPOS_1 + - ((unsigned long)gfx_alpha_select << 4)); - *y = (unsigned short)(value & 0x000007FF); - *height = (unsigned short)((value >> 16) & 0x000007FF) - *y; + ((unsigned long) gfx_alpha_select << 4)); + *y = (unsigned short) (value & 0x000007FF); + *height = (unsigned short) ((value >> 16) & 0x000007FF) - *y; } *x -= gfx_get_htotal() - gfx_get_hsync_end() - 2; *y -= gfx_get_vtotal() - gfx_get_vsync_end() + 1; @@ -2788,9 +2803,9 @@ gfx_get_alpha_value(unsigned char *alpha, char *delta) if (gfx_alpha_select <= 2) { value = READ_VID32(SC1200_ALPHA_CONTROL_1 + - ((unsigned long)gfx_alpha_select << 4)); - *alpha = (unsigned char)(value & 0x00FF); - *delta = (char)((value >> 8) & 0x00FF); + ((unsigned long) gfx_alpha_select << 4)); + *alpha = (unsigned char) (value & 0x00FF); + *delta = (char) ((value >> 8) & 0x00FF); } return; } @@ -2815,7 +2830,7 @@ gfx_get_alpha_priority(int *priority) if (gfx_alpha_select <= 2) { value = READ_VID32(SC1200_VID_ALPHA_CONTROL); pos = 16 + (gfx_alpha_select << 1); - *priority = (int)((value >> pos) & 3); + *priority = (int) ((value >> pos) & 3); } return; } @@ -2839,11 +2854,11 @@ gfx_get_alpha_color(unsigned long *color) if (gfx_alpha_select <= 2) { *color = READ_VID32(SC1200_ALPHA_COLOR_1 + - ((unsigned long)gfx_alpha_select << 4)); + ((unsigned long) gfx_alpha_select << 4)); } return; } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/vid_5530.c b/driver/xf86-video-geode/src/gfx/vid_5530.c index 40e3ffce1..f5243001d 100644 --- a/driver/xf86-video-geode/src/gfx/vid_5530.c +++ b/driver/xf86-video-geode/src/gfx/vid_5530.c @@ -31,50 +31,49 @@ * CS5530 PLL TABLE *---------------------------------------------------------------------------- */ -typedef struct tagCS5530PLLENTRY -{ - long frequency; /* 16.16 fixed point frequency */ - unsigned long pll_value; /* associated register value */ +typedef struct tagCS5530PLLENTRY { + long frequency; /* 16.16 fixed point frequency */ + unsigned long pll_value; /* associated register value */ } CS5530PLLENTRY; CS5530PLLENTRY CS5530_PLLtable[] = { - {0x00192CCC, 0x31C45801,}, /* 25.1750 */ - {0x001C526E, 0x20E36802,}, /* 28.3220 */ - {0x001F8000, 0x33915801,}, /* 31.5000 */ - {0x00240000, 0x31EC4801,}, /* 36.0000 */ - {0x00258000, 0x21E22801,}, /* 37.5000 */ - {0x00280000, 0x33088801,}, /* 40.0000 */ - {0x002CE666, 0x33E22801,}, /* 44.9000 */ - {0x00318000, 0x336C4801,}, /* 49.5000 */ - {0x00320000, 0x23088801,}, /* 50.0000 */ - {0x00325999, 0x23088801,}, /* 50.3500 */ - {0x00360000, 0x3708A801,}, /* 54.0000 */ - {0x00384000, 0x23E36802,}, /* 56.2500 */ - {0x0038643F, 0x23E36802,}, /* 56.3916 */ - {0x0038A4DD, 0x23E36802,}, /* 56.6444 */ - {0x003B0000, 0x37C45801,}, /* 59.0000 */ - {0x003F0000, 0x23EC4801,}, /* 63.0000 */ - {0x00410000, 0x37911801,}, /* 65.0000 */ - {0x00438000, 0x37963803,}, /* 67.5000 */ - {0x0046CCCC, 0x37058803,}, /* 70.8000 */ - {0x00480000, 0x3710C805,}, /* 72.0000 */ - {0x004B0000, 0x37E22801,}, /* 75.0000 */ - {0x004EC000, 0x27915801,}, /* 78.7500 */ - {0x00500000, 0x37D8D802,}, /* 80.0000 */ - {0x0059CCCC, 0x27588802,}, /* 89.8000 */ - {0x005E8000, 0x27EC4802,}, /* 94.5000 */ - {0x00630000, 0x27AC6803,}, /* 99.0000 */ - {0x00640000, 0x27088801,}, /* 100.0000 */ - {0x006C0000, 0x2710C805,}, /* 108.0000 */ - {0x00708000, 0x27E36802,}, /* 112.5000 */ - {0x00820000, 0x27C58803,}, /* 130.0000 */ - {0x00870000, 0x27316803,}, /* 135.0000 */ - {0x009D8000, 0x2F915801,}, /* 157.5000 */ - {0x00A20000, 0x2F08A801,}, /* 162.0000 */ - {0x00AF0000, 0x2FB11802,}, /* 175.0000 */ - {0x00BD0000, 0x2FEC4802,}, /* 189.0000 */ - {0x00CA0000, 0x2F963803,}, /* 202.0000 */ - {0x00E80000, 0x2FB1B802,}, /* 232.0000 */ + {0x00192CCC, 0x31C45801,}, /* 25.1750 */ + {0x001C526E, 0x20E36802,}, /* 28.3220 */ + {0x001F8000, 0x33915801,}, /* 31.5000 */ + {0x00240000, 0x31EC4801,}, /* 36.0000 */ + {0x00258000, 0x21E22801,}, /* 37.5000 */ + {0x00280000, 0x33088801,}, /* 40.0000 */ + {0x002CE666, 0x33E22801,}, /* 44.9000 */ + {0x00318000, 0x336C4801,}, /* 49.5000 */ + {0x00320000, 0x23088801,}, /* 50.0000 */ + {0x00325999, 0x23088801,}, /* 50.3500 */ + {0x00360000, 0x3708A801,}, /* 54.0000 */ + {0x00384000, 0x23E36802,}, /* 56.2500 */ + {0x0038643F, 0x23E36802,}, /* 56.3916 */ + {0x0038A4DD, 0x23E36802,}, /* 56.6444 */ + {0x003B0000, 0x37C45801,}, /* 59.0000 */ + {0x003F0000, 0x23EC4801,}, /* 63.0000 */ + {0x00410000, 0x37911801,}, /* 65.0000 */ + {0x00438000, 0x37963803,}, /* 67.5000 */ + {0x0046CCCC, 0x37058803,}, /* 70.8000 */ + {0x00480000, 0x3710C805,}, /* 72.0000 */ + {0x004B0000, 0x37E22801,}, /* 75.0000 */ + {0x004EC000, 0x27915801,}, /* 78.7500 */ + {0x00500000, 0x37D8D802,}, /* 80.0000 */ + {0x0059CCCC, 0x27588802,}, /* 89.8000 */ + {0x005E8000, 0x27EC4802,}, /* 94.5000 */ + {0x00630000, 0x27AC6803,}, /* 99.0000 */ + {0x00640000, 0x27088801,}, /* 100.0000 */ + {0x006C0000, 0x2710C805,}, /* 108.0000 */ + {0x00708000, 0x27E36802,}, /* 112.5000 */ + {0x00820000, 0x27C58803,}, /* 130.0000 */ + {0x00870000, 0x27316803,}, /* 135.0000 */ + {0x009D8000, 0x2F915801,}, /* 157.5000 */ + {0x00A20000, 0x2F08A801,}, /* 162.0000 */ + {0x00AF0000, 0x2FB11802,}, /* 175.0000 */ + {0x00BD0000, 0x2FEC4802,}, /* 189.0000 */ + {0x00CA0000, 0x2F963803,}, /* 202.0000 */ + {0x00E80000, 0x2FB1B802,}, /* 232.0000 */ }; #define NUM_CS5530_FREQUENCIES sizeof(CS5530_PLLtable)/sizeof(CS5530PLLENTRY) @@ -98,36 +97,36 @@ gfx_set_crt_enable(int enable) config = READ_VID32(CS5530_DISPLAY_CONFIG); switch (enable) { - case CRT_DISABLE: /* Disable everything */ + case CRT_DISABLE: /* Disable everything */ WRITE_VID32(CS5530_DISPLAY_CONFIG, - config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | - CS5530_DCFG_VSYNC_EN | CS5530_DCFG_DAC_BL_EN | - CS5530_DCFG_DAC_PWDNX)); + config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | + CS5530_DCFG_VSYNC_EN | CS5530_DCFG_DAC_BL_EN | + CS5530_DCFG_DAC_PWDNX)); break; - case CRT_ENABLE: /* Enable CRT display, including display logic */ + case CRT_ENABLE: /* Enable CRT display, including display logic */ WRITE_VID32(CS5530_DISPLAY_CONFIG, - config | CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | - CS5530_DCFG_VSYNC_EN | CS5530_DCFG_DAC_BL_EN | - CS5530_DCFG_DAC_PWDNX); + config | CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | + CS5530_DCFG_VSYNC_EN | CS5530_DCFG_DAC_BL_EN | + CS5530_DCFG_DAC_PWDNX); break; - case CRT_STANDBY: /* HSync:Off VSync:On */ + case CRT_STANDBY: /* HSync:Off VSync:On */ WRITE_VID32(CS5530_DISPLAY_CONFIG, - (config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | - CS5530_DCFG_DAC_BL_EN | CS5530_DCFG_DAC_PWDNX)) - | CS5530_DCFG_VSYNC_EN); + (config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_HSYNC_EN | + CS5530_DCFG_DAC_BL_EN | CS5530_DCFG_DAC_PWDNX)) + | CS5530_DCFG_VSYNC_EN); break; - case CRT_SUSPEND: /* HSync:On VSync:Off */ + case CRT_SUSPEND: /* HSync:On VSync:Off */ WRITE_VID32(CS5530_DISPLAY_CONFIG, - (config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_VSYNC_EN | - CS5530_DCFG_DAC_BL_EN | CS5530_DCFG_DAC_PWDNX)) - | CS5530_DCFG_HSYNC_EN); + (config & ~(CS5530_DCFG_DIS_EN | CS5530_DCFG_VSYNC_EN | + CS5530_DCFG_DAC_BL_EN | CS5530_DCFG_DAC_PWDNX)) + | CS5530_DCFG_HSYNC_EN); break; default: @@ -161,10 +160,10 @@ gfx_reset_video(void) gfx_set_display_video_size(0, 0); if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); } } @@ -200,13 +199,13 @@ gfx_set_display_control(int sync_polarities) /* CLEAR RELEVANT FIELDS */ dcfg &= ~(CS5530_DCFG_CRT_SYNC_SKW_MASK | CS5530_DCFG_PWR_SEQ_DLY_MASK | - CS5530_DCFG_CRT_HSYNC_POL | CS5530_DCFG_CRT_VSYNC_POL | - CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN); + CS5530_DCFG_CRT_HSYNC_POL | CS5530_DCFG_CRT_VSYNC_POL | + CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN); /* INITIALIZATION */ dcfg |= (CS5530_DCFG_CRT_SYNC_SKW_INIT | - CS5530_DCFG_PWR_SEQ_DLY_INIT | CS5530_DCFG_GV_PAL_BYP); + CS5530_DCFG_PWR_SEQ_DLY_INIT | CS5530_DCFG_GV_PAL_BYP); if (PanelEnable) { dcfg |= CS5530_DCFG_FP_PWR_EN; @@ -248,11 +247,11 @@ gfx_set_clock_frequency(unsigned long frequency) /* Search the table for the closest frequency (16.16 format). */ value = CS5530_PLLtable[0].pll_value; - min = (long)CS5530_PLLtable[0].frequency - frequency; + min = (long) CS5530_PLLtable[0].frequency - frequency; if (min < 0L) min = -min; for (index = 1; index < NUM_CS5530_FREQUENCIES; index++) { - diff = (long)CS5530_PLLtable[index].frequency - frequency; + diff = (long) CS5530_PLLtable[index].frequency - frequency; if (diff < 0L) diff = -diff; if (diff < min) { @@ -266,7 +265,7 @@ gfx_set_clock_frequency(unsigned long frequency) WRITE_VID32(CS5530_DOT_CLK_CONFIG, value); WRITE_VID32(CS5530_DOT_CLK_CONFIG, value | 0x80000100); /* set reset/bypass */ - gfx_delay_milliseconds(1); /* wait for PLL to settle */ + gfx_delay_milliseconds(1); /* wait for PLL to settle */ WRITE_VID32(CS5530_DOT_CLK_CONFIG, value & 0x7FFFFFFF); /* clear reset */ WRITE_VID32(CS5530_DOT_CLK_CONFIG, value & 0x7FFFFEFF); @@ -295,9 +294,9 @@ gfx_set_video_enable(int enable) if (gfx_test_timing_active()) { if (!gfx_test_vertical_active()) { - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); } - while (gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); } vcfg = READ_VID32(CS5530_VIDEO_CONFIG); if (enable) { @@ -311,7 +310,8 @@ gfx_set_video_enable(int enable) vcfg |= CS5530_VCFG_VID_EN; WRITE_VID32(CS5530_VIDEO_CONFIG, vcfg); - } else { + } + else { /* DISABLE CS5530 VIDEO OVERLAY */ vcfg &= ~CS5530_VCFG_VID_EN; @@ -431,11 +431,11 @@ gfx_set_video_offset(unsigned long offset) #if GFX_VIDEO_DYNAMIC int cs5530_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #else int gfx_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #endif { unsigned long xscale, yscale; @@ -471,7 +471,7 @@ gfx_set_video_scale(unsigned short srcw, unsigned short srch, /* amount of data that needs to be transferred. */ gfx_set_video_window(gfx_vid_xpos, gfx_vid_ypos, gfx_vid_width, - gfx_vid_height); + gfx_vid_height); return (0); } @@ -514,11 +514,12 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) /* LEFT CLIPPING */ if (x < 0) { - gfx_set_video_left_crop((unsigned short)(-x)); + gfx_set_video_left_crop((unsigned short) (-x)); xstart = hadjust; - } else { + } + else { gfx_set_video_left_crop(0); - xstart = (unsigned long)x + hadjust; + xstart = (unsigned long) x + hadjust; } /* CLIPPING ON RIGHT */ @@ -533,7 +534,8 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) offset = gfx_vid_offset; if (y >= 0) { ystart = y + vadjust; - } else { + } + else { ystart = vadjust; line_size = (READ_VID32(CS5530_VIDEO_CONFIG) >> 7) & 0x000001FE; if (READ_VID32(CS5530_VIDEO_CONFIG) & CS5530_VCFG_LINE_SIZE_UPPER) @@ -595,7 +597,7 @@ gfx_set_video_left_crop(unsigned short x) /* Adjust initial read for scale, checking for divide by zero */ if (gfx_vid_dstw) - initread = (unsigned long)x *gfx_vid_srcw / gfx_vid_dstw; + initread = (unsigned long) x *gfx_vid_srcw / gfx_vid_dstw; else initread = 0; @@ -626,8 +628,7 @@ gfx_set_video_left_crop(unsigned short x) */ #if GFX_VIDEO_DYNAMIC int -cs5530_set_video_color_key(unsigned long key, unsigned long mask, - int graphics) +cs5530_set_video_color_key(unsigned long key, unsigned long mask, int graphics) #else int gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics) @@ -1057,7 +1058,7 @@ gfx_get_video_format(void) if (vcfg & CS5530_VCFG_4_2_0_MODE) return (VIDEO_FORMAT_Y0Y1Y2Y3); - return ((int)((vcfg >> 2) & 3)); + return ((int) ((vcfg >> 2) & 3)); } /*---------------------------------------------------------------------------- @@ -1331,7 +1332,7 @@ gfx_read_crc(void) if (gfx_test_timing_active()) { /* WAIT UNTIL ACTIVE DISPLAY */ - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); /* RESET CRC DURING ACTIVE DISPLAY */ @@ -1340,15 +1341,15 @@ gfx_read_crc(void) /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */ - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); crc = READ_VID32(CS5530_CRCSIG_TFT_TV) >> 8; } return (crc); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/vid_rdcl.c b/driver/xf86-video-geode/src/gfx/vid_rdcl.c index 7c98d2d30..3ccc57a26 100644 --- a/driver/xf86-video-geode/src/gfx/vid_rdcl.c +++ b/driver/xf86-video-geode/src/gfx/vid_rdcl.c @@ -76,74 +76,73 @@ unsigned long gfx_gamma_ram_redcloud[] = { /* REDCLOUD PLL TABLE */ -typedef struct RCDFPLL -{ - long frequency; /* 16.16 fixed point frequency */ - unsigned long post_div3; /* MCP Frequency dividers and multipliers */ +typedef struct RCDFPLL { + long frequency; /* 16.16 fixed point frequency */ + unsigned long post_div3; /* MCP Frequency dividers and multipliers */ unsigned long pre_mul2; unsigned long pre_div2; - unsigned long pll_value; /* MCP DotPLL Register Upper 32(0x0015) */ + unsigned long pll_value; /* MCP DotPLL Register Upper 32(0x0015) */ } RCDFPLLENTRY; RCDFPLLENTRY RCDF_PLLtable[] = { - {0x0018EC4D, 1, 0, 0, 0x0000099E}, /* 24.9230 */ - {0x00192CCC, 0, 0, 0, 0x00000037}, /* 25.1750 */ - {0x001C526E, 1, 0, 0, 0x000009DA}, /* 28.3220 */ - {0x001C8F5C, 1, 0, 0, 0x0000005E}, /* 28.5600 */ - {0x001F8000, 1, 0, 0, 0x000002D2}, /* 31.5000 */ - {0x00240000, 1, 0, 0, 0x000007E2}, /* 36.0000 */ - {0x00258000, 1, 0, 0, 0x0000057A}, /* 37.5000 */ - {0x0025E395, 1, 0, 0, 0x000007FA}, /* 37.8890 */ - {0x00280000, 1, 0, 0, 0x0000030A}, /* 40.0000 */ - {0x002B29BA, 0, 0, 0, 0x0000005F}, /* 43.1630 */ - {0x002CE666, 0, 0, 0, 0x00000063}, /* 44.9000 */ - {0x002DB851, 1, 0, 0, 0x00000BC9}, /* 45.7200 */ - {0x00318000, 0, 0, 0, 0x0000054B}, /* 49.5000 */ - {0x00320000, 0, 0, 0, 0x0000006F}, /* 50.0000 */ - {0x00325999, 0, 1, 0, 0x00000037}, /* 50.3500 */ - {0x00360000, 1, 1, 0, 0x00000B0D}, /* 54.0000 */ - {0x00384000, 0, 0, 0, 0x000007F7}, /* 56.2500 */ - {0x0038643F, 0, 0, 0, 0x000007F7}, /* 56.3916 */ - {0x0038A4DD, 0, 0, 0, 0x0000057B}, /* 56.6444 */ - {0x003B0000, 0, 1, 0, 0x00000707}, /* 59.0000 */ - {0x003C10A3, 0, 0, 0, 0x0000030B}, /* 60.0650 */ - {0x003F0000, 1, 1, 0, 0x00000B39}, /* 63.0000 */ - {0x00410000, 1, 0, 0, 0x00000545}, /* 65.0000 */ - {0x00442DD2, 1, 0, 0, 0x000002E1}, /* 68.1790 */ - {0x00438000, 1, 1, 0, 0x00000FC1}, /* 67.5000 */ - {0x0046CCCC, 1, 0, 0, 0x00000561}, /* 70.8000 */ - {0x00480000, 1, 0, 0, 0x000007E1}, /* 72.0000 */ - {0x004A7B22, 0, 1, 0, 0x00000F4A}, /* 74.4810 */ - {0x004B0000, 1, 0, 0, 0x000007F5}, /* 75.0000 */ - {0x004EC000, 1, 0, 0, 0x00000305}, /* 78.7500 */ - {0x00500000, 1, 1, 0, 0x00000709}, /* 80.0000 */ - {0x00519999, 0, 0, 0, 0x000009C6}, /* 81.6000 */ - {0x0059CCCC, 0, 1, 0, 0x00000262}, /* 89.8000 */ - {0x005E8000, 0, 0, 0, 0x000002D2}, /* 94.5000 */ - {0x00618560, 0, 0, 0, 0x00000546}, /* 97.5200 */ - {0x00630000, 0, 1, 0, 0x00000B4A}, /* 99.0000 */ - {0x00642FDF, 0, 0, 0, 0x0000006E}, /* 100.1870 */ - {0x00656B85, 0, 0, 0, 0x00000552}, /* 101.4200 */ - {0x006C0000, 0, 0, 0, 0x000007E2}, /* 108.0000 */ - {0x00708000, 0, 0, 0, 0x000007F6}, /* 112.5000 */ - {0x00714F1A, 0, 0, 0, 0x0000057A}, /* 113.3090 */ - {0x0077A666, 0, 0, 0, 0x0000030A}, /* 119.6500 */ - {0x00806666, 1, 0, 0, 0x00000068}, /* 128.4000 */ - {0x00820000, 1, 1, 0, 0x00000FB0}, /* 130.0000 */ - {0x00821999, 1, 0, 0, 0x00000544}, /* 130.1000 */ - {0x00858000, 1, 0, 0, 0x0000006C}, /* 133.5000 */ - {0x00870000, 1, 0, 0, 0x00000550}, /* 135.0000 */ - {0x00906147, 1, 0, 0, 0x000007E0}, /* 144.3800 */ - {0x009D8000, 1, 0, 0, 0x00000304}, /* 157.5000 */ - {0x00A20000, 0, 0, 0, 0x000002B1}, /* 162.0000 */ - {0x00A933F7, 0, 0, 0, 0x000002B9}, /* 169.2030 */ - {0x00ACCC49, 0, 1, 0, 0x0000002D}, /* 172.798 */ - {0x00AF8000, 0, 0, 0, 0x000002C1}, /* 175.5000 */ - {0x00BD0000, 0, 0, 0, 0x000002D1}, /* 189.0000 */ - {0x00BEF5C2, 0, 0, 0, 0x0000053D}, /* 190.9600 */ - {0x00C60000, 0, 0, 0, 0x00000549}, /* 198.0000 */ - {0x00CA8000, 0, 0, 0, 0x00000551}, /* 202.5000 */ - {0x00E58000, 0, 0, 0, 0x0000057D}, /* 229.5000 */ + {0x0018EC4D, 1, 0, 0, 0x0000099E}, /* 24.9230 */ + {0x00192CCC, 0, 0, 0, 0x00000037}, /* 25.1750 */ + {0x001C526E, 1, 0, 0, 0x000009DA}, /* 28.3220 */ + {0x001C8F5C, 1, 0, 0, 0x0000005E}, /* 28.5600 */ + {0x001F8000, 1, 0, 0, 0x000002D2}, /* 31.5000 */ + {0x00240000, 1, 0, 0, 0x000007E2}, /* 36.0000 */ + {0x00258000, 1, 0, 0, 0x0000057A}, /* 37.5000 */ + {0x0025E395, 1, 0, 0, 0x000007FA}, /* 37.8890 */ + {0x00280000, 1, 0, 0, 0x0000030A}, /* 40.0000 */ + {0x002B29BA, 0, 0, 0, 0x0000005F}, /* 43.1630 */ + {0x002CE666, 0, 0, 0, 0x00000063}, /* 44.9000 */ + {0x002DB851, 1, 0, 0, 0x00000BC9}, /* 45.7200 */ + {0x00318000, 0, 0, 0, 0x0000054B}, /* 49.5000 */ + {0x00320000, 0, 0, 0, 0x0000006F}, /* 50.0000 */ + {0x00325999, 0, 1, 0, 0x00000037}, /* 50.3500 */ + {0x00360000, 1, 1, 0, 0x00000B0D}, /* 54.0000 */ + {0x00384000, 0, 0, 0, 0x000007F7}, /* 56.2500 */ + {0x0038643F, 0, 0, 0, 0x000007F7}, /* 56.3916 */ + {0x0038A4DD, 0, 0, 0, 0x0000057B}, /* 56.6444 */ + {0x003B0000, 0, 1, 0, 0x00000707}, /* 59.0000 */ + {0x003C10A3, 0, 0, 0, 0x0000030B}, /* 60.0650 */ + {0x003F0000, 1, 1, 0, 0x00000B39}, /* 63.0000 */ + {0x00410000, 1, 0, 0, 0x00000545}, /* 65.0000 */ + {0x00442DD2, 1, 0, 0, 0x000002E1}, /* 68.1790 */ + {0x00438000, 1, 1, 0, 0x00000FC1}, /* 67.5000 */ + {0x0046CCCC, 1, 0, 0, 0x00000561}, /* 70.8000 */ + {0x00480000, 1, 0, 0, 0x000007E1}, /* 72.0000 */ + {0x004A7B22, 0, 1, 0, 0x00000F4A}, /* 74.4810 */ + {0x004B0000, 1, 0, 0, 0x000007F5}, /* 75.0000 */ + {0x004EC000, 1, 0, 0, 0x00000305}, /* 78.7500 */ + {0x00500000, 1, 1, 0, 0x00000709}, /* 80.0000 */ + {0x00519999, 0, 0, 0, 0x000009C6}, /* 81.6000 */ + {0x0059CCCC, 0, 1, 0, 0x00000262}, /* 89.8000 */ + {0x005E8000, 0, 0, 0, 0x000002D2}, /* 94.5000 */ + {0x00618560, 0, 0, 0, 0x00000546}, /* 97.5200 */ + {0x00630000, 0, 1, 0, 0x00000B4A}, /* 99.0000 */ + {0x00642FDF, 0, 0, 0, 0x0000006E}, /* 100.1870 */ + {0x00656B85, 0, 0, 0, 0x00000552}, /* 101.4200 */ + {0x006C0000, 0, 0, 0, 0x000007E2}, /* 108.0000 */ + {0x00708000, 0, 0, 0, 0x000007F6}, /* 112.5000 */ + {0x00714F1A, 0, 0, 0, 0x0000057A}, /* 113.3090 */ + {0x0077A666, 0, 0, 0, 0x0000030A}, /* 119.6500 */ + {0x00806666, 1, 0, 0, 0x00000068}, /* 128.4000 */ + {0x00820000, 1, 1, 0, 0x00000FB0}, /* 130.0000 */ + {0x00821999, 1, 0, 0, 0x00000544}, /* 130.1000 */ + {0x00858000, 1, 0, 0, 0x0000006C}, /* 133.5000 */ + {0x00870000, 1, 0, 0, 0x00000550}, /* 135.0000 */ + {0x00906147, 1, 0, 0, 0x000007E0}, /* 144.3800 */ + {0x009D8000, 1, 0, 0, 0x00000304}, /* 157.5000 */ + {0x00A20000, 0, 0, 0, 0x000002B1}, /* 162.0000 */ + {0x00A933F7, 0, 0, 0, 0x000002B9}, /* 169.2030 */ + {0x00ACCC49, 0, 1, 0, 0x0000002D}, /* 172.798 */ + {0x00AF8000, 0, 0, 0, 0x000002C1}, /* 175.5000 */ + {0x00BD0000, 0, 0, 0, 0x000002D1}, /* 189.0000 */ + {0x00BEF5C2, 0, 0, 0, 0x0000053D}, /* 190.9600 */ + {0x00C60000, 0, 0, 0, 0x00000549}, /* 198.0000 */ + {0x00CA8000, 0, 0, 0, 0x00000551}, /* 202.5000 */ + {0x00E58000, 0, 0, 0, 0x0000057D}, /* 229.5000 */ }; #define NUM_RCDF_FREQUENCIES sizeof(RCDF_PLLtable)/sizeof(RCDFPLLENTRY) @@ -205,8 +204,8 @@ gfx_set_display_control(int sync_polarities) dcfg = READ_VID32(RCDF_DISPLAY_CONFIG); dcfg &= ~(RCDF_DCFG_CRT_SYNC_SKW_MASK | RCDF_DCFG_PWR_SEQ_DLY_MASK | - RCDF_DCFG_CRT_HSYNC_POL | RCDF_DCFG_CRT_VSYNC_POL | - RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN); + RCDF_DCFG_CRT_HSYNC_POL | RCDF_DCFG_CRT_VSYNC_POL | + RCDF_DCFG_FP_PWR_EN | RCDF_DCFG_FP_DATA_EN); /* Don't blindly set the PAL_BYP bit - assume that somebody along * the line has set up the gamma correctly before this point */ @@ -222,16 +221,16 @@ gfx_set_display_control(int sync_polarities) /* SET APPROPRIATE SYNC POLARITIES */ if (PanelEnable) { - unsigned int pt2 = READ_VID32(0x408); + unsigned int pt2 = READ_VID32(0x408); - pt2 &= ~((1 << 22) | (1 << 23)); - WRITE_VID32(0x408, pt2); + pt2 &= ~((1 << 22) | (1 << 23)); + WRITE_VID32(0x408, pt2); } if (sync_polarities & 0x1) - dcfg |= RCDF_DCFG_CRT_HSYNC_POL; - if (sync_polarities & 0x2) - dcfg |= RCDF_DCFG_CRT_VSYNC_POL; + dcfg |= RCDF_DCFG_CRT_HSYNC_POL; + if (sync_polarities & 0x2) + dcfg |= RCDF_DCFG_CRT_VSYNC_POL; WRITE_VID32(RCDF_DISPLAY_CONFIG, dcfg); @@ -265,11 +264,11 @@ gfx_set_clock_frequency(unsigned long frequency) /* Search the table for the closest frequency (16.16 format). */ value = RCDF_PLLtable[0].pll_value; - min = (long)RCDF_PLLtable[0].frequency - frequency; + min = (long) RCDF_PLLtable[0].frequency - frequency; if (min < 0L) min = -min; for (i = 1; i < NUM_RCDF_FREQUENCIES; i++) { - diff = (long)RCDF_PLLtable[i].frequency - frequency; + diff = (long) RCDF_PLLtable[i].frequency - frequency; if (diff < 0L) diff = -diff; if (diff < min) { @@ -296,9 +295,8 @@ gfx_set_clock_frequency(unsigned long frequency) if ((msr_value.low & MCP_DOTPLL_LOCK) && (msr_value.high == RCDF_PLLtable[index].pll_value) && - ((sys_value. - low & (MCP_DOTPOSTDIV3 | MCP_DOTPREDIV2 | MCP_DOTPREMULT2)) == - sys_low)) { + ((sys_value.low & (MCP_DOTPOSTDIV3 | MCP_DOTPREDIV2 | MCP_DOTPREMULT2)) + == sys_low)) { return; } @@ -349,36 +347,36 @@ gfx_set_crt_enable(int enable) misc = READ_VID32(RCDF_VID_MISC); switch (enable) { - case CRT_DISABLE: /* DISABLE EVERYTHING */ + case CRT_DISABLE: /* DISABLE EVERYTHING */ WRITE_VID32(RCDF_DISPLAY_CONFIG, - config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | - RCDF_DCFG_VSYNC_EN | RCDF_DCFG_DAC_BL_EN)); + config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | + RCDF_DCFG_VSYNC_EN | RCDF_DCFG_DAC_BL_EN)); WRITE_VID32(RCDF_VID_MISC, misc | RCDF_DAC_POWER_DOWN); break; - case CRT_ENABLE: /* ENABLE CRT DISPLAY, INCLUDING DISPLAY LOGIC */ + case CRT_ENABLE: /* ENABLE CRT DISPLAY, INCLUDING DISPLAY LOGIC */ WRITE_VID32(RCDF_DISPLAY_CONFIG, - config | RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | - RCDF_DCFG_VSYNC_EN | RCDF_DCFG_DAC_BL_EN); + config | RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | + RCDF_DCFG_VSYNC_EN | RCDF_DCFG_DAC_BL_EN); WRITE_VID32(RCDF_VID_MISC, - misc & ~RCDF_DAC_POWER_DOWN & ~RCDF_ANALOG_POWER_DOWN); + misc & ~RCDF_DAC_POWER_DOWN & ~RCDF_ANALOG_POWER_DOWN); break; - case CRT_STANDBY: /* HSYNC:OFF VSYNC:ON */ + case CRT_STANDBY: /* HSYNC:OFF VSYNC:ON */ WRITE_VID32(RCDF_DISPLAY_CONFIG, - (config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | - RCDF_DCFG_DAC_BL_EN)) | RCDF_DCFG_VSYNC_EN); + (config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_HSYNC_EN | + RCDF_DCFG_DAC_BL_EN)) | RCDF_DCFG_VSYNC_EN); WRITE_VID32(RCDF_VID_MISC, misc | RCDF_DAC_POWER_DOWN); break; - case CRT_SUSPEND: /* HSYNC:ON VSYNC:OFF */ + case CRT_SUSPEND: /* HSYNC:ON VSYNC:OFF */ WRITE_VID32(RCDF_DISPLAY_CONFIG, - (config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_VSYNC_EN | - RCDF_DCFG_DAC_BL_EN)) | RCDF_DCFG_HSYNC_EN); + (config & ~(RCDF_DCFG_DIS_EN | RCDF_DCFG_VSYNC_EN | + RCDF_DCFG_DAC_BL_EN)) | RCDF_DCFG_HSYNC_EN); WRITE_VID32(RCDF_VID_MISC, misc | RCDF_DAC_POWER_DOWN); break; @@ -409,9 +407,9 @@ gfx_set_video_enable(int enable) if (gfx_test_timing_active()) { if (!gfx_test_vertical_active()) { - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); } - while (gfx_test_vertical_active()) ; + while (gfx_test_vertical_active()); } vcfg = READ_VID32(RCDF_VIDEO_CONFIG); @@ -425,7 +423,8 @@ gfx_set_video_enable(int enable) vcfg |= RCDF_VCFG_VID_EN; WRITE_VID32(RCDF_VIDEO_CONFIG, vcfg); - } else { + } + else { /* DISABLE DISPLAY FILTER VIDEO OVERLAY */ vcfg &= ~RCDF_VCFG_VID_EN; @@ -619,11 +618,11 @@ gfx_set_video_offset(unsigned long offset) #if GFX_VIDEO_DYNAMIC int redcloud_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset, - unsigned long voffset) + unsigned long voffset) #else int gfx_set_video_yuv_offsets(unsigned long yoffset, unsigned long uoffset, - unsigned long voffset) + unsigned long voffset) #endif { /* SAVE VALUE FOR FUTURE CLIPPING OF THE TOP OF THE VIDEO WINDOW */ @@ -672,11 +671,11 @@ gfx_set_video_yuv_pitch(unsigned long ypitch, unsigned long uvpitch) #if GFX_VIDEO_DYNAMIC int redcloud_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #else int gfx_set_video_scale(unsigned short srcw, unsigned short srch, - unsigned short dstw, unsigned short dsth) + unsigned short dstw, unsigned short dsth) #endif { unsigned long xscale, yscale; @@ -727,7 +726,7 @@ gfx_set_video_scale(unsigned short srcw, unsigned short srch, /* amount of data that needs to be transferred. */ gfx_set_video_window(gfx_vid_xpos, gfx_vid_ypos, gfx_vid_width, - gfx_vid_height); + gfx_vid_height); return (0); } @@ -741,8 +740,7 @@ gfx_set_video_scale(unsigned short srcw, unsigned short srch, */ #if GFX_VIDEO_DYNAMIC int -redcloud_set_video_vertical_downscale(unsigned short srch, - unsigned short dsth) +redcloud_set_video_vertical_downscale(unsigned short srch, unsigned short dsth) #else int gfx_set_video_vertical_downscale(unsigned short srch, unsigned short dsth) @@ -800,7 +798,7 @@ gfx_set_video_downscale_config(unsigned short type, unsigned short m) downscale = READ_VID32(RCDF_VIDEO_DOWNSCALER_CONTROL); downscale &= ~(RCDF_VIDEO_DOWNSCALE_FACTOR_MASK | RCDF_VIDEO_DOWNSCALE_TYPE_MASK); - downscale |= ((unsigned long)(m - 1) << RCDF_VIDEO_DOWNSCALE_FACTOR_POS); + downscale |= ((unsigned long) (m - 1) << RCDF_VIDEO_DOWNSCALE_FACTOR_POS); switch (type) { case VIDEO_DOWNSCALE_KEEP_1_OF: downscale |= RCDF_VIDEO_DOWNSCALE_TYPE_A; @@ -824,21 +822,24 @@ gfx_set_video_downscale_config(unsigned short type, unsigned short m) #if GFX_VIDEO_DYNAMIC int redcloud_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4) + unsigned short coef2, + unsigned short coef3, + unsigned short coef4) #else int gfx_set_video_downscale_coefficients(unsigned short coef1, - unsigned short coef2, unsigned short coef3, unsigned short coef4) + unsigned short coef2, unsigned short coef3, + unsigned short coef4) #endif { if ((coef1 + coef2 + coef3 + coef4) != 16) return GFX_STATUS_BAD_PARAMETER; WRITE_VID32(RCDF_VIDEO_DOWNSCALER_COEFFICIENTS, - ((unsigned long)coef1 << RCDF_VIDEO_DOWNSCALER_COEF1_POS) | - ((unsigned long)coef2 << RCDF_VIDEO_DOWNSCALER_COEF2_POS) | - ((unsigned long)coef3 << RCDF_VIDEO_DOWNSCALER_COEF3_POS) | - ((unsigned long)coef4 << RCDF_VIDEO_DOWNSCALER_COEF4_POS)); + ((unsigned long) coef1 << RCDF_VIDEO_DOWNSCALER_COEF1_POS) | + ((unsigned long) coef2 << RCDF_VIDEO_DOWNSCALER_COEF2_POS) | + ((unsigned long) coef3 << RCDF_VIDEO_DOWNSCALER_COEF3_POS) | + ((unsigned long) coef4 << RCDF_VIDEO_DOWNSCALER_COEF4_POS)); return (0); } @@ -879,8 +880,7 @@ gfx_set_video_downscale_enable(int enable) */ #if GFX_VIDEO_DYNAMIC int -redcloud_set_video_window(short x, short y, unsigned short w, - unsigned short h) +redcloud_set_video_window(short x, short y, unsigned short w, unsigned short h) #else int gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) @@ -906,11 +906,12 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) /* LEFT CLIPPING */ if (x < 0) { - gfx_set_video_left_crop((unsigned short)(-x)); + gfx_set_video_left_crop((unsigned short) (-x)); xstart = hadjust; - } else { + } + else { gfx_set_video_left_crop(0); - xstart = (unsigned long)x + hadjust; + xstart = (unsigned long) x + hadjust; } /* HORIZONTAL END */ @@ -918,24 +919,24 @@ gfx_set_video_window(short x, short y, unsigned short w, unsigned short h) * end) */ if ((x + w) < gfx_get_hactive()) - xend = (unsigned long)x + (unsigned long)w + hadjust; + xend = (unsigned long) x + (unsigned long) w + hadjust; /* RIGHT-CLIPPING */ else - xend = (unsigned long)gfx_get_hactive() + hadjust; + xend = (unsigned long) gfx_get_hactive() + hadjust; /* VERTICAL START */ - ystart = (unsigned long)y + vadjust; + ystart = (unsigned long) y + vadjust; /* VERTICAL END */ if ((y + h) < gfx_get_vactive()) - yend = (unsigned long)y + (unsigned long)h + vadjust; + yend = (unsigned long) y + (unsigned long) h + vadjust; /* BOTTOM-CLIPPING */ else - yend = (unsigned long)gfx_get_vactive() + vadjust; + yend = (unsigned long) gfx_get_vactive() + vadjust; /* SET VIDEO POSITION */ @@ -976,11 +977,12 @@ gfx_set_video_left_crop(unsigned short x) * */ if (gfx_vid_dstw) { - initread = (unsigned long)x *gfx_vid_srcw / gfx_vid_dstw; + initread = (unsigned long) x *gfx_vid_srcw / gfx_vid_dstw; if (vcfg & RCDF_VCFG_4_2_0_MODE) initread &= 0xFFF8; - } else + } + else initread = 0; /* SET INITIAL READ ADDRESS */ @@ -1008,7 +1010,7 @@ gfx_set_video_left_crop(unsigned short x) #if GFX_VIDEO_DYNAMIC int redcloud_set_video_color_key(unsigned long key, unsigned long mask, - int graphics) + int graphics) #else int gfx_set_video_color_key(unsigned long key, unsigned long mask, int graphics) @@ -1093,9 +1095,9 @@ gfx_set_video_palette(unsigned long *palette) WRITE_VID32(RCDF_VID_MISC, misc); if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); } /* LOAD REDCLOUD VIDEO PALETTE */ @@ -1147,9 +1149,9 @@ gfx_set_graphics_palette(unsigned long *palette) WRITE_VID32(RCDF_VID_MISC, misc); if (gfx_test_timing_active()) { - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); } /* LOAD REDCLOUD VIDEO PALETTE */ @@ -1174,8 +1176,7 @@ gfx_set_graphics_palette(unsigned long *palette) */ #if GFX_VIDEO_DYNAMIC int -redcloud_set_graphics_palette_entry(unsigned long index, - unsigned long palette) +redcloud_set_graphics_palette_entry(unsigned long index, unsigned long palette) #else int gfx_set_graphics_palette_entry(unsigned long index, unsigned long palette) @@ -1300,8 +1301,8 @@ gfx_set_video_request(short x, short y) return GFX_STATUS_BAD_PARAMETER; WRITE_VID32(RCDF_VIDEO_REQUEST, - ((unsigned long)x << RCDF_VIDEO_X_REQUEST_POS) | ((unsigned long)y << - RCDF_VIDEO_Y_REQUEST_POS)); + ((unsigned long) x << RCDF_VIDEO_X_REQUEST_POS) | + ((unsigned long) y << RCDF_VIDEO_Y_REQUEST_POS)); return (0); } @@ -1332,18 +1333,20 @@ gfx_set_video_request(short x, short y) #if GFX_VIDEO_DYNAMIC int redcloud_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2) + unsigned short select_color2, unsigned long color1, + unsigned long color2) #else int gfx_set_video_cursor(unsigned long key, unsigned long mask, - unsigned short select_color2, unsigned long color1, unsigned long color2) + unsigned short select_color2, unsigned long color1, + unsigned long color2) #endif { if (select_color2 > RCDF_CURSOR_COLOR_BITS) return GFX_STATUS_BAD_PARAMETER; key = - (key & RCDF_COLOR_MASK) | ((unsigned long)select_color2 << - RCDF_CURSOR_COLOR_KEY_OFFSET_POS); + (key & RCDF_COLOR_MASK) | ((unsigned long) select_color2 << + RCDF_CURSOR_COLOR_KEY_OFFSET_POS); WRITE_VID32(RCDF_CURSOR_COLOR_KEY, key); WRITE_VID32(RCDF_CURSOR_COLOR_MASK, mask); WRITE_VID32(RCDF_CURSOR_COLOR_1, color1); @@ -1412,7 +1415,7 @@ gfx_set_alpha_enable(int enable) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = RCDF_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 5); + address = RCDF_ALPHA_CONTROL_1 + ((unsigned long) gfx_alpha_select << 5); value = READ_VID32(address); if (enable) value |= RCDF_ACTRL_WIN_ENABLE; @@ -1433,11 +1436,11 @@ gfx_set_alpha_enable(int enable) #if GFX_VIDEO_DYNAMIC int redcloud_set_alpha_window(short x, short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #else int gfx_set_alpha_window(short x, short y, - unsigned short width, unsigned short height) + unsigned short width, unsigned short height) #endif { unsigned long address = 0; @@ -1456,15 +1459,15 @@ gfx_set_alpha_window(short x, short y, if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = RCDF_ALPHA_XPOS_1 + ((unsigned long)gfx_alpha_select << 5); + address = RCDF_ALPHA_XPOS_1 + ((unsigned long) gfx_alpha_select << 5); /* END POSITIONS IN REGISTERS ARE NON-INCLUSIVE (ONE MORE THAN ACTUAL END) * */ - WRITE_VID32(address, (unsigned long)x | - ((unsigned long)(x + width) << 16)); - WRITE_VID32(address + 8, (unsigned long)y | - ((unsigned long)(y + height) << 16)); + WRITE_VID32(address, (unsigned long) x | + ((unsigned long) (x + width) << 16)); + WRITE_VID32(address + 8, (unsigned long) y | + ((unsigned long) (y + height) << 16)); return (GFX_STATUS_OK); } @@ -1487,11 +1490,11 @@ gfx_set_alpha_value(unsigned char alpha, char delta) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = RCDF_ALPHA_CONTROL_1 + ((unsigned long)gfx_alpha_select << 5); + address = RCDF_ALPHA_CONTROL_1 + ((unsigned long) gfx_alpha_select << 5); value = READ_VID32(address); - value &= RCDF_ACTRL_WIN_ENABLE; /* keep only enable bit */ - value |= (unsigned long)alpha; - value |= (((unsigned long)delta) & 0xff) << 8; + value &= RCDF_ACTRL_WIN_ENABLE; /* keep only enable bit */ + value |= (unsigned long) alpha; + value |= (((unsigned long) delta) & 0xff) << 8; value |= RCDF_ACTRL_LOAD_ALPHA; WRITE_VID32(address, value); return (GFX_STATUS_OK); @@ -1522,7 +1525,7 @@ gfx_set_alpha_priority(int priority) value = READ_VID32(RCDF_VID_ALPHA_CONTROL); pos = 16 + (gfx_alpha_select << 1); value &= ~(0x03l << pos); - value |= (unsigned long)priority << pos; + value |= (unsigned long) priority << pos; WRITE_VID32(RCDF_VID_ALPHA_CONTROL, value); return (GFX_STATUS_OK); } @@ -1550,7 +1553,7 @@ gfx_set_alpha_color(unsigned long color) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = RCDF_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 5); + address = RCDF_ALPHA_COLOR_1 + ((unsigned long) gfx_alpha_select << 5); WRITE_VID32(address, color); return (GFX_STATUS_OK); } @@ -1574,7 +1577,7 @@ gfx_set_alpha_color_enable(int enable) if (gfx_alpha_select > 2) return (GFX_STATUS_UNSUPPORTED); - address = RCDF_ALPHA_COLOR_1 + ((unsigned long)gfx_alpha_select << 5); + address = RCDF_ALPHA_COLOR_1 + ((unsigned long) gfx_alpha_select << 5); color = READ_VID32(address); if (enable) color |= RCDF_ALPHA_COLOR_ENABLE; @@ -1611,8 +1614,7 @@ gfx_set_no_ck_outside_alpha(int enable) if (enable) WRITE_VID32(RCDF_VID_ALPHA_CONTROL, value | RCDF_NO_CK_OUTSIDE_ALPHA); else - WRITE_VID32(RCDF_VID_ALPHA_CONTROL, - value & ~RCDF_NO_CK_OUTSIDE_ALPHA); + WRITE_VID32(RCDF_VID_ALPHA_CONTROL, value & ~RCDF_NO_CK_OUTSIDE_ALPHA); return (0); } @@ -1778,7 +1780,8 @@ gfx_get_video_format(void) case RCDF_VCFG_YVYU_FORMAT: return VIDEO_FORMAT_Y1Y2Y3Y0; } - } else { + } + else { switch (vcfg & RCDF_VCFG_VID_INP_FORMAT) { case RCDF_VCFG_UYVY_FORMAT: return VIDEO_FORMAT_UYVY; @@ -1922,11 +1925,11 @@ gfx_get_video_offset(void) #if GFX_VIDEO_DYNAMIC void redcloud_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset, - unsigned long *voffset) + unsigned long *voffset) #else void gfx_get_video_yuv_offsets(unsigned long *yoffset, unsigned long *uoffset, - unsigned long *voffset) + unsigned long *voffset) #endif { gfx_get_display_video_yuv_offsets(yoffset, uoffset, voffset); @@ -2023,8 +2026,8 @@ gfx_get_video_downscale_config(unsigned short *type, unsigned short *m) unsigned long downscale; downscale = READ_VID32(RCDF_VIDEO_DOWNSCALER_CONTROL); - *m = (unsigned short)((downscale & RCDF_VIDEO_DOWNSCALE_FACTOR_MASK) >> - RCDF_VIDEO_DOWNSCALE_FACTOR_POS) + 1; + *m = (unsigned short) ((downscale & RCDF_VIDEO_DOWNSCALE_FACTOR_MASK) >> + RCDF_VIDEO_DOWNSCALE_FACTOR_POS) + 1; switch (downscale & RCDF_VIDEO_DOWNSCALE_TYPE_MASK) { case RCDF_VIDEO_DOWNSCALE_TYPE_A: @@ -2049,28 +2052,32 @@ gfx_get_video_downscale_config(unsigned short *type, unsigned short *m) #if GFX_VIDEO_DYNAMIC void redcloud_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4) + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4) #else void gfx_get_video_downscale_coefficients(unsigned short *coef1, - unsigned short *coef2, unsigned short *coef3, unsigned short *coef4) + unsigned short *coef2, + unsigned short *coef3, + unsigned short *coef4) #endif { unsigned long coef; coef = READ_VID32(RCDF_VIDEO_DOWNSCALER_COEFFICIENTS); *coef1 = - (unsigned short)((coef >> RCDF_VIDEO_DOWNSCALER_COEF1_POS) & - RCDF_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> RCDF_VIDEO_DOWNSCALER_COEF1_POS) & + RCDF_VIDEO_DOWNSCALER_COEF_MASK); *coef2 = - (unsigned short)((coef >> RCDF_VIDEO_DOWNSCALER_COEF2_POS) & - RCDF_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> RCDF_VIDEO_DOWNSCALER_COEF2_POS) & + RCDF_VIDEO_DOWNSCALER_COEF_MASK); *coef3 = - (unsigned short)((coef >> RCDF_VIDEO_DOWNSCALER_COEF3_POS) & - RCDF_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> RCDF_VIDEO_DOWNSCALER_COEF3_POS) & + RCDF_VIDEO_DOWNSCALER_COEF_MASK); *coef4 = - (unsigned short)((coef >> RCDF_VIDEO_DOWNSCALER_COEF4_POS) & - RCDF_VIDEO_DOWNSCALER_COEF_MASK); + (unsigned short) ((coef >> RCDF_VIDEO_DOWNSCALER_COEF4_POS) & + RCDF_VIDEO_DOWNSCALER_COEF_MASK); return; } @@ -2089,8 +2096,7 @@ void gfx_get_video_downscale_enable(int *enable) #endif { - if (READ_VID32(RCDF_VIDEO_DOWNSCALER_CONTROL) & - RCDF_VIDEO_DOWNSCALE_ENABLE) + if (READ_VID32(RCDF_VIDEO_DOWNSCALER_CONTROL) & RCDF_VIDEO_DOWNSCALE_ENABLE) *enable = 1; else *enable = 0; @@ -2147,10 +2153,10 @@ gfx_get_video_position(void) /* Use routines to abstract version of display controller. */ hadjust = - (unsigned long)gfx_get_htotal() - (unsigned long)gfx_get_hsync_end() - + (unsigned long) gfx_get_htotal() - (unsigned long) gfx_get_hsync_end() - 14l; vadjust = - (unsigned long)gfx_get_vtotal() - (unsigned long)gfx_get_vsync_end() + + (unsigned long) gfx_get_vtotal() - (unsigned long) gfx_get_vsync_end() + 1l; xpos -= hadjust; ypos -= vadjust; @@ -2251,10 +2257,10 @@ gfx_get_video_request(short *x, short *y) unsigned long request = 0; request = (READ_VID32(RCDF_VIDEO_REQUEST)); - *x = (short)((request >> RCDF_VIDEO_X_REQUEST_POS) & - RCDF_VIDEO_REQUEST_MASK); - *y = (short)((request >> RCDF_VIDEO_Y_REQUEST_POS) & - RCDF_VIDEO_REQUEST_MASK); + *x = (short) ((request >> RCDF_VIDEO_X_REQUEST_POS) & + RCDF_VIDEO_REQUEST_MASK); + *y = (short) ((request >> RCDF_VIDEO_Y_REQUEST_POS) & + RCDF_VIDEO_REQUEST_MASK); *x -= gfx_get_htotal() - gfx_get_hsync_end() - 2; *y -= gfx_get_vtotal() - gfx_get_vsync_end() + 1; @@ -2274,23 +2280,23 @@ gfx_get_video_request(short *x, short *y) #if GFX_VIDEO_DYNAMIC int redcloud_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2) + unsigned short *select_color2, unsigned long *color1, + unsigned short *color2) #else int gfx_get_video_cursor(unsigned long *key, unsigned long *mask, - unsigned short *select_color2, unsigned long *color1, - unsigned short *color2) + unsigned short *select_color2, unsigned long *color1, + unsigned short *color2) #endif { *select_color2 = - (unsigned short)(READ_VID32(RCDF_CURSOR_COLOR_KEY) >> - RCDF_CURSOR_COLOR_KEY_OFFSET_POS); + (unsigned short) (READ_VID32(RCDF_CURSOR_COLOR_KEY) >> + RCDF_CURSOR_COLOR_KEY_OFFSET_POS); *key = READ_VID32(RCDF_CURSOR_COLOR_KEY) & RCDF_COLOR_MASK; *mask = READ_VID32(RCDF_CURSOR_COLOR_MASK) & RCDF_COLOR_MASK; *color1 = READ_VID32(RCDF_CURSOR_COLOR_1) & RCDF_COLOR_MASK; *color2 = - (unsigned short)(READ_VID32(RCDF_CURSOR_COLOR_2) & RCDF_COLOR_MASK); + (unsigned short) (READ_VID32(RCDF_CURSOR_COLOR_2) & RCDF_COLOR_MASK); return (0); } @@ -2324,7 +2330,7 @@ gfx_read_crc(void) if (gfx_test_timing_active()) { /* WAIT UNTIL ACTIVE DISPLAY */ - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); /* RESET CRC DURING ACTIVE DISPLAY */ @@ -2333,11 +2339,11 @@ gfx_read_crc(void) /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */ - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); crc = READ_VID32(RCDF_VID_CRC) >> 8; } return (crc); @@ -2373,7 +2379,7 @@ gfx_read_crc32(void) if (gfx_test_timing_active()) { /* WAIT UNTIL ACTIVE DISPLAY */ - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); /* RESET CRC DURING ACTIVE DISPLAY */ @@ -2382,11 +2388,11 @@ gfx_read_crc32(void) /* WAIT UNTIL NOT ACTIVE, THEN ACTIVE, NOT ACTIVE, THEN ACTIVE */ - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); crc = READ_VID32(RCDF_VID_CRC32); } return (crc); @@ -2402,11 +2408,11 @@ gfx_read_crc32(void) #if GFX_VIDEO_DYNAMIC unsigned long redcloud_read_window_crc(int source, unsigned short x, unsigned short y, - unsigned short width, unsigned short height, int crc32) + unsigned short width, unsigned short height, int crc32) #else unsigned long gfx_read_window_crc(int source, unsigned short x, unsigned short y, - unsigned short width, unsigned short height, int crc32) + unsigned short width, unsigned short height, int crc32) #endif { Q_WORD msr_value; @@ -2432,8 +2438,7 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, msr_value.low &= ~(RCDF_CONFIG_FMT_MASK); msr_value.low |= ((source == - CRC_SOURCE_FP_DATA) ? RCDF_CONFIG_FMT_FP : - RCDF_CONFIG_FMT_CRT); + CRC_SOURCE_FP_DATA) ? RCDF_CONFIG_FMT_FP : RCDF_CONFIG_FMT_CRT); gfx_msr_write(RC_ID_DF, MBD_MSR_CONFIG, &msr_value); } @@ -2466,7 +2471,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, sync_polarities = gfx_get_sync_polarities(); vsync_bit = 29; hsync_bit = 30; - } else { + } + else { vsync_bit = 25; hsync_bit = 26; } @@ -2474,7 +2480,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, if (sync_polarities & 1) { hsync_active_base = MCP_SETM0CTL; hsync_active_shift = 2; - } else { + } + else { hsync_active_base = MCP_SETN0CTL; hsync_active_shift = 1; } @@ -2483,7 +2490,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, vsync_inactive_base = MCP_SETN0CTL; vsync_active_shift = 2; vsync_inactive_shift = 1; - } else { + } + else { vsync_active_base = MCP_SETN0CTL; vsync_inactive_base = MCP_SETM0CTL; vsync_active_shift = 1; @@ -2498,8 +2506,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* VG VSync = Diag Bus Bit 25 */ msr_value.low = 0x000000A0; - msr_value.high = 0x00008000 | ((unsigned long)vsync_bit << 16) | - ((unsigned long)vsync_bit << 21) | ((unsigned long)vsync_bit << 26); + msr_value.high = 0x00008000 | ((unsigned long) vsync_bit << 16) | + ((unsigned long) vsync_bit << 21) | ((unsigned long) vsync_bit << 26); gfx_msr_write(RC_ID_MCP, vsync_inactive_base, &msr_value); /* STATE 1-2 TRANSITION (SET 4) */ @@ -2519,8 +2527,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* Notes: DF HSync = Diag Bus Bit 30 */ /* VG HSync = Diag Bus Bit 26 */ - msr_value.high = 0x00008000 | ((unsigned long)hsync_bit << 16) | - ((unsigned long)hsync_bit << 21) | ((unsigned long)hsync_bit << 26); + msr_value.high = 0x00008000 | ((unsigned long) hsync_bit << 16) | + ((unsigned long) hsync_bit << 21) | ((unsigned long) hsync_bit << 26); msr_value.low = 0x00000120; gfx_msr_write(RC_ID_MCP, hsync_active_base + 5, &msr_value); @@ -2552,8 +2560,8 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* data to access the diag bus */ /* 2. h_blank_pixels = HTOTAL - HSYNC_END */ - xpos = (unsigned long)x + ((unsigned long)gfx_get_htotal() - - (unsigned long)gfx_get_hsync_end() - 1l) - 3l; + xpos = (unsigned long) x + ((unsigned long) gfx_get_htotal() - + (unsigned long) gfx_get_hsync_end() - 1l) - 3l; if (source == CRC_SOURCE_GFX_DATA) xpos++; msr_value.high = 0x00000000; @@ -2563,7 +2571,7 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* COMPARATOR 1 */ /* Upper limit = xpos + width + (h_blank_pixels - 1) - 3 */ - msr_value.low = xpos + (unsigned long)width; + msr_value.low = xpos + (unsigned long) width; gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 2, &msr_value); /* COMPARATOR 2 */ @@ -2572,15 +2580,15 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* 1. v_blank_pixels = VTOTAL - VSYNC_END */ ypos = - (unsigned long)y + (unsigned long)gfx_get_vtotal() - - (unsigned long)gfx_get_vsync_end(); + (unsigned long) y + (unsigned long) gfx_get_vtotal() - + (unsigned long) gfx_get_vsync_end(); msr_value.low = ypos << 16; gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 4, &msr_value); /* COMPARATOR 3 */ /* Upper limit = ypos + height + v_blank_pixels */ - msr_value.low = (ypos + (unsigned long)height) << 16; + msr_value.low = (ypos + (unsigned long) height) << 16; gfx_msr_write(RC_ID_MCP, MCP_CMPVAL0 + 6, &msr_value); /* SET COMPARATOR MASKS */ @@ -2612,7 +2620,7 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, msr_value.high = 0x00000000; msr_value.low = 0xFFFF0000 | ((gfx_get_htotal() - (gfx_get_hsync_end() - gfx_get_hsync_start()) - - 1) & 0xFFFF); + 1) & 0xFFFF); gfx_msr_write(RC_ID_MCP, MCP_REGBVAL, &msr_value); /* PROGRAM ACTIONS */ @@ -2706,11 +2714,11 @@ gfx_read_window_crc(int source, unsigned short x, unsigned short y, /* DELAY TWO FRAMES */ - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; - while (gfx_test_vertical_active()) ; - while (!gfx_test_vertical_active()) ; + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); + while (gfx_test_vertical_active()); + while (!gfx_test_vertical_active()); /* VERIFY THAT XSTATE = 11 */ @@ -2767,7 +2775,7 @@ gfx_get_alpha_enable(int *enable) if (gfx_alpha_select <= 2) { value = READ_VID32(RCDF_ALPHA_CONTROL_1 + - ((unsigned long)gfx_alpha_select << 5)); + ((unsigned long) gfx_alpha_select << 5)); if (value & RCDF_ACTRL_WIN_ENABLE) *enable = 1; } @@ -2783,11 +2791,11 @@ gfx_get_alpha_enable(int *enable) #if GFX_VIDEO_DYNAMIC void redcloud_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height) + unsigned short *width, unsigned short *height) #else void gfx_get_alpha_size(unsigned short *x, unsigned short *y, - unsigned short *width, unsigned short *height) + unsigned short *width, unsigned short *height) #endif { unsigned long value = 0; @@ -2799,14 +2807,14 @@ gfx_get_alpha_size(unsigned short *x, unsigned short *y, if (gfx_alpha_select <= 2) { value = READ_VID32(RCDF_ALPHA_XPOS_1 + - ((unsigned long)gfx_alpha_select << 5)); - *x = (unsigned short)(value & 0x000007FF); - *width = (unsigned short)((value >> 16) & 0x000007FF) - *x; + ((unsigned long) gfx_alpha_select << 5)); + *x = (unsigned short) (value & 0x000007FF); + *width = (unsigned short) ((value >> 16) & 0x000007FF) - *x; value = READ_VID32(RCDF_ALPHA_YPOS_1 + - ((unsigned long)gfx_alpha_select << 5)); - *y = (unsigned short)(value & 0x000007FF); - *height = (unsigned short)((value >> 16) & 0x000007FF) - *y; + ((unsigned long) gfx_alpha_select << 5)); + *y = (unsigned short) (value & 0x000007FF); + *height = (unsigned short) ((value >> 16) & 0x000007FF) - *y; } *x -= gfx_get_htotal() - gfx_get_hsync_end() - 2; *y -= gfx_get_vtotal() - gfx_get_vsync_end() + 1; @@ -2835,9 +2843,9 @@ gfx_get_alpha_value(unsigned char *alpha, char *delta) if (gfx_alpha_select <= 2) { value = READ_VID32(RCDF_ALPHA_CONTROL_1 + - ((unsigned long)gfx_alpha_select << 5)); - *alpha = (unsigned char)(value & 0x00FF); - *delta = (char)((value >> 8) & 0x00FF); + ((unsigned long) gfx_alpha_select << 5)); + *alpha = (unsigned char) (value & 0x00FF); + *delta = (char) ((value >> 8) & 0x00FF); } return; } @@ -2862,7 +2870,7 @@ gfx_get_alpha_priority(int *priority) if (gfx_alpha_select <= 2) { value = READ_VID32(RCDF_VID_ALPHA_CONTROL); pos = 16 + (gfx_alpha_select << 1); - *priority = (int)((value >> pos) & 3); + *priority = (int) ((value >> pos) & 3); } return; } @@ -2886,11 +2894,11 @@ gfx_get_alpha_color(unsigned long *color) if (gfx_alpha_select <= 2) { *color = READ_VID32(RCDF_ALPHA_COLOR_1 + - ((unsigned long)gfx_alpha_select << 5)); + ((unsigned long) gfx_alpha_select << 5)); } return; } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gfx/vip_1200.c b/driver/xf86-video-geode/src/gfx/vip_1200.c index 731e1b8d1..34acb8aec 100644 --- a/driver/xf86-video-geode/src/gfx/vip_1200.c +++ b/driver/xf86-video-geode/src/gfx/vip_1200.c @@ -107,9 +107,9 @@ gfx_set_vip_base(unsigned long even, unsigned long odd) if (even) WRITE_VIP32(SC1200_VIP_EVEN_BASE, - even + (unsigned long)gfx_phys_fbptr); + even + (unsigned long) gfx_phys_fbptr); if (odd) - WRITE_VIP32(SC1200_VIP_ODD_BASE, odd + (unsigned long)gfx_phys_fbptr); + WRITE_VIP32(SC1200_VIP_ODD_BASE, odd + (unsigned long) gfx_phys_fbptr); return (0); } @@ -204,7 +204,7 @@ gfx_set_vbi_mode(int mode) config = READ_VIP32(SC1200_VIP_CONFIG); config &= ~(SC1200_VBI_ANCILLARY_TO_MEMORY | SC1200_VBI_TASK_A_TO_MEMORY | - SC1200_VBI_TASK_B_TO_MEMORY); + SC1200_VBI_TASK_B_TO_MEMORY); if (mode & VBI_ANCILLARY) config |= SC1200_VBI_ANCILLARY_TO_MEMORY; @@ -275,9 +275,9 @@ gfx_set_vbi_direct(unsigned long even_lines, unsigned long odd_lines) #endif { WRITE_VIP32(SC1200_EVEN_DIRECT_VBI_LINE_ENABLE, - even_lines & SC1200_DIRECT_VBI_LINE_ENABLE_MASK); + even_lines & SC1200_DIRECT_VBI_LINE_ENABLE_MASK); WRITE_VIP32(SC1200_ODD_DIRECT_VBI_LINE_ENABLE, - odd_lines & SC1200_DIRECT_VBI_LINE_ENABLE_MASK); + odd_lines & SC1200_DIRECT_VBI_LINE_ENABLE_MASK); return (0); } @@ -424,7 +424,8 @@ gfx_test_vip_fifo_overflow(void) * writing 1 */ WRITE_VIP32(SC1200_VIP_STATUS, SC1200_VIP_FIFO_OVERFLOW); return (1); - } else { + } + else { return (0); } } @@ -444,8 +445,8 @@ int gfx_get_vip_line(void) #endif { - return (int)(READ_VIP32(SC1200_VIP_CURRENT_LINE) & - SC1200_VIP_CURRENT_LINE_MASK); + return (int) (READ_VIP32(SC1200_VIP_CURRENT_LINE) & + SC1200_VIP_CURRENT_LINE_MASK); } /*---------------------------------------------------------------------------- @@ -573,8 +574,9 @@ gfx_get_vbi_mode(void) int mode = 0; config = - (int)(READ_VIP32(SC1200_VIP_CONFIG) & (SC1200_VBI_ANCILLARY_TO_MEMORY - | SC1200_VBI_TASK_A_TO_MEMORY | SC1200_VBI_TASK_B_TO_MEMORY)); + (int) (READ_VIP32(SC1200_VIP_CONFIG) & (SC1200_VBI_ANCILLARY_TO_MEMORY + | SC1200_VBI_TASK_A_TO_MEMORY | + SC1200_VBI_TASK_B_TO_MEMORY)); if (config & SC1200_VBI_ANCILLARY_TO_MEMORY) mode |= VBI_ANCILLARY; if (config & SC1200_VBI_TASK_A_TO_MEMORY) @@ -619,9 +621,9 @@ gfx_get_vbi_direct(int odd) if (odd) return (READ_VIP32(SC1200_ODD_DIRECT_VBI_LINE_ENABLE) & - SC1200_DIRECT_VBI_LINE_ENABLE_MASK); + SC1200_DIRECT_VBI_LINE_ENABLE_MASK); return (READ_VIP32(SC1200_EVEN_DIRECT_VBI_LINE_ENABLE) & - SC1200_DIRECT_VBI_LINE_ENABLE_MASK); + SC1200_DIRECT_VBI_LINE_ENABLE_MASK); } /*--------------------------------------------------------------------------- @@ -658,6 +660,6 @@ gfx_get_vip_bus_request_threshold_high(void) return (0); } -#endif /* GFX_READ_ROUTINES */ +#endif /* GFX_READ_ROUTINES */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gx_accel.c b/driver/xf86-video-geode/src/gx_accel.c index 34df4df6b..c3b3bc470 100644 --- a/driver/xf86-video-geode/src/gx_accel.c +++ b/driver/xf86-video-geode/src/gx_accel.c @@ -39,7 +39,9 @@ #include "vgaHW.h" #include "xf86.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "xf86fbman.h" #include "miline.h" #include "xaarop.h" @@ -97,8 +99,7 @@ static unsigned int ACCEL_STRIDE; /* static storage declarations */ -typedef struct sGBltBox -{ +typedef struct sGBltBox { ulong x, y; ulong w, h; ulong color; @@ -116,8 +117,7 @@ static ulong *gc8x8p; #endif #if GX_DASH_LINE_SUPPORT -typedef struct sGDashLine -{ +typedef struct sGDashLine { ulong pat[2]; int len; int fg; @@ -130,7 +130,9 @@ static GDashLine gdln; static unsigned int gu2_xshift, gu2_yshift; static unsigned int gu2_pitch; +#if XF86XAA static XAAInfoRecPtr localRecPtr; +#endif /* pat 0xF0 */ /* src 0xCC */ @@ -170,16 +172,16 @@ amd_gx_BppToRasterMode(int bpp) { switch (bpp) { case 16: - return MGP_RM_BPPFMT_565; + return MGP_RM_BPPFMT_565; case 32: - return MGP_RM_BPPFMT_8888; + return MGP_RM_BPPFMT_8888; case 8: - return MGP_RM_BPPFMT_332; + return MGP_RM_BPPFMT_332; default: - return 0; + return 0; } } -#endif /* OPT_ACCEL */ +#endif /* OPT_ACCEL */ /*---------------------------------------------------------------------------- * GXAccelSync. @@ -223,7 +225,7 @@ GXAccelSync(ScrnInfoPtr pScrni) *--------------------------------------------------------------------------*/ static void GXSetupForSolidFill(ScrnInfoPtr pScrni, - int color, int rop, unsigned int planemask) + int color, int rop, unsigned int planemask) { //ErrorF("GXSetupForSolidFill(%#x,%#x,%#x)\n", color, rop, planemask); rop &= 0x0F; @@ -233,16 +235,16 @@ GXSetupForSolidFill(ScrnInfoPtr pScrni, gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); #else { - unsigned int ROP = - BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; - if (((ROP ^ (ROP >> 1)) & 0x55) != 0) - BLT_MODE |= MGP_BM_DST_REQ; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_PAT_COLOR_0, planemask); - WRITE_GP32(MGP_SRC_COLOR_FG, color); - WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); + unsigned int ROP = BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + + BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; + if (((ROP ^ (ROP >> 1)) & 0x55) != 0) + BLT_MODE |= MGP_BM_DST_REQ; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_PAT_COLOR_0, planemask); + WRITE_GP32(MGP_SRC_COLOR_FG, color); + WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); } #endif } @@ -277,18 +279,18 @@ GXSubsequentSolidFillRect(ScrnInfoPtr pScrni, int x, int y, int w, int h) gfx_pattern_fill(x, y, w, h); #else { - unsigned int offset = CALC_FBOFFSET(x, y); - unsigned int size = (w << 16) | h; + unsigned int offset = CALC_FBOFFSET(x, y); + unsigned int size = (w << 16) | h; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, offset); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP32(MGP_BLT_MODE, BLT_MODE); + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, offset); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP32(MGP_BLT_MODE, BLT_MODE); } #endif } -#endif /* if GX_FILL_RECT_SUPPORT */ +#endif /* if GX_FILL_RECT_SUPPORT */ #if GX_CLREXP_8X8_PAT_SUPPORT /*---------------------------------------------------------------------------- @@ -315,24 +317,24 @@ GXSubsequentSolidFillRect(ScrnInfoPtr pScrni, int x, int y, int w, int h) static void GXSetupForColor8x8PatternFill(ScrnInfoPtr pScrni, int patx, int paty, int rop, - uint planemask, int trans_color) + uint planemask, int trans_color) { GeodeRec *pGeode = GEODEPTR(pScrni); //ErrorF("GXSetupForColor8x8PatternFill() pat %#x,%#x rop %#x %#x %#x\n", // patx, paty, rop, planemask, trans_color); rop &= 0x0F; - gc8x8p = (unsigned long *)FBADDR(patx, paty); + gc8x8p = (unsigned long *) FBADDR(patx, paty); /* gfx_set_solid_pattern is needed to clear src/pat transparency */ gfx_set_solid_pattern(0); gfx_set_raster_operation(planemask == ~0U ? PDfn[rop] : - (gfx_set_solid_source(planemask), PDfn_SM[rop])); + (gfx_set_solid_source(planemask), PDfn_SM[rop])); gfx2_set_source_stride(pGeode->Pitch); gfx2_set_destination_stride(pGeode->Pitch); if (trans_color == -1) - gfx2_set_source_transparency(0, 0); + gfx2_set_source_transparency(0, 0); else - gfx2_set_source_transparency(trans_color, ~0); + gfx2_set_source_transparency(trans_color, ~0); } /*---------------------------------------------------------------------------- @@ -358,7 +360,7 @@ GXSetupForColor8x8PatternFill(ScrnInfoPtr pScrni, int patx, int paty, int rop, *--------------------------------------------------------------------------*/ static void GXSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrni, int patx, int paty, - int x, int y, int w, int h) + int x, int y, int w, int h) { //ErrorF( // "GXSubsequentColor8x8PatternFillRect() patxy %d,%d at %d,%d %dsx%d\n", @@ -396,7 +398,7 @@ GXSubsequentColor8x8PatternFillRect(ScrnInfoPtr pScrni, int patx, int paty, *--------------------------------------------------------------------------*/ static void GXSetupForMono8x8PatternFill(ScrnInfoPtr pScrni, int patx, int paty, - int fg, int bg, int rop, uint planemask) + int fg, int bg, int rop, uint planemask) { //ErrorF( //"GXSetupForMono8x8PatternFill() pat %#x,%#x fg %#x bg %#x %#x %#x\n", @@ -405,24 +407,24 @@ GXSetupForMono8x8PatternFill(ScrnInfoPtr pScrni, int patx, int paty, #ifndef OPT_ACCEL gfx_set_mono_pattern(bg, fg, patx, paty, bg == -1 ? 1 : 0); gfx_set_raster_operation(planemask == ~0U ? PDfn[rop] : - (gfx_set_solid_source(planemask), PDfn_SM[rop])); + (gfx_set_solid_source(planemask), PDfn_SM[rop])); #else { - unsigned int ROP = BPP | - (bg == - -1 ? MGP_RM_PAT_MONO | MGP_RM_PAT_TRANS : MGP_RM_PAT_MONO) | - (planemask == ~0U ? PDfn[rop] : PDfn_SM[rop]); - BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; - if (((ROP ^ (ROP >> 1)) & 0x55) != 0) - BLT_MODE |= MGP_BM_DST_REQ; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_SRC_COLOR_FG, planemask); - WRITE_GP32(MGP_PAT_COLOR_0, bg); - WRITE_GP32(MGP_PAT_COLOR_1, fg); - WRITE_GP32(MGP_PAT_DATA_0, patx); - WRITE_GP32(MGP_PAT_DATA_1, paty); - WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); + unsigned int ROP = BPP | + (bg == + -1 ? MGP_RM_PAT_MONO | MGP_RM_PAT_TRANS : MGP_RM_PAT_MONO) | + (planemask == ~0U ? PDfn[rop] : PDfn_SM[rop]); + BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; + if (((ROP ^ (ROP >> 1)) & 0x55) != 0) + BLT_MODE |= MGP_BM_DST_REQ; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_SRC_COLOR_FG, planemask); + WRITE_GP32(MGP_PAT_COLOR_0, bg); + WRITE_GP32(MGP_PAT_COLOR_1, fg); + WRITE_GP32(MGP_PAT_DATA_0, patx); + WRITE_GP32(MGP_PAT_DATA_1, paty); + WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); } #endif } @@ -450,27 +452,27 @@ GXSetupForMono8x8PatternFill(ScrnInfoPtr pScrni, int patx, int paty, *--------------------------------------------------------------------------*/ static void GXSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrni, int patx, int paty, - int x, int y, int w, int h) + int x, int y, int w, int h) { DEBUGMSG(1, (0, X_INFO, "%s() pat %#x,%#x at %d,%d %dx%d\n", - __func__, patx, paty, x, y, w, h)); + __func__, patx, paty, x, y, w, h)); #ifndef OPT_ACCEL gfx_pattern_fill(x, y, w, h); #else { - unsigned int offset = - CALC_FBOFFSET(x, y) | ((x & 7) << 26) | ((y & 7) << 29); - unsigned int size = (w << 16) | h; - - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, offset); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP32(MGP_BLT_MODE, BLT_MODE); + unsigned int offset = + CALC_FBOFFSET(x, y) | ((x & 7) << 26) | ((y & 7) << 29); + unsigned int size = (w << 16) | h; + + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, offset); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP32(MGP_BLT_MODE, BLT_MODE); } #endif } -#endif /* GX_MONO_8X8_PAT_SUPPORT */ +#endif /* GX_MONO_8X8_PAT_SUPPORT */ #if GX_SCR2SCRCPY_SUPPORT /*---------------------------------------------------------------------------- @@ -492,40 +494,40 @@ GXSubsequentMono8x8PatternFillRect(ScrnInfoPtr pScrni, int patx, int paty, *---------------------------------------------------------------------------*/ static void GXSetupForScreenToScreenCopy(ScrnInfoPtr pScrni, int xdir, int ydir, int rop, - uint planemask, int trans_color) + uint planemask, int trans_color) { DEBUGMSG(1, (0, X_INFO, "%s() xd%d yd%d rop %#x %#x %#x\n", - __func__, xdir, ydir, rop, planemask, trans_color)); + __func__, xdir, ydir, rop, planemask, trans_color)); rop &= 0x0F; #ifndef OPT_ACCEL { - GeodeRec *pGeode = GEODEPTR(pScrni); - - gfx_set_solid_pattern(planemask); - /* transparency is a parameter to set_rop, but set...pattern clears - * transparency */ - if (trans_color == -1) - gfx2_set_source_transparency(0, 0); - else - gfx2_set_source_transparency(trans_color, ~0); - gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - gfx2_set_source_stride(pGeode->Pitch); - gfx2_set_destination_stride(pGeode->Pitch); + GeodeRec *pGeode = GEODEPTR(pScrni); + + gfx_set_solid_pattern(planemask); + /* transparency is a parameter to set_rop, but set...pattern clears + * transparency */ + if (trans_color == -1) + gfx2_set_source_transparency(0, 0); + else + gfx2_set_source_transparency(trans_color, ~0); + gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + gfx2_set_source_stride(pGeode->Pitch); + gfx2_set_destination_stride(pGeode->Pitch); } #else { - unsigned int ROP = - BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - if (trans_color != -1) - ROP |= MGP_RM_SRC_TRANS; - BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_PAT_COLOR_0, planemask); - WRITE_GP32(MGP_SRC_COLOR_FG, trans_color); - WRITE_GP32(MGP_SRC_COLOR_BG, ~0); - WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); + unsigned int ROP = BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + + if (trans_color != -1) + ROP |= MGP_RM_SRC_TRANS; + BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_PAT_COLOR_0, planemask); + WRITE_GP32(MGP_SRC_COLOR_FG, trans_color); + WRITE_GP32(MGP_SRC_COLOR_BG, ~0); + WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); } #endif } @@ -553,53 +555,54 @@ GXSetupForScreenToScreenCopy(ScrnInfoPtr pScrni, int xdir, int ydir, int rop, *---------------------------------------------------------------------------*/ static void GXSubsequentScreenToScreenCopy(ScrnInfoPtr pScrni, - int x1, int y1, int x2, int y2, int w, int h) + int x1, int y1, int x2, int y2, int w, int h) { DEBUGMSG(1, (0, X_INFO, "%s() from %d,%d to %d,%d %dx%d\n", - __func__, x1, y1, x2, y2, w, h)); + __func__, x1, y1, x2, y2, w, h)); #ifndef OPT_ACCEL { - int flags = 0; - - if (x2 > x1) - flags |= 1; - if (y2 > y1) - flags |= 2; - gfx2_screen_to_screen_blt(CALC_FBOFFSET(x1, y1), CALC_FBOFFSET(x2, - y2), w, h, flags); + int flags = 0; + + if (x2 > x1) + flags |= 1; + if (y2 > y1) + flags |= 2; + gfx2_screen_to_screen_blt(CALC_FBOFFSET(x1, y1), CALC_FBOFFSET(x2, + y2), w, + h, flags); } #else { - GeodeRec *pGeode = GEODEPTR(pScrni); - unsigned int src = CALC_FBOFFSET(x1, y1); - unsigned int dst = CALC_FBOFFSET(x2, y2); - unsigned int size = (w << 16) | h; - unsigned int blt_mode = BLT_MODE; - - if (x2 > x1) { - int n = (w << gu2_xshift) - 1; - - src += n; - dst += n; - blt_mode |= MGP_BM_NEG_XDIR; - } - if (y2 > y1) { - int n = (h - 1) * pGeode->Pitch; - - src += n; - dst += n; - blt_mode |= MGP_BM_NEG_YDIR; - } - GU2_WAIT_PENDING; - WRITE_GP32(MGP_SRC_OFFSET, src); - WRITE_GP32(MGP_DST_OFFSET, dst); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP16(MGP_BLT_MODE, blt_mode); + GeodeRec *pGeode = GEODEPTR(pScrni); + unsigned int src = CALC_FBOFFSET(x1, y1); + unsigned int dst = CALC_FBOFFSET(x2, y2); + unsigned int size = (w << 16) | h; + unsigned int blt_mode = BLT_MODE; + + if (x2 > x1) { + int n = (w << gu2_xshift) - 1; + + src += n; + dst += n; + blt_mode |= MGP_BM_NEG_XDIR; + } + if (y2 > y1) { + int n = (h - 1) * pGeode->Pitch; + + src += n; + dst += n; + blt_mode |= MGP_BM_NEG_YDIR; + } + GU2_WAIT_PENDING; + WRITE_GP32(MGP_SRC_OFFSET, src); + WRITE_GP32(MGP_DST_OFFSET, dst); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP16(MGP_BLT_MODE, blt_mode); } #endif } -#endif /* if GX_SCR2SCRCPY_SUPPORT */ +#endif /* if GX_SCR2SCRCPY_SUPPORT */ #if GX_SCANLINE_SUPPORT /*---------------------------------------------------------------------------- @@ -626,20 +629,20 @@ GXSubsequentScreenToScreenCopy(ScrnInfoPtr pScrni, */ static void GXSetupForScanlineImageWrite(ScrnInfoPtr pScrni, int rop, uint planemask, - int trans_color, int bpp, int depth) + int trans_color, int bpp, int depth) { GeodeRec *pGeode = GEODEPTR(pScrni); DEBUGMSG(1, (0, X_INFO, "%s() rop %#x %#x %#x %d %d\n", - __func__, rop, planemask, trans_color, bpp, depth)); + __func__, rop, planemask, trans_color, bpp, depth)); rop &= 0x0F; /* transparency is a parameter to set_rop, but set...pattern clears * transparency */ gfx_set_solid_pattern(planemask); if (trans_color == -1) - gfx2_set_source_transparency(0, 0); + gfx2_set_source_transparency(0, 0); else - gfx2_set_source_transparency(trans_color, ~0); + gfx2_set_source_transparency(trans_color, ~0); gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); gfx2_set_source_stride(pGeode->Pitch); gfx2_set_destination_stride(pGeode->Pitch); @@ -662,10 +665,10 @@ GXSetupForScanlineImageWrite(ScrnInfoPtr pScrni, int rop, uint planemask, *---------------------------------------------------------------------------*/ static void GXSubsequentScanlineImageWriteRect(ScrnInfoPtr pScrni, - int x, int y, int w, int h, int skipleft) + int x, int y, int w, int h, int skipleft) { DEBUGMSG(1, (0, X_INFO, "%s() rop %d,%d %dx%d %d\n", - __func__, x, y, w, h, skipleft)); + __func__, x, y, w, h, skipleft)); giwr.x = x; giwr.y = y; giwr.w = w; @@ -708,35 +711,39 @@ GXSubsequentImageWriteScanline(ScrnInfoPtr pScrni, int bufno) #if !GX_USE_OFFSCRN_MEM offset = pGeode->AccelImageWriteBuffers[bufno] - pGeode->FBBase; gfx2_screen_to_screen_blt(offset, CALC_FBOFFSET(giwr.x, giwr.y), giwr.w, - 1, 0); -#else /* if !GX_USE_OFFSCRN_MEM */ + 1, 0); +#else /* if !GX_USE_OFFSCRN_MEM */ gfx2_color_bitmap_to_screen_blt(0, 0, CALC_FBOFFSET(giwr.x, giwr.y), - giwr.w, 1, pGeode->AccelImageWriteBuffers[bufno], pGeode->Pitch); -#endif /* if !GX_USE_OFFSCRN_MEM */ + giwr.w, 1, + pGeode->AccelImageWriteBuffers[bufno], + pGeode->Pitch); +#endif /* if !GX_USE_OFFSCRN_MEM */ ++giwr.y; -#else /* if GX_ONE_LINE_AT_A_TIME */ +#else /* if GX_ONE_LINE_AT_A_TIME */ int blt_height; DEBUGMSG(1, (0, X_INFO, "%s() %d\n", __func__, bufno)); if ((blt_height = pGeode->NoOfImgBuffers) > giwr.h) - blt_height = giwr.h; + blt_height = giwr.h; if (++bufno < blt_height) - return; + return; #if !GX_USE_OFFSCRN_MEM offset = pGeode->AccelImageWriteBuffers[0] - pGeode->FBBase; gfx2_screen_to_screen_blt(offset, CALC_FBOFFSET(giwr.x, giwr.y), giwr.w, - blt_height, 0); + blt_height, 0); GXAccelSync(pScrni); -#else /* if !GX_USE_OFFSCRN_MEM */ +#else /* if !GX_USE_OFFSCRN_MEM */ gfx2_color_bitmap_to_screen_blt(0, 0, CALC_FBOFFSET(giwr.x, giwr.y), - giwr.w, blt_height, pGeode->AccelImageWriteBuffers[0], pGeode->Pitch); -#endif /* if !GX_USE_OFFSCRN_MEM */ + giwr.w, blt_height, + pGeode->AccelImageWriteBuffers[0], + pGeode->Pitch); +#endif /* if !GX_USE_OFFSCRN_MEM */ giwr.h -= blt_height; giwr.y += blt_height; -#endif /* if GX_ONE_LINE_AT_A_TIME */ +#endif /* if GX_ONE_LINE_AT_A_TIME */ } -#endif /* GX_SCANLINE_SUPPORT */ +#endif /* GX_SCANLINE_SUPPORT */ #if GX_CPU2SCREXP_SUPPORT /*---------------------------------------------------------------------------- @@ -759,13 +766,14 @@ GXSubsequentImageWriteScanline(ScrnInfoPtr pScrni, int bufno) static void GXSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrni, - int fg, int bg, int rop, uint planemask) + int fg, int bg, int rop, + uint planemask) { GeodeRec *pGeode = GEODEPTR(pScrni); ulong srcpitch; DEBUGMSG(1, (0, X_INFO, "%s() fg %#x bg %#x rop %#x %#x\n", - __func__, fg, bg, rop, planemask)); + __func__, fg, bg, rop, planemask)); rop &= 0x0F; srcpitch = ((pGeode->Pitch + 31) >> 5) << 2; #ifndef OPT_ACCEL @@ -776,20 +784,20 @@ GXSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrni, gfx2_set_destination_stride(pGeode->Pitch); #else { - unsigned int stride = (srcpitch << 16) | pGeode->Pitch; - unsigned int ROP = - BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - if (bg == -1) - ROP |= MGP_RM_SRC_TRANS; - BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? - MGP_BM_SRC_MONO | MGP_BM_SRC_FB | MGP_BM_DST_REQ : - MGP_BM_SRC_MONO | MGP_BM_SRC_FB; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_PAT_COLOR_0, planemask); - WRITE_GP32(MGP_SRC_COLOR_BG, bg); - WRITE_GP32(MGP_SRC_COLOR_FG, fg); - WRITE_GP32(MGP_STRIDE, stride); + unsigned int stride = (srcpitch << 16) | pGeode->Pitch; + unsigned int ROP = BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + + if (bg == -1) + ROP |= MGP_RM_SRC_TRANS; + BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? + MGP_BM_SRC_MONO | MGP_BM_SRC_FB | MGP_BM_DST_REQ : + MGP_BM_SRC_MONO | MGP_BM_SRC_FB; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_PAT_COLOR_0, planemask); + WRITE_GP32(MGP_SRC_COLOR_BG, bg); + WRITE_GP32(MGP_SRC_COLOR_FG, fg); + WRITE_GP32(MGP_STRIDE, stride); } #endif } @@ -812,10 +820,11 @@ GXSetupForScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrni, *---------------------------------------------------------------------------*/ static void GXSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrni, - int x, int y, int w, int h, int skipleft) + int x, int y, int w, int h, + int skipleft) { DEBUGMSG(1, (0, X_INFO, "%s() %d,%d %dx%d %d\n", - __func__, x, y, w, h, skipleft)); + __func__, x, y, w, h, skipleft)); gc2s.x = x; gc2s.y = y; gc2s.w = w; @@ -823,16 +832,16 @@ GXSubsequentScanlineCPUToScreenColorExpandFill(ScrnInfoPtr pScrni, #ifdef OPT_ACCEL { #if GX_ONE_LINE_AT_A_TIME - unsigned int size = (gc2s.w << 16) | 1; + unsigned int size = (gc2s.w << 16) | 1; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_WID_HEIGHT, size); + GU2_WAIT_PENDING; + WRITE_GP32(MGP_WID_HEIGHT, size); #else - GeodeRec *pGeode = GEODEPTR(pScrni); - unsigned int src = - pGeode->AccelColorExpandBuffers[0] - pGeode->FBBase; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_SRC_OFFSET, src); + GeodeRec *pGeode = GEODEPTR(pScrni); + unsigned int src = pGeode->AccelColorExpandBuffers[0] - pGeode->FBBase; + + GU2_WAIT_PENDING; + WRITE_GP32(MGP_SRC_OFFSET, src); #endif } #endif @@ -859,62 +868,64 @@ GXSubsequentColorExpandScanline(ScrnInfoPtr pScrni, int bufno) #ifndef OPT_ACCEL { #if GX_ONE_LINE_AT_A_TIME - ulong offset = - pGeode->AccelColorExpandBuffers[bufno] - pGeode->FBBase; - gfx2_mono_expand_blt(offset, 0, 0, CALC_FBOFFSET(gc2s.x, gc2s.y), - gc2s.w, 1, 0); - ++gc2s.y; -#else /* if GX_ONE_LINE_AT_A_TIME */ - ulong srcpitch; - int blt_height; - - if ((blt_height = pGeode->NoOfImgBuffers) > gc2s.h) - blt_height = gc2s.h; - if (++bufno < blt_height) - return; - - /* convert from bits to dwords */ - srcpitch = ((pGeode->Pitch + 31) >> 5) << 2; - gfx2_mono_bitmap_to_screen_blt(0, 0, CALC_FBOFFSET(gc2s.x, gc2s.y), - gc2s.w, blt_height, pGeode->AccelColorExpandBuffers[0], srcpitch); - gc2s.h -= blt_height; - gc2s.y += blt_height; -#endif /* if GX_ONE_LINE_AT_A_TIME */ + ulong offset = pGeode->AccelColorExpandBuffers[bufno] - pGeode->FBBase; + + gfx2_mono_expand_blt(offset, 0, 0, CALC_FBOFFSET(gc2s.x, gc2s.y), + gc2s.w, 1, 0); + ++gc2s.y; +#else /* if GX_ONE_LINE_AT_A_TIME */ + ulong srcpitch; + int blt_height; + + if ((blt_height = pGeode->NoOfImgBuffers) > gc2s.h) + blt_height = gc2s.h; + if (++bufno < blt_height) + return; + + /* convert from bits to dwords */ + srcpitch = ((pGeode->Pitch + 31) >> 5) << 2; + gfx2_mono_bitmap_to_screen_blt(0, 0, CALC_FBOFFSET(gc2s.x, gc2s.y), + gc2s.w, blt_height, + pGeode->AccelColorExpandBuffers[0], + srcpitch); + gc2s.h -= blt_height; + gc2s.y += blt_height; +#endif /* if GX_ONE_LINE_AT_A_TIME */ } -#else /* ifndef OPT_ACCEL */ +#else /* ifndef OPT_ACCEL */ { #if GX_ONE_LINE_AT_A_TIME - unsigned int src = - pGeode->AccelColorExpandBuffers[bufno] - pGeode->FBBase; - unsigned int dst = CALC_FBOFFSET(gc2s.x, gc2s.y); - - ++gc2s.y; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_SRC_OFFSET, src); - WRITE_GP32(MGP_DST_OFFSET, dst); - WRITE_GP16(MGP_BLT_MODE, BLT_MODE); -#else /* if GX_ONE_LINE_AT_A_TIME */ - unsigned int dst, size; - int blt_height; - - GU2_WAIT_BUSY; - if ((blt_height = pGeode->NoOfImgBuffers) > gc2s.h) - blt_height = gc2s.h; - if (++bufno < blt_height) - return; - dst = CALC_FBOFFSET(gc2s.x, gc2s.y); - size = (gc2s.w << 16) | blt_height; - gc2s.h -= blt_height; - gc2s.y += blt_height; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, dst); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP16(MGP_BLT_MODE, BLT_MODE); -#endif /* if GX_ONE_LINE_AT_A_TIME */ + unsigned int src = + pGeode->AccelColorExpandBuffers[bufno] - pGeode->FBBase; + unsigned int dst = CALC_FBOFFSET(gc2s.x, gc2s.y); + + ++gc2s.y; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_SRC_OFFSET, src); + WRITE_GP32(MGP_DST_OFFSET, dst); + WRITE_GP16(MGP_BLT_MODE, BLT_MODE); +#else /* if GX_ONE_LINE_AT_A_TIME */ + unsigned int dst, size; + int blt_height; + + GU2_WAIT_BUSY; + if ((blt_height = pGeode->NoOfImgBuffers) > gc2s.h) + blt_height = gc2s.h; + if (++bufno < blt_height) + return; + dst = CALC_FBOFFSET(gc2s.x, gc2s.y); + size = (gc2s.w << 16) | blt_height; + gc2s.h -= blt_height; + gc2s.y += blt_height; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, dst); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP16(MGP_BLT_MODE, BLT_MODE); +#endif /* if GX_ONE_LINE_AT_A_TIME */ } -#endif /* ifndef OPT_ACCEL */ +#endif /* ifndef OPT_ACCEL */ } -#endif /* GX_CPU2SCREXP_SUPPORT */ +#endif /* GX_CPU2SCREXP_SUPPORT */ #if GX_SCR2SCREXP_SUPPORT /*---------------------------------------------------------------------------- @@ -937,36 +948,36 @@ GXSubsequentColorExpandScanline(ScrnInfoPtr pScrni, int bufno) static void GXSetupForScreenToScreenColorExpandFill(ScrnInfoPtr pScrni, int fg, int bg, - int rop, uint planemask) + int rop, uint planemask) { DEBUGMSG(1, (0, X_INFO, "%s() fg %#x bg %#x rop %#x %#x\n", - __func__, fg, bg, rop, planemask)); + __func__, fg, bg, rop, planemask)); rop &= 0x0F; #ifndef OPT_ACCEL { - GeodeRec *pGeode = GEODEPTR(pScrni); + GeodeRec *pGeode = GEODEPTR(pScrni); - gfx_set_solid_pattern(planemask); - gfx_set_mono_source(bg, fg, bg == -1 ? 1 : 0); - gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - gfx2_set_source_stride(pGeode->Pitch); - gfx2_set_destination_stride(pGeode->Pitch); + gfx_set_solid_pattern(planemask); + gfx_set_mono_source(bg, fg, bg == -1 ? 1 : 0); + gfx_set_raster_operation(planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + gfx2_set_source_stride(pGeode->Pitch); + gfx2_set_destination_stride(pGeode->Pitch); } #else { - unsigned int ROP = - BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); - if (bg == -1) - ROP |= MGP_RM_SRC_TRANS; - BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? - MGP_BM_SRC_MONO | MGP_BM_SRC_FB | MGP_BM_DST_REQ : - MGP_BM_SRC_MONO | MGP_BM_SRC_FB; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_PAT_COLOR_0, planemask); - WRITE_GP32(MGP_SRC_COLOR_BG, bg); - WRITE_GP32(MGP_SRC_COLOR_FG, fg); - WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); + unsigned int ROP = BPP | (planemask == ~0U ? SDfn[rop] : SDfn_PM[rop]); + + if (bg == -1) + ROP |= MGP_RM_SRC_TRANS; + BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? + MGP_BM_SRC_MONO | MGP_BM_SRC_FB | MGP_BM_DST_REQ : + MGP_BM_SRC_MONO | MGP_BM_SRC_FB; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_PAT_COLOR_0, planemask); + WRITE_GP32(MGP_SRC_COLOR_BG, bg); + WRITE_GP32(MGP_SRC_COLOR_FG, fg); + WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); } #endif } @@ -990,29 +1001,31 @@ GXSetupForScreenToScreenColorExpandFill(ScrnInfoPtr pScrni, int fg, int bg, *---------------------------------------------------------------------------*/ static void GXSubsequentScreenToScreenColorExpandFill(ScrnInfoPtr pScrni, - int x, int y, int w, int h, int srcx, int srcy, int offset) + int x, int y, int w, int h, int srcx, + int srcy, int offset) { DEBUGMSG(1, (0, X_INFO, "%s() %d,%d %dx%d %d,%d %d\n", - __func__, x, y, w, h, srcx, srcy, offset)); + __func__, x, y, w, h, srcx, srcy, offset)); #ifndef OPT_ACCEL gfx2_mono_expand_blt(CALC_FBOFFSET(srcx, srcy), offset, 0, - CALC_FBOFFSET(x, y), w, h, 0); + CALC_FBOFFSET(x, y), w, h, 0); #else { - unsigned int src = (CALC_FBOFFSET(srcx, - srcy) + (offset >> 3)) | ((offset & 7) << 26); - unsigned int dst = CALC_FBOFFSET(x, y); - unsigned int size = (w << 16) | h; - - GU2_WAIT_PENDING; - WRITE_GP32(MGP_SRC_OFFSET, src); - WRITE_GP32(MGP_DST_OFFSET, dst); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP16(MGP_BLT_MODE, BLT_MODE); + unsigned int src = (CALC_FBOFFSET(srcx, + srcy) + + (offset >> 3)) | ((offset & 7) << 26); + unsigned int dst = CALC_FBOFFSET(x, y); + unsigned int size = (w << 16) | h; + + GU2_WAIT_PENDING; + WRITE_GP32(MGP_SRC_OFFSET, src); + WRITE_GP32(MGP_DST_OFFSET, dst); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP16(MGP_BLT_MODE, BLT_MODE); } #endif } -#endif /* GX_SCR2SCREXP_SUPPORT */ +#endif /* GX_SCR2SCREXP_SUPPORT */ #define VM_MAJOR_DEC 0 #define VM_MINOR_DEC 0 @@ -1056,24 +1069,25 @@ static void GXSetupForSolidLine(ScrnInfoPtr pScrni, int color, int rop, uint planemask) { DEBUGMSG(1, (0, X_INFO, "%s() %#x %#x %#x\n", - __func__, color, rop, planemask)); + __func__, color, rop, planemask)); rop &= 0x0F; #ifndef OPT_ACCEL gfx_set_solid_pattern(color); gfx_set_raster_operation(planemask == ~0U ? PDfn[rop] : - (gfx_set_solid_source(planemask), PDfn_SM[rop])); + (gfx_set_solid_source(planemask), PDfn_SM[rop])); #else { - unsigned int ROP = - BPP | (planemask == ~0U ? PDfn[rop] : PDfn_SM[rop]); - BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; - VEC_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? ((BLT_MODE |= - MGP_BM_DST_REQ), MGP_VM_DST_REQ) : 0; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, ROP); - WRITE_GP32(MGP_PAT_COLOR_0, color); - WRITE_GP32(MGP_SRC_COLOR_FG, planemask); - WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); + unsigned int ROP = BPP | (planemask == ~0U ? PDfn[rop] : PDfn_SM[rop]); + + BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; + VEC_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? ((BLT_MODE |= + MGP_BM_DST_REQ), + MGP_VM_DST_REQ) : 0; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, ROP); + WRITE_GP32(MGP_PAT_COLOR_0, color); + WRITE_GP32(MGP_SRC_COLOR_FG, planemask); + WRITE_GP32(MGP_STRIDE, ACCEL_STRIDE); } #endif } @@ -1103,14 +1117,15 @@ GXSetupForSolidLine(ScrnInfoPtr pScrni, int color, int rop, uint planemask) *---------------------------------------------------------------------------*/ static void GXSubsequentSolidBresenhamLine(ScrnInfoPtr pScrni, int x1, int y1, - int absmaj, int absmin, int err, int len, int octant) + int absmaj, int absmin, int err, int len, + int octant) { long axial, diagn; DEBUGMSG(1, (0, X_INFO, "%s() %d,%d %d %d, %d %d, %d\n", - __func__, x1, y1, absmaj, absmin, err, len, octant)); + __func__, x1, y1, absmaj, absmin, err, len, octant)); if (len <= 0) - return; + return; axial = absmin; err += axial; diagn = absmin - absmaj; @@ -1118,16 +1133,16 @@ GXSubsequentSolidBresenhamLine(ScrnInfoPtr pScrni, int x1, int y1, gfx_bresenham_line(x1, y1, len, err, axial, diagn, vmode[octant]); #else { - unsigned int offset = CALC_FBOFFSET(x1, y1); - unsigned int vec_err = (axial << 16) | (unsigned short)diagn; - unsigned int vec_len = (len << 16) | (unsigned short)err; - unsigned int vec_mode = VEC_MODE | vmode[octant]; - - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, offset); - WRITE_GP32(MGP_VEC_ERR, vec_err); - WRITE_GP32(MGP_VEC_LEN, vec_len); - WRITE_GP32(MGP_VECTOR_MODE, vec_mode); + unsigned int offset = CALC_FBOFFSET(x1, y1); + unsigned int vec_err = (axial << 16) | (unsigned short) diagn; + unsigned int vec_len = (len << 16) | (unsigned short) err; + unsigned int vec_mode = VEC_MODE | vmode[octant]; + + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, offset); + WRITE_GP32(MGP_VEC_ERR, vec_err); + WRITE_GP32(MGP_VEC_LEN, vec_len); + WRITE_GP32(MGP_VECTOR_MODE, vec_mode); } #endif } @@ -1149,36 +1164,37 @@ GXSubsequentSolidBresenhamLine(ScrnInfoPtr pScrni, int x1, int y1, *---------------------------------------------------------------------------*/ static void GXSubsequentSolidTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, - int x1, int y1, int flags) + int x1, int y1, int flags) { long dx, dy, dmaj, dmin, octant, bias; long axial, diagn, err, len; DEBUGMSG(1, (0, X_INFO, "%s() %d,%d %d,%d, %#x\n", - __func__, x0, y0, x1, y1, flags)); + __func__, x0, y0, x1, y1, flags)); if ((dx = x1 - x0) < 0) - dx = -dx; + dx = -dx; if ((dy = y1 - y0) < 0) - dy = -dy; + dy = -dy; if (dy >= dx) { - dmaj = dy; - dmin = dx; - octant = YMAJOR; - } else { - dmaj = dx; - dmin = dy; - octant = 0; + dmaj = dy; + dmin = dx; + octant = YMAJOR; + } + else { + dmaj = dx; + dmin = dy; + octant = 0; } len = dmaj; if ((flags & OMIT_LAST) == 0) - ++len; + ++len; if (len <= 0) - return; + return; if (x1 < x0) - octant |= XDECREASING; + octant |= XDECREASING; if (y1 < y0) - octant |= YDECREASING; + octant |= YDECREASING; axial = dmin << 1; bias = miGetZeroLineBias(pScrni->pScreen); @@ -1189,16 +1205,16 @@ GXSubsequentSolidTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, gfx_bresenham_line(x0, y0, len, err, axial, diagn, vmode[octant]); #else { - unsigned int offset = CALC_FBOFFSET(x0, y0); - unsigned int vec_err = (axial << 16) | (unsigned short)diagn; - unsigned int vec_len = (len << 16) | (unsigned short)err; - unsigned int vec_mode = VEC_MODE | vmode[octant]; - - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, offset); - WRITE_GP32(MGP_VEC_ERR, vec_err); - WRITE_GP32(MGP_VEC_LEN, vec_len); - WRITE_GP32(MGP_VECTOR_MODE, vec_mode); + unsigned int offset = CALC_FBOFFSET(x0, y0); + unsigned int vec_err = (axial << 16) | (unsigned short) diagn; + unsigned int vec_len = (len << 16) | (unsigned short) err; + unsigned int vec_mode = VEC_MODE | vmode[octant]; + + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, offset); + WRITE_GP32(MGP_VEC_ERR, vec_err); + WRITE_GP32(MGP_VEC_LEN, vec_len); + WRITE_GP32(MGP_VECTOR_MODE, vec_mode); } #endif } @@ -1222,28 +1238,27 @@ GXSubsequentSolidTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, *--------------------------------------------------------------------------- */ static void -GXSubsequentSolidHorVertLine(ScrnInfoPtr pScrni, - int x, int y, int len, int dir) +GXSubsequentSolidHorVertLine(ScrnInfoPtr pScrni, int x, int y, int len, int dir) { DEBUGMSG(1, (0, X_INFO, "%s() %d,%d %d %d\n", __func__, x, y, len, dir)); #ifndef OPT_ACCEL if (dir == DEGREES_0) - gfx_pattern_fill(x, y, len, 1); + gfx_pattern_fill(x, y, len, 1); else - gfx_pattern_fill(x, y, 1, len); + gfx_pattern_fill(x, y, 1, len); #else { - unsigned int offset = CALC_FBOFFSET(x, y); - unsigned int size = - dir == DEGREES_0 ? (len << 16) | 1 : (1 << 16) | len; - GU2_WAIT_PENDING; - WRITE_GP32(MGP_DST_OFFSET, offset); - WRITE_GP32(MGP_WID_HEIGHT, size); - WRITE_GP32(MGP_BLT_MODE, BLT_MODE); + unsigned int offset = CALC_FBOFFSET(x, y); + unsigned int size = + dir == DEGREES_0 ? (len << 16) | 1 : (1 << 16) | len; + GU2_WAIT_PENDING; + WRITE_GP32(MGP_DST_OFFSET, offset); + WRITE_GP32(MGP_WID_HEIGHT, size); + WRITE_GP32(MGP_BLT_MODE, BLT_MODE); } #endif } -#endif /* GX_BRES_LINE_SUPPORT */ +#endif /* GX_BRES_LINE_SUPPORT */ #if GX_DASH_LINE_SUPPORT /*---------------------------------------------------------------------------- @@ -1266,23 +1281,23 @@ GXSubsequentSolidHorVertLine(ScrnInfoPtr pScrni, *---------------------------------------------------------------------------*/ static void GXSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop, - unsigned int planemask, int length, unsigned char *pattern) + unsigned int planemask, int length, unsigned char *pattern) { int i, l, n, m; CARD32 pat = *pattern; CARD32 pat8x8[2]; if (length <= 0) - return; + return; i = l = m = 0; while (i < 2) { - m |= pat >> l; - l += length; - if ((n = l - 32) >= 0) { - pat8x8[i++] = m; - m = pat << (length - n); - l = n; - } + m |= pat >> l; + l += length; + if ((n = l - 32) >= 0) { + pat8x8[i++] = m; + m = pat << (length - n); + l = n; + } } gdln.pat[0] = pat8x8[0]; gdln.pat[1] = pat8x8[1]; @@ -1292,7 +1307,7 @@ GXSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop, rop &= 0x0F; gfx_set_solid_pattern(0); gfx_set_raster_operation(planemask == ~0U ? PDfn[rop] : - (gfx_set_solid_source(planemask), PDfn_SM[rop])); + (gfx_set_solid_source(planemask), PDfn_SM[rop])); } /*--------------------------------------------------------------------------- @@ -1324,8 +1339,8 @@ GXSetupForDashedLine(ScrnInfoPtr pScrn, int fg, int bg, int rop, */ static void GXSubsequentDashedBresenhamLine(ScrnInfoPtr pScrni, - int x1, int y1, int absmaj, int absmin, - int err, int len, int octant, int phase) + int x1, int y1, int absmaj, int absmin, + int err, int len, int octant, int phase) { int i, n; int axial, diagn; @@ -1338,16 +1353,16 @@ GXSubsequentDashedBresenhamLine(ScrnInfoPtr pScrni, i = phase >= 32 ? (phase -= 32, 1) : 0; n = 32 - phase; pat8x8[0] = - ((gdln.pat[i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[1 - i] << n); + ((gdln.pat[i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[1 - i] << n); pat8x8[1] = - ((gdln.pat[1 - i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[i] << n); + ((gdln.pat[1 - i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[i] << n); axial = absmin; err += axial; diagn = absmin - absmaj; gfx_set_mono_pattern(gdln.bg, gdln.fg, pat8x8[0], pat8x8[1], trans); gfx2_set_pattern_origin(x1, y1); gfx2_bresenham_line(CALC_FBOFFSET(x1, y1), len, err, axial, diagn, - vmode[octant]); + vmode[octant]); } /*--------------------------------------------------------------------------- @@ -1368,7 +1383,7 @@ GXSubsequentDashedBresenhamLine(ScrnInfoPtr pScrni, *---------------------------------------------------------------------------*/ static void GXSubsequentDashedTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, - int x1, int y1, int flags, int phase) + int x1, int y1, int flags, int phase) { int i, n; long dx, dy, dmaj, dmin, octant, bias; @@ -1380,32 +1395,33 @@ GXSubsequentDashedTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, i = phase >= 32 ? (phase -= 32, 1) : 0; n = 32 - phase; pat8x8[0] = - ((gdln.pat[i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[1 - i] << n); + ((gdln.pat[i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[1 - i] << n); pat8x8[1] = - ((gdln.pat[1 - i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[i] << n); + ((gdln.pat[1 - i] >> phase) & ((1UL << n) - 1)) | (gdln.pat[i] << n); if ((dx = x1 - x0) < 0) - dx = -dx; + dx = -dx; if ((dy = y1 - y0) < 0) - dy = -dy; + dy = -dy; if (dy >= dx) { - dmaj = dy; - dmin = dx; - octant = YMAJOR; - } else { - dmaj = dx; - dmin = dy; - octant = 0; + dmaj = dy; + dmin = dx; + octant = YMAJOR; + } + else { + dmaj = dx; + dmin = dy; + octant = 0; } len = dmaj; if ((flags & OMIT_LAST) == 0) - ++len; + ++len; if (len <= 0) - return; + return; if (x1 < x0) - octant |= XDECREASING; + octant |= XDECREASING; if (y1 < y0) - octant |= YDECREASING; + octant |= YDECREASING; axial = dmin << 1; bias = miGetZeroLineBias(pScrni->pScreen); @@ -1414,16 +1430,16 @@ GXSubsequentDashedTwoPointLine(ScrnInfoPtr pScrni, int x0, int y0, gfx2_set_pattern_origin(x0, y0); gfx2_bresenham_line(CALC_FBOFFSET(x0, y0), len, err, axial, diagn, - vmode[octant]); + vmode[octant]); } -#endif /* GX_DASH_LINE_SUPPORT */ +#endif /* GX_DASH_LINE_SUPPORT */ #if GX_WRITE_PIXMAP_SUPPORT static void GXWritePixmap(ScrnInfoPtr pScrni, int x, int y, int w, int h, - unsigned char *src, int srcwidth, int rop, unsigned int planemask, - int trans, int bpp, int depth) + unsigned char *src, int srcwidth, int rop, unsigned int planemask, + int trans, int bpp, int depth) { GeodeRec *pGeode = GEODEPTR(pScrni); @@ -1431,29 +1447,30 @@ GXWritePixmap(ScrnInfoPtr pScrni, int x, int y, int w, int h, // x, y, w, h, src, srcwidth, rop, planemask, trans, bpp, depth); if (bpp == pScrni->bitsPerPixel) { - rop &= 0x0F; - if (rop == GXcopy && trans == -1) { - gfx_wait_until_idle(); - geode_memory_to_screen_blt((unsigned long)src, - (unsigned long)FBADDR(x, y), srcwidth, pGeode->Pitch, w, - h, bpp); - } else { - gfx_set_solid_pattern(planemask); - gfx_set_raster_operation(planemask == - ~0U ? SDfn[rop] : SDfn_PM[rop]); - if (trans != -1) - gfx_color_bitmap_to_screen_xblt(0, 0, x, y, w, h, src, - srcwidth, trans); - else - gfx_color_bitmap_to_screen_blt(0, 0, x, y, w, h, src, - srcwidth); - SET_SYNC_FLAG(pGeode->AccelInfoRec); - } - } else - pGeode->WritePixmap(pScrni, x, y, w, h, src, srcwidth, rop, planemask, - trans, bpp, depth); + rop &= 0x0F; + if (rop == GXcopy && trans == -1) { + gfx_wait_until_idle(); + geode_memory_to_screen_blt((unsigned long) src, + (unsigned long) FBADDR(x, y), srcwidth, + pGeode->Pitch, w, h, bpp); + } + else { + gfx_set_solid_pattern(planemask); + gfx_set_raster_operation(planemask == + ~0U ? SDfn[rop] : SDfn_PM[rop]); + if (trans != -1) + gfx_color_bitmap_to_screen_xblt(0, 0, x, y, w, h, src, + srcwidth, trans); + else + gfx_color_bitmap_to_screen_blt(0, 0, x, y, w, h, src, srcwidth); + SET_SYNC_FLAG(pGeode->AccelInfoRec); + } + } + else + pGeode->WritePixmap(pScrni, x, y, w, h, src, srcwidth, rop, planemask, + trans, bpp, depth); } -#endif /* if GX_WRITE_PIXMAP_SUPPORT */ +#endif /* if GX_WRITE_PIXMAP_SUPPORT */ #if XF86EXA @@ -1470,7 +1487,7 @@ amd_gx_exa_Done(PixmapPtr p) static Bool amd_gx_exa_UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, - char *src, int src_pitch) + char *src, int src_pitch) { char *dst = pDst->devPrivate.ptr; int dst_pitch = exaGetPixmapPitch(pDst); @@ -1478,14 +1495,14 @@ amd_gx_exa_UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, dst += y * dst_pitch + x * (bpp >> 3); GU2_WAIT_BUSY; - geode_memory_to_screen_blt((unsigned long)src, (unsigned long)dst, - src_pitch, dst_pitch, w, h, bpp); + geode_memory_to_screen_blt((unsigned long) src, (unsigned long) dst, + src_pitch, dst_pitch, w, h, bpp); return TRUE; } static Bool amd_gx_exa_DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, - char *dst, int dst_pitch) + char *dst, int dst_pitch) { char *src = pSrc->devPrivate.ptr; int src_pitch = exaGetPixmapPitch(pSrc); @@ -1493,8 +1510,8 @@ amd_gx_exa_DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, src += (y * src_pitch) + (x * (bpp >> 3)); GU2_WAIT_BUSY; - geode_memory_to_screen_blt((unsigned long)src, (unsigned long)dst, - src_pitch, dst_pitch, w, h, bpp); + geode_memory_to_screen_blt((unsigned long) src, (unsigned long) dst, + src_pitch, dst_pitch, w, h, bpp); return TRUE; } @@ -1505,7 +1522,7 @@ amd_gx_exa_PrepareSolid(PixmapPtr pxMap, int alu, Pixel planemask, Pixel fg) { int dstPitch = exaGetPixmapPitch(pxMap); unsigned int ROP = amd_gx_BppToRasterMode(pxMap->drawable.bitsPerPixel) - | (planemask == ~0U ? SDfn[alu] : SDfn_PM[alu]); + | (planemask == ~0U ? SDfn[alu] : SDfn_PM[alu]); // FIXME: this should go away -- workaround for the blockparty icon corruption //if (pxMap->drawable.bitsPerPixel == 32) @@ -1513,7 +1530,7 @@ amd_gx_exa_PrepareSolid(PixmapPtr pxMap, int alu, Pixel planemask, Pixel fg) BLT_MODE = ((ROP ^ (ROP >> 2)) & 0x33) == 0 ? MGP_BM_SRC_MONO : 0; if (((ROP ^ (ROP >> 1)) & 0x55) != 0) - BLT_MODE |= MGP_BM_DST_REQ; + BLT_MODE |= MGP_BM_DST_REQ; //ErrorF("amd_gx_exa_PrepareSolid(%#x,%#x,%#x - ROP=%x,BLT_MODE=%x)\n", alu, planemask, fg, ROP, BLT_MODE); GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, ROP); @@ -1543,7 +1560,7 @@ amd_gx_exa_Solid(PixmapPtr pxMap, int x1, int y1, int x2, int y2) static Bool amd_gx_exa_PrepareCopy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, - int alu, Pixel planemask) + int alu, Pixel planemask) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); int dstPitch = exaGetPixmapPitch(pxDst); @@ -1552,7 +1569,7 @@ amd_gx_exa_PrepareCopy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, /* Punt if the color formats aren't the same */ if (pxSrc->drawable.bitsPerPixel != pxDst->drawable.bitsPerPixel) - return FALSE; + return FALSE; //ErrorF("amd_gx_exa_PrepareCopy() dx%d dy%d alu %#x %#x\n", // dx, dy, alu, planemask); @@ -1563,10 +1580,10 @@ amd_gx_exa_PrepareCopy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, pGeode->cpyDx = dx; pGeode->cpyDy = dy; ROP = amd_gx_BppToRasterMode(pxSrc->drawable.bitsPerPixel) | - (planemask == ~0U ? SDfn[alu] : SDfn_PM[alu]); + (planemask == ~0U ? SDfn[alu] : SDfn_PM[alu]); BLT_MODE = ((ROP ^ (ROP >> 1)) & 0x55) != 0 ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, ROP); WRITE_GP32(MGP_PAT_COLOR_0, planemask); @@ -1578,16 +1595,16 @@ amd_gx_exa_PrepareCopy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, static void amd_gx_exa_Copy(PixmapPtr pxDst, int srcX, int srcY, int dstX, int dstY, - int w, int h) + int w, int h) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); int dstBpp = (pxDst->drawable.bitsPerPixel + 7) / 8; int dstPitch = exaGetPixmapPitch(pxDst); unsigned int srcOffset = - pGeode->cpySrcOffset + (pGeode->cpySrcPitch * srcY) + - (pGeode->cpySrcBpp * srcX); + pGeode->cpySrcOffset + (pGeode->cpySrcPitch * srcY) + + (pGeode->cpySrcBpp * srcX); unsigned int dstOffset = - exaGetPixmapOffset(pxDst) + (dstPitch * dstY) + (dstBpp * dstX); + exaGetPixmapOffset(pxDst) + (dstPitch * dstY) + (dstBpp * dstX); unsigned int size = (w << 16) | h; unsigned int blt_mode = BLT_MODE; @@ -1595,14 +1612,14 @@ amd_gx_exa_Copy(PixmapPtr pxDst, int srcX, int srcY, int dstX, int dstY, // dstX, dstY, w, h); if (pGeode->cpyDx < 0) { - srcOffset += w * pGeode->cpySrcBpp - 1; - dstOffset += w * dstBpp - 1; - blt_mode |= MGP_BM_NEG_XDIR; + srcOffset += w * pGeode->cpySrcBpp - 1; + dstOffset += w * dstBpp - 1; + blt_mode |= MGP_BM_NEG_XDIR; } if (pGeode->cpyDy < 0) { - srcOffset += (h - 1) * pGeode->cpySrcPitch; - dstOffset += (h - 1) * dstPitch; - blt_mode |= MGP_BM_NEG_YDIR; + srcOffset += (h - 1) * pGeode->cpySrcPitch; + dstOffset += (h - 1) * dstPitch; + blt_mode |= MGP_BM_NEG_YDIR; } GU2_WAIT_PENDING; WRITE_GP32(MGP_SRC_OFFSET, srcOffset); @@ -1633,32 +1650,31 @@ amd_gx_exa_Copy(PixmapPtr pxDst, int srcX, int srcY, int dstX, int dstY, #define a_1 MGP_RM_SELECT_ALPHA_1 #define MGP_RM_ALPHA_TO_ARGB (MGP_RM_ALPHA_TO_ALPHA | MGP_RM_ALPHA_TO_RGB) -#define gxPictOpMAX PictOpAdd /* highest accelerated op */ +#define gxPictOpMAX PictOpAdd /* highest accelerated op */ unsigned int amd_gx_exa_alpha_ops[] = /* A B OP AS const = 0 */ { - (SRC_DST | Aa_B0 | a_C), 0, /* clear (src*0) */ - (SRC_DST | Aa_B0 | a_1), 0, /* src (src*1) */ - (DST_SRC | Aa_B0 | a_1), 0, /* dst (dst*1) */ - (SRC_DST | A1_B1a | a_A), 0, /* src-over (src*1 + dst(1-A)) */ - (DST_SRC | A1_B1a | a_A), 0, /* dst-over (dst*1 + src(1-B)) */ - (SRC_DST | Aa_B0 | a_B), 0, /* src-in (src*B) */ - (DST_SRC | Aa_B0 | a_B), 0, /* dst-in (dst*A) */ - (DST_SRC | A0_B1a | a_A), 0, /* src-out (src*(1-B)) */ - (SRC_DST | A0_B1a | a_A), 0, /* dst-out (dst*(1-A)) */ + (SRC_DST | Aa_B0 | a_C), 0, /* clear (src*0) */ + (SRC_DST | Aa_B0 | a_1), 0, /* src (src*1) */ + (DST_SRC | Aa_B0 | a_1), 0, /* dst (dst*1) */ + (SRC_DST | A1_B1a | a_A), 0, /* src-over (src*1 + dst(1-A)) */ + (DST_SRC | A1_B1a | a_A), 0, /* dst-over (dst*1 + src(1-B)) */ + (SRC_DST | Aa_B0 | a_B), 0, /* src-in (src*B) */ + (DST_SRC | Aa_B0 | a_B), 0, /* dst-in (dst*A) */ + (DST_SRC | A0_B1a | a_A), 0, /* src-out (src*(1-B)) */ + (SRC_DST | A0_B1a | a_A), 0, /* dst-out (dst*(1-A)) */ /* pass1 (SRC=dst DST=scr=src), pass2 (SRC=src, DST=dst) */ - (DST_SRC | Aa_B0 | a_B), /* srcatop (src*B) */ - (SRC_DST | A0_B1a | a_A), /* + (dst(1-A)) */ - (SRC_DST | Aa_B0 | a_B), /* dstatop (dst*A) */ - (DST_SRC | A0_B1a | a_A), /* + (src(1-B) */ - (SRC_DST | A0_B1a | a_A), /* xor (src*(1-B) */ - (SRC_DST | A0_B1a | a_A), /* + (dst(1-A) */ - (SRC_DST | A1_B1a | a_C), 0, /* add (src*1 + dst*1) */ + (DST_SRC | Aa_B0 | a_B), /* srcatop (src*B) */ + (SRC_DST | A0_B1a | a_A), /* + (dst(1-A)) */ + (SRC_DST | Aa_B0 | a_B), /* dstatop (dst*A) */ + (DST_SRC | A0_B1a | a_A), /* + (src(1-B) */ + (SRC_DST | A0_B1a | a_A), /* xor (src*(1-B) */ + (SRC_DST | A0_B1a | a_A), /* + (dst(1-A) */ + (SRC_DST | A1_B1a | a_C), 0, /* add (src*1 + dst*1) */ }; -typedef struct -{ +typedef struct { int exa_fmt; int bpp; int gx_fmt; @@ -1682,13 +1698,13 @@ amd_gx_exa_check_format(PicturePtr p) amd_gx_exa_fmt_t *fp = &amd_gx_exa_fmts[0]; for (i = sizeof(amd_gx_exa_fmts) / sizeof(amd_gx_exa_fmts[0]); --i >= 0; - ++fp) { - if (fp->bpp < bpp) - return NULL; - if (fp->bpp != bpp) - continue; - if (fp->exa_fmt == p->format) - break; + ++fp) { + if (fp->bpp < bpp) + return NULL; + if (fp->bpp != bpp) + continue; + if (fp->exa_fmt == p->format) + break; } return i < 0 ? NULL : fp; } @@ -1697,30 +1713,31 @@ amd_gx_exa_check_format(PicturePtr p) static Bool amd_gx_exa_CheckComposite(int op, PicturePtr pSrc, PicturePtr pMsk, - PicturePtr pDst) + PicturePtr pDst) { GeodeRec *pGeode = GEODEPTR_FROM_PICTURE(pDst); if (op > gxPictOpMAX) - return FALSE; + return FALSE; if (pMsk) - return FALSE; + return FALSE; if (usesPasses(op) && pGeode->exaBfrSz == 0) - return FALSE; + return FALSE; if (pSrc->filter != PictFilterNearest && - pSrc->filter != PictFilterFast && - pSrc->filter != PictFilterGood && pSrc->filter != PictFilterBest) - return FALSE; + pSrc->filter != PictFilterFast && + pSrc->filter != PictFilterGood && pSrc->filter != PictFilterBest) + return FALSE; if (pSrc->repeat) - return FALSE; + return FALSE; if (pSrc->transform) - return FALSE; + return FALSE; return TRUE; } static Bool amd_gx_exa_PrepareComposite(int op, PicturePtr pSrc, PicturePtr pMsk, - PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, PixmapPtr pxDst) + PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, + PixmapPtr pxDst) { int srcPitch; @@ -1730,31 +1747,32 @@ amd_gx_exa_PrepareComposite(int op, PicturePtr pSrc, PicturePtr pMsk, //ErrorF("amd_gx_exa_PrepareComposite()\n"); if ((sfp = amd_gx_exa_check_format(pSrc)) == NULL) - return FALSE; + return FALSE; if (sfp->alpha_bits == 0 && usesSrcAlpha(op)) - return FALSE; + return FALSE; if ((dfp = amd_gx_exa_check_format(pDst)) == NULL) - return FALSE; + return FALSE; if (dfp->alpha_bits == 0 && usesDstAlpha(op)) - return FALSE; + return FALSE; if (sfp->gx_fmt != dfp->gx_fmt) - return FALSE; + return FALSE; srcPitch = exaGetPixmapPitch(pxSrc); if (usesPasses(op) && srcPitch > pGeode->exaBfrSz) - return FALSE; + return FALSE; pGeode->cmpSrcPitch = srcPitch; pGeode->cmpOp = op; pGeode->cmpSrcOffset = exaGetPixmapOffset(pxSrc); pGeode->cmpSrcBpp = (pxSrc->drawable.bitsPerPixel + 7) / 8; pGeode->cmpSrcFmt = sfp->gx_fmt; pGeode->cmpDstFmt = dfp->gx_fmt | (dfp->alpha_bits == 0 ? - MGP_RM_ALPHA_TO_RGB : MGP_RM_ALPHA_TO_ARGB); + MGP_RM_ALPHA_TO_RGB : + MGP_RM_ALPHA_TO_ARGB); return TRUE; } static void amd_gx_exa_Composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, - int maskY, int dstX, int dstY, int width, int height) + int maskY, int dstX, int dstY, int width, int height) { int op, current_line, max_lines, lines, pass, scratchPitch; unsigned int srcOffset, srcOfs = 0, srcPitch, srcPch = 0, srcBpp; @@ -1767,16 +1785,17 @@ amd_gx_exa_Composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, op = pGeode->cmpOp; if (usesPasses(op)) { - int cacheLineSz = 32; - int cachelines = - (width * pGeode->cmpSrcBpp + cacheLineSz - 1) / cacheLineSz; - scratchPitch = cachelines * cacheLineSz; - if (scratchPitch > pGeode->cmpSrcPitch) - scratchPitch = pGeode->cmpSrcPitch; - max_lines = pGeode->exaBfrSz / scratchPitch; - } else { - scratchPitch = 0; - max_lines = height; + int cacheLineSz = 32; + int cachelines = + (width * pGeode->cmpSrcBpp + cacheLineSz - 1) / cacheLineSz; + scratchPitch = cachelines * cacheLineSz; + if (scratchPitch > pGeode->cmpSrcPitch) + scratchPitch = pGeode->cmpSrcPitch; + max_lines = pGeode->exaBfrSz / scratchPitch; + } + else { + scratchPitch = 0; + max_lines = height; } dstBpp = (pxDst->drawable.bitsPerPixel + 7) / 8; @@ -1788,83 +1807,84 @@ amd_gx_exa_Composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, current_line = pass = 0; while (current_line < height) { - if (usesPasses(op)) { - lines = height - current_line; - if (lines > max_lines) - lines = max_lines; - switch (pass) { - case 0: /* copy src to scratch */ - srcPch = srcPitch; - srcOfs = srcOffset + current_line * srcPch; - dstPch = scratchPitch; - dstOfs = pGeode->exaBfrOffset; - rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; - rop |= amd_gx_exa_alpha_ops[PictOpSrc * 2]; - blt_mode = usesChanB0(PictOpSrc) ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - ++pass; - break; - case 1: /* pass1 */ - srcPch = dstPitch; - srcOfs = dstOffset + current_line * srcPch; - dstPch = scratchPitch; - dstOfs = pGeode->exaBfrOffset; - rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; - rop |= amd_gx_exa_alpha_ops[op * 2]; - blt_mode = usesChanB1(op) ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - ++pass; - break; - case 2: /* pass2 */ - srcPch = srcPitch; - srcOfs = srcOffset + current_line * srcPch; - dstPch = dstPitch; - dstOfs = dstOffset + current_line * dstPch; - rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; - rop |= amd_gx_exa_alpha_ops[op * 2 + 1]; - blt_mode = usesChanB2(op) ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - ++pass; - break; - case 3: /* add */ - srcPch = scratchPitch; - srcOfs = pGeode->exaBfrOffset; - dstPch = dstPitch; - dstOfs = dstOffset + current_line * dstPch; - rop = pGeode->cmpDstFmt; - rop |= amd_gx_exa_alpha_ops[PictOpAdd * 2]; - blt_mode = usesChanB0(PictOpAdd) ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - current_line += lines; - pass = 0; - break; - } - strides = (srcPch << 16) | dstPch; - } else { /* not multi pass */ - srcOfs = srcOffset; - dstOfs = dstOffset; - current_line = lines = height; - strides = (srcPitch << 16) | dstPitch; - rop = pGeode->cmpDstFmt | amd_gx_exa_alpha_ops[op * 2]; - blt_mode = usesChanB0(op) ? - MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; - } - sizes = (width << 16) | lines; - if (srcOfs < dstOfs) { - srcOfs += (lines - 1) * srcPitch + width * srcBpp - 1; - dstOfs += (lines - 1) * dstPitch + width * dstBpp - 1; - blt_mode |= MGP_BM_NEG_XDIR | MGP_BM_NEG_YDIR; - } - GU2_WAIT_PENDING; - WRITE_GP32(MGP_RASTER_MODE, rop); - WRITE_GP32(MGP_SRC_OFFSET, srcOfs); - WRITE_GP32(MGP_DST_OFFSET, dstOfs); - WRITE_GP32(MGP_WID_HEIGHT, sizes); - WRITE_GP32(MGP_STRIDE, strides); - WRITE_GP16(MGP_BLT_MODE, blt_mode); + if (usesPasses(op)) { + lines = height - current_line; + if (lines > max_lines) + lines = max_lines; + switch (pass) { + case 0: /* copy src to scratch */ + srcPch = srcPitch; + srcOfs = srcOffset + current_line * srcPch; + dstPch = scratchPitch; + dstOfs = pGeode->exaBfrOffset; + rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; + rop |= amd_gx_exa_alpha_ops[PictOpSrc * 2]; + blt_mode = usesChanB0(PictOpSrc) ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + ++pass; + break; + case 1: /* pass1 */ + srcPch = dstPitch; + srcOfs = dstOffset + current_line * srcPch; + dstPch = scratchPitch; + dstOfs = pGeode->exaBfrOffset; + rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; + rop |= amd_gx_exa_alpha_ops[op * 2]; + blt_mode = usesChanB1(op) ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + ++pass; + break; + case 2: /* pass2 */ + srcPch = srcPitch; + srcOfs = srcOffset + current_line * srcPch; + dstPch = dstPitch; + dstOfs = dstOffset + current_line * dstPch; + rop = pGeode->cmpSrcFmt | MGP_RM_ALPHA_TO_ARGB; + rop |= amd_gx_exa_alpha_ops[op * 2 + 1]; + blt_mode = usesChanB2(op) ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + ++pass; + break; + case 3: /* add */ + srcPch = scratchPitch; + srcOfs = pGeode->exaBfrOffset; + dstPch = dstPitch; + dstOfs = dstOffset + current_line * dstPch; + rop = pGeode->cmpDstFmt; + rop |= amd_gx_exa_alpha_ops[PictOpAdd * 2]; + blt_mode = usesChanB0(PictOpAdd) ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + current_line += lines; + pass = 0; + break; + } + strides = (srcPch << 16) | dstPch; + } + else { /* not multi pass */ + srcOfs = srcOffset; + dstOfs = dstOffset; + current_line = lines = height; + strides = (srcPitch << 16) | dstPitch; + rop = pGeode->cmpDstFmt | amd_gx_exa_alpha_ops[op * 2]; + blt_mode = usesChanB0(op) ? + MGP_BM_SRC_FB | MGP_BM_DST_REQ : MGP_BM_SRC_FB; + } + sizes = (width << 16) | lines; + if (srcOfs < dstOfs) { + srcOfs += (lines - 1) * srcPitch + width * srcBpp - 1; + dstOfs += (lines - 1) * dstPitch + width * dstBpp - 1; + blt_mode |= MGP_BM_NEG_XDIR | MGP_BM_NEG_YDIR; + } + GU2_WAIT_PENDING; + WRITE_GP32(MGP_RASTER_MODE, rop); + WRITE_GP32(MGP_SRC_OFFSET, srcOfs); + WRITE_GP32(MGP_DST_OFFSET, dstOfs); + WRITE_GP32(MGP_WID_HEIGHT, sizes); + WRITE_GP32(MGP_STRIDE, strides); + WRITE_GP16(MGP_BLT_MODE, blt_mode); } } -#endif /* #if XF86EXA */ +#endif /* #if XF86EXA */ /*---------------------------------------------------------------------------- * GXAccelInit. @@ -1884,7 +1904,7 @@ amd_gx_exa_Composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, Bool GXAccelInit(ScreenPtr pScrn) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); #if XF86EXA @@ -1899,17 +1919,17 @@ GXAccelInit(ScreenPtr pScrn) switch (pGeode->Pitch) { case 1024: - gu2_yshift = 10; - break; + gu2_yshift = 10; + break; case 2048: - gu2_yshift = 11; - break; + gu2_yshift = 11; + break; case 4096: - gu2_yshift = 12; - break; + gu2_yshift = 12; + break; default: - gu2_yshift = 13; - break; + gu2_yshift = 13; + break; } #ifdef OPT_ACCEL @@ -1919,43 +1939,44 @@ GXAccelInit(ScreenPtr pScrn) #if XF86EXA if (pExa && pGeode->useEXA) { - pExa->exa_major = EXA_VERSION_MAJOR; - pExa->exa_minor = EXA_VERSION_MINOR; - - /* Sync */ - pExa->WaitMarker = amd_gx_exa_WaitMarker; - /* UploadToScreen */ - pExa->UploadToScreen = amd_gx_exa_UploadToScreen; - pExa->DownloadFromScreen = amd_gx_exa_DownloadFromScreen; - - /* Solid fill */ - pExa->PrepareSolid = amd_gx_exa_PrepareSolid; - pExa->Solid = amd_gx_exa_Solid; - pExa->DoneSolid = amd_gx_exa_Done; - - /* Copy */ - pExa->PrepareCopy = amd_gx_exa_PrepareCopy; - pExa->Copy = amd_gx_exa_Copy; - pExa->DoneCopy = amd_gx_exa_Done; - - /* Composite */ - pExa->CheckComposite = amd_gx_exa_CheckComposite; - pExa->PrepareComposite = amd_gx_exa_PrepareComposite; - pExa->Composite = amd_gx_exa_Composite; - pExa->DoneComposite = amd_gx_exa_Done; - - return exaDriverInit(pScrn, pGeode->pExa); + pExa->exa_major = EXA_VERSION_MAJOR; + pExa->exa_minor = EXA_VERSION_MINOR; + + /* Sync */ + pExa->WaitMarker = amd_gx_exa_WaitMarker; + /* UploadToScreen */ + pExa->UploadToScreen = amd_gx_exa_UploadToScreen; + pExa->DownloadFromScreen = amd_gx_exa_DownloadFromScreen; + + /* Solid fill */ + pExa->PrepareSolid = amd_gx_exa_PrepareSolid; + pExa->Solid = amd_gx_exa_Solid; + pExa->DoneSolid = amd_gx_exa_Done; + + /* Copy */ + pExa->PrepareCopy = amd_gx_exa_PrepareCopy; + pExa->Copy = amd_gx_exa_Copy; + pExa->DoneCopy = amd_gx_exa_Done; + + /* Composite */ + pExa->CheckComposite = amd_gx_exa_CheckComposite; + pExa->PrepareComposite = amd_gx_exa_PrepareComposite; + pExa->Composite = amd_gx_exa_Composite; + pExa->DoneComposite = amd_gx_exa_Done; + + return exaDriverInit(pScrn, pGeode->pExa); } #endif +#if XF86XAA + /* Getting the pointer for acceleration Inforecord */ pGeode->AccelInfoRec = localRecPtr = XAACreateInfoRec(); if (!pGeode->AccelInfoRec) - return FALSE; + return FALSE; /* SET ACCELERATION FLAGS */ - localRecPtr->Flags = - PIXMAP_CACHE | OFFSCREEN_PIXMAPS | LINEAR_FRAMEBUFFER; + localRecPtr->Flags = PIXMAP_CACHE | OFFSCREEN_PIXMAPS | LINEAR_FRAMEBUFFER; /* HOOK SYNCRONIZARION ROUTINE */ localRecPtr->Sync = GXAccelSync; @@ -1973,7 +1994,7 @@ GXAccelInit(ScreenPtr pScrn) HOOK(SubsequentMono8x8PatternFillRect); /* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ localRecPtr->Mono8x8PatternFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN; + HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN; #endif #if GX_CLREXP_8X8_PAT_SUPPORT @@ -1982,8 +2003,8 @@ GXAccelInit(ScreenPtr pScrn) HOOK(SubsequentColor8x8PatternFillRect); /* BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY | */ localRecPtr->Color8x8PatternFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | - HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_ORIGIN; + BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | + HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_ORIGIN; #endif #if GX_SCR2SCRCPY_SUPPORT @@ -1993,7 +2014,7 @@ GXAccelInit(ScreenPtr pScrn) HOOK(SetupForScreenToScreenCopy); HOOK(SubsequentScreenToScreenCopy); localRecPtr->ScreenToScreenCopyFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; + BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; #endif #if GX_BRES_LINE_SUPPORT @@ -2013,8 +2034,8 @@ GXAccelInit(ScreenPtr pScrn) HOOK(SubsequentDashedTwoPointLine); localRecPtr->DashedBresenhamLineErrorTermBits = 15; localRecPtr->DashPatternMaxLength = 64; - localRecPtr->DashedLineFlags = NO_PLANEMASK | /* TRANSPARENCY_ONLY | */ - LINE_PATTERN_POWER_OF_2_ONLY | LINE_PATTERN_MSBFIRST_MSBJUSTIFIED; + localRecPtr->DashedLineFlags = NO_PLANEMASK | /* TRANSPARENCY_ONLY | */ + LINE_PATTERN_POWER_OF_2_ONLY | LINE_PATTERN_MSBFIRST_MSBJUSTIFIED; #endif #if GX_SCR2SCREXP_SUPPORT @@ -2022,37 +2043,37 @@ GXAccelInit(ScreenPtr pScrn) HOOK(SetupForScreenToScreenColorExpandFill); HOOK(SubsequentScreenToScreenColorExpandFill); localRecPtr->ScreenToScreenColorExpandFillFlags = - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY; + BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD | NO_TRANSPARENCY; #endif if (pGeode->AccelImageWriteBuffers) { #if GX_SCANLINE_SUPPORT - localRecPtr->ScanlineImageWriteBuffers = - pGeode->AccelImageWriteBuffers; - localRecPtr->NumScanlineImageWriteBuffers = pGeode->NoOfImgBuffers; - HOOK(SetupForScanlineImageWrite); - HOOK(SubsequentScanlineImageWriteRect); - HOOK(SubsequentImageWriteScanline); - localRecPtr->ScanlineImageWriteFlags = NO_PLANEMASK | NO_GXCOPY | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; + localRecPtr->ScanlineImageWriteBuffers = pGeode->AccelImageWriteBuffers; + localRecPtr->NumScanlineImageWriteBuffers = pGeode->NoOfImgBuffers; + HOOK(SetupForScanlineImageWrite); + HOOK(SubsequentScanlineImageWriteRect); + HOOK(SubsequentImageWriteScanline); + localRecPtr->ScanlineImageWriteFlags = NO_PLANEMASK | NO_GXCOPY | + BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; #endif - } else { - localRecPtr->PixmapCacheFlags = DO_NOT_BLIT_STIPPLES; + } + else { + localRecPtr->PixmapCacheFlags = DO_NOT_BLIT_STIPPLES; } if (pGeode->AccelColorExpandBuffers) { #if GX_CPU2SCREXP_SUPPORT - /* Color expansion */ - localRecPtr->ScanlineColorExpandBuffers = - pGeode->AccelColorExpandBuffers; - localRecPtr->NumScanlineColorExpandBuffers = - pGeode->NoOfColorExpandLines; - HOOK(SetupForScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentScanlineCPUToScreenColorExpandFill); - HOOK(SubsequentColorExpandScanline); - localRecPtr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK | - BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; + /* Color expansion */ + localRecPtr->ScanlineColorExpandBuffers = + pGeode->AccelColorExpandBuffers; + localRecPtr->NumScanlineColorExpandBuffers = + pGeode->NoOfColorExpandLines; + HOOK(SetupForScanlineCPUToScreenColorExpandFill); + HOOK(SubsequentScanlineCPUToScreenColorExpandFill); + HOOK(SubsequentColorExpandScanline); + localRecPtr->ScanlineCPUToScreenColorExpandFillFlags = NO_PLANEMASK | + BIT_ORDER_IN_BYTE_MSBFIRST | SCANLINE_PAD_DWORD; #endif } #if GX_WRITE_PIXMAP_SUPPORT @@ -2061,6 +2082,9 @@ GXAccelInit(ScreenPtr pScrn) #endif return (XAAInit(pScrn, localRecPtr)); +#else /* XF86XAA */ + return FALSE; +#endif } /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/gx_cursor.c b/driver/xf86-video-geode/src/gx_cursor.c index 9221dfaab..5a8f33592 100644 --- a/driver/xf86-video-geode/src/gx_cursor.c +++ b/driver/xf86-video-geode/src/gx_cursor.c @@ -45,8 +45,9 @@ static void GXSetCursorColors(ScrnInfoPtr pScrni, int bg, int fg); static void GXSetCursorPosition(ScrnInfoPtr pScrni, int x, int y); static Bool GXUseHWCursor(ScreenPtr pScrn, CursorPtr pCurs); extern void GXSetVideoPosition(int x, int y, int width, int height, - short src_w, short src_h, short drw_w, - short drw_h, int id, int offset, ScrnInfoPtr pScrn); + short src_w, short src_h, short drw_w, + short drw_h, int id, int offset, + ScrnInfoPtr pScrn); /*---------------------------------------------------------------------------- * GXHWCursorInit. @@ -66,21 +67,21 @@ extern void GXSetVideoPosition(int x, int y, int width, int height, Bool GXHWCursorInit(ScreenPtr pScrn) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); xf86CursorInfoPtr infoPtr; infoPtr = xf86CreateCursorInfoRec(); if (!infoPtr) - return FALSE; + return FALSE; /* the geode structure is intiallized with the cursor infoRec */ pGeode->CursorInfo = infoPtr; infoPtr->MaxWidth = 32; infoPtr->MaxHeight = 32; /* seeting up the cursor flags */ infoPtr->Flags = HARDWARE_CURSOR_BIT_ORDER_MSBFIRST | - HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | - HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED; + HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | + HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED; /* cursor info ptr is intiallized with the values obtained from * * durnago calls */ @@ -145,27 +146,27 @@ GXSetCursorPosition(ScrnInfoPtr pScrni, int x, int y) switch (pGeode->rotation) { default: - ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, - pGeode->rotation); + ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, + pGeode->rotation); case RR_Rotate_0: - newX = savex; - newY = savey; - break; + newX = savex; + newY = savey; + break; case RR_Rotate_90: - newX = savey; - newY = pScrni->pScreen->width - savex; - break; + newX = savey; + newY = pScrni->pScreen->width - savex; + break; case RR_Rotate_180: - newX = pScrni->pScreen->width - savex; - newY = pScrni->pScreen->height - savey; - break; + newX = pScrni->pScreen->width - savex; + newY = pScrni->pScreen->height - savey; + break; case RR_Rotate_270: - newX = pScrni->pScreen->height - savey; - newY = savex; - break; + newX = pScrni->pScreen->height - savey; + newY = savex; + break; } newX += pScrni->frameX0; @@ -174,25 +175,25 @@ GXSetCursorPosition(ScrnInfoPtr pScrni, int x, int y) //ErrorF("Turned (%d,%d) into (%d,%d)\n", x,y,newX, newY); if (newX < -31) - newX = -31; + newX = -31; if (newY < -31) - newY = -31; + newY = -31; gfx_set_cursor_position(pGeode->CursorStartOffset, newX + 31, newY + 31, - 31, 31); + 31, 31); gfx_set_cursor_enable(1); if ((pGeode->OverlayON) && (pGeode->Panel)) { - pGeode->PrevDisplayOffset = gfx_get_display_offset(); - if (pGeode->PrevDisplayOffset != panOffset) { - GXSetVideoPosition(pGeode->video_x, pGeode->video_y, - pGeode->video_w, pGeode->video_h, - pGeode->video_srcw, pGeode->video_srch, - pGeode->video_dstw, pGeode->video_dsth, - pGeode->video_id, pGeode->video_offset, - pGeode->video_scrnptr); - panOffset = pGeode->PrevDisplayOffset; - } + pGeode->PrevDisplayOffset = gfx_get_display_offset(); + if (pGeode->PrevDisplayOffset != panOffset) { + GXSetVideoPosition(pGeode->video_x, pGeode->video_y, + pGeode->video_w, pGeode->video_h, + pGeode->video_srcw, pGeode->video_srch, + pGeode->video_dstw, pGeode->video_dsth, + pGeode->video_id, pGeode->video_offset, + pGeode->video_scrnptr); + panOffset = pGeode->PrevDisplayOffset; + } } } @@ -221,55 +222,55 @@ GXLoadCursorImage(ScrnInfoPtr pScrni, unsigned char *src) unsigned char *mskp = &src[128]; if (src != NULL) { - mskb = rowb = 0; - for (y = 32; --y >= 0;) - andMask[y] = xorMask[y] = 0; - for (y = 0; y < 32; ++y) { - for (x = 0; x < 32; ++x) { - if ((i = x & 7) == 0) { - rowb = (*rowp & *mskp); - mskb = ~(*mskp); - ++rowp; - ++mskp; - } + mskb = rowb = 0; + for (y = 32; --y >= 0;) + andMask[y] = xorMask[y] = 0; + for (y = 0; y < 32; ++y) { + for (x = 0; x < 32; ++x) { + if ((i = x & 7) == 0) { + rowb = (*rowp & *mskp); + mskb = ~(*mskp); + ++rowp; + ++mskp; + } - switch (pGeode->rotation) { - default: - ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, - pGeode->rotation); - case RR_Rotate_0: - newX = x; - newY = y; - break; - case RR_Rotate_90: - newX = y; - newY = 31 - x; - break; - case RR_Rotate_180: - newX = 31 - x; - newY = 31 - y; - break; - case RR_Rotate_270: - newX = 31 - y; - newY = x; - break; - } + switch (pGeode->rotation) { + default: + ErrorF("%s:%d invalid rotation %d\n", __func__, __LINE__, + pGeode->rotation); + case RR_Rotate_0: + newX = x; + newY = y; + break; + case RR_Rotate_90: + newX = y; + newY = 31 - x; + break; + case RR_Rotate_180: + newX = 31 - x; + newY = 31 - y; + break; + case RR_Rotate_270: + newX = 31 - y; + newY = x; + break; + } - i = 7 - i; - n = 31 - newX; - andMask[newY] |= (((mskb >> i) & 1) << n); - xorMask[newY] |= (((rowb >> i) & 1) << n); - } - } - } else { - for (y = 32; --y >= 0;) { - andMask[y] = ~0; - xorMask[y] = 0; - } + i = 7 - i; + n = 31 - newX; + andMask[newY] |= (((mskb >> i) & 1) << n); + xorMask[newY] |= (((rowb >> i) & 1) << n); + } + } + } + else { + for (y = 32; --y >= 0;) { + andMask[y] = ~0; + xorMask[y] = 0; + } } - gfx_set_cursor_shape32(pGeode->CursorStartOffset, &andMask[0], - &xorMask[0]); + gfx_set_cursor_shape32(pGeode->CursorStartOffset, &andMask[0], &xorMask[0]); } /*---------------------------------------------------------------------------- diff --git a/driver/xf86-video-geode/src/gx_driver.c b/driver/xf86-video-geode/src/gx_driver.c index b9904d13d..5268f2969 100644 --- a/driver/xf86-video-geode/src/gx_driver.c +++ b/driver/xf86-video-geode/src/gx_driver.c @@ -81,15 +81,15 @@ static inline void gx_enable_dac_power(void) { gfx_write_vid32(RCDF_VID_MISC, - gfx_read_vid32(RCDF_VID_MISC) & RCDF_GAMMA_BYPASS_BOTH); + gfx_read_vid32(RCDF_VID_MISC) & RCDF_GAMMA_BYPASS_BOTH); } static inline void gx_disable_dac_power(void) { gfx_write_vid32(RCDF_VID_MISC, - RCDF_DAC_POWER_DOWN | RCDF_ANALOG_POWER_DOWN | - (gfx_read_vid32(RCDF_VID_MISC) & RCDF_GAMMA_BYPASS_BOTH)); + RCDF_DAC_POWER_DOWN | RCDF_ANALOG_POWER_DOWN | + (gfx_read_vid32(RCDF_VID_MISC) & RCDF_GAMMA_BYPASS_BOTH)); } static void @@ -98,9 +98,9 @@ GXInitEXAMemory(ScrnInfoPtr pScrni, unsigned int *offset, unsigned int *avail) GeodePtr pGeode = GEODEPTR(pScrni); if (pGeode->exaBfrSz > 0 && pGeode->exaBfrSz <= *avail) { - pGeode->exaBfrOffset = *offset; - *offset += pGeode->exaBfrOffset; - *avail -= pGeode->exaBfrOffset; + pGeode->exaBfrOffset = *offset; + *offset += pGeode->exaBfrOffset; + *avail -= pGeode->exaBfrOffset; } } @@ -114,39 +114,41 @@ GXInitXAAMemory(ScrnInfoPtr pScrni, unsigned int *offset, unsigned int *avail) /* For now, we NULL them all out. */ if (pGeode->NoOfImgBuffers > 0) { - size = pGeode->displayPitch * pGeode->NoOfImgBuffers; - if (size <= *avail) { - for (i = 0; i < pGeode->NoOfImgBuffers; i++) { - pGeode->AccelImageWriteBuffers[i] = pGeode->FBBase + *offset; - *offset += pGeode->displayPitch; - *avail -= pGeode->displayPitch; - } - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for image write buffers.\n"); - - for (i = 0; i < pGeode->NoOfImgBuffers; i++) - pGeode->AccelImageWriteBuffers[i] = NULL; - } + size = pGeode->displayPitch * pGeode->NoOfImgBuffers; + if (size <= *avail) { + for (i = 0; i < pGeode->NoOfImgBuffers; i++) { + pGeode->AccelImageWriteBuffers[i] = pGeode->FBBase + *offset; + *offset += pGeode->displayPitch; + *avail -= pGeode->displayPitch; + } + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for image write buffers.\n"); + + for (i = 0; i < pGeode->NoOfImgBuffers; i++) + pGeode->AccelImageWriteBuffers[i] = NULL; + } } if (pGeode->NoOfColorExpandLines > 0) { - pitch = ((pGeode->displayPitch + 31) >> 5) << 2; - size = pitch * pGeode->NoOfColorExpandLines; - - if (size <= *avail) { - for (i = 0; i < pGeode->NoOfColorExpandLines; i++) { - pGeode->AccelColorExpandBuffers[i] = pGeode->FBBase + *offset; - *offset += pitch; - *avail -= pitch; - } - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for color expansion buffers.\n"); - - for (i = 0; i < pGeode->NoOfImgBuffers; i++) - pGeode->AccelColorExpandBuffers[i] = NULL; - } + pitch = ((pGeode->displayPitch + 31) >> 5) << 2; + size = pitch * pGeode->NoOfColorExpandLines; + + if (size <= *avail) { + for (i = 0; i < pGeode->NoOfColorExpandLines; i++) { + pGeode->AccelColorExpandBuffers[i] = pGeode->FBBase + *offset; + *offset += pitch; + *avail -= pitch; + } + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for color expansion buffers.\n"); + + for (i = 0; i < pGeode->NoOfImgBuffers; i++) + pGeode->AccelColorExpandBuffers[i] = NULL; + } } } @@ -161,11 +163,11 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) BOOL ret = TRUE; if (pGeode->tryCompression) - pGeode->displayPitch = - GeodeCalculatePitchBytes(pScrni->virtualX, pScrni->bitsPerPixel); + pGeode->displayPitch = + GeodeCalculatePitchBytes(pScrni->virtualX, pScrni->bitsPerPixel); else - pGeode->displayPitch = - ((pScrni->virtualX + 3) & ~3) * (pScrni->bitsPerPixel >> 3); + pGeode->displayPitch = + ((pScrni->virtualX + 3) & ~3) * (pScrni->bitsPerPixel >> 3); pGeode->Pitch = pGeode->displayPitch; pGeode->displayWidth = pGeode->displayPitch / bytpp; @@ -180,62 +182,65 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) fboffset += pGeode->displaySize; if (pGeode->tryCompression) { - size = pScrni->virtualY * GX_CB_PITCH; + size = pScrni->virtualY * GX_CB_PITCH; - if (size <= fbavail) { - pGeode->CBData.compression_offset = fboffset; + if (size <= fbavail) { + pGeode->CBData.compression_offset = fboffset; - fboffset += size; - fbavail -= size; + fboffset += size; + fbavail -= size; - pGeode->Compression = TRUE; - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for compression\n"); - pGeode->Compression = FALSE; - } + pGeode->Compression = TRUE; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for compression\n"); + pGeode->Compression = FALSE; + } } if (pGeode->tryHWCursor) { - if (fbavail >= 1024) { - pGeode->CursorStartOffset = fboffset; - fboffset += 1024; - fbavail -= 1024; - pGeode->HWCursor = TRUE; - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for the hardware cursor\n"); - pGeode->HWCursor = FALSE; - } + if (fbavail >= 1024) { + pGeode->CursorStartOffset = fboffset; + fboffset += 1024; + fbavail -= 1024; + pGeode->HWCursor = TRUE; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for the hardware cursor\n"); + pGeode->HWCursor = FALSE; + } } if (!pGeode->NoAccel) { - if (pGeode->useEXA) - GXInitEXAMemory(pScrni, &fboffset, &fbavail); - else - GXInitXAAMemory(pScrni, &fboffset, &fbavail); + if (pGeode->useEXA) + GXInitEXAMemory(pScrni, &fboffset, &fbavail); + else + GXInitXAAMemory(pScrni, &fboffset, &fbavail); } pGeode->shadowSize = 0; if (rotate != RR_Rotate_0) { - if (rotate & (RR_Rotate_90 | RR_Rotate_270)) - size = pGeode->displayPitch * pScrni->virtualX; - else - size = pGeode->displayPitch * pScrni->virtualY; - - if (size <= fbavail) { - pGeode->shadowOffset = fboffset; - pGeode->shadowSize = size; - - fboffset += size; - fbavail -= size; - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for the shadow framebuffer\n"); - ret = FALSE; - } + if (rotate & (RR_Rotate_90 | RR_Rotate_270)) + size = pGeode->displayPitch * pScrni->virtualX; + else + size = pGeode->displayPitch * pScrni->virtualY; + + if (size <= fbavail) { + pGeode->shadowOffset = fboffset; + pGeode->shadowSize = size; + + fboffset += size; + fbavail -= size; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for the shadow framebuffer\n"); + ret = FALSE; + } } /* XAA always exists - we can't remove it on demand like we can with EXA. @@ -244,53 +249,56 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) if (!pGeode->NoAccel) { - if (pGeode->useEXA && pGeode->pExa) { - ExaDriverPtr pExa = pGeode->pExa; + if (pGeode->useEXA && pGeode->pExa) { + ExaDriverPtr pExa = pGeode->pExa; - pExa->offScreenBase = fboffset; - pExa->memorySize = fboffset + fbavail; - } + pExa->offScreenBase = fboffset; + pExa->memorySize = fboffset + fbavail; + } - if (!pGeode->useEXA) { + if (!pGeode->useEXA) { - if (!xf86FBManagerRunning(pScrn)) { +#if XF86XAA + if (!xf86FBManagerRunning(pScrn)) { - unsigned int offset = fboffset; - unsigned int avail = fbavail; - RegionRec OffscreenRegion; - BoxRec AvailBox; + unsigned int offset = fboffset; + unsigned int avail = fbavail; + RegionRec OffscreenRegion; + BoxRec AvailBox; - /* Assume the shadow FB exists even if it doesnt */ + /* Assume the shadow FB exists even if it doesnt */ - if (pGeode->shadowSize == 0) { - size = (pScrn->width * bytpp) * pScrni->virtualX; - offset += size; - avail -= size; - } + if (pGeode->shadowSize == 0) { + size = (pScrn->width * bytpp) * pScrni->virtualX; + offset += size; + avail -= size; + } - AvailBox.x1 = 0; - AvailBox.y1 = - (offset + pGeode->displayPitch - - 1) / pGeode->displayPitch; + AvailBox.x1 = 0; + AvailBox.y1 = + (offset + pGeode->displayPitch - 1) / pGeode->displayPitch; - AvailBox.x2 = pGeode->displayWidth; - AvailBox.y2 = (offset + avail) / pGeode->displayPitch; + AvailBox.x2 = pGeode->displayWidth; + AvailBox.y2 = (offset + avail) / pGeode->displayPitch; - if (AvailBox.y1 < AvailBox.y2) { - REGION_INIT(pScrn, &OffscreenRegion, &AvailBox, 2); + if (AvailBox.y1 < AvailBox.y2) { + REGION_INIT(pScrn, &OffscreenRegion, &AvailBox, 2); - if (!xf86InitFBManagerRegion(pScrn, &OffscreenRegion)) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Memory manager initialization failed.\n"); + if (!xf86InitFBManagerRegion(pScrn, &OffscreenRegion)) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Memory manager initialization failed.\n"); - REGION_UNINIT(pScrn, &OffscreenRegion); - } else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "Cache disabled - no offscreen memory available.\n"); - } else - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "XAA offscreen memory has already been allocated.\n"); - } + REGION_UNINIT(pScrn, &OffscreenRegion); + } + else + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + "Cache disabled - no offscreen memory available.\n"); + } + else + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + "XAA offscreen memory has already been allocated.\n"); +#endif + } } return ret; } @@ -298,11 +306,11 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) static Bool GXSaveScreen(ScreenPtr pScrn, int mode) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodePtr pGeode = GEODEPTR(pScrni); if (pGeode->useVGA && !pScrni->vtSema) - return vgaHWSaveScreen(pScrn, mode); + return vgaHWSaveScreen(pScrn, mode); return TRUE; } @@ -311,21 +319,21 @@ GXSaveScreen(ScreenPtr pScrn, int mode) #ifdef XSERVER_LIBPCIACCESS static inline void * map_pci_mem(ScrnInfoPtr pScrni, int vram, - struct pci_device *dev, int bar, int size) + struct pci_device *dev, int bar, int size) { void *ptr; - void **result = (void **)&ptr; + void **result = (void **) &ptr; int map_size = size ? size : dev->regions[bar].size; int err = pci_device_map_range(dev, - dev->regions[bar].base_addr, - map_size, - PCI_DEV_MAP_FLAG_WRITABLE | - (vram ? PCI_DEV_MAP_FLAG_WRITE_COMBINE : 0), - result); + dev->regions[bar].base_addr, + map_size, + PCI_DEV_MAP_FLAG_WRITABLE | + (vram ? PCI_DEV_MAP_FLAG_WRITE_COMBINE : 0), + result); if (err) - return NULL; + return NULL; return ptr; } #endif @@ -341,17 +349,21 @@ GXMapMem(ScrnInfoPtr pScrni) pciVideoPtr pci = xf86GetPciInfoForEntity(pGeode->pEnt->index); #ifndef XSERVER_LIBPCIACCESS - gfx_virt_regptr = (unsigned char *)xf86MapVidMem(index, VIDMEM_MMIO, - pci->memBase[2], pci->size[2]); + gfx_virt_regptr = (unsigned char *) xf86MapVidMem(index, VIDMEM_MMIO, + pci->memBase[2], + pci->size[2]); - gfx_virt_gpptr = (unsigned char *)xf86MapVidMem(index, VIDMEM_MMIO, - pci->memBase[1], pci->size[1]); + gfx_virt_gpptr = (unsigned char *) xf86MapVidMem(index, VIDMEM_MMIO, + pci->memBase[1], + pci->size[1]); - gfx_virt_vidptr = (unsigned char *)xf86MapVidMem(index, VIDMEM_MMIO, - pci->memBase[3], pci->size[3]); + gfx_virt_vidptr = (unsigned char *) xf86MapVidMem(index, VIDMEM_MMIO, + pci->memBase[3], + pci->size[3]); - gfx_virt_fbptr = (unsigned char *)xf86MapVidMem(index, VIDMEM_FRAMEBUFFER, - pci->memBase[0], pGeode->FBAvail); + gfx_virt_fbptr = (unsigned char *) xf86MapVidMem(index, VIDMEM_FRAMEBUFFER, + pci->memBase[0], + pGeode->FBAvail); #else gfx_virt_regptr = map_pci_mem(pScrni, 0, pci, 2, 0); gfx_virt_gpptr = map_pci_mem(pScrni, 0, pci, 1, 0); @@ -366,14 +378,14 @@ GXMapMem(ScrnInfoPtr pScrni) pGeode->FBBase = gfx_virt_fbptr; if ((!gfx_virt_regptr) || (!gfx_virt_gpptr) || - (!gfx_virt_vidptr) || (!gfx_virt_fbptr)) - return FALSE; + (!gfx_virt_vidptr) || (!gfx_virt_fbptr)) + return FALSE; if (!pGeode->NoAccel && pGeode->useEXA) - pGeode->pExa->memoryBase = pGeode->FBBase; + pGeode->pExa->memoryBase = pGeode->FBBase; xf86DrvMsg(index, X_INFO, "Found Geode %x %p\n", - pGeode->FBAvail, pGeode->FBBase); + pGeode->FBAvail, pGeode->FBBase); return TRUE; } @@ -391,11 +403,11 @@ GXCheckVGA(ScrnInfoPtr pScrni) int ret; ptr = - xf86MapVidMem(pScrni->scrnIndex, VIDMEM_FRAMEBUFFER, 0xC001E, - strlen(vgasig)); + xf86MapVidMem(pScrni->scrnIndex, VIDMEM_FRAMEBUFFER, 0xC001E, + strlen(vgasig)); if (ptr == NULL) - return FALSE; + return FALSE; ret = memcmp(ptr, vgasig, strlen(vgasig)); xf86UnMapVidMem(pScrni->scrnIndex, (pointer) ptr, strlen(vgasig)); @@ -418,24 +430,24 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) Bool useVGA; if (pScrni->numEntities != 1) - return FALSE; + return FALSE; pEnt = xf86GetEntityInfo(pScrni->entityList[0]); #ifndef XSERVER_LIBPCIACCESS if (pEnt->resources) - return FALSE; + return FALSE; #endif pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec)); if (pGeode == NULL) - return FALSE; + return FALSE; useVGA = GXCheckVGA(pScrni); if (flags & PROBE_DETECT) { - GeodeProbeDDC(pScrni, pEnt->index); - return TRUE; + GeodeProbeDDC(pScrni, pEnt->index); + return TRUE; } /* Probe for VGA */ @@ -443,13 +455,13 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) pGeode->pEnt = pEnt; if (pGeode->useVGA) { - if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) - pGeode->useVGA = FALSE; - else - vgaHWSetStdFuncs(VGAHWPTR(pScrni)); + if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) + pGeode->useVGA = FALSE; + else + vgaHWSetStdFuncs(VGAHWPTR(pScrni)); #if INT10_SUPPORT - pGeode->vesa = calloc(1, sizeof(VESARec)); + pGeode->vesa = calloc(1, sizeof(VESARec)); #endif } @@ -458,48 +470,49 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) ret = gfx_msr_read(RC_ID_DF, MBD_MSR_CONFIG, &msrValue); if (!ret) { - pGeode->Output = - ((msrValue.low & RCDF_CONFIG_FMT_MASK) == - RCDF_CONFIG_FMT_FP) ? OUTPUT_PANEL : OUTPUT_CRT; + pGeode->Output = + ((msrValue.low & RCDF_CONFIG_FMT_MASK) == + RCDF_CONFIG_FMT_FP) ? OUTPUT_PANEL : OUTPUT_CRT; } /* Fill in the monitor information */ pScrni->monitor = pScrni->confScreen->monitor; if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb)) - return FALSE; + return FALSE; switch (pScrni->depth) { case 8: - pScrni->rgbBits = 8; + pScrni->rgbBits = 8; case 16: case 24: case 32: - break; + break; default: - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "The driver does not support %d as a depth.\n", pScrni->depth); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "The driver does not support %d as a depth.\n", + pScrni->depth); + return FALSE; } xf86PrintDepthBpp(pScrni); if (!xf86SetWeight(pScrni, defaultWeight, defaultWeight)) - return FALSE; + return FALSE; if (!xf86SetDefaultVisual(pScrni, -1)) - return FALSE; + return FALSE; /* * If the driver can do gamma correction, it should call xf86SetGamma() * here. */ { - Gamma zeros = { 0.0, 0.0, 0.0 }; + Gamma zeros = { 0.0, 0.0, 0.0 }; - if (!xf86SetGamma(pScrni, zeros)) { - return FALSE; - } + if (!xf86SetGamma(pScrni, zeros)) { + return FALSE; + } } pScrni->progClock = TRUE; @@ -521,94 +534,92 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) pGeode->NoOfColorExpandLines = DEFAULT_CLR_LINE_BUFS; pGeode->exaBfrSz = DEFAULT_EXA_SCRATCH_BFRSZ; - xf86GetOptValBool(GeodeOptions, GX_OPTION_HW_CURSOR, - &pGeode->tryHWCursor); + xf86GetOptValBool(GeodeOptions, GX_OPTION_HW_CURSOR, &pGeode->tryHWCursor); if (!xf86GetOptValInteger(GeodeOptions, GX_OPTION_FBSIZE, - (int *)&(pGeode->FBAvail))) - pGeode->FBAvail = 0; + (int *) &(pGeode->FBAvail))) + pGeode->FBAvail = 0; /* For compatability - allow SWCursor too */ if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_SW_CURSOR, FALSE)) - pGeode->tryHWCursor = FALSE; + pGeode->tryHWCursor = FALSE; if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOCOMPRESSION, FALSE)) - pGeode->tryCompression = FALSE; + pGeode->tryCompression = FALSE; if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOACCEL, FALSE)) - pGeode->NoAccel = TRUE; + pGeode->NoAccel = TRUE; pGeode->rotation = RR_Rotate_0; if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_ROTATE))) { - if (!xf86NameCmp(s, "LEFT")) - pGeode->rotation = RR_Rotate_90; - else if (!xf86NameCmp(s, "INVERT")) - pGeode->rotation = RR_Rotate_180; - else if (!xf86NameCmp(s, "CCW")) - pGeode->rotation = RR_Rotate_270; - else - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Invalid rotation %s.\n", s); + if (!xf86NameCmp(s, "LEFT")) + pGeode->rotation = RR_Rotate_90; + else if (!xf86NameCmp(s, "INVERT")) + pGeode->rotation = RR_Rotate_180; + else if (!xf86NameCmp(s, "CCW")) + pGeode->rotation = RR_Rotate_270; + else + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "Invalid rotation %s.\n", s); } xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_IMG_BUFS, - &(pGeode->NoOfImgBuffers)); + &(pGeode->NoOfImgBuffers)); if (pGeode->NoOfImgBuffers <= 0) - pGeode->NoOfImgBuffers = 0; + pGeode->NoOfImgBuffers = 0; xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_CLR_BUFS, - &(pGeode->NoOfColorExpandLines)); + &(pGeode->NoOfColorExpandLines)); if (pGeode->NoOfColorExpandLines <= 0) - pGeode->NoOfColorExpandLines = 0; + pGeode->NoOfColorExpandLines = 0; xf86GetOptValInteger(GeodeOptions, GX_OPTION_OSM_CLR_BUFS, - (int *)&(pGeode->exaBfrSz)); + (int *) &(pGeode->exaBfrSz)); if (pGeode->exaBfrSz <= 0) - pGeode->exaBfrSz = 0; + pGeode->exaBfrSz = 0; if (pGeode->Panel == TRUE) { - if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOPANEL, FALSE)) - pGeode->Panel = FALSE; + if (xf86ReturnOptValBool(GeodeOptions, GX_OPTION_NOPANEL, FALSE)) + pGeode->Panel = FALSE; } panelgeo = xf86GetOptValString(GeodeOptions, GX_OPTION_PANEL_GEOMETRY); if ((s = xf86GetOptValString(GeodeOptions, GX_OPTION_ACCEL_METHOD))) { - if (!xf86NameCmp(s, "XAA")) - pGeode->useEXA = FALSE; - else if (xf86NameCmp(s, "EXA")) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Unknown accleration method %s. Defaulting to XAA.\n", s); + if (!xf86NameCmp(s, "XAA")) + pGeode->useEXA = FALSE; + else if (xf86NameCmp(s, "EXA")) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Unknown accleration method %s. Defaulting to XAA.\n", + s); } xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "Using %s acceleration architecture\n", - pGeode->useEXA ? "EXA" : "XAA"); + "Using %s acceleration architecture\n", + pGeode->useEXA ? "EXA" : "XAA"); /* Set up the panel */ if (pGeode->Panel) { - if (panelgeo != NULL) { - if (GeodeGetFPGeometry(panelgeo, &pGeode->PanelX, - &pGeode->PanelY)) - pGeode->Panel = FALSE; - } + if (panelgeo != NULL) { + if (GeodeGetFPGeometry(panelgeo, &pGeode->PanelX, &pGeode->PanelY)) + pGeode->Panel = FALSE; + } #ifdef PNL_SUP - else { - int b, f; + else { + int b, f; - /* The bitdepth and refresh isn't used anywhere else in the driver */ + /* The bitdepth and refresh isn't used anywhere else in the driver */ - if ((pGeode->Panel = Pnl_IsPanelEnabledInBIOS())) - Pnl_GetPanelInfoFromBIOS(&pGeode->PanelX, &pGeode->PanelY, &b, - &f); - } + if ((pGeode->Panel = Pnl_IsPanelEnabledInBIOS())) + Pnl_GetPanelInfoFromBIOS(&pGeode->PanelX, &pGeode->PanelY, &b, + &f); + } #endif } @@ -616,18 +627,18 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) if (pGeode->useVGA) { #if INT10_SUPPORT - VESARec *pVesa; + VESARec *pVesa; - if (!xf86LoadSubModule(pScrni, "int10")) - return FALSE; + if (!xf86LoadSubModule(pScrni, "int10")) + return FALSE; - pVesa = pGeode->vesa; + pVesa = pGeode->vesa; - if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Unable to initialize 1NT10 support\n"); - pGeode->useVGA = FALSE; - } + if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Unable to initialize 1NT10 support\n"); + pGeode->useVGA = FALSE; + } #endif } @@ -637,19 +648,19 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) */ if (pGeode->FBAvail == 0) { - if (GeodeGetSizeFromFB(&pGeode->FBAvail)) - pGeode->FBAvail = gfx_get_frame_buffer_size(); + if (GeodeGetSizeFromFB(&pGeode->FBAvail)) + pGeode->FBAvail = gfx_get_frame_buffer_size(); } if (pScrni->memPhysBase == 0) - pScrni->memPhysBase = gfx_get_frame_buffer_base(); + pScrni->memPhysBase = gfx_get_frame_buffer_base(); pScrni->fbOffset = 0; if (pGeode->pEnt->device->videoRam == 0) - pScrni->videoRam = pGeode->FBAvail / 1024; + pScrni->videoRam = pGeode->FBAvail / 1024; else - pScrni->videoRam = pGeode->pEnt->device->videoRam; + pScrni->videoRam = pGeode->pEnt->device->videoRam; GeodeClockRange = (ClockRangePtr) xnfcalloc(1, sizeof(ClockRange)); GeodeClockRange->next = NULL; @@ -664,24 +675,25 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) /* I'm still not 100% sure this uses the right values */ modecnt = xf86ValidateModes(pScrni, - pScrni->monitor->Modes, - pScrni->display->modes, - GeodeClockRange, - NULL, GX_MIN_PITCH, GX_MAX_PITCH, - 32, GX_MIN_HEIGHT, GX_MAX_HEIGHT, - pScrni->display->virtualX, - pScrni->display->virtualY, pGeode->FBAvail, LOOKUP_BEST_REFRESH); + pScrni->monitor->Modes, + pScrni->display->modes, + GeodeClockRange, + NULL, GX_MIN_PITCH, GX_MAX_PITCH, + 32, GX_MIN_HEIGHT, GX_MAX_HEIGHT, + pScrni->display->virtualX, + pScrni->display->virtualY, pGeode->FBAvail, + LOOKUP_BEST_REFRESH); if (modecnt <= 0) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n"); + return FALSE; } xf86PruneDriverModes(pScrni); if (pScrni->modes == NULL) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes were found\n"); + return FALSE; } xf86SetCrtcForModes(pScrni, 0); @@ -693,28 +705,28 @@ GXPreInit(ScrnInfoPtr pScrni, int flags) /* Load the modules we'll need */ if (xf86LoadSubModule(pScrni, "fb") == NULL) { - return FALSE; + return FALSE; } if (pGeode->NoAccel == FALSE) { - const char *module = (pGeode->useEXA) ? "exa" : "xaa"; + const char *module = (pGeode->useEXA) ? "exa" : "xaa"; - if (!xf86LoadSubModule(pScrni, module)) { - return FALSE; - } + if (!xf86LoadSubModule(pScrni, module)) { + return FALSE; + } } if (pGeode->tryHWCursor == TRUE) { - if (!xf86LoadSubModule(pScrni, "ramdac")) { - return FALSE; - } + if (!xf86LoadSubModule(pScrni, "ramdac")) { + return FALSE; + } } #ifndef XSERVER_LIBPCIACCESS if (xf86RegisterResources(pGeode->pEnt->index, NULL, ResExclusive)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Couldn't register the resources.\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't register the resources.\n"); + return FALSE; } #endif return TRUE; @@ -726,11 +738,11 @@ GXRestore(ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->useVGA && pGeode->FBVGAActive) { - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - vgaHWProtect(pScrni, TRUE); - vgaHWRestore(pScrni, &pvgaHW->SavedReg, VGA_SR_ALL); - vgaHWProtect(pScrni, FALSE); + vgaHWProtect(pScrni, TRUE); + vgaHWRestore(pScrni, &pvgaHW->SavedReg, VGA_SR_ALL); + vgaHWProtect(pScrni, FALSE); } } @@ -754,13 +766,13 @@ GXSetDvLineSize(unsigned int pitch) unsigned long temp, dv_size = MDC_DV_LINE_SIZE_1024; if (pitch > 1024) { - dv_size = MDC_DV_LINE_SIZE_2048; + dv_size = MDC_DV_LINE_SIZE_2048; } if (pitch > 2048) { - dv_size = MDC_DV_LINE_SIZE_4096; + dv_size = MDC_DV_LINE_SIZE_4096; } if (pitch > 4096) { - dv_size = MDC_DV_LINE_SIZE_8192; + dv_size = MDC_DV_LINE_SIZE_8192; } /* WRITE DIRTY/VALID CONTROL WITH LINE LENGTH */ @@ -772,9 +784,9 @@ GXSetDvLineSize(unsigned int pitch) /* XXX - this is nothing like the original function - not sure exactly what the purpose is for this quite yet */ static void -GXAdjustFrame(int scrnIndex, int x, int y, int flags) +GXAdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); unsigned long offset; @@ -795,38 +807,40 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) gx_disable_dac_power(); if (pMode->Flags & V_NHSYNC) - flags |= 1; + flags |= 1; if (pMode->Flags & V_NVSYNC) - flags |= 2; + flags |= 2; /* Check to see if we should use custom or built-in timings */ if (pGeode->Panel) - custom = (pMode->type & M_T_USERDEF); + custom = (pMode->type & M_T_USERDEF); else - custom = !(pMode->type & (M_T_BUILTIN | M_T_DEFAULT)); + custom = !(pMode->type & (M_T_BUILTIN | M_T_DEFAULT)); /* If we're not doing a custom mode, then just set the fixed timings, * otherwise, do the whole shooting match */ if (!custom) { - GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY, - pMode->CrtcHDisplay, pMode->CrtcVDisplay, - pScrni->bitsPerPixel)); - } else { - if (pGeode->Panel) - GFX(set_panel_present(pGeode->PanelX, pGeode->PanelY, - pMode->CrtcHDisplay, pMode->CrtcVDisplay, - pScrni->bitsPerPixel)); - - GFX(set_display_timings(pScrni->bitsPerPixel, flags, - pMode->CrtcHDisplay, pMode->CrtcHBlankStart, - pMode->CrtcHSyncStart, pMode->CrtcHSyncEnd, - pMode->CrtcHBlankEnd, pMode->CrtcHTotal, - pMode->CrtcVDisplay, pMode->CrtcVBlankStart, - pMode->CrtcVSyncStart, pMode->CrtcVSyncEnd, - pMode->CrtcVBlankEnd, pMode->CrtcVTotal, - (int)((pMode->SynthClock / 1000.0) * 0x10000))); + GFX(set_fixed_timings(pGeode->PanelX, pGeode->PanelY, + pMode->CrtcHDisplay, pMode->CrtcVDisplay, + pScrni->bitsPerPixel)); + } + else { + if (pGeode->Panel) + GFX(set_panel_present(pGeode->PanelX, pGeode->PanelY, + pMode->CrtcHDisplay, pMode->CrtcVDisplay, + pScrni->bitsPerPixel)); + + GFX(set_display_timings(pScrni->bitsPerPixel, flags, + pMode->CrtcHDisplay, pMode->CrtcHBlankStart, + pMode->CrtcHSyncStart, pMode->CrtcHSyncEnd, + pMode->CrtcHBlankEnd, pMode->CrtcHTotal, + pMode->CrtcVDisplay, pMode->CrtcVBlankStart, + pMode->CrtcVSyncStart, pMode->CrtcVSyncEnd, + pMode->CrtcVBlankEnd, pMode->CrtcVTotal, + (int) ((pMode->SynthClock / 1000.0) * + 0x10000))); } GFX(set_crt_enable(CRT_ENABLE)); @@ -835,34 +849,35 @@ GXSetVideoMode(ScrnInfoPtr pScrni, DisplayModePtr pMode) GFX(wait_vertical_blank()); if (pGeode->Compression) { - GXSetDvLineSize(pGeode->Pitch); + GXSetDvLineSize(pGeode->Pitch); - gfx_set_compression_offset(pGeode->CBData.compression_offset); - gfx_set_compression_pitch(GX_CB_PITCH); - gfx_set_compression_size(GX_CB_SIZE); + gfx_set_compression_offset(pGeode->CBData.compression_offset); + gfx_set_compression_pitch(GX_CB_PITCH); + gfx_set_compression_size(GX_CB_SIZE); - gfx_set_compression_enable(1); + gfx_set_compression_enable(1); } if (pGeode->HWCursor && !(pMode->Flags & V_DBLSCAN)) { - GXLoadCursorImage(pScrni, NULL); - GFX(set_cursor_position(pGeode->CursorStartOffset, 0, 0, 0, 0)); - GXShowCursor(pScrni); - } else { - GFX(set_cursor_enable(0)); - pGeode->HWCursor = FALSE; + GXLoadCursorImage(pScrni, NULL); + GFX(set_cursor_position(pGeode->CursorStartOffset, 0, 0, 0, 0)); + GXShowCursor(pScrni); + } + else { + GFX(set_cursor_enable(0)); + pGeode->HWCursor = FALSE; } - GXAdjustFrame(pScrni->scrnIndex, pScrni->frameX0, pScrni->frameY0, 0); + GXAdjustFrame(ADJUST_FRAME_ARGS(pScrni->frameX0, pScrni->frameY0)); gx_enable_dac_power(); return TRUE; } static Bool -GXSwitchMode(int index, DisplayModePtr pMode, int flags) +GXSwitchMode(SWITCH_MODE_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[index]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int ret = TRUE; int rotate; @@ -876,21 +891,22 @@ GXSwitchMode(int index, DisplayModePtr pMode, int flags) ret = GXAllocateMemory(pScrni->pScreen, pScrni, rotate); if (ret) { - if (pGeode->curMode != pMode) - ret = GXSetVideoMode(pScrni, pMode); + if (pGeode->curMode != pMode) + ret = GXSetVideoMode(pScrni, pMode); } if (ret) - ret = GXRotate(pScrni, pMode); + ret = GXRotate(pScrni, pMode); /* Go back the way it was */ if (ret == FALSE) { - if (!GXSetVideoMode(pScrni, pGeode->curMode)) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Could not restore the previous mode\n"); - } else - pGeode->curMode = pMode; + if (!GXSetVideoMode(pScrni, pGeode->curMode)) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Could not restore the previous mode\n"); + } + else + pGeode->curMode = pMode; return ret; } @@ -904,29 +920,29 @@ GXLeaveGraphics(ScrnInfoPtr pScrni) /* Restore VG registers */ gfx_set_display_timings(pGeode->FBgfxdisplaytiming.wBpp, - pGeode->FBgfxdisplaytiming.wPolarity, - pGeode->FBgfxdisplaytiming.wHActive, - pGeode->FBgfxdisplaytiming.wHBlankStart, - pGeode->FBgfxdisplaytiming.wHSyncStart, - pGeode->FBgfxdisplaytiming.wHSyncEnd, - pGeode->FBgfxdisplaytiming.wHBlankEnd, - pGeode->FBgfxdisplaytiming.wHTotal, - pGeode->FBgfxdisplaytiming.wVActive, - pGeode->FBgfxdisplaytiming.wVBlankStart, - pGeode->FBgfxdisplaytiming.wVSyncStart, - pGeode->FBgfxdisplaytiming.wVSyncEnd, - pGeode->FBgfxdisplaytiming.wVBlankEnd, - pGeode->FBgfxdisplaytiming.wVTotal, - pGeode->FBgfxdisplaytiming.dwDotClock); + pGeode->FBgfxdisplaytiming.wPolarity, + pGeode->FBgfxdisplaytiming.wHActive, + pGeode->FBgfxdisplaytiming.wHBlankStart, + pGeode->FBgfxdisplaytiming.wHSyncStart, + pGeode->FBgfxdisplaytiming.wHSyncEnd, + pGeode->FBgfxdisplaytiming.wHBlankEnd, + pGeode->FBgfxdisplaytiming.wHTotal, + pGeode->FBgfxdisplaytiming.wVActive, + pGeode->FBgfxdisplaytiming.wVBlankStart, + pGeode->FBgfxdisplaytiming.wVSyncStart, + pGeode->FBgfxdisplaytiming.wVSyncEnd, + pGeode->FBgfxdisplaytiming.wVBlankEnd, + pGeode->FBgfxdisplaytiming.wVTotal, + pGeode->FBgfxdisplaytiming.dwDotClock); gfx_set_compression_enable(0); /* Restore the previous Compression state */ if (pGeode->FBCompressionEnable) { - gfx_set_compression_offset(pGeode->FBCompressionOffset); - gfx_set_compression_pitch(pGeode->FBCompressionPitch); - gfx_set_compression_size(pGeode->FBCompressionSize); - gfx_set_compression_enable(1); + gfx_set_compression_offset(pGeode->FBCompressionOffset); + gfx_set_compression_pitch(pGeode->FBCompressionPitch); + gfx_set_compression_size(pGeode->FBCompressionSize); + gfx_set_compression_enable(1); } gfx_set_display_pitch(pGeode->FBgfxdisplaytiming.wPitch); @@ -937,11 +953,11 @@ GXLeaveGraphics(ScrnInfoPtr pScrni) gfx_set_cursor_position(pGeode->FBCursorOffset, 0, 0, 0, 0); if (pGeode->useVGA) { - pGeode->vesa->pInt->num = 0x10; - pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode; - pGeode->vesa->pInt->bx = 0; - xf86ExecX86int10(pGeode->vesa->pInt); - gfx_delay_milliseconds(3); + pGeode->vesa->pInt->num = 0x10; + pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode; + pGeode->vesa->pInt->bx = 0; + xf86ExecX86int10(pGeode->vesa->pInt); + gfx_delay_milliseconds(3); } GXRestore(pScrni); @@ -950,32 +966,34 @@ GXLeaveGraphics(ScrnInfoPtr pScrni) } static Bool -GXCloseScreen(int scrnIndex, ScreenPtr pScrn) +GXCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); if (pScrni->vtSema) - GXLeaveGraphics(pScrni); + GXLeaveGraphics(pScrni); +#ifdef XF86XAA if (pGeode->AccelInfoRec) - XAADestroyInfoRec(pGeode->AccelInfoRec); + XAADestroyInfoRec(pGeode->AccelInfoRec); +#endif if (pGeode->AccelImageWriteBuffers) { - free(pGeode->AccelImageWriteBuffers[0]); - free(pGeode->AccelImageWriteBuffers); - pGeode->AccelImageWriteBuffers = NULL; + free(pGeode->AccelImageWriteBuffers[0]); + free(pGeode->AccelImageWriteBuffers); + pGeode->AccelImageWriteBuffers = NULL; } if (pGeode->AccelColorExpandBuffers) { - free(pGeode->AccelColorExpandBuffers); - pGeode->AccelColorExpandBuffers = NULL; + free(pGeode->AccelColorExpandBuffers); + pGeode->AccelColorExpandBuffers = NULL; } if (pGeode->pExa) { - exaDriverFini(pScrn); - free(pGeode->pExa); - pGeode->pExa = NULL; + exaDriverFini(pScrn); + free(pGeode->pExa); + pGeode->pExa = NULL; } pScrni->vtSema = FALSE; @@ -986,7 +1004,7 @@ GXCloseScreen(int scrnIndex, ScreenPtr pScrn) pScrn->CloseScreen = pGeode->CloseScreen; if (pScrn->CloseScreen) - return (*pScrn->CloseScreen) (scrnIndex, pScrn); + return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS); return TRUE; } @@ -997,10 +1015,10 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (!GXMapMem(pScrni)) - return FALSE; + return FALSE; if (pGeode->useVGA) - pGeode->FBVGAActive = gu2_get_vga_active(); + pGeode->FBVGAActive = gu2_get_vga_active(); gfx_wait_until_idle(); @@ -1026,9 +1044,9 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) pGeode->FBDisplayOffset = gfx_get_display_offset(); if (pGeode->useVGA) { - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040); + pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040); } pGeode->FBCompressionEnable = gfx_get_compression_enable(); @@ -1043,37 +1061,37 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) /* Turn off the VGA */ if (pGeode->useVGA && pGeode->FBVGAActive) { - unsigned short sequencer; - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + unsigned short sequencer; + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - /* Map VGA aperture */ - if (!vgaHWMapMem(pScrni)) - return FALSE; + /* Map VGA aperture */ + if (!vgaHWMapMem(pScrni)) + return FALSE; - /* Unlock VGA registers */ - vgaHWUnlock(pvgaHW); + /* Unlock VGA registers */ + vgaHWUnlock(pvgaHW); - /* Save the current state and setup the current mode */ - vgaHWSave(pScrni, &VGAHWPTR(pScrni)->SavedReg, VGA_SR_ALL); + /* Save the current state and setup the current mode */ + vgaHWSave(pScrni, &VGAHWPTR(pScrni)->SavedReg, VGA_SR_ALL); - /* DISABLE VGA SEQUENCER */ - /* This allows the VGA state machine to terminate. We must delay */ - /* such that there are no pending MBUS requests. */ + /* DISABLE VGA SEQUENCER */ + /* This allows the VGA state machine to terminate. We must delay */ + /* such that there are no pending MBUS requests. */ - gfx_outb(MDC_SEQUENCER_INDEX, MDC_SEQUENCER_CLK_MODE); - sequencer = gfx_inb(MDC_SEQUENCER_DATA); - sequencer |= MDC_CLK_MODE_SCREEN_OFF; - gfx_outb(MDC_SEQUENCER_DATA, sequencer); + gfx_outb(MDC_SEQUENCER_INDEX, MDC_SEQUENCER_CLK_MODE); + sequencer = gfx_inb(MDC_SEQUENCER_DATA); + sequencer |= MDC_CLK_MODE_SCREEN_OFF; + gfx_outb(MDC_SEQUENCER_DATA, sequencer); - gfx_delay_milliseconds(1); + gfx_delay_milliseconds(1); - /* BLANK THE VGA DISPLAY */ - gfx_outw(MDC_SEQUENCER_INDEX, MDC_SEQUENCER_RESET); - sequencer = gfx_inb(MDC_SEQUENCER_DATA); - sequencer &= ~MDC_RESET_VGA_DISP_ENABLE; - gfx_outb(MDC_SEQUENCER_DATA, sequencer); + /* BLANK THE VGA DISPLAY */ + gfx_outw(MDC_SEQUENCER_INDEX, MDC_SEQUENCER_RESET); + sequencer = gfx_inb(MDC_SEQUENCER_DATA); + sequencer &= ~MDC_RESET_VGA_DISP_ENABLE; + gfx_outb(MDC_SEQUENCER_DATA, sequencer); - gfx_delay_milliseconds(1); + gfx_delay_milliseconds(1); } /* Set up the memory */ @@ -1092,17 +1110,17 @@ GXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) static void GXLoadPalette(ScrnInfoPtr pScrni, - int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) + int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) { int i, index, color; for (i = 0; i < numColors; i++) { - index = indizes[i] & 0xFF; - color = (((unsigned long)(colors[index].red & 0xFF)) << 16) | - (((unsigned long)(colors[index].green & 0xFF)) << 8) | - ((unsigned long)(colors[index].blue & 0xFF)); + index = indizes[i] & 0xFF; + color = (((unsigned long) (colors[index].red & 0xFF)) << 16) | + (((unsigned long) (colors[index].green & 0xFF)) << 8) | + ((unsigned long) (colors[index].blue & 0xFF)); - GFX(set_display_palette_entry(index, color)); + GFX(set_display_palette_entry(index, color)); } } @@ -1113,9 +1131,9 @@ GXPanelPower(int enable) unsigned long power = READ_VID32(RCDF_POWER_MANAGEMENT); if (enable != 0) - power |= RCDF_PM_PANEL_POWER_ON; + power |= RCDF_PM_PANEL_POWER_ON; else - power &= ~RCDF_PM_PANEL_POWER_ON; + power &= ~RCDF_PM_PANEL_POWER_ON; WRITE_VID32(RCDF_POWER_MANAGEMENT, power); } @@ -1128,52 +1146,52 @@ GXDPMSSet(ScrnInfoPtr pScrni, int mode, int flags) pGeode = GEODEPTR(pScrni); if (!pScrni->vtSema) - return; + return; switch (mode) { case DPMSModeOn: - /* Screen: On; HSync: On; VSync: On */ - GFX(set_crt_enable(CRT_ENABLE)); + /* Screen: On; HSync: On; VSync: On */ + GFX(set_crt_enable(CRT_ENABLE)); #if defined(PNL_SUP) - if (pGeode->Panel) { - Pnl_PowerUp(); - GXPanelPower(1); - } + if (pGeode->Panel) { + Pnl_PowerUp(); + GXPanelPower(1); + } #endif - break; + break; case DPMSModeStandby: - /* Screen: Off; HSync: Off; VSync: On */ - GFX(set_crt_enable(CRT_STANDBY)); + /* Screen: Off; HSync: Off; VSync: On */ + GFX(set_crt_enable(CRT_STANDBY)); #if defined(PNL_SUP) - if (pGeode->Panel) { - Pnl_PowerDown(); - GXPanelPower(0); - } + if (pGeode->Panel) { + Pnl_PowerDown(); + GXPanelPower(0); + } #endif - break; + break; case DPMSModeSuspend: - /* Screen: Off; HSync: On; VSync: Off */ - GFX(set_crt_enable(CRT_SUSPEND)); + /* Screen: Off; HSync: On; VSync: Off */ + GFX(set_crt_enable(CRT_SUSPEND)); #if defined(PNL_SUP) - if (pGeode->Panel) { - Pnl_PowerDown(); - GXPanelPower(0); - } + if (pGeode->Panel) { + Pnl_PowerDown(); + GXPanelPower(0); + } #endif - break; + break; case DPMSModeOff: - /* Screen: Off; HSync: Off; VSync: Off */ - GFX(set_crt_enable(CRT_DISABLE)); + /* Screen: Off; HSync: Off; VSync: Off */ + GFX(set_crt_enable(CRT_DISABLE)); #if defined(PNL_SUP) - if (pGeode->Panel) { - Pnl_PowerDown(); - GXPanelPower(0); - } + if (pGeode->Panel) { + Pnl_PowerDown(); + GXPanelPower(0); + } #endif - break; + break; } } #endif @@ -1181,45 +1199,45 @@ GXDPMSSet(ScrnInfoPtr pScrni, int mode, int flags) static Bool GXCreateScreenResources(ScreenPtr pScreen) { - ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); pScreen->CreateScreenResources = pGeode->CreateScreenResources; if (!(*pScreen->CreateScreenResources) (pScreen)) - return FALSE; + return FALSE; if (xf86LoaderCheckSymbol("GXRandRSetConfig") - && pGeode->rotation != RR_Rotate_0) { - Rotation(*GXRandRSetConfig) (ScreenPtr pScreen, Rotation rr, int rate, - RRScreenSizePtr pSize) = NULL; + && pGeode->rotation != RR_Rotate_0) { + Rotation(*GXRandRSetConfig) (ScreenPtr pScreen, Rotation rr, int rate, + RRScreenSizePtr pSize) = NULL; - RRScreenSize p; - Rotation requestedRotation = pGeode->rotation; + RRScreenSize p; + Rotation requestedRotation = pGeode->rotation; - pGeode->rotation = RR_Rotate_0; + pGeode->rotation = RR_Rotate_0; - /* Just setup enough for an initial rotate */ + /* Just setup enough for an initial rotate */ - p.width = pScreen->width; - p.height = pScreen->height; - p.mmWidth = pScreen->mmWidth; - p.mmHeight = pScreen->mmHeight; + p.width = pScreen->width; + p.height = pScreen->height; + p.mmWidth = pScreen->mmWidth; + p.mmHeight = pScreen->mmHeight; - GXRandRSetConfig = LoaderSymbol("GXRandRSetConfig"); - if (GXRandRSetConfig) { - pGeode->starting = TRUE; - (*GXRandRSetConfig) (pScreen, requestedRotation, 0, &p); - pGeode->starting = FALSE; - } + GXRandRSetConfig = LoaderSymbol("GXRandRSetConfig"); + if (GXRandRSetConfig) { + pGeode->starting = TRUE; + (*GXRandRSetConfig) (pScreen, requestedRotation, 0, &p); + pGeode->starting = FALSE; + } } return TRUE; } static Bool -GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) +GXScreenInit(SCREEN_INIT_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); XF86ModReqInfo shadowReq; int maj, min, ret, rotate; @@ -1230,65 +1248,69 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) if (pGeode->useVGA) { - if (!vgaHWMapMem(pScrni)) - return FALSE; + if (!vgaHWMapMem(pScrni)) + return FALSE; - vgaHWGetIOBase(VGAHWPTR(pScrni)); + vgaHWGetIOBase(VGAHWPTR(pScrni)); } if (!pGeode->NoAccel) { - if (pGeode->useEXA) { - - if (!(pGeode->pExa = exaDriverAlloc())) { - xf86DrvMsg(scrnIndex, X_ERROR, - "Couldn't allocate the EXA structure.\n"); - pGeode->NoAccel = TRUE; - } else { - ExaDriverPtr pExa = pGeode->pExa; - - /* THis is set in GXAllocMem */ - pExa->memoryBase = 0; - - /* This is set in GXAllocateMemory */ - pExa->memorySize = 0; - - pExa->pixmapOffsetAlign = 32; - pExa->pixmapPitchAlign = 32; - pExa->flags = EXA_OFFSCREEN_PIXMAPS; - pExa->maxX = GX_MAX_WIDTH - 1; - pExa->maxY = GX_MAX_HEIGHT - 1; - } - } else { - pGeode->AccelImageWriteBuffers = - calloc(pGeode->NoOfImgBuffers, - sizeof(pGeode->AccelImageWriteBuffers[0])); - pGeode->AccelColorExpandBuffers = - calloc(pGeode->NoOfColorExpandLines, - sizeof(pGeode->AccelColorExpandBuffers[0])); - } + if (pGeode->useEXA) { + + if (!(pGeode->pExa = exaDriverAlloc())) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't allocate the EXA structure.\n"); + pGeode->NoAccel = TRUE; + } + else { + ExaDriverPtr pExa = pGeode->pExa; + + /* THis is set in GXAllocMem */ + pExa->memoryBase = 0; + + /* This is set in GXAllocateMemory */ + pExa->memorySize = 0; + + pExa->pixmapOffsetAlign = 32; + pExa->pixmapPitchAlign = 32; + pExa->flags = EXA_OFFSCREEN_PIXMAPS; + pExa->maxX = GX_MAX_WIDTH - 1; + pExa->maxY = GX_MAX_HEIGHT - 1; + } + } + else { + pGeode->AccelImageWriteBuffers = + calloc(pGeode->NoOfImgBuffers, + sizeof(pGeode->AccelImageWriteBuffers[0])); + pGeode->AccelColorExpandBuffers = + calloc(pGeode->NoOfColorExpandLines, + sizeof(pGeode->AccelColorExpandBuffers[0])); + } } /* XXX FIXME - Take down any of the structures on failure? */ if (!GXEnterGraphics(pScrn, pScrni)) - return FALSE; + return FALSE; miClearVisualTypes(); /* XXX Again - take down anything? */ if (pScrni->bitsPerPixel > 8) { - if (!miSetVisualTypes(pScrni->depth, - TrueColorMask, pScrni->rgbBits, pScrni->defaultVisual)) { - return FALSE; - } - } else { - if (!miSetVisualTypes(pScrni->depth, - miGetDefaultVisualMask(pScrni->depth), - pScrni->rgbBits, pScrni->defaultVisual)) { - return FALSE; - } + if (!miSetVisualTypes(pScrni->depth, + TrueColorMask, pScrni->rgbBits, + pScrni->defaultVisual)) { + return FALSE; + } + } + else { + if (!miSetVisualTypes(pScrni->depth, + miGetDefaultVisualMask(pScrni->depth), + pScrni->rgbBits, pScrni->defaultVisual)) { + return FALSE; + } } miSetPixmapDepths(); @@ -1296,37 +1318,37 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) /* Point at the visible area to start */ ret = fbScreenInit(pScrn, pGeode->FBBase + pGeode->displayOffset, - pScrni->virtualX, pScrni->virtualY, - pScrni->xDpi, pScrni->yDpi, pGeode->displayWidth, - pScrni->bitsPerPixel); + pScrni->virtualX, pScrni->virtualY, + pScrni->xDpi, pScrni->yDpi, pGeode->displayWidth, + pScrni->bitsPerPixel); if (!ret) - return FALSE; + return FALSE; xf86SetBlackWhitePixels(pScrn); /* Set up the color ordering */ if (pScrni->bitsPerPixel > 8) { - VisualPtr visual = pScrn->visuals + pScrn->numVisuals; - - while (--visual >= pScrn->visuals) { - if ((visual->class | DynamicClass) == DirectColor) { - visual->offsetRed = pScrni->offset.red; - visual->offsetGreen = pScrni->offset.green; - visual->offsetBlue = pScrni->offset.blue; - visual->redMask = pScrni->mask.red; - visual->greenMask = pScrni->mask.green; - visual->blueMask = pScrni->mask.blue; - } - } + VisualPtr visual = pScrn->visuals + pScrn->numVisuals; + + while (--visual >= pScrn->visuals) { + if ((visual->class | DynamicClass) == DirectColor) { + visual->offsetRed = pScrni->offset.red; + visual->offsetGreen = pScrni->offset.green; + visual->offsetBlue = pScrni->offset.blue; + visual->redMask = pScrni->mask.red; + visual->greenMask = pScrni->mask.green; + visual->blueMask = pScrni->mask.blue; + } + } } /* Must follow the color ordering */ fbPictureInit(pScrn, 0, 0); if (!pGeode->NoAccel) - GXAccelInit(pScrn); + GXAccelInit(pScrn); miInitializeBackingStore(pScrn); xf86SetBackingStore(pScrn); @@ -1337,24 +1359,25 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) /* Set up the HW cursor - must follow the soft cursor init */ if (pGeode->tryHWCursor) { - if (!GXHWCursorInit(pScrn)) - xf86DrvMsg(scrnIndex, X_ERROR, - "Hardware cursor initialization failed.\n"); + if (!GXHWCursorInit(pScrn)) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Hardware cursor initialization failed.\n"); } /* Set up the color map */ if (!miCreateDefColormap(pScrn)) - return FALSE; + return FALSE; if (pScrni->bitsPerPixel == 8) { - /* Must follow initialization of the default colormap */ + /* Must follow initialization of the default colormap */ - if (!xf86HandleColormaps(pScrn, 256, 8, - GXLoadPalette, NULL, - CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH)) { - return FALSE; - } + if (!xf86HandleColormaps(pScrn, 256, 8, + GXLoadPalette, NULL, + CMAP_PALETTED_TRUECOLOR | + CMAP_RELOAD_ON_MODE_SWITCH)) { + return FALSE; + } } #ifdef DPMSExtension xf86DPMSInit(pScrn, GXDPMSSet, 0); @@ -1364,7 +1387,7 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) /* Set up RandR */ - xf86DisableRandR(); /* We provide our own RandR goodness */ + xf86DisableRandR(); /* We provide our own RandR goodness */ /* Try to set up the shadow FB for rotation */ @@ -1373,20 +1396,21 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) shadowReq.minorversion = 1; if (LoadSubModule(pScrni->module, "shadow", - NULL, NULL, NULL, &shadowReq, &maj, &min)) { + NULL, NULL, NULL, &shadowReq, &maj, &min)) { - rotate = RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270; - shadowSetup(pScrn); - } else { - LoaderErrorMsg(NULL, "shadow", maj, min); - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Error loading shadow - rotation not available.\n"); + rotate = RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270; + shadowSetup(pScrn); + } + else { + LoaderErrorMsg(NULL, "shadow", maj, min); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Error loading shadow - rotation not available.\n"); - if (pGeode->rotation != RR_Rotate_0) - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Reverting back to normal rotation.\n"); + if (pGeode->rotation != RR_Rotate_0) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Reverting back to normal rotation.\n"); - rotate = pGeode->rotation = RR_Rotate_0; + rotate = pGeode->rotation = RR_Rotate_0; } GXRandRInit(pScrn, rotate); @@ -1402,7 +1426,7 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) pScrn->SaveScreen = GXSaveScreen; if (serverGeneration == 1) - xf86ShowUnusedOptions(pScrni->scrnIndex, pScrni->options); + xf86ShowUnusedOptions(pScrni->scrnIndex, pScrni->options); pGeode->starting = FALSE; @@ -1410,17 +1434,17 @@ GXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) } static int -GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) +GXValidMode(VALID_MODE_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int p; int custom = 0; if (pGeode->Panel) - custom = (pMode->type & M_T_USERDEF); + custom = (pMode->type & M_T_USERDEF); else - custom = (pMode->type & (M_T_BUILTIN | M_T_DEFAULT)); + custom = (pMode->type & (M_T_BUILTIN | M_T_DEFAULT)); /* Use the durango lookup for !custom modes */ @@ -1445,16 +1469,15 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) } if (pMode->Flags & V_INTERLACE) - return MODE_NO_INTERLACE; + return MODE_NO_INTERLACE; if (pGeode->tryCompression) - p = GeodeCalculatePitchBytes(pMode->CrtcHDisplay, - pScrni->bitsPerPixel); + p = GeodeCalculatePitchBytes(pMode->CrtcHDisplay, pScrni->bitsPerPixel); else - p = ((pMode->CrtcHDisplay + 3) & ~3) * (pScrni->bitsPerPixel >> 3); + p = ((pMode->CrtcHDisplay + 3) & ~3) * (pScrni->bitsPerPixel >> 3); if (p * pMode->CrtcVDisplay > pGeode->FBAvail) - return MODE_MEM; + return MODE_MEM; return MODE_OK; } @@ -1462,19 +1485,20 @@ GXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) /* XXX - Way more to do here */ static Bool -GXEnterVT(int scrnIndex, int flags) +GXEnterVT(VT_FUNC_ARGS_DECL) { - return GXEnterGraphics(NULL, xf86Screens[scrnIndex]); + SCRN_INFO_PTR(arg); + return GXEnterGraphics(NULL, pScrni); } static void -GXLeaveVT(int scrnIndex, int flags) +GXLeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); pGeode->PrevDisplayOffset = gfx_get_display_offset(); - GXLeaveGraphics(xf86Screens[scrnIndex]); + GXLeaveGraphics(pScrni); } void @@ -1497,31 +1521,31 @@ GXSetupChipsetFPtr(ScrnInfoPtr pScrn) * ============================== */ void -GeodePointerMoved(int index, int x, int y) +GeodePointerMoved(POINTER_MOVED_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[index]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); int newX = x, newY = y; switch (pGeode->rotation) { case RR_Rotate_0: - break; + break; case RR_Rotate_90: - newX = y; - newY = pScrni->pScreen->width - x - 1; - break; + newX = y; + newY = pScrni->pScreen->width - x - 1; + break; case RR_Rotate_180: - newX = pScrni->pScreen->width - x - 1; - newY = pScrni->pScreen->height - y - 1; - break; + newX = pScrni->pScreen->width - x - 1; + newY = pScrni->pScreen->height - y - 1; + break; case RR_Rotate_270: - newX = pScrni->pScreen->height - y - 1; - newY = x; - break; + newX = pScrni->pScreen->height - y - 1; + newY = x; + break; } - (*pGeode->PointerMoved) (index, newX, newY); + (*pGeode->PointerMoved) (POINTER_MOVED_ARGS(newX, newY)); } int @@ -1537,25 +1561,26 @@ static void GeodeFreeRec(ScrnInfoPtr pScrni) { if (pScrni->driverPrivate != NULL) { - free(pScrni->driverPrivate); - pScrni->driverPrivate = NULL; + free(pScrni->driverPrivate); + pScrni->driverPrivate = NULL; } } void -GeodeFreeScreen(int scrnIndex, int flags) +GeodeFreeScreen(FREE_SCREEN_ARGS_DECL) { - GeodeRec *pGeode = GEODEPTR(xf86Screens[scrnIndex]); + SCRN_INFO_PTR(arg); + GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode == NULL) - return; + return; if (pGeode->useVGA) { - if (xf86LoaderCheckSymbol("vgaHWFreeHWRec")) - vgaHWFreeHWRec(xf86Screens[scrnIndex]); + if (xf86LoaderCheckSymbol("vgaHWFreeHWRec")) + vgaHWFreeHWRec(pScrni); } - GeodeFreeRec(xf86Screens[scrnIndex]); + GeodeFreeRec(pScrni); } int @@ -1567,18 +1592,18 @@ GeodeCalculatePitchBytes(unsigned int width, unsigned int bpp) /* Less then 640 has doubling enabled */ if (width < 640) - delta <<= 1; + delta <<= 1; /* Calculate the pitch (compression rquires a power of 2) */ if (delta > 4096) - delta = 8192; + delta = 8192; else if (delta > 2048) - delta = 4096; + delta = 4096; else if (delta > 1024) - delta = 2048; + delta = 2048; else - delta = 1024; + delta = 1024; return delta; } diff --git a/driver/xf86-video-geode/src/gx_randr.c b/driver/xf86-video-geode/src/gx_randr.c index d0ddba8c6..c0ca3b978 100644 --- a/driver/xf86-video-geode/src/gx_randr.c +++ b/driver/xf86-video-geode/src/gx_randr.c @@ -48,16 +48,15 @@ static int GXRandRGeneration; -typedef struct _GXRandRInfo -{ +typedef struct _GXRandRInfo { int virtualX; int virtualY; int mmWidth; int mmHeight; int maxX; int maxY; - Rotation rotation; /* current mode */ - Rotation supported_rotations; /* driver supported */ + Rotation rotation; /* current mode */ + Rotation supported_rotations; /* driver supported */ } XF86RandRInfoRec, *XF86RandRInfoPtr; #if HAS_DEVPRIVATEKEYREC @@ -81,10 +80,9 @@ static int GXRandRModeRefresh(DisplayModePtr mode) { if (mode->VRefresh) - return (int)(mode->VRefresh + 0.5); + return (int) (mode->VRefresh + 0.5); else - return (int)(mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + - 0.5); + return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5); } static Bool @@ -100,59 +98,59 @@ GXRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) *rotations = pRandr->supported_rotations; if (pRandr->virtualX == -1 || pRandr->virtualY == -1) { - pRandr->virtualX = pScrni->virtualX; - pRandr->virtualY = pScrni->virtualY; + pRandr->virtualX = pScrni->virtualX; + pRandr->virtualY = pScrni->virtualY; } for (mode = pScrni->modes;; mode = mode->next) { - int refresh = GXRandRModeRefresh(mode); - - if (pRandr->maxX == 0 || pRandr->maxY == 0) { - if (maxX < mode->HDisplay) - maxX = mode->HDisplay; - if (maxY < mode->VDisplay) - maxY = mode->VDisplay; - } - - if (mode == pScrni->modes) - refresh0 = refresh; - - pSize = RRRegisterSize(pScreen, - mode->HDisplay, mode->VDisplay, - pRandr->mmWidth, pRandr->mmHeight); - if (!pSize) - return FALSE; - - RRRegisterRate(pScreen, pSize, refresh); - - if (mode == pScrni->currentMode && - mode->HDisplay == pScrni->virtualX - && mode->VDisplay == pScrni->virtualY) - RRSetCurrentConfig(pScreen, pRandr->rotation, refresh, pSize); - if (mode->next == pScrni->modes) - break; + int refresh = GXRandRModeRefresh(mode); + + if (pRandr->maxX == 0 || pRandr->maxY == 0) { + if (maxX < mode->HDisplay) + maxX = mode->HDisplay; + if (maxY < mode->VDisplay) + maxY = mode->VDisplay; + } + + if (mode == pScrni->modes) + refresh0 = refresh; + + pSize = RRRegisterSize(pScreen, + mode->HDisplay, mode->VDisplay, + pRandr->mmWidth, pRandr->mmHeight); + if (!pSize) + return FALSE; + + RRRegisterRate(pScreen, pSize, refresh); + + if (mode == pScrni->currentMode && + mode->HDisplay == pScrni->virtualX + && mode->VDisplay == pScrni->virtualY) + RRSetCurrentConfig(pScreen, pRandr->rotation, refresh, pSize); + if (mode->next == pScrni->modes) + break; } if (pRandr->maxX == 0 || pRandr->maxY == 0) { - pRandr->maxX = maxX; - pRandr->maxY = maxY; + pRandr->maxX = maxX; + pRandr->maxY = maxY; } if (pScrni->currentMode->HDisplay != pScrni->virtualX || - pScrni->currentMode->VDisplay != pScrni->virtualY) { - - mode = pScrni->modes; - pSize = RRRegisterSize(pScreen, - pRandr->virtualX, pRandr->virtualY, - pRandr->mmWidth, pRandr->mmHeight); - if (!pSize) - return FALSE; - - RRRegisterRate(pScreen, pSize, refresh0); - if (pScrni->virtualX == pRandr->virtualX && - pScrni->virtualY == pRandr->virtualY) { - RRSetCurrentConfig(pScreen, pRandr->rotation, refresh0, pSize); - } + pScrni->currentMode->VDisplay != pScrni->virtualY) { + + mode = pScrni->modes; + pSize = RRRegisterSize(pScreen, + pRandr->virtualX, pRandr->virtualY, + pRandr->mmWidth, pRandr->mmHeight); + if (!pSize) + return FALSE; + + RRRegisterRate(pScreen, pSize, refresh0); + if (pScrni->virtualX == pRandr->virtualX && + pScrni->virtualY == pRandr->virtualY) { + RRSetCurrentConfig(pScreen, pRandr->rotation, refresh0, pSize); + } } return TRUE; @@ -160,7 +158,7 @@ GXRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) static Bool GXRandRSetMode(ScreenPtr pScreen, - DisplayModePtr mode, Bool useVirtual, int mmWidth, int mmHeight) + DisplayModePtr mode, Bool useVirtual, int mmWidth, int mmHeight) { ScrnInfoPtr pScrni = XF86SCRNINFO(pScreen); XF86RandRInfoPtr pRandr = XF86RANDRINFO(pScreen); @@ -169,6 +167,7 @@ GXRandRSetMode(ScreenPtr pScreen, int oldHeight = pScreen->height; int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; + #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 8 WindowPtr pRoot = WindowTable[pScreen->myNum]; #else @@ -176,45 +175,49 @@ GXRandRSetMode(ScreenPtr pScreen, #endif DisplayModePtr currentMode = NULL; Bool ret = TRUE; + #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0) PixmapPtr pspix = NULL; - #endif +#endif if (pRoot) - (*pScrni->EnableDisableFBAccess) (pScreen->myNum, FALSE); + (*pScrni-> + EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, FALSE)); if (useVirtual) { - pScrni->virtualX = pRandr->virtualX; - pScrni->virtualY = pRandr->virtualY; - } else { - pScrni->virtualX = mode->HDisplay; - pScrni->virtualY = mode->VDisplay; + pScrni->virtualX = pRandr->virtualX; + pScrni->virtualY = pRandr->virtualY; + } + else { + pScrni->virtualX = mode->HDisplay; + pScrni->virtualY = mode->VDisplay; } if (pRandr->rotation & (RR_Rotate_90 | RR_Rotate_270)) { - pScreen->width = pScrni->virtualY; - pScreen->height = pScrni->virtualX; - pScreen->mmWidth = mmHeight; - pScreen->mmHeight = mmWidth; - } else { - pScreen->width = pScrni->virtualX; - pScreen->height = pScrni->virtualY; - pScreen->mmWidth = mmWidth; - pScreen->mmHeight = mmHeight; + pScreen->width = pScrni->virtualY; + pScreen->height = pScrni->virtualX; + pScreen->mmWidth = mmHeight; + pScreen->mmHeight = mmWidth; + } + else { + pScreen->width = pScrni->virtualX; + pScreen->height = pScrni->virtualY; + pScreen->mmWidth = mmWidth; + pScreen->mmHeight = mmHeight; } if (pScrni->currentMode == mode) { - currentMode = pScrni->currentMode; - pScrni->currentMode = NULL; + currentMode = pScrni->currentMode; + pScrni->currentMode = NULL; } if (!xf86SwitchMode(pScreen, mode)) { - ret = FALSE; - pScrni->virtualX = pScreen->width = oldWidth; - pScrni->virtualY = pScreen->height = oldHeight; - pScreen->mmWidth = oldmmWidth; - pScreen->mmHeight = oldmmHeight; - pScrni->currentMode = currentMode; + ret = FALSE; + pScrni->virtualX = pScreen->width = oldWidth; + pScrni->virtualY = pScreen->height = oldHeight; + pScreen->mmWidth = oldmmWidth; + pScreen->mmHeight = oldmmHeight; + pScrni->currentMode = currentMode; } #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0) @@ -225,7 +228,7 @@ GXRandRSetMode(ScreenPtr pScreen, */ pspix = (*pScreen->GetScreenPixmap) (pScreen); if (pspix->devPrivate.ptr) - pScrni->pixmapPrivate = pspix->devPrivate; + pScrni->pixmapPrivate = pspix->devPrivate; #endif xf86ReconfigureLayout(); @@ -234,14 +237,15 @@ GXRandRSetMode(ScreenPtr pScreen, xf86SetViewport(pScreen, 0, 0); if (pRoot) - (*pScrni->EnableDisableFBAccess) (pScreen->myNum, TRUE); + (*pScrni-> + EnableDisableFBAccess) (XF86_ENABLEDISABLEFB_ARG(pScrni, TRUE)); return ret; } Bool GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, - int rate, RRScreenSizePtr pSize) + int rate, RRScreenSizePtr pSize) { ScrnInfoPtr pScrni = XF86SCRNINFO(pScreen); XF86RandRInfoPtr pRandr = XF86RANDRINFO(pScreen); @@ -255,8 +259,8 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, pRandr->rotation = rotation; if (pRandr->virtualX == -1 || pRandr->virtualY == -1) { - pRandr->virtualX = pScrni->virtualX; - pRandr->virtualY = pScrni->virtualY; + pRandr->virtualX = pScrni->virtualX; + pRandr->virtualY = pScrni->virtualY; } /* FIXME: we don't have a new video ABI yet */ @@ -267,40 +271,40 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, #endif for (mode = pScrni->modes;; mode = mode->next) { - if (pRandr->maxX == 0 || pRandr->maxY == 0) { - if (maxX < mode->HDisplay) - maxX = mode->HDisplay; - if (maxY < mode->VDisplay) - maxY = mode->VDisplay; - } - if (mode->HDisplay == pSize->width && - mode->VDisplay == pSize->height && - (rate == 0 || GXRandRModeRefresh(mode) == rate)) - break; - if (mode->next == pScrni->modes) { - if (pSize->width == pRandr->virtualX && - pSize->height == pRandr->virtualY) { - mode = pScrni->modes; - useVirtual = TRUE; - break; - } - if (pRandr->maxX == 0 || pRandr->maxY == 0) { - pRandr->maxX = maxX; - pRandr->maxY = maxY; - } - return FALSE; - } + if (pRandr->maxX == 0 || pRandr->maxY == 0) { + if (maxX < mode->HDisplay) + maxX = mode->HDisplay; + if (maxY < mode->VDisplay) + maxY = mode->VDisplay; + } + if (mode->HDisplay == pSize->width && + mode->VDisplay == pSize->height && + (rate == 0 || GXRandRModeRefresh(mode) == rate)) + break; + if (mode->next == pScrni->modes) { + if (pSize->width == pRandr->virtualX && + pSize->height == pRandr->virtualY) { + mode = pScrni->modes; + useVirtual = TRUE; + break; + } + if (pRandr->maxX == 0 || pRandr->maxY == 0) { + pRandr->maxX = maxX; + pRandr->maxY = maxY; + } + return FALSE; + } } if (pRandr->maxX == 0 || pRandr->maxY == 0) { - pRandr->maxX = maxX; - pRandr->maxY = maxY; + pRandr->maxX = maxX; + pRandr->maxY = maxY; } if (!GXRandRSetMode(pScreen, mode, useVirtual, pSize->mmWidth, - pSize->mmHeight)) { - pRandr->rotation = oldRotation; - return FALSE; + pSize->mmHeight)) { + pRandr->rotation = oldRotation; + return FALSE; } /* FIXME: we don't have a new video ABI yet */ @@ -310,19 +314,17 @@ GXRandRSetConfig(ScreenPtr pScreen, Rotation rotation, if (pScreen == miPointerCurrentScreen()) #endif { - px = (px >= pScreen->width ? (pScreen->width - 1) : px); - py = (py >= pScreen->height ? (pScreen->height - 1) : py); + px = (px >= pScreen->width ? (pScreen->width - 1) : px); + py = (py >= pScreen->height ? (pScreen->height - 1) : py); - xf86SetViewport(pScreen, px, py); + xf86SetViewport(pScreen, px, py); /* FIXME: we don't have a new video ABI yet */ - (*pScreen->SetCursorPosition) ( + (*pScreen->SetCursorPosition) ( #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3 - inputInfo.pointer, + inputInfo.pointer, #endif - pScreen, - px, py, - FALSE); + pScreen, px, py, FALSE); } return TRUE; @@ -343,23 +345,23 @@ GXRandRInit(ScreenPtr pScreen, int rotation) rrScrPrivPtr rp; if (GXRandRGeneration != serverGeneration) { - GXRandRGeneration = serverGeneration; + GXRandRGeneration = serverGeneration; } #if OLD_VIDEODRV_INTERFACE GXRandRIndex = AllocateScreenPrivateIndex(); #endif #if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&GXRandRIndex, PRIVATE_SCREEN, 0)) - return FALSE; + return FALSE; #endif pRandr = calloc(1, sizeof(XF86RandRInfoRec)); if (pRandr == NULL) - return FALSE; + return FALSE; if (!RRScreenInit(pScreen)) { - free(pRandr); - return FALSE; + free(pRandr); + return FALSE; } rp = rrGetScrPriv(pScreen); diff --git a/driver/xf86-video-geode/src/gx_regacc.c b/driver/xf86-video-geode/src/gx_regacc.c index 315672637..c7ba64aa3 100644 --- a/driver/xf86-video-geode/src/gx_regacc.c +++ b/driver/xf86-video-geode/src/gx_regacc.c @@ -66,11 +66,12 @@ unsigned long gfx_read_vid32(unsigned long offset); unsigned long gfx_read_vip32(unsigned long offset); void gfx_write_vip32(unsigned long offset, unsigned long value); void gfx_mono_bitmap_to_screen_blt_swp(unsigned short srcx, - unsigned short srcy, - unsigned short dstx, - unsigned short dsty, - unsigned short width, - unsigned short height, unsigned char *data, short pitch); + unsigned short srcy, + unsigned short dstx, + unsigned short dsty, + unsigned short width, + unsigned short height, + unsigned char *data, short pitch); unsigned int GetVideoMemSize(void); /* ROUTINES added accessing hardware reg */ @@ -91,6 +92,7 @@ gfx_write_reg32(unsigned long offset, unsigned long value) { WRITE_REG32(offset, value); } + unsigned short gfx_read_reg16(unsigned long offset) { @@ -99,6 +101,7 @@ gfx_read_reg16(unsigned long offset) value = READ_REG16(offset); return value; } + unsigned long gfx_read_reg32(unsigned long offset) { @@ -113,6 +116,7 @@ gfx_write_vid32(unsigned long offset, unsigned long value) { WRITE_VID32(offset, value); } + unsigned long gfx_read_vid32(unsigned long offset) { @@ -155,31 +159,31 @@ gfx_write_vip32(unsigned long offset, unsigned long value) void gfx_mono_bitmap_to_screen_blt_swp(unsigned short srcx, unsigned short srcy, - unsigned short dstx, unsigned short dsty, - unsigned short width, unsigned short height, - unsigned char *data, short pitch) + unsigned short dstx, unsigned short dsty, + unsigned short width, unsigned short height, + unsigned char *data, short pitch) { unsigned long dstoffset, size, bytes; unsigned long offset, temp_offset, temp1 = 0, temp2 = 0; unsigned long i, j = 0, fifo_lines, dwords_extra, bytes_extra; unsigned long shift = 0; - size = (((unsigned long)width) << 16) | height; + size = (((unsigned long) width) << 16) | height; /* CALCULATE STARTING OFFSETS */ - offset = (unsigned long)srcy *pitch + ((unsigned long)srcx >> 3); + offset = (unsigned long) srcy *pitch + ((unsigned long) srcx >> 3); - dstoffset = (unsigned long)dsty *gu2_pitch + - (((unsigned long)dstx) << gu2_xshift); + dstoffset = (unsigned long) dsty *gu2_pitch + + (((unsigned long) dstx) << gu2_xshift); /* CHECK IF PATTERN ORIGINS NEED TO BE SET */ if (GFXpatternFlags) { - /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ + /* COMBINE X AND Y PATTERN ORIGINS WITH OFFSET */ - dstoffset |= ((unsigned long)(dstx & 7)) << 26; - dstoffset |= ((unsigned long)(dsty & 7)) << 29; + dstoffset |= ((unsigned long) (dstx & 7)) << 26; + dstoffset |= ((unsigned long) (dsty & 7)) << 29; } bytes = ((srcx & 7) + width + 7) >> 3; @@ -195,12 +199,11 @@ gfx_mono_bitmap_to_screen_blt_swp(unsigned short srcx, unsigned short srcy, GU2_WAIT_PENDING; WRITE_GP32(MGP_RASTER_MODE, gu2_rop32); - WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long)srcx & 7) << 26); + WRITE_GP32(MGP_SRC_OFFSET, ((unsigned long) srcx & 7) << 26); WRITE_GP32(MGP_DST_OFFSET, dstoffset); WRITE_GP32(MGP_WID_HEIGHT, size); WRITE_GP32(MGP_STRIDE, gu2_pitch); - WRITE_GP16(MGP_BLT_MODE, - gu2_blt_mode | MGP_BM_SRC_HOST | MGP_BM_SRC_MONO); + WRITE_GP16(MGP_BLT_MODE, gu2_blt_mode | MGP_BM_SRC_HOST | MGP_BM_SRC_MONO); /* WAIT FOR BLT TO BE LATCHED */ @@ -209,34 +212,34 @@ gfx_mono_bitmap_to_screen_blt_swp(unsigned short srcx, unsigned short srcy, /* WRITE ALL OF THE DATA TO THE HOST SOURCE REGISTER */ while (height--) { - temp_offset = offset; + temp_offset = offset; - /* WRITE ALL FULL FIFO LINES */ + /* WRITE ALL FULL FIFO LINES */ - for (i = 0; i < fifo_lines; i++) { - GU2_WAIT_HALF_EMPTY; - WRITE_GPREG_STRING32_SWP(MGP_HST_SOURCE, 8, j, data, temp_offset, - temp1); - temp_offset += 32; - } + for (i = 0; i < fifo_lines; i++) { + GU2_WAIT_HALF_EMPTY; + WRITE_GPREG_STRING32_SWP(MGP_HST_SOURCE, 8, j, data, temp_offset, + temp1); + temp_offset += 32; + } - /* WRITE ALL FULL DWORDS */ + /* WRITE ALL FULL DWORDS */ - GU2_WAIT_HALF_EMPTY; - if (dwords_extra) { - WRITE_GPREG_STRING32_SWP(MGP_HST_SOURCE, dwords_extra, i, data, - temp_offset, temp1); - temp_offset += (dwords_extra << 2); - } + GU2_WAIT_HALF_EMPTY; + if (dwords_extra) { + WRITE_GPREG_STRING32_SWP(MGP_HST_SOURCE, dwords_extra, i, data, + temp_offset, temp1); + temp_offset += (dwords_extra << 2); + } - /* WRITE REMAINING BYTES */ + /* WRITE REMAINING BYTES */ - shift = 0; - if (bytes_extra) - WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, - temp_offset, temp1, temp2); + shift = 0; + if (bytes_extra) + WRITE_GPREG_STRING8(MGP_HST_SOURCE, bytes_extra, shift, i, data, + temp_offset, temp1, temp2); - offset += pitch; + offset += pitch; } } @@ -260,37 +263,37 @@ GetVideoMemSize(void) /* Calculate total memory size for GXm. */ for (i = 0; i < 2; i++) { - if (((mcBankCfg >> dimmShift) & 0x7) != 0x7) { - switch ((mcBankCfg >> (dimmShift + 4)) & 0x7) { - case 0: - totalMem += 0x400000; - break; - case 1: - totalMem += 0x800000; - break; - case 2: - totalMem += 0x1000000; - break; - case 3: - totalMem += 0x2000000; - break; - case 4: - totalMem += 0x4000000; - break; - case 5: - totalMem += 0x8000000; - break; - case 6: - totalMem += 0x10000000; - break; - case 7: - totalMem += 0x20000000; - break; - default: - break; - } - } - dimmShift += 16; + if (((mcBankCfg >> dimmShift) & 0x7) != 0x7) { + switch ((mcBankCfg >> (dimmShift + 4)) & 0x7) { + case 0: + totalMem += 0x400000; + break; + case 1: + totalMem += 0x800000; + break; + case 2: + totalMem += 0x1000000; + break; + case 3: + totalMem += 0x2000000; + break; + case 4: + totalMem += 0x4000000; + break; + case 5: + totalMem += 0x8000000; + break; + case 6: + totalMem += 0x10000000; + break; + case 7: + totalMem += 0x20000000; + break; + default: + break; + } + } + dimmShift += 16; } /* Calculate graphics memory base address */ diff --git a/driver/xf86-video-geode/src/gx_rotate.c b/driver/xf86-video-geode/src/gx_rotate.c index e473a3475..6076a402b 100644 --- a/driver/xf86-video-geode/src/gx_rotate.c +++ b/driver/xf86-video-geode/src/gx_rotate.c @@ -33,56 +33,56 @@ static void * GXWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, - CARD32 * size, void *closure) + CARD32 *size, void *closure) { - ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); *size = pGeode->displayPitch; return (pGeode->FBBase + pGeode->displayOffset) + - row * pGeode->displayPitch + offset; + row * pGeode->displayPitch + offset; } static void GXUpdate(ScreenPtr pScreen, shadowBufPtr pBuf) { - ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); int rotate = pGeode->rotation; switch (rotate) { case RR_Rotate_90: - if (pScrni->bitsPerPixel == 8) - shadowUpdateRotate8_90(pScreen, pBuf); - else if (pScrni->bitsPerPixel == 16) - shadowUpdateRotate16_90(pScreen, pBuf); - else - shadowUpdateRotate32_90(pScreen, pBuf); + if (pScrni->bitsPerPixel == 8) + shadowUpdateRotate8_90(pScreen, pBuf); + else if (pScrni->bitsPerPixel == 16) + shadowUpdateRotate16_90(pScreen, pBuf); + else + shadowUpdateRotate32_90(pScreen, pBuf); - break; + break; case RR_Rotate_180: - if (pScrni->bitsPerPixel == 8) - shadowUpdateRotate8_180(pScreen, pBuf); - else if (pScrni->bitsPerPixel == 16) - shadowUpdateRotate16_180(pScreen, pBuf); - else - shadowUpdateRotate32_180(pScreen, pBuf); + if (pScrni->bitsPerPixel == 8) + shadowUpdateRotate8_180(pScreen, pBuf); + else if (pScrni->bitsPerPixel == 16) + shadowUpdateRotate16_180(pScreen, pBuf); + else + shadowUpdateRotate32_180(pScreen, pBuf); - break; + break; case RR_Rotate_270: - if (pScrni->bitsPerPixel == 8) - shadowUpdateRotate8_270(pScreen, pBuf); - else if (pScrni->bitsPerPixel == 16) - shadowUpdateRotate16_270(pScreen, pBuf); - else - shadowUpdateRotate32_270(pScreen, pBuf); - - break; + if (pScrni->bitsPerPixel == 8) + shadowUpdateRotate8_270(pScreen, pBuf); + else if (pScrni->bitsPerPixel == 16) + shadowUpdateRotate16_270(pScreen, pBuf); + else + shadowUpdateRotate32_270(pScreen, pBuf); + + break; } } @@ -101,88 +101,94 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) /* Leave if we have nothing to do */ if (pGeode->rotation == curr && pGeode->curMode == mode) { - return TRUE; + return TRUE; } shadowRemove(pScrni->pScreen, NULL); switch (pGeode->rotation) { case RR_Rotate_0: - ErrorF("Rotate to 0 degrees\n"); - pScrni->displayWidth = pGeode->displayWidth; - pGeode->Pitch = pGeode->displayPitch; - break; + ErrorF("Rotate to 0 degrees\n"); + pScrni->displayWidth = pGeode->displayWidth; + pGeode->Pitch = pGeode->displayPitch; + break; case RR_Rotate_90: - ErrorF("Rotate to 90 degrees\n"); - pScrni->displayWidth = pScrni->pScreen->width; - break; + ErrorF("Rotate to 90 degrees\n"); + pScrni->displayWidth = pScrni->pScreen->width; + break; case RR_Rotate_180: - ErrorF("Rotate to 180 degrees\n"); - pScrni->displayWidth = pGeode->displayWidth; - break; + ErrorF("Rotate to 180 degrees\n"); + pScrni->displayWidth = pGeode->displayWidth; + break; case RR_Rotate_270: - ErrorF("Rotate to 270 degrees\n"); - pScrni->displayWidth = pScrni->pScreen->width; - break; + ErrorF("Rotate to 270 degrees\n"); + pScrni->displayWidth = pScrni->pScreen->width; + break; } if (pGeode->rotation != RR_Rotate_0) { - ret = - shadowAdd(pScrni->pScreen, pPixmap, GXUpdate, GXWindowLinear, - pGeode->rotation, NULL); + ret = + shadowAdd(pScrni->pScreen, pPixmap, GXUpdate, GXWindowLinear, + pGeode->rotation, NULL); - if (!ret) { - ErrorF("shadowAdd failed\n"); - goto error; - } + if (!ret) { + ErrorF("shadowAdd failed\n"); + goto error; + } } if (pGeode->rotation == RR_Rotate_0) - pScrni->fbOffset = pGeode->displayOffset; + pScrni->fbOffset = pGeode->displayOffset; else - pScrni->fbOffset = pGeode->shadowOffset; + pScrni->fbOffset = pGeode->shadowOffset; pScrni->pScreen->ModifyPixmapHeader(pPixmap, - pScrni->pScreen->width, - pScrni->pScreen->height, - pScrni->pScreen->rootDepth, - pScrni->bitsPerPixel, - PixmapBytePad(pScrni->displayWidth, pScrni->pScreen->rootDepth), - (pointer) (pGeode->FBBase + pScrni->fbOffset)); + pScrni->pScreen->width, + pScrni->pScreen->height, + pScrni->pScreen->rootDepth, + pScrni->bitsPerPixel, + PixmapBytePad(pScrni->displayWidth, + pScrni-> + pScreen->rootDepth), + (pointer) (pGeode->FBBase + + pScrni->fbOffset)); /* Don't use XAA pixmap cache or offscreen pixmaps when rotated */ - +#if XF86XAA if (pGeode->AccelInfoRec) { - if (pGeode->rotation == RR_Rotate_0) { - pGeode->AccelInfoRec->Flags = - LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS | PIXMAP_CACHE; - pGeode->AccelInfoRec->UsingPixmapCache = TRUE; - pGeode->AccelInfoRec->maxOffPixWidth = 0; - pGeode->AccelInfoRec->maxOffPixHeight = 0; - } else { - pGeode->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER; - pGeode->AccelInfoRec->UsingPixmapCache = FALSE; - pGeode->AccelInfoRec->maxOffPixWidth = 1; - pGeode->AccelInfoRec->maxOffPixHeight = 1; - } + if (pGeode->rotation == RR_Rotate_0) { + pGeode->AccelInfoRec->Flags = + LINEAR_FRAMEBUFFER | OFFSCREEN_PIXMAPS | PIXMAP_CACHE; + pGeode->AccelInfoRec->UsingPixmapCache = TRUE; + pGeode->AccelInfoRec->maxOffPixWidth = 0; + pGeode->AccelInfoRec->maxOffPixHeight = 0; + } + else { + pGeode->AccelInfoRec->Flags = LINEAR_FRAMEBUFFER; + pGeode->AccelInfoRec->UsingPixmapCache = FALSE; + pGeode->AccelInfoRec->maxOffPixWidth = 1; + pGeode->AccelInfoRec->maxOffPixHeight = 1; + } } +#endif return TRUE; - error: + error: /* Restore the old rotation */ pScrni->displayWidth = curdw; if (curr & (RR_Rotate_0 | RR_Rotate_180)) { - pScrni->pScreen->width = pScrni->virtualX; - pScrni->pScreen->height = pScrni->virtualY; - } else { - pScrni->pScreen->width = pScrni->virtualY; - pScrni->pScreen->height = pScrni->virtualX; + pScrni->pScreen->width = pScrni->virtualX; + pScrni->pScreen->height = pScrni->virtualY; + } + else { + pScrni->pScreen->width = pScrni->virtualY; + pScrni->pScreen->height = pScrni->virtualX; } pGeode->rotation = curr; diff --git a/driver/xf86-video-geode/src/gx_vga.c b/driver/xf86-video-geode/src/gx_vga.c index e5d642726..48d08d573 100644 --- a/driver/xf86-video-geode/src/gx_vga.c +++ b/driver/xf86-video-geode/src/gx_vga.c @@ -57,7 +57,7 @@ static unsigned int palette[256]; static unsigned int ATTRregs[32]; static unsigned char *font_data = NULL; -#define VGA_BLOCK 0x40000 /* 256 k */ +#define VGA_BLOCK 0x40000 /* 256 k */ void gu2_vga_extcrtc(char offset, int reset); int gu2_get_vga_active(void); @@ -78,7 +78,7 @@ gu2_get_vga_active(void) int data = gfx_read_reg32(MDC_GENERAL_CFG); if (data & MDC_GCFG_VGAE) - return 1; + return 1; return 0; } @@ -87,17 +87,18 @@ void gu2_vga_font_data(int flag) { if (flag == 0) { - if (font_data == NULL) { - font_data = malloc(VGA_BLOCK); - } - - DEBUGMSG(1, (0, X_NONE, "Saving VGA Data\n")); - memcpy(font_data, gfx_virt_fbptr, VGA_BLOCK); - } else if (font_data) { - DEBUGMSG(1, (0, X_NONE, "Restore VGA Data\n")); - memcpy(gfx_virt_fbptr, font_data, VGA_BLOCK); - free(font_data); - font_data = NULL; + if (font_data == NULL) { + font_data = malloc(VGA_BLOCK); + } + + DEBUGMSG(1, (0, X_NONE, "Saving VGA Data\n")); + memcpy(font_data, gfx_virt_fbptr, VGA_BLOCK); + } + else if (font_data) { + DEBUGMSG(1, (0, X_NONE, "Restore VGA Data\n")); + memcpy(gfx_virt_fbptr, font_data, VGA_BLOCK); + free(font_data); + font_data = NULL; } } @@ -107,9 +108,9 @@ gu2_set_vga(int reset) int data = gfx_read_reg32(MDC_GENERAL_CFG); if (reset) - data |= MDC_GCFG_VGAE; + data |= MDC_GCFG_VGAE; else - data &= ~MDC_GCFG_VGAE; + data &= ~MDC_GCFG_VGAE; gfx_write_reg32(MDC_GENERAL_CFG, data); } @@ -135,9 +136,9 @@ gu2_vga_attr_ctrl(int reset) int tmp; tmp = gfx_inb(0x3DA); - gfx_outb(0x3C0, (unsigned char)(reset ? 0x00 : 0x20)); + gfx_outb(0x3C0, (unsigned char) (reset ? 0x00 : 0x20)); if (reset) - tmp = gfx_inb(0x3DA); + tmp = gfx_inb(0x3DA); return (GFX_STATUS_OK); } @@ -194,7 +195,7 @@ int gu2_vga_seq_reset(int reset) { gfx_outb(0x3C4, 0); - gfx_outb(0x3C5, (unsigned char)(reset ? 0x00 : 0x03)); + gfx_outb(0x3C5, (unsigned char) (reset ? 0x00 : 0x03)); return (GFX_STATUS_OK); } @@ -218,65 +219,65 @@ gu2_vga_save(gfx_vga_struct * vga, int flags) /* CHECK MISCELLANEOUS OUTPUT FLAG */ if (flags & GU2_VGA_FLAG_MISC_OUTPUT) { - /* SAVE MISCCELLANEOUS OUTPUT REGISTER */ - vga->miscOutput = gfx_inb(0x3CC); + /* SAVE MISCCELLANEOUS OUTPUT REGISTER */ + vga->miscOutput = gfx_inb(0x3CC); } /* CHECK SEQ */ if (flags & GU2_VGA_FLAG_SEQ) { - /* SAVE STANDARD CRTC REGISTERS */ - for (i = 1; i < GU2_SEQ_REGS; i++) { - gfx_outb(0x3C4, (unsigned char)i); - SEQregs[i] = gfx_inb(0x3C5); - } + /* SAVE STANDARD CRTC REGISTERS */ + for (i = 1; i < GU2_SEQ_REGS; i++) { + gfx_outb(0x3C4, (unsigned char) i); + SEQregs[i] = gfx_inb(0x3C5); + } } /* CHECK STANDARD CRTC FLAG */ if (flags & GU2_VGA_FLAG_STD_CRTC) { - /* SAVE STANDARD CRTC REGISTERS */ - for (i = 0; i < GU2_STD_CRTC_REGS; i++) { - gfx_outb(crtcindex, (unsigned char)i); - vga->stdCRTCregs[i] = gfx_inb(crtcdata); - } + /* SAVE STANDARD CRTC REGISTERS */ + for (i = 0; i < GU2_STD_CRTC_REGS; i++) { + gfx_outb(crtcindex, (unsigned char) i); + vga->stdCRTCregs[i] = gfx_inb(crtcdata); + } } /* CHECK GDC */ if (flags & GU2_VGA_FLAG_GDC) { - /* SAVE STANDARD CRTC REGISTERS */ - for (i = 0; i < GU2_GDC_REGS; i++) { - gfx_outb(0x3CE, (unsigned char)i); - GDCregs[i] = gfx_inb(0x3CF); - } + /* SAVE STANDARD CRTC REGISTERS */ + for (i = 0; i < GU2_GDC_REGS; i++) { + gfx_outb(0x3CE, (unsigned char) i); + GDCregs[i] = gfx_inb(0x3CF); + } } /* CHECK EXTENDED CRTC FLAG */ if (flags & GU2_VGA_FLAG_EXT_CRTC) { - /* SAVE EXTENDED CRTC REGISTERS */ - for (i = 0; i < GU2_EXT_CRTC_REGS; i++) { - gfx_outb(crtcindex, (unsigned char)(0x40 + i)); - vga->extCRTCregs[i] = gfx_inb(crtcdata); - } + /* SAVE EXTENDED CRTC REGISTERS */ + for (i = 0; i < GU2_EXT_CRTC_REGS; i++) { + gfx_outb(crtcindex, (unsigned char) (0x40 + i)); + vga->extCRTCregs[i] = gfx_inb(crtcdata); + } } if (flags & GU2_VGA_FLAG_PALETTE) { - /* SAVE PALETTE DATA */ - for (i = 0; i < 0x100; i++) { - gfx_outb(0x3C7, i); - palette[i] = gfx_inb(0x3C9); - } + /* SAVE PALETTE DATA */ + for (i = 0; i < 0x100; i++) { + gfx_outb(0x3C7, i); + palette[i] = gfx_inb(0x3C9); + } } if (flags & GU2_VGA_FLAG_ATTR) { - /* SAVE Attribute DATA */ - for (i = 0; i < 21; i++) { - gfx_inb(0x3DA); - gfx_outb(0x3C0, i); - ATTRregs[i] = gfx_inb(0x3C1); - } + /* SAVE Attribute DATA */ + for (i = 0; i < 21; i++) { + gfx_inb(0x3DA); + gfx_outb(0x3C0, i); + ATTRregs[i] = gfx_inb(0x3C1); + } } /* save the VGA data */ @@ -304,8 +305,8 @@ gu2_vga_clear_extended(void) gfx_outb(crtcdata, 0x57); gfx_outb(crtcdata, 0x4C); for (i = 0x41; i <= 0x4F; i++) { - gfx_outb(crtcindex, (unsigned char)i); - gfx_outb(crtcdata, 0); + gfx_outb(crtcindex, (unsigned char) i); + gfx_outb(crtcdata, 0); } gfx_outb(crtcindex, 0x30); @@ -352,100 +353,100 @@ gu2_vga_restore(gfx_vga_struct * vga, int flags) /* CHECK MISCELLANEOUS OUTPUT FLAG */ if (flags & GU2_VGA_FLAG_MISC_OUTPUT) { - /* RESTORE MISCELLANEOUS OUTPUT REGISTER VALUE */ - gfx_outb(0x3C2, vga->miscOutput); + /* RESTORE MISCELLANEOUS OUTPUT REGISTER VALUE */ + gfx_outb(0x3C2, vga->miscOutput); } /* CHECK SEQ */ if (flags & GU2_VGA_FLAG_SEQ) { - /* RESTORE STANDARD CRTC REGISTERS */ - for (i = 1; i < GU2_SEQ_REGS; i++) { - gfx_outb(0x3C4, (unsigned char)i); - gfx_outb(0x3C5, SEQregs[i]); - } + /* RESTORE STANDARD CRTC REGISTERS */ + for (i = 1; i < GU2_SEQ_REGS; i++) { + gfx_outb(0x3C4, (unsigned char) i); + gfx_outb(0x3C5, SEQregs[i]); + } } /* CHECK STANDARD CRTC FLAG */ if (flags & GU2_VGA_FLAG_STD_CRTC) { - /* UNLOCK STANDARD CRTC REGISTERS */ - gfx_outb(crtcindex, 0x11); - gfx_outb(crtcdata, 0); + /* UNLOCK STANDARD CRTC REGISTERS */ + gfx_outb(crtcindex, 0x11); + gfx_outb(crtcdata, 0); - /* RESTORE STANDARD CRTC REGISTERS */ + /* RESTORE STANDARD CRTC REGISTERS */ - for (i = 0; i < GU2_STD_CRTC_REGS; i++) { - gfx_outb(crtcindex, (unsigned char)i); - gfx_outb(crtcdata, vga->stdCRTCregs[i]); - } + for (i = 0; i < GU2_STD_CRTC_REGS; i++) { + gfx_outb(crtcindex, (unsigned char) i); + gfx_outb(crtcdata, vga->stdCRTCregs[i]); + } } /* CHECK GDC */ if (flags & GU2_VGA_FLAG_GDC) { - /* SAVE STANDARD CRTC REGISTERS */ - for (i = 0; i < GU2_GDC_REGS; i++) { - gfx_outb(0x3CE, (unsigned char)i); - gfx_outb(0x3CF, GDCregs[i]); - } + /* SAVE STANDARD CRTC REGISTERS */ + for (i = 0; i < GU2_GDC_REGS; i++) { + gfx_outb(0x3CE, (unsigned char) i); + gfx_outb(0x3CF, GDCregs[i]); + } } /* CHECK EXTENDED CRTC FLAG */ if (flags & GU2_VGA_FLAG_EXT_CRTC) { - /* UNLOCK EXTENDED CRTC REGISTERS */ - gfx_outb(crtcindex, 0x30); - gfx_outb(crtcdata, 0x57); - gfx_outb(crtcdata, 0x4C); + /* UNLOCK EXTENDED CRTC REGISTERS */ + gfx_outb(crtcindex, 0x30); + gfx_outb(crtcdata, 0x57); + gfx_outb(crtcdata, 0x4C); - /* RESTORE EXTENDED CRTC REGISTERS */ + /* RESTORE EXTENDED CRTC REGISTERS */ - for (i = 1; i < GU2_EXT_CRTC_REGS; i++) { - gfx_outb(crtcindex, (unsigned char)(0x40 + i)); - gfx_outb(crtcdata, vga->extCRTCregs[i]); - } + for (i = 1; i < GU2_EXT_CRTC_REGS; i++) { + gfx_outb(crtcindex, (unsigned char) (0x40 + i)); + gfx_outb(crtcdata, vga->extCRTCregs[i]); + } - /* LOCK EXTENDED CRTC REGISTERS */ + /* LOCK EXTENDED CRTC REGISTERS */ - gfx_outb(crtcindex, 0x30); - gfx_outb(crtcdata, 0x00); + gfx_outb(crtcindex, 0x30); + gfx_outb(crtcdata, 0x00); - /* CHECK IF DIRECT FRAME BUFFER MODE (VESA MODE) */ + /* CHECK IF DIRECT FRAME BUFFER MODE (VESA MODE) */ - if (vga->extCRTCregs[0x03] & 1) { - /* SET BORDER COLOR TO BLACK */ - /* This really should be another thing saved/restored, but */ - /* Durango currently doesn't do the attr controller registers. */ + if (vga->extCRTCregs[0x03] & 1) { + /* SET BORDER COLOR TO BLACK */ + /* This really should be another thing saved/restored, but */ + /* Durango currently doesn't do the attr controller registers. */ - gfx_inb(0x3BA); /* Reset flip-flop */ - gfx_inb(0x3DA); - gfx_outb(0x3C0, 0x11); - gfx_outb(0x3C0, 0x00); - } + gfx_inb(0x3BA); /* Reset flip-flop */ + gfx_inb(0x3DA); + gfx_outb(0x3C0, 0x11); + gfx_outb(0x3C0, 0x00); + } } if (flags & GU2_VGA_FLAG_PALETTE) { - /* RESTORE PALETTE DATA */ - for (i = 0; i < 0x100; i++) { - gfx_outb(0x3C8, i); - gfx_outb(0x3C9, palette[i]); - } + /* RESTORE PALETTE DATA */ + for (i = 0; i < 0x100; i++) { + gfx_outb(0x3C8, i); + gfx_outb(0x3C9, palette[i]); + } } if (flags & GU2_VGA_FLAG_ATTR) { - /* RESTORE Attribute DATA */ - for (i = 0; i < 21; i++) { - gfx_inb(0x3DA); - gfx_outb(0x3C0, i); - gfx_outb(0x3C0, ATTRregs[i]); - } - /* SAVE Attribute DATA */ - - for (i = 0; i < 21; i++) { - gfx_inb(0x3DA); - gfx_outb(0x3C0, i); - } + /* RESTORE Attribute DATA */ + for (i = 0; i < 21; i++) { + gfx_inb(0x3DA); + gfx_outb(0x3C0, i); + gfx_outb(0x3C0, ATTRregs[i]); + } + /* SAVE Attribute DATA */ + + for (i = 0; i < 21; i++) { + gfx_inb(0x3DA); + gfx_outb(0x3C0, i); + } } /* restore the VGA data */ diff --git a/driver/xf86-video-geode/src/gx_video.c b/driver/xf86-video-geode/src/gx_video.c index f475bb60e..0d3e1c5a4 100644 --- a/driver/xf86-video-geode/src/gx_video.c +++ b/driver/xf86-video-geode/src/gx_video.c @@ -54,13 +54,15 @@ #include "geode.h" #include "xf86xv.h" #include <X11/extensions/Xv.h> +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" +#endif #include "dixstruct.h" #include "fourcc.h" #include "geode_fourcc.h" -#define OFF_DELAY 200 /* milliseconds */ +#define OFF_DELAY 200 /* milliseconds */ #define FREE_DELAY 60000 #define OFF_TIMER 0x01 @@ -97,15 +99,16 @@ static void GXStopVideo(ScrnInfoPtr, pointer, Bool); static int GXSetPortAttribute(ScrnInfoPtr, Atom, INT32, pointer); static int GXGetPortAttribute(ScrnInfoPtr, Atom, INT32 *, pointer); static void GXQueryBestSize(ScrnInfoPtr, Bool, - short, short, short, short, unsigned int *, unsigned int *, pointer); + short, short, short, short, unsigned int *, + unsigned int *, pointer); static int GXPutImage(ScrnInfoPtr, short, short, short, short, short, short, - short, short, int, unsigned char *, short, short, Bool, - RegionPtr, pointer, DrawablePtr pDraw); + short, short, int, unsigned char *, short, short, Bool, + RegionPtr, pointer, DrawablePtr pDraw); -static void GXBlockHandler(int, pointer, pointer, pointer); +static void GXBlockHandler(BLOCKHANDLER_ARGS_DECL); void GXSetVideoPosition(int x, int y, int width, int height, - short src_w, short src_h, short drw_w, - short drw_h, int id, int offset, ScrnInfoPtr pScrni); + short src_w, short src_h, short drw_w, + short drw_h, int id, int offset, ScrnInfoPtr pScrni); extern void GXAccelSync(ScrnInfoPtr pScrni); @@ -118,9 +121,9 @@ static int lutflag = 0; static Atom xvColorKey, xvColorKeyMode, xvFilter #if DBUF - , xvDoubleBuffer +, xvDoubleBuffer #endif - ; +; #define PALETTE_ADDRESS 0x038 #define PALETTE_DATA 0x040 @@ -136,7 +139,7 @@ get_gamma_ram(unsigned long *lut) gfx_write_vid32(PALETTE_ADDRESS, 0); for (i = 0; i < 256; i++) - lut[i] = gfx_read_vid32(PALETTE_DATA); + lut[i] = gfx_read_vid32(PALETTE_DATA); } /*---------------------------------------------------------------------------- @@ -161,55 +164,55 @@ void GXInitVideo(ScreenPtr pScrn) { GeodeRec *pGeode; - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); pGeode = GEODEPTR(pScrni); if (!pGeode->NoAccel) { - XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; - XF86VideoAdaptorPtr newAdaptor = NULL; - - int num_adaptors; - - newAdaptor = GXSetupImageVideo(pScrn); - GXInitOffscreenImages(pScrn); - - num_adaptors = xf86XVListGenericAdaptors(pScrni, &adaptors); - - if (newAdaptor) { - if (!num_adaptors) { - num_adaptors = 1; - adaptors = &newAdaptor; - } else { - newAdaptors = /* need to free this someplace */ - malloc((num_adaptors + - 1) * sizeof(XF86VideoAdaptorPtr *)); - if (newAdaptors) { - memcpy(newAdaptors, adaptors, num_adaptors * - sizeof(XF86VideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } - } - } - - if (num_adaptors) - xf86XVScreenInit(pScrn, adaptors, num_adaptors); - - if (newAdaptors) - free(newAdaptors); + XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; + XF86VideoAdaptorPtr newAdaptor = NULL; + + int num_adaptors; + + newAdaptor = GXSetupImageVideo(pScrn); + GXInitOffscreenImages(pScrn); + + num_adaptors = xf86XVListGenericAdaptors(pScrni, &adaptors); + + if (newAdaptor) { + if (!num_adaptors) { + num_adaptors = 1; + adaptors = &newAdaptor; + } + else { + newAdaptors = /* need to free this someplace */ + malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *)); + if (newAdaptors) { + memcpy(newAdaptors, adaptors, num_adaptors * + sizeof(XF86VideoAdaptorPtr)); + newAdaptors[num_adaptors] = newAdaptor; + adaptors = newAdaptors; + num_adaptors++; + } + } + } + + if (num_adaptors) + xf86XVScreenInit(pScrn, adaptors, num_adaptors); + + if (newAdaptors) + free(newAdaptors); } } /* client libraries expect an encoding */ static XF86VideoEncodingRec DummyEncoding[1] = { { - 0, - "XV_IMAGE", - 1024, 1024, - {1, 1} - } + 0, + "XV_IMAGE", + 1024, 1024, + {1, 1} + } }; #define NUM_FORMATS 4 @@ -246,8 +249,7 @@ static XF86ImageRec Images[NUM_IMAGES] = { XVIMAGE_RGB565 }; -typedef struct -{ +typedef struct { void *area; int offset; RegionRec clip; @@ -291,35 +293,35 @@ GXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv) switch (pScrni->depth) { case 8: - GFX(get_display_palette_entry(pPriv->colorKey & 0xFF, &key)); - red = ((key >> 16) & 0xFF); - green = ((key >> 8) & 0xFF); - blue = (key & 0xFF); - break; + GFX(get_display_palette_entry(pPriv->colorKey & 0xFF, &key)); + red = ((key >> 16) & 0xFF); + green = ((key >> 8) & 0xFF); + blue = (key & 0xFF); + break; case 16: - red = (pPriv->colorKey & pScrni->mask.red) >> - pScrni->offset.red << (8 - pScrni->weight.red); - green = (pPriv->colorKey & pScrni->mask.green) >> - pScrni->offset.green << (8 - pScrni->weight.green); - blue = (pPriv->colorKey & pScrni->mask.blue) >> - pScrni->offset.blue << (8 - pScrni->weight.blue); - break; + red = (pPriv->colorKey & pScrni->mask.red) >> + pScrni->offset.red << (8 - pScrni->weight.red); + green = (pPriv->colorKey & pScrni->mask.green) >> + pScrni->offset.green << (8 - pScrni->weight.green); + blue = (pPriv->colorKey & pScrni->mask.blue) >> + pScrni->offset.blue << (8 - pScrni->weight.blue); + break; default: - /* for > 16 bpp we send in the mask in xf86SetWeight. This - * function is providing the offset by 1 more. So we take - * this as a special case and subtract 1 for > 16 - */ - red = (pPriv->colorKey & pScrni->mask.red) >> - (pScrni->offset.red - 1) << (8 - pScrni->weight.red); - green = (pPriv->colorKey & pScrni->mask.green) >> - (pScrni->offset.green - 1) << (8 - pScrni->weight.green); - blue = (pPriv->colorKey & pScrni->mask.blue) >> - (pScrni->offset.blue - 1) << (8 - pScrni->weight.blue); - break; + /* for > 16 bpp we send in the mask in xf86SetWeight. This + * function is providing the offset by 1 more. So we take + * this as a special case and subtract 1 for > 16 + */ + red = (pPriv->colorKey & pScrni->mask.red) >> + (pScrni->offset.red - 1) << (8 - pScrni->weight.red); + green = (pPriv->colorKey & pScrni->mask.green) >> + (pScrni->offset.green - 1) << (8 - pScrni->weight.green); + blue = (pPriv->colorKey & pScrni->mask.blue) >> + (pScrni->offset.blue - 1) << (8 - pScrni->weight.blue); + break; } GFX(set_video_color_key((blue | (green << 8) | (red << 16)), 0xFFFFFF, - (pPriv->colorKeyMode == 0))); + (pPriv->colorKeyMode == 0))); REGION_EMPTY(pScrni->pScreen, &pPriv->clip); return 0; } @@ -344,11 +346,11 @@ GXResetVideo(ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (!pGeode->NoAccel) { - GeodePortPrivRec *pPriv = pGeode->adaptor->pPortPrivates[0].ptr; + GeodePortPrivRec *pPriv = pGeode->adaptor->pPortPrivates[0].ptr; - GXAccelSync(pScrni); - GXSetColorkey(pScrni, pPriv); - GFX(set_video_filter(pPriv->filter, pPriv->filter)); + GXAccelSync(pScrni); + GXSetColorkey(pScrni, pPriv); + GFX(set_video_filter(pPriv->filter, pPriv->filter)); } } @@ -369,14 +371,14 @@ GXResetVideo(ScrnInfoPtr pScrni) static XF86VideoAdaptorPtr GXSetupImageVideo(ScreenPtr pScrn) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); XF86VideoAdaptorPtr adapt; GeodePortPrivRec *pPriv; if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + - sizeof(GeodePortPrivRec) + sizeof(DevUnion)))) - return NULL; + sizeof(GeodePortPrivRec) + sizeof(DevUnion)))) + return NULL; adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; @@ -410,7 +412,7 @@ GXSetupImageVideo(ScreenPtr pScrn) pPriv->videoStatus = 0; #if DBUF pPriv->doubleBuffer = TRUE; - pPriv->currentBuffer = 0; /* init to first buffer */ + pPriv->currentBuffer = 0; /* init to first buffer */ #endif /* gotta uninit this someplace */ @@ -463,39 +465,40 @@ GXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) GXAccelSync(pScrni); if (exit) { - if (pPriv->videoStatus & CLIENT_VIDEO_ON) { - GFX(set_video_enable(0)); + if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + GFX(set_video_enable(0)); - /* If we have saved graphics LUT data - restore it */ - /* Otherwise, turn bypass on */ + /* If we have saved graphics LUT data - restore it */ + /* Otherwise, turn bypass on */ - if (lutflag) - GFX(set_graphics_palette(graphics_lut)); - else - GFX(set_video_palette_bypass(1)); + if (lutflag) + GFX(set_graphics_palette(graphics_lut)); + else + GFX(set_video_palette_bypass(1)); - lutflag = 0; - } + lutflag = 0; + } - if (pPriv->area) { + if (pPriv->area) { #ifdef XF86EXA - if (pGeode->useEXA) - exaOffscreenFree(pScrni->pScreen, pPriv->area); + if (pGeode->useEXA) + exaOffscreenFree(pScrni->pScreen, pPriv->area); #endif - if (!pGeode->useEXA) - xf86FreeOffscreenArea(pPriv->area); + if (!pGeode->useEXA) + xf86FreeOffscreenArea(pPriv->area); - pPriv->area = NULL; - } + pPriv->area = NULL; + } - pPriv->videoStatus = 0; - pGeode->OverlayON = FALSE; - } else { - if (pPriv->videoStatus & CLIENT_VIDEO_ON) { - pPriv->videoStatus |= OFF_TIMER; - pPriv->offTime = currentTime.milliseconds + OFF_DELAY; - } + pPriv->videoStatus = 0; + pGeode->OverlayON = FALSE; + } + else { + if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + pPriv->videoStatus |= OFF_TIMER; + pPriv->offTime = currentTime.milliseconds + OFF_DELAY; + } } } @@ -518,31 +521,33 @@ GXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) */ static int GXSetPortAttribute(ScrnInfoPtr pScrni, - Atom attribute, INT32 value, pointer data) + Atom attribute, INT32 value, pointer data) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; GXAccelSync(pScrni); if (attribute == xvColorKey) { - pPriv->colorKey = value; - GXSetColorkey(pScrni, pPriv); + pPriv->colorKey = value; + GXSetColorkey(pScrni, pPriv); } #if DBUF else if (attribute == xvDoubleBuffer) { - if ((value < 0) || (value > 1)) - return BadValue; - pPriv->doubleBuffer = value; + if ((value < 0) || (value > 1)) + return BadValue; + pPriv->doubleBuffer = value; } #endif else if (attribute == xvColorKeyMode) { - pPriv->colorKeyMode = value; - GXSetColorkey(pScrni, pPriv); - } else if (attribute == xvFilter) { - if ((value < 0) || (value > 1)) - return BadValue; - pPriv->filter = value; - } else - return BadMatch; + pPriv->colorKeyMode = value; + GXSetColorkey(pScrni, pPriv); + } + else if (attribute == xvFilter) { + if ((value < 0) || (value > 1)) + return BadValue; + pPriv->filter = value; + } + else + return BadMatch; return Success; } @@ -566,24 +571,26 @@ GXSetPortAttribute(ScrnInfoPtr pScrni, */ static int GXGetPortAttribute(ScrnInfoPtr pScrni, - Atom attribute, INT32 * value, pointer data) + Atom attribute, INT32 *value, pointer data) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; if (attribute == xvColorKey) { - *value = pPriv->colorKey; + *value = pPriv->colorKey; } #if DBUF else if (attribute == xvDoubleBuffer) { - *value = (pPriv->doubleBuffer) ? 1 : 0; + *value = (pPriv->doubleBuffer) ? 1 : 0; } #endif else if (attribute == xvColorKeyMode) { - *value = pPriv->colorKeyMode; - } else if (attribute == xvFilter) { - *value = pPriv->filter; - } else - return BadMatch; + *value = pPriv->colorKeyMode; + } + else if (attribute == xvFilter) { + *value = pPriv->filter; + } + else + return BadMatch; return Success; } @@ -610,16 +617,16 @@ GXGetPortAttribute(ScrnInfoPtr pScrni, */ static void GXQueryBestSize(ScrnInfoPtr pScrni, - Bool motion, - short vid_w, short vid_h, - short drw_w, short drw_h, - unsigned int *p_w, unsigned int *p_h, pointer data) + Bool motion, + short vid_w, short vid_h, + short drw_w, short drw_h, + unsigned int *p_w, unsigned int *p_h, pointer data) { *p_w = drw_w; *p_h = drw_h; if (*p_w > 16384) - *p_w = 16384; + *p_w = 16384; } /*---------------------------------------------------------------------------- @@ -641,12 +648,12 @@ GXQueryBestSize(ScrnInfoPtr pScrni, */ static void GXCopyData420(unsigned char *src, unsigned char *dst, - int srcPitch, int dstPitch, int h, int w) + int srcPitch, int dstPitch, int h, int w) { while (h--) { - memcpy(dst, src, w); - src += srcPitch; - dst += dstPitch; + memcpy(dst, src, w); + src += srcPitch; + dst += dstPitch; } } @@ -669,13 +676,13 @@ GXCopyData420(unsigned char *src, unsigned char *dst, */ static void GXCopyData422(unsigned char *src, unsigned char *dst, - int srcPitch, int dstPitch, int h, int w) + int srcPitch, int dstPitch, int h, int w) { w <<= 1; while (h--) { - memcpy(dst, src, w); - src += srcPitch; - dst += dstPitch; + memcpy(dst, src, w); + src += srcPitch; + dst += dstPitch; } } @@ -683,18 +690,18 @@ GXCopyData422(unsigned char *src, unsigned char *dst, static void GXVideoSave(ScreenPtr pScreen, ExaOffscreenArea * area) { - ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); if (area == pPriv->area) - pPriv->area = NULL; + pPriv->area = NULL; } #endif static int GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) { - ScreenPtr pScrn = screenInfo.screens[pScrni->scrnIndex]; + ScreenPtr pScrn = xf86ScrnToScreen(pScrni); GeodeRec *pGeode = GEODEPTR(pScrni); //long displayWidth = pGeode->Pitch / ((pScrni->bitsPerPixel + 7) / 8); @@ -702,59 +709,60 @@ GXAllocateMemory(ScrnInfoPtr pScrni, void **memp, int numlines) #if XF86EXA if (pGeode->useEXA) { - ExaOffscreenArea *area = *memp; + ExaOffscreenArea *area = *memp; - if (area != NULL) { - if (area->size >= size) - return area->offset; + if (area != NULL) { + if (area->size >= size) + return area->offset; - exaOffscreenFree(pScrni->pScreen, area); - } + exaOffscreenFree(pScrni->pScreen, area); + } - area = exaOffscreenAlloc(pScrni->pScreen, size, 16, - TRUE, GXVideoSave, NULL); - *memp = area; + area = exaOffscreenAlloc(pScrni->pScreen, size, 16, + TRUE, GXVideoSave, NULL); + *memp = area; - return area == NULL ? 0 : area->offset; + return area == NULL ? 0 : area->offset; } #endif if (!pGeode->useEXA) { - FBAreaPtr area = *memp; - FBAreaPtr new_area; + FBAreaPtr area = *memp; + FBAreaPtr new_area; - if (area) { - if ((area->box.y2 - area->box.y1) >= numlines) - return (area->box.y1 * pGeode->Pitch); + if (area) { + if ((area->box.y2 - area->box.y1) >= numlines) + return (area->box.y1 * pGeode->Pitch); - if (xf86ResizeOffscreenArea(area, pGeode->displayWidth, numlines)) - return (area->box.y1 * pGeode->Pitch); + if (xf86ResizeOffscreenArea(area, pGeode->displayWidth, numlines)) + return (area->box.y1 * pGeode->Pitch); - xf86FreeOffscreenArea(area); - } + xf86FreeOffscreenArea(area); + } - new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, - numlines, 0, NULL, NULL, NULL); + new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, + numlines, 0, NULL, NULL, NULL); - if (!new_area) { - int max_w, max_h; + if (!new_area) { + int max_w, max_h; - xf86QueryLargestOffscreenArea(pScrn, &max_w, &max_h, 0, - FAVOR_WIDTH_THEN_AREA, PRIORITY_EXTREME); + xf86QueryLargestOffscreenArea(pScrn, &max_w, &max_h, 0, + FAVOR_WIDTH_THEN_AREA, + PRIORITY_EXTREME); - if ((max_w < pGeode->displayWidth) || (max_h < numlines)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "No room - how sad %x, %x, %x, %x\n", max_w, - pGeode->displayWidth, max_h, numlines); - return 0; - } + if ((max_w < pGeode->displayWidth) || (max_h < numlines)) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "No room - how sad %x, %x, %x, %x\n", max_w, + pGeode->displayWidth, max_h, numlines); + return 0; + } - xf86PurgeUnlockedOffscreenAreas(pScrn); - new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, - numlines, 0, NULL, NULL, NULL); - } + xf86PurgeUnlockedOffscreenAreas(pScrn); + new_area = xf86AllocateOffscreenArea(pScrn, pGeode->displayWidth, + numlines, 0, NULL, NULL, NULL); + } - return (new_area->box.y1 * pGeode->Pitch); + return (new_area->box.y1 * pGeode->Pitch); } return 0; @@ -776,12 +784,12 @@ RegionsIntersect(BoxPtr pRcl1, BoxPtr pRcl2, BoxPtr pRclResult) pRclResult->x2 = min(pRcl1->x2, pRcl2->x2); if (pRclResult->x1 <= pRclResult->x2) { - pRclResult->y1 = max(pRcl1->y1, pRcl2->y1); - pRclResult->y2 = min(pRcl1->y2, pRcl2->y2); + pRclResult->y1 = max(pRcl1->y1, pRcl2->y1); + pRclResult->y2 = min(pRcl1->y2, pRcl2->y2); - if (pRclResult->y1 <= pRclResult->y2) { - return (TRUE); - } + if (pRclResult->y1 <= pRclResult->y2) { + return (TRUE); + } } return (FALSE); @@ -790,8 +798,8 @@ RegionsIntersect(BoxPtr pRcl1, BoxPtr pRcl2, BoxPtr pRclResult) void GXSetVideoPosition(int x, int y, int width, int height, - short src_w, short src_h, short drw_w, short drw_h, - int id, int offset, ScrnInfoPtr pScrni) + short src_w, short src_h, short drw_w, short drw_h, + int id, int offset, ScrnInfoPtr pScrni) { GeodeRec *pGeode = GEODEPTR(pScrni); long ystart, xend, yend; @@ -817,49 +825,52 @@ GXSetVideoPosition(int x, int y, int width, int height, /* Thhis code is pretty dang broken - comment it out for now */ if (pGeode->Panel) { - ovly.x1 = x; - ovly.x2 = x + pGeode->video_dstw; - ovly.y1 = y; - ovly.y2 = y + pGeode->video_dsth; - - display.x1 = DeltaX; - display.x2 = DeltaX + pGeode->FPBX; - display.y1 = DeltaY; - display.y2 = DeltaY + pGeode->FPBY; - x = xend = 0; - if (RegionsIntersect(&display, &ovly, &result)) { - x = ovly.x1 - DeltaX; - xend = ovly.x2 - DeltaX; - y = ovly.y1 - DeltaY; - yend = ovly.y2 - DeltaY; - } + ovly.x1 = x; + ovly.x2 = x + pGeode->video_dstw; + ovly.y1 = y; + ovly.y2 = y + pGeode->video_dsth; + + display.x1 = DeltaX; + display.x2 = DeltaX + pGeode->FPBX; + display.y1 = DeltaY; + display.y2 = DeltaY + pGeode->FPBY; + x = xend = 0; + if (RegionsIntersect(&display, &ovly, &result)) { + x = ovly.x1 - DeltaX; + xend = ovly.x2 - DeltaX; + y = ovly.y1 - DeltaY; + yend = ovly.y2 - DeltaY; + } } #endif /* TOP CLIPPING */ if (y < 0) { - if (src_h < drw_h) - lines = (-y) * src_h / drw_h; - else - lines = (-y); - ystart = 0; - drw_h += y; - y_extra = lines * dstPitch; - uv_extra = (lines >> 1) * (dstPitch2); - } else { - ystart = y; - lines = 0; - y_extra = 0; + if (src_h < drw_h) + lines = (-y) * src_h / drw_h; + else + lines = (-y); + ystart = 0; + drw_h += y; + y_extra = lines * dstPitch; + uv_extra = (lines >> 1) * (dstPitch2); + } + else { + ystart = y; + lines = 0; + y_extra = 0; } GFX(set_video_window(x, ystart, xend - x, yend - ystart)); if ((id == FOURCC_Y800) || (id == FOURCC_I420) || (id == FOURCC_YV12)) { - GFX(set_video_yuv_offsets(offset + y_extra, - offset + d3offset + uv_extra, offset + d2offset + uv_extra)); - } else { - GFX(set_video_offset(offset + y_extra)); + GFX(set_video_yuv_offsets(offset + y_extra, + offset + d3offset + uv_extra, + offset + d2offset + uv_extra)); + } + else { + GFX(set_video_offset(offset + y_extra)); } } @@ -880,12 +891,13 @@ GXSetVideoPosition(int x, int y, int width, int height, static void GXDisplayVideo(ScrnInfoPtr pScrni, - int id, - int offset, - short width, short height, - int pitch, - int x1, int y1, int x2, int y2, - BoxPtr dstBox, short src_w, short src_h, short drw_w, short drw_h) + int id, + int offset, + short width, short height, + int pitch, + int x1, int y1, int x2, int y2, + BoxPtr dstBox, short src_w, short src_h, short drw_w, + short drw_h) { GeodeRec *pGeode = GEODEPTR(pScrni); unsigned long dcfg, misc; @@ -897,74 +909,74 @@ GXDisplayVideo(ScrnInfoPtr pScrni, */ if (id != FOURCC_RGB565) { - dcfg = gfx_read_vid32(DISPLAY_CONFIG); - misc = gfx_read_vid32(MISC); + dcfg = gfx_read_vid32(DISPLAY_CONFIG); + misc = gfx_read_vid32(MISC); - lutflag = (!(misc & 1) && (dcfg & (1 << 21))); + lutflag = (!(misc & 1) && (dcfg & (1 << 21))); - if (lutflag) - get_gamma_ram(graphics_lut); + if (lutflag) + get_gamma_ram(graphics_lut); - /* Set the video gamma ram */ - GFX(set_video_palette(NULL)); + /* Set the video gamma ram */ + GFX(set_video_palette(NULL)); } GFX(set_video_enable(1)); switch (id) { - case FOURCC_UYVY: /* UYVY */ - GFX(set_video_format(VIDEO_FORMAT_UYVY)); - GFX(set_video_size(width, height)); - break; - case FOURCC_Y800: /* Y800 - greyscale - we munge it! */ - case FOURCC_YV12: /* YV12 */ - case FOURCC_I420: /* I420 */ - GFX(set_video_format(VIDEO_FORMAT_Y0Y1Y2Y3)); - GFX(set_video_size(width, height)); - GFX(set_video_yuv_pitch(dstPitch, dstPitch2)); - break; - case FOURCC_YUY2: /* YUY2 */ - GFX(set_video_format(VIDEO_FORMAT_YUYV)); - GFX(set_video_size(width, height)); - break; - case FOURCC_Y2YU: /* Y2YU */ - GFX(set_video_format(VIDEO_FORMAT_Y2YU)); - GFX(set_video_size(width, height)); - break; - case FOURCC_YVYU: /* YVYU */ - GFX(set_video_format(VIDEO_FORMAT_YVYU)); - GFX(set_video_size(width, height)); - break; + case FOURCC_UYVY: /* UYVY */ + GFX(set_video_format(VIDEO_FORMAT_UYVY)); + GFX(set_video_size(width, height)); + break; + case FOURCC_Y800: /* Y800 - greyscale - we munge it! */ + case FOURCC_YV12: /* YV12 */ + case FOURCC_I420: /* I420 */ + GFX(set_video_format(VIDEO_FORMAT_Y0Y1Y2Y3)); + GFX(set_video_size(width, height)); + GFX(set_video_yuv_pitch(dstPitch, dstPitch2)); + break; + case FOURCC_YUY2: /* YUY2 */ + GFX(set_video_format(VIDEO_FORMAT_YUYV)); + GFX(set_video_size(width, height)); + break; + case FOURCC_Y2YU: /* Y2YU */ + GFX(set_video_format(VIDEO_FORMAT_Y2YU)); + GFX(set_video_size(width, height)); + break; + case FOURCC_YVYU: /* YVYU */ + GFX(set_video_format(VIDEO_FORMAT_YVYU)); + GFX(set_video_size(width, height)); + break; case FOURCC_RGB565: - GFX(set_video_format(VIDEO_FORMAT_RGB)); - GFX(set_video_size(width, height)); - break; + GFX(set_video_format(VIDEO_FORMAT_RGB)); + GFX(set_video_size(width, height)); + break; } if (pGeode->Panel) { - pGeode->video_x = dstBox->x1; - pGeode->video_y = dstBox->y1; - pGeode->video_w = width; - pGeode->video_h = height; - pGeode->video_srcw = src_w; - pGeode->video_srch = src_h; - pGeode->video_dstw = drw_w; - pGeode->video_dsth = drw_h; - pGeode->video_offset = offset; - pGeode->video_id = id; - pGeode->video_scrnptr = pScrni; + pGeode->video_x = dstBox->x1; + pGeode->video_y = dstBox->y1; + pGeode->video_w = width; + pGeode->video_h = height; + pGeode->video_srcw = src_w; + pGeode->video_srch = src_h; + pGeode->video_dstw = drw_w; + pGeode->video_dsth = drw_h; + pGeode->video_offset = offset; + pGeode->video_id = id; + pGeode->video_scrnptr = pScrni; } if ((drw_w >= src_w) && (drw_h >= src_h)) - GFX(set_video_scale(width, height, drw_w, drw_h)); + GFX(set_video_scale(width, height, drw_w, drw_h)); else if (drw_w < src_w) - GFX(set_video_scale(drw_w, height, drw_w, drw_h)); + GFX(set_video_scale(drw_w, height, drw_w, drw_h)); else if (drw_h < src_h) - GFX(set_video_scale(width, drw_h, drw_w, drw_h)); + GFX(set_video_scale(width, drw_h, drw_w, drw_h)); GXSetVideoPosition(dstBox->x1, dstBox->y1, width, height, src_w, - src_h, drw_w, drw_h, id, offset, pScrni); + src_h, drw_w, drw_h, id, offset, pScrni); } /* Used by LX as well */ @@ -977,23 +989,23 @@ RegionsEqual(RegionPtr A, RegionPtr B) num = REGION_NUM_RECTS(A); if (num != REGION_NUM_RECTS(B)) { - return FALSE; + return FALSE; } if ((A->extents.x1 != B->extents.x1) || - (A->extents.x2 != B->extents.x2) || - (A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2)) - return FALSE; + (A->extents.x2 != B->extents.x2) || + (A->extents.y1 != B->extents.y1) || (A->extents.y2 != B->extents.y2)) + return FALSE; - dataA = (int *)REGION_RECTS(A); - dataB = (int *)REGION_RECTS(B); + dataA = (int *) REGION_RECTS(A); + dataB = (int *) REGION_RECTS(B); while (num--) { - if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1])) - return FALSE; + if ((dataA[0] != dataB[0]) || (dataA[1] != dataB[1])) + return FALSE; - dataA += 2; - dataB += 2; + dataA += 2; + dataB += 2; } return TRUE; @@ -1022,13 +1034,13 @@ RegionsEqual(RegionPtr A, RegionPtr B) static int GXPutImage(ScrnInfoPtr pScrni, - short src_x, short src_y, - short drw_x, short drw_y, - short src_w, short src_h, - short drw_w, short drw_h, - int id, unsigned char *buf, - short width, short height, Bool sync, RegionPtr clipBoxes, pointer data, - DrawablePtr pDraw) + short src_x, short src_y, + short drw_x, short drw_y, + short src_w, short src_h, + short drw_w, short drw_h, + int id, unsigned char *buf, + short width, short height, Bool sync, RegionPtr clipBoxes, + pointer data, DrawablePtr pDraw) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; GeodeRec *pGeode = GEODEPTR(pScrni); @@ -1049,173 +1061,172 @@ GXPutImage(ScrnInfoPtr pScrni, #if REINIT /* update cliplist */ if (!RegionsEqual(&pPriv->clip, clipBoxes)) { - ReInitVideo = TRUE; + ReInitVideo = TRUE; } if (DoReinitAgain) - ReInitVideo = TRUE; + ReInitVideo = TRUE; if (ReInitVideo) { - DEBUGMSG(1, (0, X_NONE, "Regional Not Equal - Init\n")); + DEBUGMSG(1, (0, X_NONE, "Regional Not Equal - Init\n")); #endif - DoReinitAgain = ~DoReinitAgain; - if (drw_w > 16384) - drw_w = 16384; - - /* Clip */ - Bx1 = src_x; - Bx2 = src_x + src_w; - By1 = src_y; - By2 = src_y + src_h; - - if ((Bx1 >= Bx2) || (By1 >= By2)) - return Success; - - dstBox.x1 = drw_x; - dstBox.x2 = drw_x + drw_w; - dstBox.y1 = drw_y; - dstBox.y2 = drw_y + drw_h; - - dstBox.x1 -= pScrni->frameX0; - dstBox.x2 -= pScrni->frameX0; - dstBox.y1 -= pScrni->frameY0; - dstBox.y2 -= pScrni->frameY0; - - switch (id) { - case FOURCC_YV12: - case FOURCC_I420: - srcPitch = (width + 3) & ~3; /* of luma */ - dstPitch = (width + 31) & ~31; - - s2offset = srcPitch * height; - d2offset = dstPitch * height; - - srcPitch2 = ((width >> 1) + 3) & ~3; - dstPitch2 = ((width >> 1) + 15) & ~15; - - s3offset = (srcPitch2 * (height >> 1)) + s2offset; - d3offset = (dstPitch2 * (height >> 1)) + d2offset; - - new_h = dstPitch * height; /* Y */ - new_h += (dstPitch2 * height); /* U+V */ - new_h += pGeode->Pitch - 1; - new_h /= pGeode->Pitch; - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - case FOURCC_Y800: - case FOURCC_RGB565: - default: - dstPitch = ((width << 1) + 3) & ~3; - srcPitch = (width << 1); - new_h = ((dstPitch * height) + pGeode->Pitch - 1) / pGeode->Pitch; - break; - } + DoReinitAgain = ~DoReinitAgain; + if (drw_w > 16384) + drw_w = 16384; + + /* Clip */ + Bx1 = src_x; + Bx2 = src_x + src_w; + By1 = src_y; + By2 = src_y + src_h; + + if ((Bx1 >= Bx2) || (By1 >= By2)) + return Success; + + dstBox.x1 = drw_x; + dstBox.x2 = drw_x + drw_w; + dstBox.y1 = drw_y; + dstBox.y2 = drw_y + drw_h; + + dstBox.x1 -= pScrni->frameX0; + dstBox.x2 -= pScrni->frameX0; + dstBox.y1 -= pScrni->frameY0; + dstBox.y2 -= pScrni->frameY0; + + switch (id) { + case FOURCC_YV12: + case FOURCC_I420: + srcPitch = (width + 3) & ~3; /* of luma */ + dstPitch = (width + 31) & ~31; + + s2offset = srcPitch * height; + d2offset = dstPitch * height; + + srcPitch2 = ((width >> 1) + 3) & ~3; + dstPitch2 = ((width >> 1) + 15) & ~15; + + s3offset = (srcPitch2 * (height >> 1)) + s2offset; + d3offset = (dstPitch2 * (height >> 1)) + d2offset; + + new_h = dstPitch * height; /* Y */ + new_h += (dstPitch2 * height); /* U+V */ + new_h += pGeode->Pitch - 1; + new_h /= pGeode->Pitch; + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + case FOURCC_Y800: + case FOURCC_RGB565: + default: + dstPitch = ((width << 1) + 3) & ~3; + srcPitch = (width << 1); + new_h = ((dstPitch * height) + pGeode->Pitch - 1) / pGeode->Pitch; + break; + } #if DBUF - if (pPriv->doubleBuffer) - new_h <<= 1; + if (pPriv->doubleBuffer) + new_h <<= 1; #endif - if (!(pPriv->offset = GXAllocateMemory(pScrni, &pPriv->area, new_h))) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Could not allocate area of size %d\n", new_h); - return BadAlloc; - } + if (!(pPriv->offset = GXAllocateMemory(pScrni, &pPriv->area, new_h))) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Could not allocate area of size %d\n", new_h); + return BadAlloc; + } - /* copy data */ - top = By1; - left = Bx1 & ~1; - npixels = ((Bx2 + 1) & ~1) - left; + /* copy data */ + top = By1; + left = Bx1 & ~1; + npixels = ((Bx2 + 1) & ~1) - left; - switch (id) { - case FOURCC_YV12: - case FOURCC_I420: - { - int tmp; + switch (id) { + case FOURCC_YV12: + case FOURCC_I420: + { + int tmp; - top &= ~1; + top &= ~1; - offset = pPriv->offset + (top * dstPitch); + offset = pPriv->offset + (top * dstPitch); #if DBUF - if (pPriv->doubleBuffer && pPriv->currentBuffer) - offset += (new_h >> 1) * pGeode->Pitch; + if (pPriv->doubleBuffer && pPriv->currentBuffer) + offset += (new_h >> 1) * pGeode->Pitch; #endif - dst_start = pGeode->FBBase + offset + left; - tmp = ((top >> 1) * srcPitch2) + (left >> 1); - s2offset += tmp; - s3offset += tmp; - if (id == FOURCC_I420) { - tmp = s2offset; - s2offset = s3offset; - s3offset = tmp; - } - nlines = ((By2 + 1) & ~1) - top; - } - break; - case FOURCC_UYVY: - case FOURCC_YUY2: - case FOURCC_Y800: - case FOURCC_RGB565: - default: - left <<= 1; - buf += (top * srcPitch) + left; - nlines = By2 - top; - offset = (pPriv->offset) + (top * dstPitch); + dst_start = pGeode->FBBase + offset + left; + tmp = ((top >> 1) * srcPitch2) + (left >> 1); + s2offset += tmp; + s3offset += tmp; + if (id == FOURCC_I420) { + tmp = s2offset; + s2offset = s3offset; + s3offset = tmp; + } + nlines = ((By2 + 1) & ~1) - top; + } + break; + case FOURCC_UYVY: + case FOURCC_YUY2: + case FOURCC_Y800: + case FOURCC_RGB565: + default: + left <<= 1; + buf += (top * srcPitch) + left; + nlines = By2 - top; + offset = (pPriv->offset) + (top * dstPitch); #if DBUF - if (pPriv->doubleBuffer && pPriv->currentBuffer) - offset += (new_h >> 1) * pGeode->Pitch; + if (pPriv->doubleBuffer && pPriv->currentBuffer) + offset += (new_h >> 1) * pGeode->Pitch; #endif - dst_start = pGeode->FBBase + offset + left; - break; - } - s1offset = (top * srcPitch) + left; + dst_start = pGeode->FBBase + offset + left; + break; + } + s1offset = (top * srcPitch) + left; #if REINIT - /* update cliplist */ - REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes); + /* update cliplist */ + REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes); - if (pPriv->colorKeyMode == 0) { - xf86XVFillKeyHelper(pScrni->pScreen, pPriv->colorKey, clipBoxes); - } + if (pPriv->colorKeyMode == 0) { + xf86XVFillKeyHelper(pScrni->pScreen, pPriv->colorKey, clipBoxes); + } - GXDisplayVideo(pScrni, id, offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); + GXDisplayVideo(pScrni, id, offset, width, height, dstPitch, + Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); } #endif switch (id) { case FOURCC_Y800: - /* This is shared between LX and GX, so it lives in amd_common.c */ - GeodeCopyGreyscale(buf, dst_start, srcPitch, dstPitch, nlines, - npixels); - break; + /* This is shared between LX and GX, so it lives in amd_common.c */ + GeodeCopyGreyscale(buf, dst_start, srcPitch, dstPitch, nlines, npixels); + break; case FOURCC_YV12: case FOURCC_I420: - GXCopyData420(buf + s1offset, dst_start, srcPitch, dstPitch, nlines, - npixels); - GXCopyData420(buf + s2offset, dst_start + d2offset, srcPitch2, - dstPitch2, nlines >> 1, npixels >> 1); - GXCopyData420(buf + s3offset, dst_start + d3offset, srcPitch2, - dstPitch2, nlines >> 1, npixels >> 1); - break; + GXCopyData420(buf + s1offset, dst_start, srcPitch, dstPitch, nlines, + npixels); + GXCopyData420(buf + s2offset, dst_start + d2offset, srcPitch2, + dstPitch2, nlines >> 1, npixels >> 1); + GXCopyData420(buf + s3offset, dst_start + d3offset, srcPitch2, + dstPitch2, nlines >> 1, npixels >> 1); + break; case FOURCC_UYVY: case FOURCC_YUY2: case FOURCC_RGB565: default: - GXCopyData422(buf, dst_start, srcPitch, dstPitch, nlines, npixels); - break; + GXCopyData422(buf, dst_start, srcPitch, dstPitch, nlines, npixels); + break; } #if !REINIT /* update cliplist */ REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes); if (pPriv->colorKeyMode == 0) { - /* draw these */ - XAAFillSolidRects(pScrni, pPriv->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(clipBoxes), REGION_RECTS(clipBoxes)); + /* draw these */ + XAAFillSolidRects(pScrni, pPriv->colorKey, GXcopy, ~0, + REGION_NUM_RECTS(clipBoxes), REGION_RECTS(clipBoxes)); } GXDisplayVideo(pScrni, id, offset, width, height, dstPitch, - Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); + Bx1, By1, Bx2, By2, &dstBox, src_w, src_h, drw_w, drw_h); #endif #if XV_PROFILE @@ -1254,7 +1265,8 @@ GXPutImage(ScrnInfoPtr pScrni, int GeodeQueryImageAttributes(ScrnInfoPtr pScrni, - int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets) + int id, unsigned short *w, unsigned short *h, + int *pitches, int *offsets) { int size; int tmp; @@ -1262,107 +1274,107 @@ GeodeQueryImageAttributes(ScrnInfoPtr pScrni, DEBUGMSG(0, (0, X_NONE, "QueryImageAttributes %X\n", id)); if (*w > 1024) - *w = 1024; + *w = 1024; if (*h > 1024) - *h = 1024; + *h = 1024; *w = (*w + 1) & ~1; if (offsets) - offsets[0] = 0; + offsets[0] = 0; switch (id) { case FOURCC_YV12: case FOURCC_I420: - *h = (*h + 1) & ~1; - size = (*w + 3) & ~3; - if (pitches) - pitches[0] = size; - - size *= *h; - if (offsets) - offsets[1] = size; - - tmp = ((*w >> 1) + 3) & ~3; - if (pitches) - pitches[1] = pitches[2] = tmp; - - tmp *= (*h >> 1); - size += tmp; - if (offsets) - offsets[2] = size; - - size += tmp; - break; + *h = (*h + 1) & ~1; + size = (*w + 3) & ~3; + if (pitches) + pitches[0] = size; + + size *= *h; + if (offsets) + offsets[1] = size; + + tmp = ((*w >> 1) + 3) & ~3; + if (pitches) + pitches[1] = pitches[2] = tmp; + + tmp *= (*h >> 1); + size += tmp; + if (offsets) + offsets[2] = size; + + size += tmp; + break; case FOURCC_UYVY: case FOURCC_YUY2: case FOURCC_Y800: default: - size = *w << 1; - if (pitches) - pitches[0] = size; + size = *w << 1; + if (pitches) + pitches[0] = size; - size *= *h; - break; + size *= *h; + break; } return size; } static void -GXBlockHandler(int i, pointer blockData, pointer pTimeout, pointer pReadmask) +GXBlockHandler(BLOCKHANDLER_ARGS_DECL) { - ScreenPtr pScrn = screenInfo.screens[i]; - ScrnInfoPtr pScrni = xf86Screens[i]; + SCREEN_PTR(arg); + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); pScrn->BlockHandler = pGeode->BlockHandler; - (*pScrn->BlockHandler) (i, blockData, pTimeout, pReadmask); + (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS); pScrn->BlockHandler = GXBlockHandler; if (pPriv->videoStatus & TIMER_MASK) { - GXAccelSync(pScrni); - UpdateCurrentTime(); - if (pPriv->videoStatus & OFF_TIMER) { - if (pPriv->offTime < currentTime.milliseconds) { - GFX(set_video_enable(0)); - - /* If we have saved graphics LUT data - restore it */ - /* Otherwise, turn bypass on */ - - if (lutflag) - GFX(set_graphics_palette(graphics_lut)); - else - GFX(set_video_palette_bypass(1)); - - lutflag = 0; - - pPriv->videoStatus = FREE_TIMER; - pPriv->freeTime = currentTime.milliseconds + FREE_DELAY; - } - } else { /* FREE_TIMER */ - if (pPriv->freeTime < currentTime.milliseconds) { - - if (pPriv->area) { + GXAccelSync(pScrni); + UpdateCurrentTime(); + if (pPriv->videoStatus & OFF_TIMER) { + if (pPriv->offTime < currentTime.milliseconds) { + GFX(set_video_enable(0)); + + /* If we have saved graphics LUT data - restore it */ + /* Otherwise, turn bypass on */ + + if (lutflag) + GFX(set_graphics_palette(graphics_lut)); + else + GFX(set_video_palette_bypass(1)); + + lutflag = 0; + + pPriv->videoStatus = FREE_TIMER; + pPriv->freeTime = currentTime.milliseconds + FREE_DELAY; + } + } + else { /* FREE_TIMER */ + if (pPriv->freeTime < currentTime.milliseconds) { + + if (pPriv->area) { #ifdef XF86EXA - if (pGeode->useEXA) - exaOffscreenFree(pScrn, pPriv->area); + if (pGeode->useEXA) + exaOffscreenFree(pScrn, pPriv->area); #endif - if (!pGeode->useEXA) - xf86FreeOffscreenArea(pPriv->area); + if (!pGeode->useEXA) + xf86FreeOffscreenArea(pPriv->area); - pPriv->area = NULL; - } + pPriv->area = NULL; + } - pPriv->videoStatus = 0; - } - } + pPriv->videoStatus = 0; + } + } } } /****************** Offscreen stuff ***************/ -typedef struct -{ +typedef struct { void *area; int offset; Bool isOn; @@ -1383,14 +1395,15 @@ typedef struct */ static int GXAllocateSurface(ScrnInfoPtr pScrni, - int id, unsigned short w, unsigned short h, XF86SurfacePtr surface) + int id, unsigned short w, unsigned short h, + XF86SurfacePtr surface) { void *area = NULL; int pitch, fbpitch, numlines; OffscreenPrivRec *pPriv; if ((w > 1024) || (h > 1024)) - return BadAlloc; + return BadAlloc; w = (w + 1) & ~1; pitch = ((w << 1) + 15) & ~15; @@ -1398,23 +1411,23 @@ GXAllocateSurface(ScrnInfoPtr pScrni, numlines = ((pitch * h) + fbpitch - 1) / fbpitch; if (!(offset = GXAllocateMemory(pScrni, &area, numlines))) - return BadAlloc; + return BadAlloc; surface->width = w; surface->height = h; if (!(surface->pitches = malloc(sizeof(int)))) - return BadAlloc; + return BadAlloc; if (!(surface->offsets = malloc(sizeof(int)))) { - free(surface->pitches); - return BadAlloc; + free(surface->pitches); + return BadAlloc; } if (!(pPriv = malloc(sizeof(OffscreenPrivRec)))) { - free(surface->pitches); - free(surface->offsets); - return BadAlloc; + free(surface->pitches); + free(surface->offsets); + return BadAlloc; } pPriv->area = area; @@ -1437,7 +1450,7 @@ GXStopSurface(XF86SurfacePtr surface) OffscreenPrivRec *pPriv = (OffscreenPrivRec *) surface->devPrivate.ptr; if (pPriv->isOn) { - pPriv->isOn = FALSE; + pPriv->isOn = FALSE; } return Success; @@ -1449,7 +1462,7 @@ GXFreeSurface(XF86SurfacePtr surface) OffscreenPrivRec *pPriv = (OffscreenPrivRec *) surface->devPrivate.ptr; if (pPriv->isOn) - GXStopSurface(surface); + GXStopSurface(surface); xf86FreeOffscreenArea(pPriv->area); free(surface->pitches); @@ -1460,24 +1473,25 @@ GXFreeSurface(XF86SurfacePtr surface) } static int -GXGetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 * value) +GXGetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value) { return GXGetPortAttribute(pScrni, attribute, value, - (pointer) (GET_PORT_PRIVATE(pScrni))); + (pointer) (GET_PORT_PRIVATE(pScrni))); } static int GXSetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 value) { return GXSetPortAttribute(pScrni, attribute, value, - (pointer) (GET_PORT_PRIVATE(pScrni))); + (pointer) (GET_PORT_PRIVATE(pScrni))); } static int GXDisplaySurface(XF86SurfacePtr surface, - short src_x, short src_y, - short drw_x, short drw_y, - short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes) + short src_x, short src_y, + short drw_x, short drw_y, + short src_w, short src_h, short drw_w, short drw_h, + RegionPtr clipBoxes) { OffscreenPrivRec *pPriv = (OffscreenPrivRec *) surface->devPrivate.ptr; ScrnInfoPtr pScrni = surface->pScrn; @@ -1497,7 +1511,7 @@ GXDisplaySurface(XF86SurfacePtr surface, dstBox.y2 = drw_y + drw_h; if ((x1 >= x2) || (y1 >= y2)) - return Success; + return Success; dstBox.x1 -= pScrni->frameX0; dstBox.x2 -= pScrni->frameX0; @@ -1507,15 +1521,15 @@ GXDisplaySurface(XF86SurfacePtr surface, xf86XVFillKeyHelper(pScrni->pScreen, portPriv->colorKey, clipBoxes); GXDisplayVideo(pScrni, surface->id, surface->offsets[0], - surface->width, surface->height, surface->pitches[0], - x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); + surface->width, surface->height, surface->pitches[0], + x1, y1, x2, y2, &dstBox, src_w, src_h, drw_w, drw_h); pPriv->isOn = TRUE; if (portPriv->videoStatus & CLIENT_VIDEO_ON) { - REGION_EMPTY(pScrni->pScreen, &portPriv->clip); - UpdateCurrentTime(); - portPriv->videoStatus = FREE_TIMER; - portPriv->freeTime = currentTime.milliseconds + FREE_DELAY; + REGION_EMPTY(pScrni->pScreen, &portPriv->clip); + UpdateCurrentTime(); + portPriv->videoStatus = FREE_TIMER; + portPriv->freeTime = currentTime.milliseconds + FREE_DELAY; } return Success; @@ -1543,7 +1557,7 @@ GXInitOffscreenImages(ScreenPtr pScrn) /* need to free this someplace */ if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec)))) - return; + return; offscreenImages[0].image = &Images[0]; offscreenImages[0].flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; @@ -1561,4 +1575,4 @@ GXInitOffscreenImages(ScreenPtr pScrn) xf86XVRegisterOffscreenImages(pScrn, offscreenImages, 1); } -#endif /* !XvExtension */ +#endif /* !XvExtension */ diff --git a/driver/xf86-video-geode/src/lx_cursor.c b/driver/xf86-video-geode/src/lx_cursor.c index 23205c02f..fe1149a89 100644 --- a/driver/xf86-video-geode/src/lx_cursor.c +++ b/driver/xf86-video-geode/src/lx_cursor.c @@ -36,20 +36,20 @@ Bool LXCursorInit(ScreenPtr pScrn) { return xf86_cursors_init(pScrn, - LX_CURSOR_MAX_WIDTH, LX_CURSOR_MAX_HEIGHT, - HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | - HARDWARE_CURSOR_INVERT_MASK | - HARDWARE_CURSOR_AND_SOURCE_WITH_MASK | - HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 | - HARDWARE_CURSOR_ARGB); + LX_CURSOR_MAX_WIDTH, LX_CURSOR_MAX_HEIGHT, + HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | + HARDWARE_CURSOR_INVERT_MASK | + HARDWARE_CURSOR_AND_SOURCE_WITH_MASK | + HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 | + HARDWARE_CURSOR_ARGB); } void LXLoadARGBCursorImage(ScrnInfoPtr pScrni, unsigned char *src) { GeodeRec *pGeode = GEODEPTR(pScrni); + vg_set_color_cursor_shape(pGeode->CursorStartOffset, src, - LX_CURSOR_MAX_WIDTH, LX_CURSOR_MAX_HEIGHT, - LX_CURSOR_MAX_WIDTH * 4, 0, 0); + LX_CURSOR_MAX_WIDTH, LX_CURSOR_MAX_HEIGHT, + LX_CURSOR_MAX_WIDTH * 4, 0, 0); } - diff --git a/driver/xf86-video-geode/src/lx_display.c b/driver/xf86-video-geode/src/lx_display.c index b46fa1700..997d53d26 100644 --- a/driver/xf86-video-geode/src/lx_display.c +++ b/driver/xf86-video-geode/src/lx_display.c @@ -33,8 +33,7 @@ #include "cim/cim_defs.h" #include "cim/cim_regs.h" -typedef struct _LXOutputPrivateRec -{ +typedef struct _LXOutputPrivateRec { int video_enable; unsigned long video_flags; GeodeMemPtr rotate_mem; @@ -50,14 +49,14 @@ lx_enable_dac_power(ScrnInfoPtr pScrni, int option) /* Turn off the DAC if we don't need the CRT */ if (option && (!(pGeode->Output & OUTPUT_CRT))) { - unsigned int misc = READ_VID32(DF_VID_MISC); + unsigned int misc = READ_VID32(DF_VID_MISC); - misc |= DF_DAC_POWER_DOWN; - WRITE_VID32(DF_VID_MISC, misc); + misc |= DF_DAC_POWER_DOWN; + WRITE_VID32(DF_VID_MISC, misc); } if (pGeode->Output & OUTPUT_PANEL) - df_set_panel_enable(1); + df_set_panel_enable(1); } static void @@ -66,15 +65,15 @@ lx_disable_dac_power(ScrnInfoPtr pScrni, int option) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->Output & OUTPUT_PANEL) - df_set_panel_enable(0); + df_set_panel_enable(0); if (pGeode->Output & OUTPUT_CRT) { - /* Wait for the panel to finish its procedure */ + /* Wait for the panel to finish its procedure */ - if (pGeode->Output & OUTPUT_PANEL) - while ((READ_VID32(DF_POWER_MANAGEMENT) & 2) == 0) ; - df_set_crt_enable(option); + if (pGeode->Output & OUTPUT_PANEL) + while ((READ_VID32(DF_POWER_MANAGEMENT) & 2) == 0); + df_set_crt_enable(option); } } @@ -107,7 +106,7 @@ lx_set_panel_mode(VG_DISPLAY_MODE * mode, DisplayModePtr pMode) mode->vblankend_even = pMode->VTotal; mode->vtotal_even = pMode->VTotal; - mode->frequency = (int)((pMode->Clock / 1000.0) * 0x10000); + mode->frequency = (int) ((pMode->Clock / 1000.0) * 0x10000); /* In panel mode, Cimarron purposely swizzles these, * so we swizzle them first */ @@ -148,7 +147,7 @@ lx_set_crt_mode(VG_DISPLAY_MODE * mode, DisplayModePtr pMode) mode->vblankend_even = pMode->CrtcVBlankEnd; mode->vtotal_even = pMode->CrtcVTotal; - mode->frequency = (int)((pMode->Clock / 1000.0) * 0x10000); + mode->frequency = (int) ((pMode->Clock / 1000.0) * 0x10000); hsync = (pMode->Flags & V_NHSYNC) ? 1 : 0; vsync = (pMode->Flags & V_NVSYNC) ? 1 : 0; @@ -169,15 +168,15 @@ lx_set_mode(ScrnInfoPtr pScrni, DisplayModePtr pMode, int bpp) mode.flags |= pGeode->Output & OUTPUT_CRT ? VG_MODEFLAG_CRT_AND_FP : 0; if (pGeode->Output & OUTPUT_PANEL) { - mode.flags |= VG_MODEFLAG_PANELOUT; - if (pGeode->Output & OUTPUT_CRT) - mode.flags |= VG_MODEFLAG_CRT_AND_FP; + mode.flags |= VG_MODEFLAG_PANELOUT; + if (pGeode->Output & OUTPUT_CRT) + mode.flags |= VG_MODEFLAG_CRT_AND_FP; } if (pGeode->Output & OUTPUT_PANEL && pGeode->Scale) - lx_set_panel_mode(&mode, pGeode->panelMode); + lx_set_panel_mode(&mode, pGeode->panelMode); else - lx_set_crt_mode(&mode, pMode); + lx_set_crt_mode(&mode, pMode); mode.src_width = pMode->HDisplay; mode.src_height = pMode->VDisplay; @@ -196,24 +195,24 @@ lx_crtc_dpms(xf86CrtcPtr crtc, int mode) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->Output & OUTPUT_DCON) - DCONDPMSSet(pScrni, mode); + DCONDPMSSet(pScrni, mode); switch (mode) { case DPMSModeOn: - lx_enable_dac_power(pScrni, 1); - break; + lx_enable_dac_power(pScrni, 1); + break; case DPMSModeStandby: - lx_disable_dac_power(pScrni, DF_CRT_STANDBY); - break; + lx_disable_dac_power(pScrni, DF_CRT_STANDBY); + break; case DPMSModeSuspend: - lx_disable_dac_power(pScrni, DF_CRT_SUSPEND); - break; + lx_disable_dac_power(pScrni, DF_CRT_SUSPEND); + break; case DPMSModeOff: - lx_disable_dac_power(pScrni, DF_CRT_DISABLE); - break; + lx_disable_dac_power(pScrni, DF_CRT_DISABLE); + break; } } @@ -240,7 +239,7 @@ lx_crtc_prepare(xf86CrtcPtr crtc) df_get_video_enable(&lx_crtc->video_enable, &lx_crtc->video_flags); if (lx_crtc->video_enable) - df_set_video_enable(0, 0); + df_set_video_enable(0, 0); /* Turn off compression */ vg_set_compression_enable(0); @@ -254,14 +253,14 @@ lx_crtc_prepare(xf86CrtcPtr crtc) static Bool lx_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode, - DisplayModePtr adjusted_mode) + DisplayModePtr adjusted_mode) { return TRUE; } static void lx_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, - DisplayModePtr adjusted_mode, int x, int y) + DisplayModePtr adjusted_mode, int x, int y) { ScrnInfoPtr pScrni = crtc->scrn; GeodeRec *pGeode = GEODEPTR(pScrni); @@ -275,7 +274,7 @@ lx_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, */ if (lx_set_mode(pScrni, adjusted_mode, pScrni->bitsPerPixel)) - ErrorF("ERROR! Unable to set the mode!\n"); + ErrorF("ERROR! Unable to set the mode!\n"); /* The output gets turned in in the output code as * per convention */ @@ -284,19 +283,19 @@ lx_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, * the retire frame as dirty. */ if (crtc->rotatedData != NULL) { - rpitch = pScrni->displayWidth * (pScrni->bitsPerPixel / 8); - vg_set_display_pitch(rpitch); + rpitch = pScrni->displayWidth * (pScrni->bitsPerPixel / 8); + vg_set_display_pitch(rpitch); } else - vg_set_display_pitch(pGeode->Pitch); + vg_set_display_pitch(pGeode->Pitch); gp_set_bpp(pScrni->bitsPerPixel); /* Set the acceleration offset if we are drawing to a shadow */ if (crtc->rotatedData != NULL) - vg_set_display_offset((unsigned int)((char *)crtc->rotatedData - - (char *)pGeode->FBBase)); + vg_set_display_offset((unsigned int) ((char *) crtc->rotatedData - + (char *) pGeode->FBBase)); else - vg_set_display_offset(0); + vg_set_display_offset(0); /* FIXME: Whats up with X and Y? Does that come into play * here? */ @@ -319,29 +318,29 @@ lx_crtc_commit(xf86CrtcPtr crtc) /* Turn on compression */ if (pGeode->Compression) { - vg_configure_compression(&(pGeode->CBData)); - vg_set_compression_enable(1); + vg_configure_compression(&(pGeode->CBData)); + vg_set_compression_enable(1); } /* Load the cursor */ if (crtc->scrn->pScreen != NULL) { - xf86_reload_cursors(crtc->scrn->pScreen); - crtc->funcs->hide_cursor(crtc); - crtc->cursor_shown = FALSE; + xf86_reload_cursors(crtc->scrn->pScreen); + crtc->funcs->hide_cursor(crtc); + crtc->cursor_shown = FALSE; } /* Renable the video */ if (lx_crtc->video_enable) - df_set_video_enable(lx_crtc->video_enable, lx_crtc->video_flags); + df_set_video_enable(lx_crtc->video_enable, lx_crtc->video_flags); lx_crtc->video_enable = 0; lx_crtc->video_flags = 0; } static void -lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, - CARD16 * blue, int size) +lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, + CARD16 *blue, int size) { unsigned int dcfg; int i; @@ -355,12 +354,13 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, for (i = 0; i < 256; i++) { unsigned int val; + (*red) &= 0xff00; (*green) &= 0xff00; (*blue) &= 0xff00; val = (*(red++) << 8) | *(green++) | (*(blue++) >> 8); - df_set_video_palette_entry(i, val); + df_set_video_palette_entry(i, val); } /* df_set_video_palette_entry automatically turns on @@ -384,27 +384,25 @@ lx_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 * red, CARD16 * green, */ static PixmapPtr lx_create_bo_pixmap(ScreenPtr pScreen, - int width, int height, - int depth, int bpp, - int pitch, pointer pPixData) + int width, int height, + int depth, int bpp, int pitch, pointer pPixData) { PixmapPtr pixmap; - #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,0,0,0) - pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0); + pixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); #else - pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth); + pixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth); #endif if (!pixmap) - return NULL; - if (!(*pScreen->ModifyPixmapHeader)(pixmap, width, height, - depth, bpp, pitch, pPixData)) { - /* ModifyPixmapHeader failed, so we can't use it as scratch pixmap - */ - (*pScreen->DestroyPixmap)(pixmap); - return NULL; + return NULL; + if (!(*pScreen->ModifyPixmapHeader) (pixmap, width, height, + depth, bpp, pitch, pPixData)) { + /* ModifyPixmapHeader failed, so we can't use it as scratch pixmap + */ + (*pScreen->DestroyPixmap) (pixmap); + return NULL; } return pixmap; @@ -415,7 +413,7 @@ lx_destory_bo_pixmap(PixmapPtr pixmap) { ScreenPtr pScreen = pixmap->drawable.pScreen; - (*pScreen->DestroyPixmap)(pixmap); + (*pScreen->DestroyPixmap) (pixmap); } /* Allocates shadow memory, and allocating a new space for Rotation. @@ -429,19 +427,18 @@ LXAllocShadow(ScrnInfoPtr pScrni, int size) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->shadowArea) { - if (pGeode->shadowArea->size != size) { - exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea); - pGeode->shadowArea = NULL; - } + if (pGeode->shadowArea->size != size) { + exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea); + pGeode->shadowArea = NULL; + } } if (pGeode->shadowArea == NULL) { - pGeode->shadowArea = - exaOffscreenAlloc(pScrni->pScreen, size, 4, TRUE, - NULL, NULL); + pGeode->shadowArea = + exaOffscreenAlloc(pScrni->pScreen, size, 4, TRUE, NULL, NULL); - if (pGeode->shadowArea == NULL) - return FALSE; + if (pGeode->shadowArea == NULL) + return FALSE; } pScrni->fbOffset = pGeode->shadowArea->offset; @@ -460,13 +457,13 @@ lx_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) /* Allocate shadow memory */ if (LXAllocShadow(pScrni, size) == FALSE) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Couldn't allocate the shadow memory for rotation\n"); - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - " You need 0x%x bytes, but only 0x%x bytes are available\n", - size, GeodeOffscreenFreeSize(pGeode)); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't allocate the shadow memory for rotation\n"); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + " You need 0x%x bytes, but only 0x%x bytes are available\n", + size, GeodeOffscreenFreeSize(pGeode)); - return NULL; + return NULL; } memset(pGeode->FBBase + pGeode->shadowArea->offset, 0, size); @@ -482,15 +479,15 @@ lx_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) rpitch = pScrni->displayWidth * (pScrni->bitsPerPixel / 8); if (!data) - data = lx_crtc_shadow_allocate(crtc, width, height); + data = lx_crtc_shadow_allocate(crtc, width, height); rpixmap = lx_create_bo_pixmap(pScrni->pScreen, - width, height, pScrni->depth, pScrni->bitsPerPixel, rpitch, - data); + width, height, pScrni->depth, + pScrni->bitsPerPixel, rpitch, data); if (rpixmap == NULL) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Couldn't allocate shadow pixmap for rotated CRTC\n"); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't allocate shadow pixmap for rotated CRTC\n"); } return rpixmap; @@ -503,15 +500,15 @@ lx_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rpixmap, void *data) GeodeRec *pGeode = GEODEPTR(pScrni); if (rpixmap) - lx_destory_bo_pixmap(rpixmap); + lx_destory_bo_pixmap(rpixmap); /* Free shadow memory */ if (data) { - gp_wait_until_idle(); - if (pGeode->shadowArea != NULL) { - exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea); - pGeode->shadowArea = NULL; - } + gp_wait_until_idle(); + if (pGeode->shadowArea != NULL) { + exaOffscreenFree(pScrni->pScreen, pGeode->shadowArea); + pGeode->shadowArea = NULL; + } } } @@ -525,6 +522,7 @@ static void lx_crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y) { VG_PANNING_COORDINATES panning; + vg_set_cursor_position(x, y, &panning); } @@ -574,16 +572,16 @@ LXSetupCrtc(ScrnInfoPtr pScrni) crtc = xf86CrtcCreate(pScrni, &lx_crtc_funcs); if (crtc == NULL) { - ErrorF("ERROR - failed to create a CRTC\n"); - return; + ErrorF("ERROR - failed to create a CRTC\n"); + return; } lxpriv = xnfcalloc(1, sizeof(LXCrtcPrivateRec)); if (!lxpriv) { - xf86CrtcDestroy(crtc); - ErrorF("unable to allocate memory for lxpriv\n"); - return; + xf86CrtcDestroy(crtc); + ErrorF("unable to allocate memory for lxpriv\n"); + return; } crtc->driver_private = lxpriv; diff --git a/driver/xf86-video-geode/src/lx_driver.c b/driver/xf86-video-geode/src/lx_driver.c index 146d7c31c..6d7f37f60 100644 --- a/driver/xf86-video-geode/src/lx_driver.c +++ b/driver/xf86-video-geode/src/lx_driver.c @@ -76,11 +76,11 @@ unsigned char *XpressROMPtr; static Bool LXSaveScreen(ScreenPtr pScrn, int mode) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodePtr pGeode = GEODEPTR(pScrni); if (pGeode->useVGA && !pScrni->vtSema) - return vgaHWSaveScreen(pScrn, mode); + return vgaHWSaveScreen(pScrn, mode); return TRUE; } @@ -123,11 +123,11 @@ static void LXReadMSR(unsigned long addr, unsigned long *lo, unsigned long *hi) { if (GeodeReadMSR(addr, lo, hi) == -1) { - unsigned int l, h; + unsigned int l, h; - LX_MSR_READ(addr, l, h); - *lo = l; - *hi = h; + LX_MSR_READ(addr, l, h); + *lo = l; + *hi = h; } } @@ -135,7 +135,7 @@ static void LXWriteMSR(unsigned long addr, unsigned long lo, unsigned long hi) { if (GeodeWriteMSR(addr, lo, hi) == -1) - LX_MSR_WRITE(addr, lo, hi); + LX_MSR_WRITE(addr, lo, hi); } static unsigned int @@ -144,30 +144,29 @@ LXCalcPitch(ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->tryCompression) - return - GeodeCalculatePitchBytes(pScrni->virtualX, pScrni->bitsPerPixel); + return GeodeCalculatePitchBytes(pScrni->virtualX, pScrni->bitsPerPixel); else - return ((pScrni->virtualX + 3) & ~3) * (pScrni->bitsPerPixel >> 3); + return ((pScrni->virtualX + 3) & ~3) * (pScrni->bitsPerPixel >> 3); } #ifdef XSERVER_LIBPCIACCESS static inline void * map_pci_mem(ScrnInfoPtr pScrni, int vram, - struct pci_device *dev, int bar, int size) + struct pci_device *dev, int bar, int size) { void *ptr; - void **result = (void **)&ptr; + void **result = (void **) &ptr; int map_size = size ? size : dev->regions[bar].size; int err = pci_device_map_range(dev, - dev->regions[bar].base_addr, - map_size, - PCI_DEV_MAP_FLAG_WRITABLE | - (vram ? PCI_DEV_MAP_FLAG_WRITE_COMBINE : 0), - result); + dev->regions[bar].base_addr, + map_size, + PCI_DEV_MAP_FLAG_WRITABLE | + (vram ? PCI_DEV_MAP_FLAG_WRITE_COMBINE : 0), + result); if (err) - return NULL; + return NULL; return ptr; } @@ -193,41 +192,47 @@ LXMapMem(ScrnInfoPtr pScrni) tag = pciTag(pci->bus, pci->device, pci->func); - cim_gp_ptr = (unsigned char *)xf86MapPciMem(index, VIDMEM_MMIO, - tag, pci->memBase[1], LX_GP_REG_SIZE); + cim_gp_ptr = (unsigned char *) xf86MapPciMem(index, VIDMEM_MMIO, + tag, pci->memBase[1], + LX_GP_REG_SIZE); - cim_vg_ptr = (unsigned char *)xf86MapPciMem(index, VIDMEM_MMIO, - tag, pci->memBase[2], LX_VG_REG_SIZE); + cim_vg_ptr = (unsigned char *) xf86MapPciMem(index, VIDMEM_MMIO, + tag, pci->memBase[2], + LX_VG_REG_SIZE); - cim_vid_ptr = (unsigned char *)xf86MapPciMem(index, VIDMEM_MMIO, - tag, pci->memBase[3], LX_VID_REG_SIZE); + cim_vid_ptr = (unsigned char *) xf86MapPciMem(index, VIDMEM_MMIO, + tag, pci->memBase[3], + LX_VID_REG_SIZE); - cim_vip_ptr = (unsigned char *)xf86MapPciMem(index, VIDMEM_MMIO, - tag, pci->memBase[4], LX_VIP_REG_SIZE); + cim_vip_ptr = (unsigned char *) xf86MapPciMem(index, VIDMEM_MMIO, + tag, pci->memBase[4], + LX_VIP_REG_SIZE); - cim_fb_ptr = (unsigned char *)xf86MapPciMem(index, VIDMEM_FRAMEBUFFER, - tag, pci->memBase[0], pGeode->FBAvail + CIM_CMD_BFR_SZ); + cim_fb_ptr = (unsigned char *) xf86MapPciMem(index, VIDMEM_FRAMEBUFFER, + tag, pci->memBase[0], + pGeode->FBAvail + + CIM_CMD_BFR_SZ); #else cim_gp_ptr = map_pci_mem(pScrni, 0, pci, 1, LX_GP_REG_SIZE); cim_vg_ptr = map_pci_mem(pScrni, 0, pci, 2, LX_VG_REG_SIZE); cim_vid_ptr = map_pci_mem(pScrni, 0, pci, 3, LX_VID_REG_SIZE); cim_vip_ptr = map_pci_mem(pScrni, 0, pci, 4, LX_VIP_REG_SIZE); cim_fb_ptr = - map_pci_mem(pScrni, 1, pci, 0, pGeode->FBAvail + CIM_CMD_BFR_SZ); + map_pci_mem(pScrni, 1, pci, 0, pGeode->FBAvail + CIM_CMD_BFR_SZ); #endif if (pScrni->memPhysBase == 0) - pScrni->memPhysBase = PCI_REGION_BASE(pci, 0, REGION_MEM); + pScrni->memPhysBase = PCI_REGION_BASE(pci, 0, REGION_MEM); cmd_bfr_phys = PCI_REGION_BASE(pci, 0, REGION_MEM) + pGeode->CmdBfrOffset; cim_cmd_base_ptr = cim_fb_ptr + pGeode->CmdBfrOffset; if (!cim_gp_ptr || !cim_vg_ptr || !cim_vid_ptr || !cim_fb_ptr || - !cim_vip_ptr) - return FALSE; + !cim_vip_ptr) + return FALSE; gp_set_frame_buffer_base(PCI_REGION_BASE(pci, 0, REGION_MEM), - pGeode->FBAvail); + pGeode->FBAvail); gp_set_command_buffer_base(cmd_bfr_phys, 0, pGeode->CmdBfrSize); XpressROMPtr = xf86MapVidMem(index, VIDMEM_FRAMEBUFFER, 0xF0000, 0x10000); @@ -235,10 +240,10 @@ LXMapMem(ScrnInfoPtr pScrni) pGeode->FBBase = cim_fb_ptr; if (!pGeode->NoAccel) - pGeode->pExa->memoryBase = pGeode->FBBase; + pGeode->pExa->memoryBase = pGeode->FBBase; xf86DrvMsg(index, X_INFO, "Geode LX video memory %x bytes at %p\n", - pGeode->FBAvail, pGeode->FBBase); + pGeode->FBAvail, pGeode->FBBase); return TRUE; } @@ -256,11 +261,11 @@ LXCheckVGA(ScrnInfoPtr pScrni) int ret; ptr = - xf86MapVidMem(pScrni->scrnIndex, VIDMEM_FRAMEBUFFER, 0xC001E, - strlen(vgasig)); + xf86MapVidMem(pScrni->scrnIndex, VIDMEM_FRAMEBUFFER, 0xC001E, + strlen(vgasig)); if (ptr == NULL) - return FALSE; + return FALSE; ret = memcmp(ptr, vgasig, strlen(vgasig)); xf86UnMapVidMem(pScrni->scrnIndex, (pointer) ptr, strlen(vgasig)); @@ -288,34 +293,34 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) char *s; if (pScrni->numEntities != 1) - return FALSE; + return FALSE; pEnt = xf86GetEntityInfo(pScrni->entityList[0]); #ifndef XSERVER_LIBPCIACCESS if (pEnt->resources) - return FALSE; + return FALSE; #endif if (flags & PROBE_DETECT) { - GeodeProbeDDC(pScrni, pEnt->index); - return TRUE; + GeodeProbeDDC(pScrni, pEnt->index); + return TRUE; } pGeode = pScrni->driverPrivate = xnfcalloc(1, sizeof(GeodeRec)); if (pGeode == NULL) - return FALSE; + return FALSE; pGeode->useVGA = LXCheckVGA(pScrni); pGeode->VGAActive = FALSE; pGeode->pEnt = pEnt; if (pGeode->useVGA) { - if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) - pGeode->useVGA = FALSE; - else - vgaHWSetStdFuncs(VGAHWPTR(pScrni)); + if (!xf86LoadSubModule(pScrni, "vgahw") || !vgaHWGetHWRec(pScrni)) + pGeode->useVGA = FALSE; + else + vgaHWSetStdFuncs(VGAHWPTR(pScrni)); - pGeode->vesa = calloc(1, sizeof(VESARec)); + pGeode->vesa = calloc(1, sizeof(VESARec)); } cim_rdmsr = LXReadMSR; @@ -334,39 +339,40 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) pScrni->monitor = pScrni->confScreen->monitor; if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb)) - return FALSE; + return FALSE; switch (pScrni->depth) { case 8: - pScrni->rgbBits = 8; + pScrni->rgbBits = 8; case 16: case 24: case 32: - break; + break; default: - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "The driver does not support %d as a depth.\n", pScrni->depth); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "The driver does not support %d as a depth.\n", + pScrni->depth); + return FALSE; } xf86PrintDepthBpp(pScrni); if (!xf86SetWeight(pScrni, defaultWeight, defaultWeight)) - return FALSE; + return FALSE; if (!xf86SetDefaultVisual(pScrni, -1)) - return FALSE; + return FALSE; /* * If the driver can do gamma correction, it should call xf86SetGamma() * here. */ { - Gamma zeros = { 0.0, 0.0, 0.0 }; + Gamma zeros = { 0.0, 0.0, 0.0 }; - if (!xf86SetGamma(pScrni, zeros)) { - return FALSE; - } + if (!xf86SetGamma(pScrni, zeros)) { + return FALSE; + } } pScrni->progClock = TRUE; @@ -383,59 +389,57 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) #if (EXA_VERSION_MAJOR < 2) pGeode->NoAccel = TRUE; xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "*** This driver was compiled with EXA version %d\n"); + "*** This driver was compiled with EXA version %d\n"); xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "*** we need version 2 or greater\n"); + "*** we need version 2 or greater\n"); xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "*** All accelerations are being turned off.\n"); + "*** All accelerations are being turned off.\n"); #else pGeode->NoAccel = FALSE; #endif pGeode->exaBfrSz = DEFAULT_EXA_SCRATCH_BFRSZ; - xf86GetOptValBool(GeodeOptions, LX_OPTION_HW_CURSOR, - &pGeode->tryHWCursor); + xf86GetOptValBool(GeodeOptions, LX_OPTION_HW_CURSOR, &pGeode->tryHWCursor); if (!xf86GetOptValInteger(GeodeOptions, LX_OPTION_FBSIZE, - (int *)&(pGeode->FBAvail))) - pGeode->FBAvail = 0; + (int *) &(pGeode->FBAvail))) + pGeode->FBAvail = 0; /* For compatability - allow SWCursor too */ if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_SW_CURSOR, FALSE)) - pGeode->tryHWCursor = FALSE; + pGeode->tryHWCursor = FALSE; if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_NOCOMPRESSION, FALSE)) - pGeode->tryCompression = FALSE; + pGeode->tryCompression = FALSE; if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_NOACCEL, FALSE)) - pGeode->NoAccel = TRUE; + pGeode->NoAccel = TRUE; pGeode->rotation = RR_Rotate_0; if ((s = xf86GetOptValString(GeodeOptions, LX_OPTION_ROTATE))) { - if (!xf86NameCmp(s, "LEFT")) - pGeode->rotation = RR_Rotate_90; - else if (!xf86NameCmp(s, "INVERT")) - pGeode->rotation = RR_Rotate_180; - else if (!xf86NameCmp(s, "CCW")) - pGeode->rotation = RR_Rotate_270; - else - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Invalid rotation %s.\n", s); + if (!xf86NameCmp(s, "LEFT")) + pGeode->rotation = RR_Rotate_90; + else if (!xf86NameCmp(s, "INVERT")) + pGeode->rotation = RR_Rotate_180; + else if (!xf86NameCmp(s, "CCW")) + pGeode->rotation = RR_Rotate_270; + else + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "Invalid rotation %s.\n", s); } xf86GetOptValInteger(GeodeOptions, LX_OPTION_EXA_SCRATCH_BFRSZ, - (int *)&(pGeode->exaBfrSz)); + (int *) &(pGeode->exaBfrSz)); if (pGeode->exaBfrSz <= 0) - pGeode->exaBfrSz = 0; + pGeode->exaBfrSz = 0; if (pGeode->Output & OUTPUT_PANEL) { - if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_NOPANEL, FALSE)) - pGeode->Output &= ~OUTPUT_PANEL; + if (xf86ReturnOptValBool(GeodeOptions, LX_OPTION_NOPANEL, FALSE)) + pGeode->Output &= ~OUTPUT_PANEL; } /* Panel detection code - @@ -446,53 +450,54 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) */ if (dcon_init(pScrni)) { - pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON; - } else if (pGeode->Output & OUTPUT_PANEL) { - char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); + pGeode->Output = OUTPUT_PANEL | OUTPUT_DCON; + } + else if (pGeode->Output & OUTPUT_PANEL) { + char *pmode = xf86GetOptValString(GeodeOptions, LX_OPTION_PANEL_MODE); - if (pmode != NULL) - pGeode->panelMode = LXGetManualPanelMode(pmode); + if (pmode != NULL) + pGeode->panelMode = LXGetManualPanelMode(pmode); - if (pGeode->panelMode == NULL) - pGeode->panelMode = LXGetLegacyPanelMode(pScrni); + if (pGeode->panelMode == NULL) + pGeode->panelMode = LXGetLegacyPanelMode(pScrni); - if (pGeode->panelMode == NULL) - pGeode->Output &= ~OUTPUT_PANEL; + if (pGeode->panelMode == NULL) + pGeode->Output &= ~OUTPUT_PANEL; } /* Default to turn scaling on for panels */ if (pGeode->Output & OUTPUT_PANEL) - pGeode->Scale = TRUE; + pGeode->Scale = TRUE; xf86DrvMsg(pScrni->scrnIndex, X_INFO, "LX output options:\n"); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " CRT: %s\n", - pGeode->Output & OUTPUT_CRT ? "YES" : "NO"); + pGeode->Output & OUTPUT_CRT ? "YES" : "NO"); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " PANEL: %s\n", - pGeode->Output & OUTPUT_PANEL ? "YES" : "NO"); + pGeode->Output & OUTPUT_PANEL ? "YES" : "NO"); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " DCON: %s\n", - pGeode->Output & OUTPUT_DCON ? "YES" : "NO"); + pGeode->Output & OUTPUT_DCON ? "YES" : "NO"); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " VGA: %s\n", - pGeode->useVGA ? "YES" : "NO"); + pGeode->useVGA ? "YES" : "NO"); /* Set up VGA */ if (pGeode->useVGA) { - VESARec *pVesa; + VESARec *pVesa; - if (!xf86LoadSubModule(pScrni, "int10")) - return FALSE; + if (!xf86LoadSubModule(pScrni, "int10")) + return FALSE; - pVesa = pGeode->vesa; + pVesa = pGeode->vesa; - if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Unable to initialize 1NT10 support\n"); - pGeode->useVGA = FALSE; - } + if ((pVesa->pInt = xf86InitInt10(pGeode->pEnt->index)) == NULL) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Unable to initialize 1NT10 support\n"); + pGeode->useVGA = FALSE; + } } /* Read the amount of framebuffer memory */ @@ -501,36 +506,36 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) */ if (pGeode->FBAvail == 0) { - if (GeodeGetSizeFromFB(&pGeode->FBAvail)) { - unsigned long value; + if (GeodeGetSizeFromFB(&pGeode->FBAvail)) { + unsigned long value; - cim_outw(0xAC1C, 0xFC53); - cim_outw(0xAC1C, 0x0200); + cim_outw(0xAC1C, 0xFC53); + cim_outw(0xAC1C, 0x0200); - value = (unsigned long)(cim_inw(0xAC1E)) & 0xFE; - pGeode->FBAvail = value << 20; - } + value = (unsigned long) (cim_inw(0xAC1E)) & 0xFE; + pGeode->FBAvail = value << 20; + } } pScrni->fbOffset = 0; if (pGeode->pEnt->device->videoRam == 0) - pScrni->videoRam = pGeode->FBAvail / 1024; + pScrni->videoRam = pGeode->FBAvail / 1024; else { - pScrni->videoRam = pGeode->pEnt->device->videoRam; - pGeode->FBAvail = pScrni->videoRam << 10; + pScrni->videoRam = pGeode->pEnt->device->videoRam; + pGeode->FBAvail = pScrni->videoRam << 10; } /* If we have <= 16Mb of memory then compression is going to hurt - so warn and disable */ - if (pGeode->tryCompression && - pGeode->FBAvail <= 0x1000000) { - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "%x bytes of video memory is less then optimal\n", pGeode->FBAvail); - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - "when compression is on. Disabling compression.\n"); - pGeode->tryCompression = FALSE; + if (pGeode->tryCompression && pGeode->FBAvail <= 0x1000000) { + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + "%x bytes of video memory is less then optimal\n", + pGeode->FBAvail); + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + "when compression is on. Disabling compression.\n"); + pGeode->tryCompression = FALSE; } /* Carve out some memory for the command buffer */ @@ -552,8 +557,8 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) LXSetupOutput(pScrni); if (!xf86InitialConfiguration(pScrni, FALSE)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes.\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "No valid modes.\n"); + return FALSE; } xf86PrintModes(pScrni); @@ -567,18 +572,18 @@ LXPreInit(ScrnInfoPtr pScrni, int flags) /* Load the modules we'll need */ if (xf86LoadSubModule(pScrni, "fb") == NULL) { - return FALSE; + return FALSE; } if (!pGeode->NoAccel) { - if (!xf86LoadSubModule(pScrni, "exa")) - return FALSE; + if (!xf86LoadSubModule(pScrni, "exa")) + return FALSE; } #ifndef XSERVER_LIBPCIACCESS if (xf86RegisterResources(pGeode->pEnt->index, NULL, ResExclusive)) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Couldn't register the resources.\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't register the resources.\n"); + return FALSE; } #endif return TRUE; @@ -590,11 +595,11 @@ LXRestore(ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (pGeode->useVGA) { - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - vgaHWProtect(pScrni, TRUE); - vgaHWRestore(pScrni, &pvgaHW->SavedReg, VGA_SR_ALL); - vgaHWProtect(pScrni, FALSE); + vgaHWProtect(pScrni, TRUE); + vgaHWRestore(pScrni, &pvgaHW->SavedReg, VGA_SR_ALL); + vgaHWProtect(pScrni, FALSE); } } @@ -604,10 +609,8 @@ LXUnmapMem(ScrnInfoPtr pScrni) #ifndef XSERVER_LIBPCIACCESS xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_gp_ptr, LX_GP_REG_SIZE); xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vg_ptr, LX_VG_REG_SIZE); - xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vid_ptr, - LX_VID_REG_SIZE); - xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vip_ptr, - LX_VIP_REG_SIZE); + xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vid_ptr, LX_VID_REG_SIZE); + xf86UnMapVidMem(pScrni->scrnIndex, (pointer) cim_vip_ptr, LX_VIP_REG_SIZE); #else GeodeRec *pGeode = GEODEPTR(pScrni); pciVideoPtr pci = xf86GetPciInfoForEntity(pGeode->pEnt->index); @@ -627,9 +630,9 @@ LXUnmapMem(ScrnInfoPtr pScrni) /* These should be correctly accounted for rotation */ void -LXAdjustFrame(int scrnIndex, int x, int y, int flags) +LXAdjustFrame(ADJUST_FRAME_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); unsigned long offset; @@ -641,9 +644,9 @@ LXAdjustFrame(int scrnIndex, int x, int y, int flags) } static Bool -LXSwitchMode(int index, DisplayModePtr pMode, int flags) +LXSwitchMode(SWITCH_MODE_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[index]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); /* Set the new mode */ @@ -659,14 +662,14 @@ LXLeaveGraphics(ScrnInfoPtr pScrni) gp_wait_until_idle(); vg_set_custom_mode(&(pGeode->FBcimdisplaytiming.vgDisplayMode), - pGeode->FBcimdisplaytiming.wBpp); + pGeode->FBcimdisplaytiming.wBpp); vg_set_compression_enable(0); /* Restore the previous Compression state */ if (pGeode->FBCompressionEnable) { - vg_configure_compression(&(pGeode->FBCBData)); - vg_set_compression_enable(1); + vg_configure_compression(&(pGeode->FBCBData)); + vg_set_compression_enable(1); } vg_set_display_pitch(pGeode->FBcimdisplaytiming.wPitch); @@ -674,34 +677,34 @@ LXLeaveGraphics(ScrnInfoPtr pScrni) /* Restore Cursor */ vg_set_cursor_position(pGeode->FBCursor.cursor_x, - pGeode->FBCursor.cursor_y, &panning); + pGeode->FBCursor.cursor_y, &panning); LXRestore(pScrni); if (pGeode->useVGA && pGeode->VGAActive) { - pGeode->vesa->pInt->num = 0x10; - pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode; - pGeode->vesa->pInt->bx = 0; - xf86ExecX86int10(pGeode->vesa->pInt); - vg_delay_milliseconds(3); + pGeode->vesa->pInt->num = 0x10; + pGeode->vesa->pInt->ax = 0x0 | pGeode->FBBIOSMode; + pGeode->vesa->pInt->bx = 0; + xf86ExecX86int10(pGeode->vesa->pInt); + vg_delay_milliseconds(3); } pScrni->vtSema = FALSE; } static Bool -LXCloseScreen(int scrnIndex, ScreenPtr pScrn) +LXCloseScreen(CLOSE_SCREEN_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); if (pScrni->vtSema) - LXLeaveGraphics(pScrni); + LXLeaveGraphics(pScrni); if (pGeode->pExa) { - exaDriverFini(pScrn); - free(pGeode->pExa); - pGeode->pExa = NULL; + exaDriverFini(pScrn); + free(pGeode->pExa); + pGeode->pExa = NULL; } /* Unmap the offscreen allocations */ @@ -710,13 +713,13 @@ LXCloseScreen(int scrnIndex, ScreenPtr pScrn) LXUnmapMem(pScrni); if (pGeode->useVGA) - vgaHWUnmapMem(pScrni); + vgaHWUnmapMem(pScrni); pScrni->PointerMoved = pGeode->PointerMoved; pScrn->CloseScreen = pGeode->CloseScreen; if (pScrn->CloseScreen) - return (*pScrn->CloseScreen) (scrnIndex, pScrn); + return (*pScrn->CloseScreen) (CLOSE_SCREEN_ARGS); return TRUE; } @@ -732,7 +735,7 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) gp_wait_until_idle(); vg_get_current_display_mode(&pGeode->FBcimdisplaytiming.vgDisplayMode, - &bpp); + &bpp); pGeode->FBcimdisplaytiming.wBpp = bpp; pGeode->FBcimdisplaytiming.wPitch = vg_get_display_pitch(); @@ -740,9 +743,9 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) pGeode->FBDisplayOffset = vg_get_display_offset(); if (pGeode->useVGA && pGeode->VGAActive) { - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040); + pGeode->FBBIOSMode = pvgaHW->readCrtc(pvgaHW, 0x040); } pGeode->FBCompressionEnable = vg_get_compression_enable(); @@ -754,33 +757,33 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) /* Turn off the VGA */ if (pGeode->useVGA) { - unsigned short sequencer; - vgaHWPtr pvgaHW = VGAHWPTR(pScrni); + unsigned short sequencer; + vgaHWPtr pvgaHW = VGAHWPTR(pScrni); - /* Unlock VGA registers */ - vgaHWUnlock(pvgaHW); + /* Unlock VGA registers */ + vgaHWUnlock(pvgaHW); - /* Save the current state and setup the current mode */ - vgaHWSave(pScrni, &VGAHWPTR(pScrni)->SavedReg, VGA_SR_ALL); + /* Save the current state and setup the current mode */ + vgaHWSave(pScrni, &VGAHWPTR(pScrni)->SavedReg, VGA_SR_ALL); - /* DISABLE VGA SEQUENCER */ - /* This allows the VGA state machine to terminate. We must delay */ - /* such that there are no pending MBUS requests. */ + /* DISABLE VGA SEQUENCER */ + /* This allows the VGA state machine to terminate. We must delay */ + /* such that there are no pending MBUS requests. */ - cim_outb(DC3_SEQUENCER_INDEX, DC3_SEQUENCER_CLK_MODE); - sequencer = cim_inb(DC3_SEQUENCER_DATA); - sequencer |= DC3_CLK_MODE_SCREEN_OFF; - cim_outb(DC3_SEQUENCER_DATA, sequencer); + cim_outb(DC3_SEQUENCER_INDEX, DC3_SEQUENCER_CLK_MODE); + sequencer = cim_inb(DC3_SEQUENCER_DATA); + sequencer |= DC3_CLK_MODE_SCREEN_OFF; + cim_outb(DC3_SEQUENCER_DATA, sequencer); - vg_delay_milliseconds(1); + vg_delay_milliseconds(1); - /* BLANK THE VGA DISPLAY */ - cim_outw(DC3_SEQUENCER_INDEX, DC3_SEQUENCER_RESET); - sequencer = cim_inb(DC3_SEQUENCER_DATA); - sequencer &= ~DC3_RESET_VGA_DISP_ENABLE; - cim_outb(DC3_SEQUENCER_DATA, sequencer); + /* BLANK THE VGA DISPLAY */ + cim_outw(DC3_SEQUENCER_INDEX, DC3_SEQUENCER_RESET); + sequencer = cim_inb(DC3_SEQUENCER_DATA); + sequencer &= ~DC3_RESET_VGA_DISP_ENABLE; + cim_outb(DC3_SEQUENCER_DATA, sequencer); - vg_delay_milliseconds(1); + vg_delay_milliseconds(1); } /* Clear the framebuffer */ @@ -788,7 +791,7 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) /* Set the modes */ if (!xf86SetDesiredModes(pScrni)) - return FALSE; + return FALSE; pScrni->vtSema = TRUE; @@ -797,24 +800,24 @@ LXEnterGraphics(ScreenPtr pScrn, ScrnInfoPtr pScrni) static void LXLoadPalette(ScrnInfoPtr pScrni, - int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) + int numColors, int *indizes, LOCO * colors, VisualPtr pVisual) { int i, index, color; for (i = 0; i < numColors; i++) { - index = indizes[i] & 0xFF; - color = (((unsigned long)(colors[index].red & 0xFF)) << 16) | - (((unsigned long)(colors[index].green & 0xFF)) << 8) | - ((unsigned long)(colors[index].blue & 0xFF)); + index = indizes[i] & 0xFF; + color = (((unsigned long) (colors[index].red & 0xFF)) << 16) | + (((unsigned long) (colors[index].green & 0xFF)) << 8) | + ((unsigned long) (colors[index].blue & 0xFF)); - vg_set_display_palette_entry(index, color); + vg_set_display_palette_entry(index, color); } } static Bool -LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) +LXScreenInit(SCREEN_INIT_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); int ret; unsigned int dwidth; @@ -825,65 +828,68 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) if (pGeode->useVGA) { - if (!vgaHWMapMem(pScrni)) - return FALSE; + if (!vgaHWMapMem(pScrni)) + return FALSE; - vgaHWGetIOBase(VGAHWPTR(pScrni)); + vgaHWGetIOBase(VGAHWPTR(pScrni)); } if (!pGeode->NoAccel) { - pGeode->pExa = exaDriverAlloc(); + pGeode->pExa = exaDriverAlloc(); - if (pGeode->pExa) { + if (pGeode->pExa) { - pGeode->pExa->memoryBase = 0; - pGeode->pExa->memorySize = 0; + pGeode->pExa->memoryBase = 0; + pGeode->pExa->memorySize = 0; - pGeode->pExa->pixmapOffsetAlign = 32; - pGeode->pExa->pixmapPitchAlign = 32; - pGeode->pExa->flags = EXA_OFFSCREEN_PIXMAPS; - pGeode->pExa->maxX = LX_MAX_WIDTH - 1; - pGeode->pExa->maxY = LX_MAX_HEIGHT - 1; - } else { - xf86DrvMsg(scrnIndex, X_ERROR, - "Couldn't allocate the EXA structure.\n"); - pGeode->NoAccel = TRUE; - } + pGeode->pExa->pixmapOffsetAlign = 32; + pGeode->pExa->pixmapPitchAlign = 32; + pGeode->pExa->flags = EXA_OFFSCREEN_PIXMAPS; + pGeode->pExa->maxX = LX_MAX_WIDTH - 1; + pGeode->pExa->maxY = LX_MAX_HEIGHT - 1; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Couldn't allocate the EXA structure.\n"); + pGeode->NoAccel = TRUE; + } } /* Map the memory here before doing anything else */ if (!LXMapMem(pScrni)) - return FALSE; + return FALSE; LXInitOffscreen(pScrni); /* XXX FIXME - Take down any of the structures on failure? */ if (!LXEnterGraphics(pScrn, pScrni)) - return FALSE; + return FALSE; miClearVisualTypes(); /* XXX Again - take down anything? */ if (pScrni->bitsPerPixel > 8) { - if (!miSetVisualTypes(pScrni->depth, - TrueColorMask, pScrni->rgbBits, pScrni->defaultVisual)) { - return FALSE; - } - } else { - if (!miSetVisualTypes(pScrni->depth, - miGetDefaultVisualMask(pScrni->depth), - pScrni->rgbBits, pScrni->defaultVisual)) { - return FALSE; - } + if (!miSetVisualTypes(pScrni->depth, + TrueColorMask, pScrni->rgbBits, + pScrni->defaultVisual)) { + return FALSE; + } + } + else { + if (!miSetVisualTypes(pScrni->depth, + miGetDefaultVisualMask(pScrni->depth), + pScrni->rgbBits, pScrni->defaultVisual)) { + return FALSE; + } } miSetPixmapDepths(); if (pScrni->virtualX > pScrni->displayWidth) - pScrni->displayWidth = pScrni->virtualX; + pScrni->displayWidth = pScrni->virtualX; /* Point at the visible area to start */ @@ -895,35 +901,36 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) dwidth = pGeode->Pitch / ((pScrni->bitsPerPixel + 7) / 8); ret = fbScreenInit(pScrn, pGeode->FBBase, - pScrni->virtualX, pScrni->virtualY, - pScrni->xDpi, pScrni->yDpi, dwidth, pScrni->bitsPerPixel); + pScrni->virtualX, pScrni->virtualY, + pScrni->xDpi, pScrni->yDpi, dwidth, + pScrni->bitsPerPixel); if (!ret) - return FALSE; + return FALSE; xf86SetBlackWhitePixels(pScrn); /* Set up the color ordering */ if (pScrni->bitsPerPixel > 8) { - VisualPtr visual = pScrn->visuals + pScrn->numVisuals; - - while (--visual >= pScrn->visuals) { - if ((visual->class | DynamicClass) == DirectColor) { - visual->offsetRed = pScrni->offset.red; - visual->offsetGreen = pScrni->offset.green; - visual->offsetBlue = pScrni->offset.blue; - visual->redMask = pScrni->mask.red; - visual->greenMask = pScrni->mask.green; - visual->blueMask = pScrni->mask.blue; - } - } + VisualPtr visual = pScrn->visuals + pScrn->numVisuals; + + while (--visual >= pScrn->visuals) { + if ((visual->class | DynamicClass) == DirectColor) { + visual->offsetRed = pScrni->offset.red; + visual->offsetGreen = pScrni->offset.green; + visual->offsetBlue = pScrni->offset.blue; + visual->redMask = pScrni->mask.red; + visual->greenMask = pScrni->mask.green; + visual->blueMask = pScrni->mask.blue; + } + } } /* Must follow the color ordering */ fbPictureInit(pScrn, 0, 0); if (!pGeode->NoAccel) - pGeode->NoAccel = LXExaInit(pScrn) ? FALSE : TRUE; + pGeode->NoAccel = LXExaInit(pScrn) ? FALSE : TRUE; miInitializeBackingStore(pScrn); xf86SetBackingStore(pScrn); @@ -934,24 +941,25 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) /* Set up the HW cursor - must follow the soft cursor init */ if (pGeode->tryHWCursor) { - if (!LXCursorInit(pScrn)) - xf86DrvMsg(scrnIndex, X_ERROR, - "Hardware cursor initialization failed.\n"); + if (!LXCursorInit(pScrn)) + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Hardware cursor initialization failed.\n"); } /* Set up the color map */ if (!miCreateDefColormap(pScrn)) - return FALSE; + return FALSE; if (pScrni->bitsPerPixel == 8) { - /* Must follow initialization of the default colormap */ - - if (!xf86HandleColormaps(pScrn, 256, 8, - LXLoadPalette, NULL, - CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH)) { - return FALSE; - } + /* Must follow initialization of the default colormap */ + + if (!xf86HandleColormaps(pScrn, 256, 8, + LXLoadPalette, NULL, + CMAP_PALETTED_TRUECOLOR | + CMAP_RELOAD_ON_MODE_SWITCH)) { + return FALSE; + } } xf86DPMSInit(pScrn, xf86DPMSSet, 0); @@ -965,12 +973,12 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) pScrn->SaveScreen = LXSaveScreen; if (!xf86CrtcScreenInit(pScrn)) { - xf86DrvMsg(scrnIndex, X_ERROR, "CRTCScreenInit failed.\n"); - return FALSE; + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, "CRTCScreenInit failed.\n"); + return FALSE; } if (serverGeneration == 1) - xf86ShowUnusedOptions(pScrni->scrnIndex, pScrni->options); + xf86ShowUnusedOptions(pScrni->scrnIndex, pScrni->options); pGeode->starting = FALSE; @@ -978,21 +986,22 @@ LXScreenInit(int scrnIndex, ScreenPtr pScrn, int argc, char **argv) } static int -LXValidMode(int scrnIndex, DisplayModePtr pMode, Bool Verbose, int flags) +LXValidMode(VALID_MODE_ARGS_DECL) { return MODE_OK; } static Bool -LXEnterVT(int scrnIndex, int flags) +LXEnterVT(VT_FUNC_ARGS_DECL) { - return LXEnterGraphics(NULL, xf86Screens[scrnIndex]); + SCRN_INFO_PTR(arg); + return LXEnterGraphics(NULL, pScrni); } static void -LXLeaveVT(int scrnIndex, int flags) +LXLeaveVT(VT_FUNC_ARGS_DECL) { - ScrnInfoPtr pScrni = xf86Screens[scrnIndex]; + SCRN_INFO_PTR(arg); GeodeRec *pGeode = GEODEPTR(pScrni); pGeode->PrevDisplayOffset = vg_get_display_offset(); diff --git a/driver/xf86-video-geode/src/lx_exa.c b/driver/xf86-video-geode/src/lx_exa.c index ef90d6b17..60edd1b30 100644 --- a/driver/xf86-video-geode/src/lx_exa.c +++ b/driver/xf86-video-geode/src/lx_exa.c @@ -61,8 +61,7 @@ do { \ #define GEODE_FALLBACK(x) return FALSE #endif -static const struct exa_format_t -{ +static const struct exa_format_t { int exa; int bpp; int fmt; @@ -89,15 +88,13 @@ static const struct exa_format_t #define COMP_TYPE_TWOPASS 3 #define COMP_TYPE_ROTATE 5 -static struct -{ +static struct { int type; unsigned int srcOffset; unsigned int srcPitch; unsigned int srcBpp; unsigned int srcWidth, srcHeight; - PixmapPtr srcPixmap; unsigned int srcColor; int op; @@ -135,10 +132,10 @@ static int lx_fill_flags(int x0, int y0, int w, int h, int rop) { int x1 = x0 + w, y1 = y0 + h; - int n = ((rop ^ (rop >> 1)) & 0x55) == 0 || /* no dst */ - x0 >= lx1 || y0 >= ly1 || /* rght/below */ - x1 <= lx0 || y1 <= ly0 ? /* left/above */ - 0 : CIMGP_BLTFLAGS_HAZARD; + int n = ((rop ^ (rop >> 1)) & 0x55) == 0 || /* no dst */ + x0 >= lx1 || y0 >= ly1 || /* rght/below */ + x1 <= lx0 || y1 <= ly0 ? /* left/above */ + 0 : CIMGP_BLTFLAGS_HAZARD; lx0 = x0; ly0 = y0; @@ -155,11 +152,11 @@ lx_copy_flags(int x0, int y0, int x1, int y1, int w, int h, int rop) /* dst not hazzard and src not hazzard */ int n = (((rop ^ (rop >> 1)) & 0x55) == 0 || - x1 >= lx1 || y1 >= ly1 || - x2 <= lx0 || y2 <= ly0) && - (((rop ^ (rop >> 2)) & 0x33) == 0 || - x0 >= lx1 || y0 >= ly1 || - x0 + w <= lx0 || y0 + h <= ly0) ? 0 : CIMGP_BLTFLAGS_HAZARD; + x1 >= lx1 || y1 >= ly1 || + x2 <= lx0 || y2 <= ly0) && + (((rop ^ (rop >> 2)) & 0x33) == 0 || + x0 >= lx1 || y0 >= ly1 || + x0 + w <= lx0 || y0 + h <= ly0) ? 0 : CIMGP_BLTFLAGS_HAZARD; lx0 = x1; ly0 = y1; @@ -176,8 +173,9 @@ lx_copy_flags(int x0, int y0, int x1, int y1, int w, int h, int rop) /* exaGetPixelFromRGBA (exa_render.c) */ static Bool -_GetPixelFromRGBA(CARD32 * pixel, - CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, CARD32 format) +_GetPixelFromRGBA(CARD32 *pixel, + CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, + CARD32 format) { int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; @@ -185,7 +183,7 @@ _GetPixelFromRGBA(CARD32 * pixel, *pixel = 0; if (!PICT_FORMAT_COLOR(format)) - return FALSE; + return FALSE; rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); @@ -193,15 +191,16 @@ _GetPixelFromRGBA(CARD32 * pixel, abits = PICT_FORMAT_A(format); if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { - bshift = 0; - gshift = bbits; - rshift = gshift + gbits; - ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ - rshift = 0; - gshift = rbits; - bshift = gshift + gbits; - ashift = bshift + bbits; + bshift = 0; + gshift = bbits; + rshift = gshift + gbits; + ashift = rshift + rbits; + } + else { /* PICT_TYPE_ABGR */ + rshift = 0; + gshift = rbits; + bshift = gshift + gbits; + ashift = bshift + bbits; } *pixel |= (blue >> (16 - bbits)) << bshift; @@ -216,14 +215,14 @@ _GetPixelFromRGBA(CARD32 * pixel, static Bool _GetRGBAFromPixel(CARD32 pixel, - CARD16 * red, - CARD16 * green, CARD16 * blue, CARD16 * alpha, CARD32 format) + CARD16 *red, + CARD16 *green, CARD16 *blue, CARD16 *alpha, CARD32 format) { int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; if (!PICT_FORMAT_COLOR(format)) - return FALSE; + return FALSE; rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); @@ -231,43 +230,45 @@ _GetRGBAFromPixel(CARD32 pixel, abits = PICT_FORMAT_A(format); if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { - bshift = 0; - gshift = bbits; - rshift = gshift + gbits; - ashift = rshift + rbits; - } else { /* PICT_TYPE_ABGR */ - rshift = 0; - gshift = rbits; - bshift = gshift + gbits; - ashift = bshift + bbits; + bshift = 0; + gshift = bbits; + rshift = gshift + gbits; + ashift = rshift + rbits; + } + else { /* PICT_TYPE_ABGR */ + rshift = 0; + gshift = rbits; + bshift = gshift + gbits; + ashift = bshift + bbits; } *red = ((pixel >> rshift) & ((1 << rbits) - 1)) << (16 - rbits); while (rbits < 16) { - *red |= *red >> rbits; - rbits <<= 1; + *red |= *red >> rbits; + rbits <<= 1; } *green = ((pixel >> gshift) & ((1 << gbits) - 1)) << (16 - gbits); while (gbits < 16) { - *green |= *green >> gbits; - gbits <<= 1; + *green |= *green >> gbits; + gbits <<= 1; } *blue = ((pixel >> bshift) & ((1 << bbits) - 1)) << (16 - bbits); while (bbits < 16) { - *blue |= *blue >> bbits; - bbits <<= 1; + *blue |= *blue >> bbits; + bbits <<= 1; } if (abits) { - *alpha = ((pixel >> ashift) & ((1 << abits) - 1)) << (16 - abits); - while (abits < 16) { - *alpha |= *alpha >> abits; - abits <<= 1; - } - } else - *alpha = 0xffff; + *alpha = ((pixel >> ashift) & ((1 << abits) - 1)) << (16 - abits); + while (abits < 16) { + *alpha |= *alpha >> abits; + abits <<= 1; + } + } + else + *alpha = 0xffff; return TRUE; } @@ -283,6 +284,7 @@ lx_get_source_color(PixmapPtr pSrc, int srcFormat, int dstFormat) * exaGetPixmapFirstPixel, so this should be adjusted so * the stall isn't run needlessly */ + /* FIXME: xserver-1.4 with a supposed fix for this is really old, so kill the stall? */ gp_wait_until_idle(); in = exaGetPixmapFirstPixel(pSrc); @@ -305,7 +307,7 @@ lx_prepare_solid(PixmapPtr pxMap, int alu, Pixel planemask, Pixel fg) gp_set_raster_operation(op); if (planemask != ~0U) - gp_set_solid_pattern(planemask); + gp_set_solid_pattern(planemask); exaScratch.op = op; @@ -321,8 +323,7 @@ lx_do_solid(PixmapPtr pxMap, int x1, int y1, int x2, int y2) { int bpp = (pxMap->drawable.bitsPerPixel + 7) / 8; int pitch = exaGetPixmapPitch(pxMap); - unsigned int offset = - exaGetPixmapOffset(pxMap) + (pitch * y1) + (bpp * x1); + unsigned int offset = exaGetPixmapOffset(pxMap) + (pitch * y1) + (bpp * x1); gp_declare_blt(lx_fill_flags(x1, y1, x2 - x1, y2 - y1, exaScratch.op)); gp_pattern_fill(offset, x2 - x1, y2 - y1); @@ -330,7 +331,7 @@ lx_do_solid(PixmapPtr pxMap, int x1, int y1, int x2, int y2) static Bool lx_prepare_copy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, - int alu, Pixel planemask) + int alu, Pixel planemask) { int dpitch = exaGetPixmapPitch(pxDst); int op = (planemask == ~0U) ? SDfn[alu] : SDfn_PM[alu]; @@ -341,7 +342,7 @@ lx_prepare_copy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, gp_set_raster_operation(op); if (planemask != ~0U) - gp_set_solid_pattern(planemask); + gp_set_solid_pattern(planemask); exaScratch.srcOffset = exaGetPixmapOffset(pxSrc); exaScratch.srcPitch = exaGetPixmapPitch(pxSrc); @@ -356,27 +357,25 @@ lx_prepare_copy(PixmapPtr pxSrc, PixmapPtr pxDst, int dx, int dy, static void lx_do_copy(PixmapPtr pxDst, int srcX, int srcY, - int dstX, int dstY, int w, int h) + int dstX, int dstY, int w, int h) { int dstBpp = (pxDst->drawable.bitsPerPixel + 7) / 8; int dstPitch = exaGetPixmapPitch(pxDst); unsigned int srcOffset, dstOffset; int flags = 0; - gp_declare_blt(lx_copy_flags(srcX, srcY, dstX, dstY, w, h, - exaScratch.op)); + gp_declare_blt(lx_copy_flags(srcX, srcY, dstX, dstY, w, h, exaScratch.op)); srcOffset = exaScratch.srcOffset + (exaScratch.srcPitch * srcY) + - (exaScratch.srcBpp) * srcX; + (exaScratch.srcBpp) * srcX; - dstOffset = exaGetPixmapOffset(pxDst) + - (dstPitch * dstY) + (dstBpp * dstX); + dstOffset = exaGetPixmapOffset(pxDst) + (dstPitch * dstY) + (dstBpp * dstX); if (dstX > srcX) - flags |= CIMGP_NEGXDIR; + flags |= CIMGP_NEGXDIR; if (dstY > srcY) - flags |= CIMGP_NEGYDIR; + flags |= CIMGP_NEGYDIR; gp_screen_to_screen_blt(dstOffset, srcOffset, w, h, flags); } @@ -403,8 +402,7 @@ PictOpAtop PictOpXor */ -struct blend_ops_t -{ +struct blend_ops_t { int operation; int type; int channel; @@ -413,57 +411,59 @@ struct blend_ops_t { CIMGP_ALPHA_TIMES_A, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { }, - /* PictOpSrc */ + /* PictOpSrc */ { CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_SOURCE}, { }, - /* PictOpDst */ + /* PictOpDst */ { CIMGP_ALPHA_TIMES_A, CIMGP_ALPHA_EQUALS_ONE, CIMGP_CHANNEL_A_DEST}, { }, - /* PictOpOver */ + /* PictOpOver */ { CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOverReverse */ + /* PictOpOverReverse */ { CIMGP_A_PLUS_BETA_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpIn */ + /* PictOpIn */ { CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpInReverse */ + /* PictOpInReverse */ { CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOut */ + /* PictOpOut */ { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpOutReverse */ + /* PictOpOutReverse */ { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { CIMGP_ALPHA_TIMES_A, CIMGP_CONVERTED_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* SrcAtop */ + /* SrcAtop */ { CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_DEST}, { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* SrcAtopReverse */ + /* SrcAtopReverse */ { CIMGP_ALPHA_TIMES_A, CIMGP_CHANNEL_B_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_DEST}, - /* Xor */ + /* Xor */ { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { CIMGP_BETA_TIMES_B, CIMGP_CHANNEL_A_ALPHA, CIMGP_CHANNEL_A_SOURCE}, - /* PictOpAdd */ + /* PictOpAdd */ { CIMGP_A_PLUS_BETA_B, CIMGP_CONSTANT_ALPHA, CIMGP_CHANNEL_A_SOURCE}, { } }; +#ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof((a)) / (sizeof(*(a)))) +#endif static const struct exa_format_t * lx_get_format(PicturePtr p) @@ -472,8 +472,8 @@ lx_get_format(PicturePtr p) unsigned int format = p->format; for (i = 0; i < ARRAY_SIZE(lx_exa_formats); i++) - if (lx_exa_formats[i].exa == format) - return (&lx_exa_formats[i]); + if (lx_exa_formats[i].exa == format) + return (&lx_exa_formats[i]); return NULL; } @@ -492,10 +492,9 @@ lx_process_transform(PicturePtr pSrc) * translate coordinates */ if (t->matrix[0][0] == 0 && - t->matrix[0][1] == 0 && - t->matrix[1][0] == 0 && t->matrix[1][1] == 0) { - exaScratch.transform = pSrc->transform; - return TRUE; + t->matrix[0][1] == 0 && t->matrix[1][0] == 0 && t->matrix[1][1] == 0) { + exaScratch.transform = pSrc->transform; + return TRUE; } /* Otherwise, see if this is a simple @@ -503,7 +502,7 @@ lx_process_transform(PicturePtr pSrc) * we have to punt back to software */ if (t->matrix[2][2] != F(1)) - return FALSE; + return FALSE; /* The rotate matrix looks like this: * [ cos X -sin x @@ -517,22 +516,22 @@ lx_process_transform(PicturePtr pSrc) */ if ((c0 != c1) || (s0 != -s1)) - return FALSE; + return FALSE; /* Now, figure out what angle we want - we * can only accelerate right angle rotations, * so this turns into an easy set of if statements */ if (c0 == F(1) && s1 == F(0)) - exaScratch.rotate = RR_Rotate_0; + exaScratch.rotate = RR_Rotate_0; else if (c0 == F(0) && s1 == F(1)) - exaScratch.rotate = RR_Rotate_90; + exaScratch.rotate = RR_Rotate_90; else if (c0 == F(-1) && s1 == F(0)) - exaScratch.rotate = RR_Rotate_180; + exaScratch.rotate = RR_Rotate_180; else if (c0 == F(0) && s1 == F(-1)) - exaScratch.rotate = RR_Rotate_270; + exaScratch.rotate = RR_Rotate_270; else - return FALSE; + return FALSE; exaScratch.transform = pSrc->transform; @@ -546,30 +545,41 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst) const struct exa_format_t *srcFmt, *dstFmt; if (op > PictOpAdd) - GEODE_FALLBACK(("Operation %d is not supported\n", op)); + GEODE_FALLBACK(("Operation %d is not supported\n", op)); + + /* XXX - don't know if we can do any hwaccel on solid fills or gradient types in generic cases */ + if (pMsk && pMsk->pSourcePict) + GEODE_FALLBACK(("%s are not supported as a mask\n", + pMsk->pSourcePict->type == + SourcePictTypeSolidFill ? "Solid pictures" : + "Gradients")); + + if (pSrc->pSourcePict && pSrc->pSourcePict->type != SourcePictTypeSolidFill) + GEODE_FALLBACK(("Gradients are not supported as the source\n")); + + if (pMsk && op == PictOpAdd) + GEODE_FALLBACK(("PictOpAdd with mask is not supported\n")); /* FIXME: Meet this conditions from the debug for PictOpAdd. * Any Other possibilities? Add a judge for the future supplement */ if (op == PictOpAdd && pSrc->format == PICT_a8r8g8b8 && - pDst->format == PICT_a8 && !pMsk) - return TRUE; + pDst->format == PICT_a8) + return TRUE; if (op == PictOpAdd && pSrc->format == PICT_x8r8g8b8 && - pDst->format == PICT_a8 && !pMsk) - return TRUE; + pDst->format == PICT_a8) + return TRUE; if (op == PictOpAdd && pSrc->format == PICT_r5g6b5 && - pDst->format == PICT_a8 && !pMsk) - return TRUE; + pDst->format == PICT_a8) + return TRUE; if (usesPasses(op)) { - if (pGeode->exaBfrOffset == 0 || !pMsk) - GEODE_FALLBACK(("Multipass operation requires off-screen buffer\n")); + /* FIXME: Slightly misleading fallback msg when !pMsk */ + if (pGeode->exaBfrOffset == 0 || !pMsk) + GEODE_FALLBACK(("Multipass operation requires off-screen buffer\n")); } - if (pMsk && op == PictOpAdd) - GEODE_FALLBACK(("PictOpAdd with mask is not supported\n")); - /* Check that the filter matches what we support */ switch (pSrc->filter) { @@ -577,18 +587,14 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst) case PictFilterFast: case PictFilterGood: case PictFilterBest: - break; + break; default: - GEODE_FALLBACK(("Bilinear or convolution filters are not supported\n")); + GEODE_FALLBACK(("Bilinear or convolution filters are not supported\n")); } if (pMsk && pMsk->transform) - GEODE_FALLBACK(("Mask transforms are not supported\n")); - - /* XXX - don't know if we can do any hwaccel on solid fills or gradient types */ - if (pSrc->pSourcePict || (pMsk && pMsk->pSourcePict)) - GEODE_FALLBACK(("Solid fills or gradient types are not supported\n")); + GEODE_FALLBACK(("Mask transforms are not supported\n")); /* Keep an eye out for source rotation transforms - those we can * do something about */ @@ -597,74 +603,81 @@ lx_check_composite(int op, PicturePtr pSrc, PicturePtr pMsk, PicturePtr pDst) exaScratch.transform = NULL; if (pSrc->transform && !lx_process_transform(pSrc)) - GEODE_FALLBACK(("Transform operation is non-trivial\n")); + GEODE_FALLBACK(("Transform operation is non-trivial\n")); /* XXX - I don't understand PICT_a8 enough - so I'm punting */ if ((op != PictOpAdd) && (pSrc->format == PICT_a8 || - pDst->format == PICT_a8)) - GEODE_FALLBACK(("PICT_a8 as src or dst format is unsupported\n")); + pDst->format == PICT_a8)) + GEODE_FALLBACK(("PICT_a8 as src or dst format is unsupported\n")); if (pMsk && op != PictOpClear) { - struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2]; - int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1; - - /* Direction 0 indicates src->dst, 1 indiates dst->src */ - if (((direction == 0) && (pSrc->pDrawable->bitsPerPixel < 16)) || - ((direction == 1) && (pDst->pDrawable->bitsPerPixel < 16))) { - ErrorF("Mask blending unsupported with <16bpp\n"); - return FALSE; - } - if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4) - GEODE_FALLBACK(("Masks can be only done with a 8bpp or 4bpp depth\n")); - - /* The pSrc should be 1x1 pixel if the pMsk is not zero */ - if (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1) - GEODE_FALLBACK(("pSrc should be 1x1 pixel if pMsk is not zero\n")); - /* FIXME: In lx_prepare_composite, there are no variables to record the - * one pixel source's width and height when the mask is not zero. - * That will lead to bigger region to render instead of one pixel in lx - * _do_composite, so we should fallback currently to avoid this */ - if (!pSrc->repeat) - GEODE_FALLBACK(("FIXME: unzero mask might lead to bigger rendering region than 1x1 pixels\n")); + struct blend_ops_t *opPtr = &lx_alpha_ops[op * 2]; + int direction = (opPtr->channel == CIMGP_CHANNEL_A_SOURCE) ? 0 : 1; + + /* Direction 0 indicates src->dst, 1 indicates dst->src */ + if (((direction == 0) && + (pSrc->pDrawable && pSrc->pDrawable->bitsPerPixel < 16)) || + ((direction == 1) && (pDst->pDrawable->bitsPerPixel < 16))) { + ErrorF("Mask blending unsupported with <16bpp\n"); + return FALSE; + } + if (pMsk->format != PICT_a8 && pMsk->format != PICT_a4) + GEODE_FALLBACK(("Masks can be only done with a 8bpp or 4bpp depth\n")); + + /* The pSrc should be 1x1 pixel if the pMsk is not zero */ + if (pSrc->pDrawable && + (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1)) + GEODE_FALLBACK(("pSrc should be 1x1 pixel if pMsk is not zero\n")); + /* FIXME: In lx_prepare_composite, there are no variables to record the + * one pixel source's width and height when the mask is not zero. + * That will lead to bigger region to render instead of one pixel in lx + * _do_composite, so we should fallback currently to avoid this */ + /* Not an issue for solid pictures, because we'll treat it as 1x1R too */ + if (!pSrc->repeat && + !(pSrc->pSourcePict && + pSrc->pSourcePict->type == SourcePictTypeSolidFill)) { + GEODE_FALLBACK(("FIXME: unzero mask might lead to bigger rendering region than 1x1 pixels\n")); + } + } + else { + if (pSrc->pSourcePict) + GEODE_FALLBACK(("Solid source pictures without a mask are not supported\n")); } /* Get the formats for the source and destination */ - if ((srcFmt = lx_get_format(pSrc)) == NULL) { - ErrorF("EXA: Invalid source format %x\n", pSrc->format); - return FALSE; - } + if ((srcFmt = lx_get_format(pSrc)) == NULL) + GEODE_FALLBACK(("Unsupported source format %x\n", pSrc->format)); - if ((dstFmt = lx_get_format(pDst)) == NULL) { - ErrorF("EXA: Invalid destination format %x\n", pDst->format); - return FALSE; - } + if ((dstFmt = lx_get_format(pDst)) == NULL) + GEODE_FALLBACK(("Unsupported destination format %x\n", pDst->format)); /* Make sure operations that need alpha bits have them */ /* If a mask is enabled, the alpha will come from there */ if (!pMsk && (!srcFmt->alphabits && usesSrcAlpha(op))) - GEODE_FALLBACK(("Operation requires src alpha, but alphabits is unset\n")); + GEODE_FALLBACK(("Operation requires src alpha, but alphabits is unset\n")); if (!pMsk && (!dstFmt->alphabits && usesDstAlpha(op))) - GEODE_FALLBACK(("Operation requires dst alpha, but alphabits is unset\n")); + GEODE_FALLBACK(("Operation requires dst alpha, but alphabits is unset\n")); /* FIXME: See a way around this! */ if (srcFmt->alphabits == 0 && dstFmt->alphabits != 0) - GEODE_FALLBACK(("src_alphabits=0, dst_alphabits!=0\n")); + GEODE_FALLBACK(("src_alphabits=0, dst_alphabits!=0\n")); /* If this is a rotate operation, then make sure the src and dst * formats are the same */ if (exaScratch.rotate != RR_Rotate_0 && srcFmt != dstFmt) { - ErrorF("EXA: Unable to rotate and convert formats at the same time\n"); - return FALSE; + ErrorF("EXA: Unable to rotate and convert formats at the same time\n"); + return FALSE; } return TRUE; } static Bool lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk, - PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, PixmapPtr pxDst) + PicturePtr pDst, PixmapPtr pxSrc, PixmapPtr pxMsk, + PixmapPtr pxDst) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); const struct exa_format_t *srcFmt, *dstFmt; @@ -676,60 +689,64 @@ lx_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMsk, /* Set up the scratch buffer with the information we need */ - exaScratch.srcFormat = (struct exa_format_t *)srcFmt; - exaScratch.dstFormat = (struct exa_format_t *)dstFmt; + exaScratch.srcFormat = (struct exa_format_t *) srcFmt; + exaScratch.dstFormat = (struct exa_format_t *) dstFmt; exaScratch.op = op; exaScratch.repeat = pSrc->repeat; exaScratch.bufferOffset = pGeode->exaBfrOffset; if (pMsk && op != PictOpClear) { - /* Get the source color */ - /* If the op is PictOpOver(or PictOpOutReverse, PictOpInReverse, - * PictOpIn, PictOpOut, PictOpOverReverse), we should get the - * ARGB32 source format */ - - if ((op == PictOpOver || op == PictOpOutReverse || op == - PictOpInReverse || op == PictOpIn || op == PictOpOut || - op == PictOpOverReverse) && (srcFmt->alphabits != 0)) - exaScratch.srcColor = exaGetPixmapFirstPixel(pxSrc); - else if ((op == PictOpOver || op == PictOpOutReverse || op == - PictOpInReverse || op == PictOpIn || op == PictOpOut || - op == PictOpOverReverse) && - (srcFmt->alphabits == 0)) - exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format, - PICT_a8r8g8b8); - else - exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format, - pDst->format); - - /* Save off the info we need (reuse the source values to save space) */ - - exaScratch.type = COMP_TYPE_MASK; - exaScratch.maskrepeat = pMsk->repeat; - - exaScratch.srcOffset = exaGetPixmapOffset(pxMsk); - exaScratch.srcPitch = exaGetPixmapPitch(pxMsk); - exaScratch.srcBpp = (pxMsk->drawable.bitsPerPixel + 7) / 8; - - exaScratch.srcWidth = pMsk->pDrawable->width; - exaScratch.srcHeight = pMsk->pDrawable->height; - - /* Flag to indicate if this a 8BPP or a 4BPP mask */ - exaScratch.fourBpp = (pxMsk->drawable.bitsPerPixel == 4) ? 1 : 0; - } else { - if (usesPasses(op)) - exaScratch.type = COMP_TYPE_TWOPASS; - else if (exaScratch.rotate != RR_Rotate_0) - exaScratch.type = COMP_TYPE_ROTATE; - else - exaScratch.type = COMP_TYPE_ONEPASS; - - exaScratch.srcOffset = exaGetPixmapOffset(pxSrc); - exaScratch.srcPitch = exaGetPixmapPitch(pxSrc); - exaScratch.srcBpp = (pxSrc->drawable.bitsPerPixel + 7) / 8; - - exaScratch.srcWidth = pSrc->pDrawable->width; - exaScratch.srcHeight = pSrc->pDrawable->height; + /* Get the source color */ + if (pSrc->pSourcePict) { + exaScratch.srcColor = pSrc->pSourcePict->solidFill.color; + } + else { + /* If the op is PictOpOver(or PictOpOutReverse, PictOpInReverse, + * PictOpIn, PictOpOut, PictOpOverReverse), we should get the + * ARGB32 source format */ + + if ((op == PictOpOver || op == PictOpOutReverse || op == + PictOpInReverse || op == PictOpIn || op == PictOpOut || + op == PictOpOverReverse) && (srcFmt->alphabits != 0)) + exaScratch.srcColor = exaGetPixmapFirstPixel(pxSrc); + else if ((op == PictOpOver || op == PictOpOutReverse || op == + PictOpInReverse || op == PictOpIn || op == PictOpOut || + op == PictOpOverReverse) && (srcFmt->alphabits == 0)) + exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format, + PICT_a8r8g8b8); + else + exaScratch.srcColor = lx_get_source_color(pxSrc, pSrc->format, + pDst->format); + } + + /* Save off the info we need (reuse the source values to save space) */ + exaScratch.type = COMP_TYPE_MASK; + exaScratch.maskrepeat = pMsk->repeat; + + exaScratch.srcOffset = exaGetPixmapOffset(pxMsk); + exaScratch.srcPitch = exaGetPixmapPitch(pxMsk); + exaScratch.srcBpp = (pxMsk->drawable.bitsPerPixel + 7) / 8; + + exaScratch.srcWidth = pMsk->pDrawable->width; + exaScratch.srcHeight = pMsk->pDrawable->height; + + /* Flag to indicate if this a 8BPP or a 4BPP mask */ + exaScratch.fourBpp = (pxMsk->drawable.bitsPerPixel == 4) ? 1 : 0; + } + else { + if (usesPasses(op)) + exaScratch.type = COMP_TYPE_TWOPASS; + else if (exaScratch.rotate != RR_Rotate_0) + exaScratch.type = COMP_TYPE_ROTATE; + else + exaScratch.type = COMP_TYPE_ONEPASS; + + exaScratch.srcOffset = exaGetPixmapOffset(pxSrc); + exaScratch.srcPitch = exaGetPixmapPitch(pxSrc); + exaScratch.srcBpp = (pxSrc->drawable.bitsPerPixel + 7) / 8; + + exaScratch.srcWidth = pSrc->pDrawable->width; + exaScratch.srcHeight = pSrc->pDrawable->height; } return TRUE; @@ -742,21 +759,21 @@ lx_get_bpp_from_format(int format) switch (format) { case CIMGP_SOURCE_FMT_8_8_8_8: case CIMGP_SOURCE_FMT_32BPP_BGR: - return 32; + return 32; case CIMGP_SOURCE_FMT_4_4_4_4: - return 12; + return 12; case CIMGP_SOURCE_FMT_0_5_6_5: case CIMGP_SOURCE_FMT_16BPP_BGR: - return 16; + return 16; case CIMGP_SOURCE_FMT_1_5_5_5: case CIMGP_SOURCE_FMT_15BPP_BGR: - return 15; + return 15; case CIMGP_SOURCE_FMT_3_3_2: - return 8; + return 8; } return 0; @@ -771,11 +788,11 @@ static void lx_set_source_format(int srcFormat, int dstFormat) { if (!(srcFormat & 0x10) && (dstFormat & 0x10)) - gp_set_source_format(srcFormat | 0x10); + gp_set_source_format(srcFormat | 0x10); else if ((srcFormat & 0x10) && (dstFormat & 0x10)) - gp_set_source_format(srcFormat & ~0x10); + gp_set_source_format(srcFormat & ~0x10); else - gp_set_source_format(srcFormat); + gp_set_source_format(srcFormat); } /* If we are converting colors and we need the channel A alpha, @@ -787,7 +804,7 @@ static inline int get_op_type(struct exa_format_t *src, struct exa_format_t *dst, int type) { return (type == CIMGP_CHANNEL_A_ALPHA && - src->alphabits != dst->alphabits) ? CIMGP_CONVERTED_ALPHA : type; + src->alphabits != dst->alphabits) ? CIMGP_CONVERTED_ALPHA : type; } /* Note - this is the preferred onepass method. The other will remain @@ -803,8 +820,8 @@ get_op_type(struct exa_format_t *src, struct exa_format_t *dst, int type) static void lx_composite_onepass_add_a8(PixmapPtr pxDst, unsigned long dstOffset, - unsigned long srcOffset, int width, int height, int opX, int opY, - int srcX, int srcY) + unsigned long srcOffset, int width, int height, + int opX, int opY, int srcX, int srcY) { struct blend_ops_t *opPtr; int apply, type; @@ -821,46 +838,50 @@ lx_composite_onepass_add_a8(PixmapPtr pxDst, unsigned long dstOffset, gp_wait_until_idle(); if (opX % 4 == 0 && srcX % 4 == 0) { - /* HW acceleration */ - opPtr = &lx_alpha_ops[exaScratch.op * 2]; - apply = CIMGP_APPLY_BLEND_TO_ALL; - gp_declare_blt(0); - gp_set_bpp(32); - gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); - gp_set_source_format(8); - type = opPtr->type; - gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0); - gp_screen_to_screen_convert(dstOffset, srcOffset, width / 4, height, 0); - /* Calculate the pixels in the tail of each line */ - for (j = srcY; j < srcY + height; j++) - for (i = srcX + (width / 4) * 4; i < srcX + width; i++) { - srcOffset = GetSrcOffset(i, j); - optempX = opX + i - srcX; - optempY = opY + j - srcY; - dstOffset = pixmapOffset + pixmapPitch * optempY + - calBitsPixel * optempX; - *(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset) - + *(cim_fb_ptr + dstOffset) <= 0xff) ? - *(cim_fb_ptr + srcOffset) + *(cim_fb_ptr + dstOffset) : 0xff; - } - } else { - for (j = srcY; j < srcY + height; j++) - for (i = srcX; i < srcX + width; i++) { - srcOffset = GetSrcOffset(i, j); - optempX = opX + i - srcX; - optempY = opY + j - srcY; - dstOffset = pixmapOffset + pixmapPitch * optempY + - calBitsPixel * optempX; - *(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset) + - *(cim_fb_ptr + dstOffset) <= 0xff) ? - *(cim_fb_ptr + srcOffset) + *(cim_fb_ptr + dstOffset) : 0xff; - } + /* HW acceleration */ + opPtr = &lx_alpha_ops[exaScratch.op * 2]; + apply = CIMGP_APPLY_BLEND_TO_ALL; + gp_declare_blt(0); + gp_set_bpp(32); + gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); + gp_set_source_format(8); + type = opPtr->type; + gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, + 0); + gp_screen_to_screen_convert(dstOffset, srcOffset, width / 4, height, 0); + /* Calculate the pixels in the tail of each line */ + for (j = srcY; j < srcY + height; j++) + for (i = srcX + (width / 4) * 4; i < srcX + width; i++) { + srcOffset = GetSrcOffset(i, j); + optempX = opX + i - srcX; + optempY = opY + j - srcY; + dstOffset = pixmapOffset + pixmapPitch * optempY + + calBitsPixel * optempX; + *(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset) + + *(cim_fb_ptr + dstOffset) <= + 0xff) ? *(cim_fb_ptr + srcOffset) + + *(cim_fb_ptr + dstOffset) : 0xff; + } + } + else { + for (j = srcY; j < srcY + height; j++) + for (i = srcX; i < srcX + width; i++) { + srcOffset = GetSrcOffset(i, j); + optempX = opX + i - srcX; + optempY = opY + j - srcY; + dstOffset = pixmapOffset + pixmapPitch * optempY + + calBitsPixel * optempX; + *(cim_fb_ptr + dstOffset) = (*(cim_fb_ptr + srcOffset) + + *(cim_fb_ptr + dstOffset) <= + 0xff) ? *(cim_fb_ptr + srcOffset) + + *(cim_fb_ptr + dstOffset) : 0xff; + } } } static void lx_composite_onepass(PixmapPtr pxDst, unsigned long dstOffset, - unsigned long srcOffset, int width, int height) + unsigned long srcOffset, int width, int height) { struct blend_ops_t *opPtr; int apply, type; @@ -868,18 +889,16 @@ lx_composite_onepass(PixmapPtr pxDst, unsigned long dstOffset, opPtr = &lx_alpha_ops[exaScratch.op * 2]; apply = (exaScratch.dstFormat->alphabits != 0 && - exaScratch.srcFormat->alphabits != 0) ? - CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; + exaScratch.srcFormat->alphabits != 0) ? + CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; gp_declare_blt(0); gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); - lx_set_source_format(exaScratch.srcFormat->fmt, - exaScratch.dstFormat->fmt); + lx_set_source_format(exaScratch.srcFormat->fmt, exaScratch.dstFormat->fmt); - type = - get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, opPtr->type); + type = get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, opPtr->type); gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0); @@ -894,14 +913,12 @@ lx_composite_all_black(unsigned long srcOffset, int width, int height) opPtr = &lx_alpha_ops[0]; apply = (exaScratch.srcFormat->alphabits != 0) ? - CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; + CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; gp_declare_blt(0); gp_set_bpp(lx_get_bpp_from_format(exaScratch.srcFormat->fmt)); gp_set_strides(exaScratch.srcPitch, exaScratch.srcPitch); - lx_set_source_format(exaScratch.srcFormat->fmt, - exaScratch.srcFormat->fmt); - type = - get_op_type(exaScratch.srcFormat, exaScratch.srcFormat, opPtr->type); + lx_set_source_format(exaScratch.srcFormat->fmt, exaScratch.srcFormat->fmt); + type = get_op_type(exaScratch.srcFormat, exaScratch.srcFormat, opPtr->type); gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0); gp_screen_to_screen_convert(srcOffset, srcOffset, width, height, 0); @@ -909,7 +926,7 @@ lx_composite_all_black(unsigned long srcOffset, int width, int height) static void lx_composite_onepass_special(PixmapPtr pxDst, int width, int height, int opX, - int opY, int srcX, int srcY) + int opY, int srcX, int srcY) { struct blend_ops_t *opPtr; int apply, type; @@ -921,65 +938,69 @@ lx_composite_onepass_special(PixmapPtr pxDst, int width, int height, int opX, optempY = opY; /* Make sure srcX and srcY are in source region */ - srcX = ((srcX % (int)exaScratch.srcWidth) + (int)exaScratch.srcWidth) - % (int)exaScratch.srcWidth; - srcY = ((srcY % (int)exaScratch.srcHeight) + (int)exaScratch.srcHeight) - % (int)exaScratch.srcHeight; + srcX = ((srcX % (int) exaScratch.srcWidth) + (int) exaScratch.srcWidth) + % (int) exaScratch.srcWidth; + srcY = ((srcY % (int) exaScratch.srcHeight) + (int) exaScratch.srcHeight) + % (int) exaScratch.srcHeight; opWidth = exaScratch.srcWidth - srcX; - opHeight = exaScratch.srcHeight - srcY; + opHeight = exaScratch.srcHeight - srcY; srcOffset = GetSrcOffset(srcX, srcY); if (width < opWidth) - opWidth = width; + opWidth = width; if (height < opHeight) - opHeight = height; + opHeight = height; while (1) { - gp_wait_until_idle(); - dstOffset = GetPixmapOffset(pxDst, optempX, optempY); - opPtr = &lx_alpha_ops[exaScratch.op * 2]; - apply = (exaScratch.dstFormat->alphabits != 0 && - exaScratch.srcFormat->alphabits != 0) ? - CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; - gp_declare_blt(0); - gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); - gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); - lx_set_source_format(exaScratch.srcFormat->fmt, - exaScratch.dstFormat->fmt); - type = get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, - opPtr->type); - gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, - apply, 0); - gp_screen_to_screen_convert(dstOffset, srcOffset, opWidth, opHeight, 0); - - optempX += opWidth; - if (optempX >= opX + width) { - optempX = opX; - optempY += opHeight; - if (optempY >= opY + height) - break; - } - if (optempX == opX) { - srcOffset = GetSrcOffset(srcX, 0); - opWidth = ((opX + width) - optempX) > (exaScratch.srcWidth - srcX) - ? (exaScratch.srcWidth - srcX) : ((opX + width) - optempX); - opHeight = ((opY + height) - optempY) > exaScratch.srcHeight - ? exaScratch.srcHeight : ((opY + height) - optempY); - } else if (optempY == opY) { - srcOffset = GetSrcOffset(0, srcY); - opWidth = ((opX + width) - optempX) > exaScratch.srcWidth - ? exaScratch.srcWidth : ((opX + width) - optempX); - opHeight = ((opY + height) - optempY) > (exaScratch.srcHeight - - srcY) ? (exaScratch.srcHeight - srcY) : ((opY + height) - optempY); - } else { - srcOffset = GetSrcOffset(0, 0); - opWidth = ((opX + width) - optempX) > exaScratch.srcWidth - ? exaScratch.srcWidth : ((opX + width) - optempX); - opHeight = ((opY + height) - optempY) > exaScratch.srcHeight - ? exaScratch.srcHeight : ((opY + height) - optempY); - } + gp_wait_until_idle(); + dstOffset = GetPixmapOffset(pxDst, optempX, optempY); + opPtr = &lx_alpha_ops[exaScratch.op * 2]; + apply = (exaScratch.dstFormat->alphabits != 0 && + exaScratch.srcFormat->alphabits != 0) ? + CIMGP_APPLY_BLEND_TO_ALL : CIMGP_APPLY_BLEND_TO_RGB; + gp_declare_blt(0); + gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); + gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); + lx_set_source_format(exaScratch.srcFormat->fmt, + exaScratch.dstFormat->fmt); + type = get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, + opPtr->type); + gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, + apply, 0); + gp_screen_to_screen_convert(dstOffset, srcOffset, opWidth, opHeight, 0); + + optempX += opWidth; + if (optempX >= opX + width) { + optempX = opX; + optempY += opHeight; + if (optempY >= opY + height) + break; + } + if (optempX == opX) { + srcOffset = GetSrcOffset(srcX, 0); + opWidth = ((opX + width) - optempX) > (exaScratch.srcWidth - srcX) + ? (exaScratch.srcWidth - srcX) : ((opX + width) - optempX); + opHeight = ((opY + height) - optempY) > exaScratch.srcHeight + ? exaScratch.srcHeight : ((opY + height) - optempY); + } + else if (optempY == opY) { + srcOffset = GetSrcOffset(0, srcY); + opWidth = ((opX + width) - optempX) > exaScratch.srcWidth + ? exaScratch.srcWidth : ((opX + width) - optempX); + opHeight = ((opY + height) - optempY) > (exaScratch.srcHeight - + srcY) + ? (exaScratch.srcHeight - srcY) : ((opY + height) + - optempY); + } + else { + srcOffset = GetSrcOffset(0, 0); + opWidth = ((opX + width) - optempX) > exaScratch.srcWidth + ? exaScratch.srcWidth : ((opX + width) - optempX); + opHeight = ((opY + height) - optempY) > exaScratch.srcHeight + ? exaScratch.srcHeight : ((opY + height) - optempY); + } } } @@ -987,7 +1008,7 @@ lx_composite_onepass_special(PixmapPtr pxDst, int width, int height, int opX, static void lx_composite_multipass(PixmapPtr pxDst, unsigned long dstOffset, - unsigned long srcOffset, int width, int height) + unsigned long srcOffset, int width, int height) { struct blend_ops_t *opPtr; int sbpp = lx_get_bpp_from_format(exaScratch.srcFormat->fmt); @@ -1008,7 +1029,7 @@ lx_composite_multipass(PixmapPtr pxDst, unsigned long dstOffset, gp_set_raster_operation(0xCC); gp_set_strides(exaScratch.srcPitch, exaGetPixmapPitch(pxDst)); gp_screen_to_screen_convert(exaScratch.bufferOffset, dstOffset, - width, height, 0); + width, height, 0); /* Do the first blend from the source to the scratch buffer */ @@ -1020,40 +1041,38 @@ lx_composite_multipass(PixmapPtr pxDst, unsigned long dstOffset, opPtr = &lx_alpha_ops[exaScratch.op * 2]; apply = (exaScratch.srcFormat->alphabits == 0) ? - CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; + CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; /* If we're destroying the source alpha bits, then make sure we * use the alpha before the color conversion */ gp_screen_to_screen_blt(exaScratch.bufferOffset, srcOffset, width, height, - 0); + 0); /* Finally, do the second blend back to the destination */ opPtr = &lx_alpha_ops[(exaScratch.op * 2) + 1]; apply = (exaScratch.dstFormat->alphabits == 0) ? - CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; + CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; gp_declare_blt(CIMGP_BLTFLAGS_HAZARD); gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); - lx_set_source_format(exaScratch.srcFormat->fmt, - exaScratch.dstFormat->fmt); + lx_set_source_format(exaScratch.srcFormat->fmt, exaScratch.dstFormat->fmt); - type = - get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, opPtr->type); + type = get_op_type(exaScratch.srcFormat, exaScratch.dstFormat, opPtr->type); gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, apply, 0); gp_screen_to_screen_convert(dstOffset, exaScratch.bufferOffset, - width, height, 0); + width, height, 0); } static void lx_composite_rotate(PixmapPtr pxDst, unsigned long dstOffset, - unsigned int srcOffset, int width, int height) + unsigned int srcOffset, int width, int height) { int degrees = 0; @@ -1061,8 +1080,7 @@ lx_composite_rotate(PixmapPtr pxDst, unsigned long dstOffset, gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); gp_set_strides(exaGetPixmapPitch(pxDst), exaScratch.srcPitch); - lx_set_source_format(exaScratch.srcFormat->fmt, - exaScratch.dstFormat->fmt); + lx_set_source_format(exaScratch.srcFormat->fmt, exaScratch.dstFormat->fmt); gp_set_raster_operation(0xCC); @@ -1071,14 +1089,14 @@ lx_composite_rotate(PixmapPtr pxDst, unsigned long dstOffset, switch (exaScratch.rotate) { case RR_Rotate_90: - degrees = 270; - break; + degrees = 270; + break; case RR_Rotate_180: - degrees = 180; - break; + degrees = 180; + break; case RR_Rotate_270: - degrees = 90; - break; + degrees = 90; + break; } gp_rotate_blt(dstOffset, srcOffset, width, height, degrees); @@ -1086,7 +1104,7 @@ lx_composite_rotate(PixmapPtr pxDst, unsigned long dstOffset, static void lx_do_composite_mask(PixmapPtr pxDst, unsigned long dstOffset, - unsigned int maskOffset, int width, int height) + unsigned int maskOffset, int width, int height) { struct blend_ops_t *opPtr = &lx_alpha_ops[exaScratch.op * 2]; @@ -1098,13 +1116,14 @@ lx_do_composite_mask(PixmapPtr pxDst, unsigned long dstOffset, gp_set_solid_source(exaScratch.srcColor); gp_blend_mask_blt(dstOffset, 0, width, height, maskOffset, - exaScratch.srcPitch, opPtr->operation, exaScratch.fourBpp); + exaScratch.srcPitch, opPtr->operation, + exaScratch.fourBpp); } static void lx_do_composite_mask_two_pass(PixmapPtr pxDst, unsigned long dstOffset, - unsigned int maskOffset, int width, int height, int opX, int opY, - xPointFixed srcPoint) + unsigned int maskOffset, int width, int height, + int opX, int opY, xPointFixed srcPoint) { int apply, type; struct blend_ops_t *opPtr; @@ -1120,62 +1139,64 @@ lx_do_composite_mask_two_pass(PixmapPtr pxDst, unsigned long dstOffset, * of the Pitch(stride) parameter, so we use maximun width of mask picture. * that is to say it is a scanline rendering process */ if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) { - opWidth = width; - opHeight = DEFAULT_EXA_SCRATCH_BFRSZ / (width * 4); - } else { - opWidth = width; - opHeight = height; + opWidth = width; + opHeight = DEFAULT_EXA_SCRATCH_BFRSZ / (width * 4); + } + else { + opWidth = width; + opHeight = height; } while (1) { - /* Wait until the GP is idle - this will ensure that the scratch buffer - * isn't occupied */ - - gp_wait_until_idle(); - - /* Copy the source to the scratch buffer, and do a src * mask raster - * operation */ - - gp_declare_blt(0); - opPtr = &lx_alpha_ops[(exaScratch.op * 2) + 1]; - gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8); - gp_set_strides(opWidth * 4, exaScratch.srcPitch); - gp_set_bpp(lx_get_bpp_from_format(CIMGP_SOURCE_FMT_8_8_8_8)); - gp_set_solid_source(exaScratch.srcColor); - gp_blend_mask_blt(exaScratch.bufferOffset, 0, opWidth, opHeight, - maskOffset, exaScratch.srcPitch, opPtr->operation, - exaScratch.fourBpp); - - /* Do a relative operation(refer rendercheck ops.c), and copy the - * operation result to destination */ - - gp_declare_blt(CIMGP_BLTFLAGS_HAZARD); - opPtr = &lx_alpha_ops[exaScratch.op * 2]; - apply = (exaScratch.dstFormat->alphabits == 0) ? - CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; - gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8); - gp_set_strides(exaGetPixmapPitch(pxDst), opWidth * 4); - gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); - type = CIMGP_CONVERTED_ALPHA; - gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, - apply, 0); - gp_screen_to_screen_convert(dstOffset, exaScratch.bufferOffset, - opWidth, opHeight, 0); - - if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) { - /* Finish the rendering */ - if (opoverY + opHeight == opY + height) - break; - /* Recalculate the Dest and Mask rendering start point */ - srcPoint.y = srcPoint.y + F(opHeight); - opoverY = opoverY + opHeight; - if (opoverY + opHeight > opY + height) - opHeight = opY + height - opoverY; - dstOffset = GetPixmapOffset(pxDst, opoverX, opoverY); - maskOffset = GetSrcOffset(I(srcPoint.x), I(srcPoint.y)); - } else - break; + /* Wait until the GP is idle - this will ensure that the scratch buffer + * isn't occupied */ + + gp_wait_until_idle(); + + /* Copy the source to the scratch buffer, and do a src * mask raster + * operation */ + + gp_declare_blt(0); + opPtr = &lx_alpha_ops[(exaScratch.op * 2) + 1]; + gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8); + gp_set_strides(opWidth * 4, exaScratch.srcPitch); + gp_set_bpp(lx_get_bpp_from_format(CIMGP_SOURCE_FMT_8_8_8_8)); + gp_set_solid_source(exaScratch.srcColor); + gp_blend_mask_blt(exaScratch.bufferOffset, 0, opWidth, opHeight, + maskOffset, exaScratch.srcPitch, opPtr->operation, + exaScratch.fourBpp); + + /* Do a relative operation(refer rendercheck ops.c), and copy the + * operation result to destination */ + + gp_declare_blt(CIMGP_BLTFLAGS_HAZARD); + opPtr = &lx_alpha_ops[exaScratch.op * 2]; + apply = (exaScratch.dstFormat->alphabits == 0) ? + CIMGP_APPLY_BLEND_TO_RGB : CIMGP_APPLY_BLEND_TO_ALL; + gp_set_source_format(CIMGP_SOURCE_FMT_8_8_8_8); + gp_set_strides(exaGetPixmapPitch(pxDst), opWidth * 4); + gp_set_bpp(lx_get_bpp_from_format(exaScratch.dstFormat->fmt)); + type = CIMGP_CONVERTED_ALPHA; + gp_set_alpha_operation(opPtr->operation, type, opPtr->channel, + apply, 0); + gp_screen_to_screen_convert(dstOffset, exaScratch.bufferOffset, + opWidth, opHeight, 0); + + if (width * height * 4 > DEFAULT_EXA_SCRATCH_BFRSZ) { + /* Finish the rendering */ + if (opoverY + opHeight == opY + height) + break; + /* Recalculate the Dest and Mask rendering start point */ + srcPoint.y = srcPoint.y + F(opHeight); + opoverY = opoverY + opHeight; + if (opoverY + opHeight > opY + height) + opHeight = opY + height - opoverY; + dstOffset = GetPixmapOffset(pxDst, opoverX, opoverY); + maskOffset = GetSrcOffset(I(srcPoint.x), I(srcPoint.y)); + } + else + break; } } @@ -1189,7 +1210,7 @@ transformPoint(PictTransform * t, xPointFixed * point) v.vector[2] = xFixed1; if (t != NULL) - PictureTransformPoint(t, &v); + PictureTransformPoint(t, &v); point->x = v.vector[0]; point->y = v.vector[1]; @@ -1197,7 +1218,7 @@ transformPoint(PictTransform * t, xPointFixed * point) static void lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, - int maskY, int dstX, int dstY, int width, int height) + int maskY, int dstX, int dstY, int width, int height) { unsigned int dstOffset, srcOffset = 0; @@ -1211,11 +1232,12 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, /* Transform the source coordinates */ if (exaScratch.type == COMP_TYPE_MASK) { - srcPoint.x = F(maskX); - srcPoint.y = F(maskY); - } else { - srcPoint.x = F(srcX); - srcPoint.y = F(srcY); + srcPoint.x = F(maskX); + srcPoint.y = F(maskY); + } + else { + srcPoint.x = F(srcX); + srcPoint.y = F(srcY); } /* srcX, srcY point to the upper right side of the bounding box @@ -1225,26 +1247,26 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, switch (exaScratch.rotate) { case RR_Rotate_270: - srcPoint.x += F(width); + srcPoint.x += F(width); - opWidth = height; - opHeight = width; - break; + opWidth = height; + opHeight = width; + break; case RR_Rotate_180: - srcPoint.x += F(width); - srcPoint.y += F(height); + srcPoint.x += F(width); + srcPoint.y += F(height); - srcX += width; - srcY += height; - break; + srcX += width; + srcY += height; + break; case RR_Rotate_90: - srcPoint.y += F(height); + srcPoint.y += F(height); - opWidth = height; - opHeight = width; - break; + opWidth = height; + opHeight = width; + break; } transformPoint(exaScratch.transform, &srcPoint); @@ -1252,13 +1274,13 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, /* Adjust the point to fit into the pixmap */ if (I(srcPoint.x) < 0) { - opWidth += I(srcPoint.x); - srcPoint.x = F(0); + opWidth += I(srcPoint.x); + srcPoint.x = F(0); } if (I(srcPoint.y) < 0) { - opHeight += I(srcPoint.y); - srcPoint.y = F(0); + opHeight += I(srcPoint.y); + srcPoint.y = F(0); } /* Get the source point offset position */ @@ -1278,166 +1300,220 @@ lx_do_composite(PixmapPtr pxDst, int srcX, int srcY, int maskX, * exaScratch.srcWidth and exaScratch.srcHeight */ if (exaScratch.type == COMP_TYPE_MASK) { - if ((exaScratch.srcWidth - maskX) < opWidth) - opWidth = exaScratch.srcWidth - maskX; - if ((exaScratch.srcHeight - maskY) < opHeight) - opHeight = exaScratch.srcHeight - maskY; - } else { - if (exaScratch.type == COMP_TYPE_ONEPASS) { - /* This is the condition srcX or/and srcY is/are out of source - * region */ - if (((srcX >= 0 && srcY >= exaScratch.srcHeight) - || (srcX >= exaScratch.srcWidth && srcY >= 0)) && - (exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) { - if (exaScratch.repeat == 1) { - opWidth = width; - opHeight = height; - } else { - if (exaScratch.op == PictOpOver) - return ; - else { - exaScratch.op = PictOpClear; - opWidth = width; - opHeight = height; - } - } - /* This is the condition srcX or/and srcY is/are in the source - * region */ - } else if (srcX >= 0 && srcY >= 0 && - (exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) { - if (exaScratch.repeat == 1) { - opWidth = width; - opHeight = height; - } else { - if ((exaScratch.srcWidth - srcX) < opWidth) - opWidth = exaScratch.srcWidth - srcX; - if ((exaScratch.srcHeight - srcY) < opHeight) - opHeight = exaScratch.srcHeight - srcY; - } - /* This is the condition srcX or/and srcY is/are negative */ - } else if ((srcX < 0 || srcY < 0) && - (exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) { - if (exaScratch.repeat == 1) { - opWidth = width; - opHeight = height; - } else { - /* Have not met this condition till now */ - return ; - } - } else { - if (exaScratch.srcWidth < opWidth) - opWidth = exaScratch.srcWidth; - if (exaScratch.srcHeight < opHeight) - opHeight = exaScratch.srcHeight; - } - } else { - if (exaScratch.rotate == RR_Rotate_180) { - } else { - if ((exaScratch.srcWidth - srcY) < opWidth) - opWidth = exaScratch.srcWidth - srcY; - if ((exaScratch.srcHeight - srcX) < opHeight) - opHeight = exaScratch.srcHeight - srcX; - } - } + if ((exaScratch.srcWidth - maskX) < opWidth) + opWidth = exaScratch.srcWidth - maskX; + if ((exaScratch.srcHeight - maskY) < opHeight) + opHeight = exaScratch.srcHeight - maskY; + } + else { + if (exaScratch.type == COMP_TYPE_ONEPASS) { + /* This is the condition srcX or/and srcY is/are out of source + * region */ + if (((srcY >= 0 && srcY >= exaScratch.srcHeight) + || (srcX >= 0 && srcX >= exaScratch.srcWidth)) && + (exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc)) { + if (exaScratch.repeat == 1) { + opWidth = width; + opHeight = height; + } + else { + if (exaScratch.op == PictOpOver) + return; + else { + exaScratch.op = PictOpClear; + opWidth = width; + opHeight = height; + } + } + /* This is the condition srcX or/and srcY is/are in the source + * region */ + } + else if (srcX >= 0 && srcY >= 0 && + (exaScratch.op == PictOpOver || + exaScratch.op == PictOpSrc)) { + if (exaScratch.repeat == 1) { + opWidth = width; + opHeight = height; + } + else { + if ((exaScratch.srcWidth - srcX) < opWidth) + opWidth = exaScratch.srcWidth - srcX; + if ((exaScratch.srcHeight - srcY) < opHeight) + opHeight = exaScratch.srcHeight - srcY; + } + /* This is the condition srcX or/and srcY is/are negative */ + } + else if ((srcX < 0 || srcY < 0) && + (exaScratch.op == PictOpOver || + exaScratch.op == PictOpSrc)) { + if (exaScratch.repeat == 1) { + opWidth = width; + opHeight = height; + } + else { + /* FIXME: We can't support negative srcX/Y for all corner cases in + * a sane way without a bit bigger refactoring. So as to avoid + * gross misrenderings (e.g missing tray icons) in current real-world + * applications, just shift destination appropriately for now and + * ignore out of bounds source pixmap zero-vector handling. This is + * actually correct for PictOpOver, but PictOpSrc out of bounds regions + * should be blacked out, but aren't - without this workaround however + * it'd be simply all black instead, which is probably worse till a full + * clean solution solves it for all cases. */ + if (srcX < 0) { + opX -= srcX; + srcX = 0; + } + + if (srcY < 0) { + opY -= srcY; + srcY = 0; + } + + /* EXA has taken care of adjusting srcWidth if it gets cut on the right */ + width = opWidth = exaScratch.srcWidth; + /* EXA has taken care of adjusting srcHeight if it gets cut on the bottom */ + height = opHeight = exaScratch.srcHeight; + } + } + else { + if (exaScratch.srcWidth < opWidth) + opWidth = exaScratch.srcWidth; + if (exaScratch.srcHeight < opHeight) + opHeight = exaScratch.srcHeight; + } + } + else { + if (exaScratch.rotate == RR_Rotate_180) { + } + else { + if ((exaScratch.srcWidth - srcY) < opWidth) + opWidth = exaScratch.srcWidth - srcY; + if ((exaScratch.srcHeight - srcX) < opHeight) + opHeight = exaScratch.srcHeight - srcX; + } + } } while (1) { - dstOffset = GetPixmapOffset(pxDst, opX, opY); - - switch (exaScratch.type) { - - case COMP_TYPE_MASK:{ - if (exaScratch.op == PictOpOver || exaScratch.op == - PictOpOutReverse || exaScratch.op == PictOpInReverse || - exaScratch.op == PictOpIn || exaScratch.op == PictOpOut || - exaScratch.op == PictOpOverReverse) - lx_do_composite_mask_two_pass(pxDst, dstOffset, - srcOffset, opWidth, opHeight, opX, opY, srcPoint); - else - lx_do_composite_mask(pxDst, dstOffset, srcOffset, - opWidth, opHeight); - } - break; - - case COMP_TYPE_ONEPASS: - if ((exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc) - && (exaScratch.repeat == 1)) { - lx_composite_onepass_special(pxDst, opWidth, opHeight, opX, opY, - srcX, srcY); - return ; - } else if ((exaScratch.op == PictOpAdd) && (exaScratch.srcFormat->exa - == PICT_a8) && (exaScratch.dstFormat->exa == PICT_a8)) - lx_composite_onepass_add_a8(pxDst, dstOffset, srcOffset, - opWidth, opHeight, opX, opY, srcX, srcY); - else - lx_composite_onepass(pxDst, dstOffset, srcOffset, opWidth, - opHeight); - break; - - case COMP_TYPE_TWOPASS: - lx_composite_multipass(pxDst, dstOffset, srcOffset, opWidth, - opHeight); - - case COMP_TYPE_ROTATE: - lx_composite_rotate(pxDst, dstOffset, srcOffset, opWidth, - opHeight); - break; - } - - opX += opWidth; - - if (opX >= dstX + width) { - opX = dstX; - opY += opHeight; - - if (opY >= dstY + height) - break; - } - - /* FIXME: Please add the code to handle the condition when the maskX - * and maskY coordinate are negative or greater than - * exaScratch.srcWidth and exaScratch.srcHeight */ - - if (exaScratch.type == COMP_TYPE_MASK) { - opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - maskX) - ? (exaScratch.srcWidth - maskX) : (dstX + width) - opX; - opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - maskY) - ? (exaScratch.srcHeight - maskY) : (dstY + height) - opY; - /* All black out of the mask */ - if (!exaScratch.maskrepeat) - exaScratch.srcColor = 0x0; - } else { - if (exaScratch.type == COMP_TYPE_ONEPASS) { - if (srcX >= 0 && srcY >= 0 && (exaScratch.op == PictOpOver || - exaScratch.op == PictOpSrc || exaScratch.op == - PictOpClear)) { - opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - - srcX) ? (exaScratch.srcWidth - srcX) : (dstX + width) - - opX; - opHeight = ((dstY + height) - opY) > - (exaScratch.srcHeight - srcY) ? - (exaScratch.srcHeight - srcY) : (dstY + height) - opY; - } else { - opWidth = ((dstX + width) - opX) > exaScratch.srcWidth ? - exaScratch.srcWidth : (dstX + width) - opX; - opHeight = ((dstY + height) - opY) > exaScratch.srcHeight ? - exaScratch.srcHeight : (dstY + height) - opY; - } - } else { - opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - srcY) - ? (exaScratch.srcWidth - srcY) : (dstX + width) - opX; - opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - srcX - ) ? (exaScratch.srcHeight - srcX) : (dstY + height) - opY; - } - /* All black out of the source */ - if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ONEPASS)) { - lx_composite_all_black(srcOffset, exaScratch.srcWidth, - exaScratch.srcHeight); - } - if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ROTATE)) - break; - } + dstOffset = GetPixmapOffset(pxDst, opX, opY); + + switch (exaScratch.type) { + + case COMP_TYPE_MASK:{ + if (exaScratch.op == PictOpOver || exaScratch.op == + PictOpOutReverse || exaScratch.op == PictOpInReverse || + exaScratch.op == PictOpIn || exaScratch.op == PictOpOut || + exaScratch.op == PictOpOverReverse) + lx_do_composite_mask_two_pass(pxDst, dstOffset, + srcOffset, opWidth, opHeight, opX, + opY, srcPoint); + else + lx_do_composite_mask(pxDst, dstOffset, srcOffset, + opWidth, opHeight); + } + break; + + case COMP_TYPE_ONEPASS: + if ((exaScratch.op == PictOpOver || exaScratch.op == PictOpSrc) + && (exaScratch.repeat == 1)) { + lx_composite_onepass_special(pxDst, opWidth, opHeight, opX, opY, + srcX, srcY); + return; + } + else if ((exaScratch.op == PictOpAdd) && (exaScratch.srcFormat->exa + == PICT_a8) && + (exaScratch.dstFormat->exa == PICT_a8)) + lx_composite_onepass_add_a8(pxDst, dstOffset, srcOffset, + opWidth, opHeight, opX, opY, srcX, + srcY); + else + lx_composite_onepass(pxDst, dstOffset, srcOffset, opWidth, + opHeight); + break; + + case COMP_TYPE_TWOPASS: + lx_composite_multipass(pxDst, dstOffset, srcOffset, opWidth, + opHeight); + + case COMP_TYPE_ROTATE: + lx_composite_rotate(pxDst, dstOffset, srcOffset, opWidth, opHeight); + break; + } + + opX += opWidth; + + if (opX >= dstX + width) { + opX = dstX; + opY += opHeight; + + if (opY >= dstY + height) + break; + } + + /* FIXME: Please add the code to handle the condition when the maskX + * and maskY coordinate are negative or greater than + * exaScratch.srcWidth and exaScratch.srcHeight */ + + if (exaScratch.type == COMP_TYPE_MASK) { + opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - maskX) + ? (exaScratch.srcWidth - maskX) : (dstX + width) - opX; + opHeight = ((dstY + height) - opY) > (exaScratch.srcHeight - maskY) + ? (exaScratch.srcHeight - maskY) : (dstY + height) - opY; + /* All black out of the mask */ + if (!exaScratch.maskrepeat) + exaScratch.srcColor = 0x0; + } + else { + if (exaScratch.type == COMP_TYPE_ONEPASS) { + if (srcX >= 0 && srcY >= 0 && (exaScratch.op == PictOpOver || + exaScratch.op == PictOpSrc || + exaScratch.op == PictOpClear)) { + opWidth = + ((dstX + width) - opX) > + (exaScratch.srcWidth - srcX) ? (exaScratch.srcWidth - + srcX) : (dstX + width) + - opX; + opHeight = ((dstY + height) - opY) > + (exaScratch.srcHeight - srcY) ? + (exaScratch.srcHeight - srcY) : (dstY + height) - opY; + } + else { + opWidth = ((dstX + width) - opX) > exaScratch.srcWidth ? + exaScratch.srcWidth : (dstX + width) - opX; + opHeight = ((dstY + height) - opY) > exaScratch.srcHeight ? + exaScratch.srcHeight : (dstY + height) - opY; + } + } + else { + opWidth = ((dstX + width) - opX) > (exaScratch.srcWidth - srcY) + ? (exaScratch.srcWidth - srcY) : (dstX + width) - opX; + opHeight = + ((dstY + height) - opY) > + (exaScratch.srcHeight - srcX) ? (exaScratch.srcHeight - + srcX) : (dstY + height) - + opY; + } + /* All black out of the source */ + if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ONEPASS)) { + /* FIXME: We black out the source here, so that any further regions + * in the loop get handled as a source that's a zero-vector (as + * defined for out-of-bounds from source pixmap for RepeatModeNone), + * but this will likely interfere with cases where srcX and/or srcY + * is negative - as opposed to e.g width being larger than srcWidth, + * which is exercised in rendercheck (always rectangle in top-left + * corner). + * Additionally it forces the drawing into tiles of srcWidth/srcHeight + * for non-repeat modes too, where we don't really need to tile it like + * this and could draw the out of bound regions all at once (or at most + * in 4 operations without the big loop). */ + lx_composite_all_black(srcOffset, exaScratch.srcWidth, + exaScratch.srcHeight); + } + if (!exaScratch.repeat && (exaScratch.type == COMP_TYPE_ROTATE)) + break; + } } } @@ -1455,7 +1531,7 @@ lx_done(PixmapPtr ptr) #if 0 static void lx_upload_to_screen(PixmapPtr pxDst, int x, int y, int w, int h, - char *src, int src_pitch) + char *src, int src_pitch) { GeodeRec *pGeode = GEODEPTR_FROM_PIXMAP(pxDst); int dst_pitch = exaGetPixmapPitch(pxDst); @@ -1464,32 +1540,32 @@ lx_upload_to_screen(PixmapPtr pxDst, int x, int y, int w, int h, char *dst; int offset = exaGetPixmapOffset(pxDst); - dst = (char *)(pGeode->FBBase + offset + (y * dst_pitch) + (x * cpp)); + dst = (char *) (pGeode->FBBase + offset + (y * dst_pitch) + (x * cpp)); int i; for (i = 0; i < h; i++) { - memcpy(dst, src, w * cpp); - dst += dst_pitch; - src += src_pitch; + memcpy(dst, src, w * cpp); + dst += dst_pitch; + src += src_pitch; } } #endif -#if EXA_VERSION_MINOR >= 2 +#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 2) static Bool lx_exa_pixmap_is_offscreen(PixmapPtr pPixmap) { - ScrnInfoPtr pScrni = xf86Screens[pPixmap->drawable.pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pPixmap->drawable.pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); - void *start = (void *)(pGeode->FBBase); + void *start = (void *) (pGeode->FBBase); void *end = - (void *)(pGeode->FBBase + pGeode->offscreenStart + - pGeode->offscreenSize); + (void *) (pGeode->FBBase + pGeode->offscreenStart + + pGeode->offscreenSize); - if ((void *)pPixmap->devPrivate.ptr >= start && - (void *)pPixmap->devPrivate.ptr < end) - return TRUE; + if ((void *) pPixmap->devPrivate.ptr >= start && + (void *) pPixmap->devPrivate.ptr < end) + return TRUE; return FALSE; } @@ -1499,7 +1575,7 @@ lx_exa_pixmap_is_offscreen(PixmapPtr pPixmap) Bool LXExaInit(ScreenPtr pScreen) { - ScrnInfoPtr pScrni = xf86Screens[pScreen->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScreen); GeodeRec *pGeode = GEODEPTR(pScrni); ExaDriverPtr pExa = pGeode->pExa; @@ -1523,7 +1599,7 @@ LXExaInit(ScreenPtr pScreen) pExa->DoneComposite = lx_done; //pExa->UploadToScreen = lx_upload_to_screen; -#if EXA_VERSION_MINOR >= 2 +#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 2) pExa->PixmapIsOffscreen = lx_exa_pixmap_is_offscreen; #endif diff --git a/driver/xf86-video-geode/src/lx_memory.c b/driver/xf86-video-geode/src/lx_memory.c index d833caa59..f26d2806e 100644 --- a/driver/xf86-video-geode/src/lx_memory.c +++ b/driver/xf86-video-geode/src/lx_memory.c @@ -45,11 +45,11 @@ GeodeOffscreenFreeSize(GeodeRec * pGeode) GeodeMemPtr ptr = pGeode->offscreenList; if (ptr == NULL) - return pGeode->offscreenSize; + return pGeode->offscreenSize; - for (; ptr->next; ptr = ptr->next) ; + for (; ptr->next; ptr = ptr->next); return (pGeode->offscreenStart + pGeode->offscreenSize) - - (ptr->offset + ptr->size); + - (ptr->offset + ptr->size); } void @@ -62,12 +62,12 @@ GeodeFreeOffscreen(GeodeRec * pGeode, GeodeMemPtr ptr) */ if (ptr->prev == NULL) - pGeode->offscreenList = ptr->next; + pGeode->offscreenList = ptr->next; else - ptr->prev->next = ptr->next; + ptr->prev->next = ptr->next; if (ptr->next) - ptr->next->prev = ptr->prev; + ptr->next->prev = ptr->prev; free(ptr); } @@ -83,22 +83,22 @@ GeodeAllocRemainder(GeodeRec * pGeode) GeodeMemPtr nptr, ptr = pGeode->offscreenList; if (!pGeode->offscreenList) { - pGeode->offscreenList = calloc(1, sizeof(*nptr)); - pGeode->offscreenList->offset = pGeode->offscreenStart; - pGeode->offscreenList->size = pGeode->offscreenSize; - pGeode->offscreenList->next = NULL; - pGeode->offscreenList->prev = NULL; + pGeode->offscreenList = calloc(1, sizeof(*nptr)); + pGeode->offscreenList->offset = pGeode->offscreenStart; + pGeode->offscreenList->size = pGeode->offscreenSize; + pGeode->offscreenList->next = NULL; + pGeode->offscreenList->prev = NULL; - return pGeode->offscreenList; + return pGeode->offscreenList; } /* Go to the end of the list of allocated stuff */ - for (; ptr->next; ptr = ptr->next) ; + for (; ptr->next; ptr = ptr->next); nptr = calloc(1, sizeof(*nptr)); nptr->offset = ptr->offset + ptr->size; nptr->size = pGeode->offscreenSize - - (nptr->offset - pGeode->offscreenStart); + (nptr->offset - pGeode->offscreenStart); nptr->next = ptr->next; nptr->prev = ptr; @@ -120,46 +120,46 @@ GeodeAllocOffscreen(GeodeRec * pGeode, int size, int align) if (!pGeode->offscreenList) { - if (size > pGeode->offscreenSize) - return NULL; + if (size > pGeode->offscreenSize) + return NULL; - offset = ALIGN(pGeode->offscreenStart, align); + offset = ALIGN(pGeode->offscreenStart, align); - pGeode->offscreenList = calloc(1, sizeof(*nptr)); - pGeode->offscreenList->offset = offset; - pGeode->offscreenList->size = size; - pGeode->offscreenList->next = NULL; + pGeode->offscreenList = calloc(1, sizeof(*nptr)); + pGeode->offscreenList->offset = offset; + pGeode->offscreenList->size = size; + pGeode->offscreenList->next = NULL; - return pGeode->offscreenList; + return pGeode->offscreenList; } while (ptr) { - unsigned int gap; + unsigned int gap; - if (ptr->next == NULL) - gap = pGeode->offscreenSize + pGeode->offscreenStart; + if (ptr->next == NULL) + gap = pGeode->offscreenSize + pGeode->offscreenStart; - else - gap = ptr->next->offset; + else + gap = ptr->next->offset; - gap = gap - (ptr->offset + ptr->size); - gap = ALIGN(gap, align); + gap = gap - (ptr->offset + ptr->size); + gap = ALIGN(gap, align); - if (size < gap) { - offset = ptr->offset + ptr->size; - offset = ALIGN(ptr->offset + ptr->size, align); + if (size < gap) { + offset = ptr->offset + ptr->size; + offset = ALIGN(ptr->offset + ptr->size, align); - nptr = calloc(1, sizeof(*nptr)); - nptr->offset = offset; - nptr->size = size; - nptr->next = ptr->next; - nptr->prev = ptr; - ptr->next = nptr; + nptr = calloc(1, sizeof(*nptr)); + nptr->offset = offset; + nptr->size = size; + nptr->next = ptr->next; + nptr->prev = ptr; + ptr->next = nptr; - return nptr; - } + return nptr; + } - ptr = ptr->next; + ptr = ptr->next; } return NULL; @@ -182,115 +182,118 @@ LXInitOffscreen(ScrnInfoPtr pScrni) fbavail = pGeode->FBAvail - GP3_SCRATCH_BUFFER_SIZE; pGeode->displaySize = MAX(pScrni->virtualX, pScrni->virtualY) - * pGeode->Pitch; + * pGeode->Pitch; pGeode->offscreenStart = pGeode->displaySize; pGeode->offscreenSize = fbavail - pGeode->displaySize; /* Allocate the usual memory suspects */ if (pGeode->tryCompression) { - int size = pScrni->virtualY * LX_CB_PITCH; - - /* The compression buffer needs to be 16 byte aligned */ - ptr = GeodeAllocOffscreen(pGeode, size, 16); - - if (ptr != NULL) { - pGeode->CBData.compression_offset = ptr->offset; - pGeode->CBData.size = LX_CB_PITCH; - pGeode->CBData.pitch = LX_CB_PITCH; - - pGeode->Compression = TRUE; - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for compression\n"); - pGeode->Compression = FALSE; - } + int size = pScrni->virtualY * LX_CB_PITCH; + + /* The compression buffer needs to be 16 byte aligned */ + ptr = GeodeAllocOffscreen(pGeode, size, 16); + + if (ptr != NULL) { + pGeode->CBData.compression_offset = ptr->offset; + pGeode->CBData.size = LX_CB_PITCH; + pGeode->CBData.pitch = LX_CB_PITCH; + + pGeode->Compression = TRUE; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for compression\n"); + pGeode->Compression = FALSE; + } } if (pGeode->tryHWCursor) { - ptr = GeodeAllocOffscreen(pGeode, - LX_CURSOR_HW_WIDTH * 4 * LX_CURSOR_HW_HEIGHT, 4); - - if (ptr != NULL) { - pGeode->CursorStartOffset = ptr->offset; - pGeode->HWCursor = TRUE; - } else { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Not enough memory for the hardware cursor\n"); - pGeode->HWCursor = FALSE; - } + ptr = GeodeAllocOffscreen(pGeode, + LX_CURSOR_HW_WIDTH * 4 * LX_CURSOR_HW_HEIGHT, + 4); + + if (ptr != NULL) { + pGeode->CursorStartOffset = ptr->offset; + pGeode->HWCursor = TRUE; + } + else { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Not enough memory for the hardware cursor\n"); + pGeode->HWCursor = FALSE; + } } if (!pGeode->NoAccel && pGeode->pExa) { - int size; + int size; - /* Try to get the scratch buffer for blending */ - pGeode->exaBfrOffset = 0; + /* Try to get the scratch buffer for blending */ + pGeode->exaBfrOffset = 0; - if (pGeode->exaBfrSz > 0) { - ptr = GeodeAllocOffscreen(pGeode, pGeode->exaBfrSz, 4); - if (ptr != NULL) - pGeode->exaBfrOffset = ptr->offset; - } + if (pGeode->exaBfrSz > 0) { + ptr = GeodeAllocOffscreen(pGeode, pGeode->exaBfrSz, 4); + if (ptr != NULL) + pGeode->exaBfrOffset = ptr->offset; + } - pGeode->pExa->offScreenBase = 0; - pGeode->pExa->memorySize = 0; + pGeode->pExa->offScreenBase = 0; + pGeode->pExa->memorySize = 0; - /* This might cause complaints - in order to avoid using + /* This might cause complaints - in order to avoid using xorg.conf as much as possible, we make assumptions about what a "default" memory map would look like. After discussion, we agreed that the default driver should assume the user will want to use rotation and video overlays, and - EXA will get whatever is leftover. - */ + EXA will get whatever is leftover. + */ - /* Get the amount of offscreen memory still left */ - size = GeodeOffscreenFreeSize(pGeode); + /* Get the amount of offscreen memory still left */ + size = GeodeOffscreenFreeSize(pGeode); - /* Align the size to a K boundary */ - size &= ~1023; + /* Align the size to a K boundary */ + size &= ~1023; - /* Allocate the EXA offscreen space */ - ptr = GeodeAllocOffscreen(pGeode, size, 4); + /* Allocate the EXA offscreen space */ + ptr = GeodeAllocOffscreen(pGeode, size, 4); - if (ptr == NULL) { - /* If we couldn't allocate what we wanted, - * then allocate whats left */ + if (ptr == NULL) { + /* If we couldn't allocate what we wanted, + * then allocate whats left */ - ptr = GeodeAllocRemainder(pGeode); - } + ptr = GeodeAllocRemainder(pGeode); + } - if (ptr != NULL) { - pGeode->pExa->offScreenBase = ptr->offset; - pGeode->pExa->memorySize = ptr->offset + ptr->size; - } + if (ptr != NULL) { + pGeode->pExa->offScreenBase = ptr->offset; + pGeode->pExa->memorySize = ptr->offset + ptr->size; + } } /* Show the memory map for diagnostic purposes */ xf86DrvMsg(pScrni->scrnIndex, X_INFO, "LX video memory:\n"); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Display: 0x%x bytes\n", - pGeode->displaySize); + pGeode->displaySize); if (pGeode->Compression) - xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Compression: 0x%x bytes\n", - pScrni->virtualY * LX_CB_PITCH); + xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Compression: 0x%x bytes\n", + pScrni->virtualY * LX_CB_PITCH); if (pGeode->HWCursor) - xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Cursor: 0x%x bytes\n", - LX_CURSOR_HW_WIDTH * 4 * LX_CURSOR_HW_HEIGHT); + xf86DrvMsg(pScrni->scrnIndex, X_INFO, " Cursor: 0x%x bytes\n", + LX_CURSOR_HW_WIDTH * 4 * LX_CURSOR_HW_HEIGHT); if (pGeode->exaBfrSz) - xf86DrvMsg(pScrni->scrnIndex, X_INFO, " ExaBfrSz: 0x%x bytes\n", - pGeode->exaBfrSz); + xf86DrvMsg(pScrni->scrnIndex, X_INFO, " ExaBfrSz: 0x%x bytes\n", + pGeode->exaBfrSz); if (pGeode->pExa && pGeode->pExa->offScreenBase) - xf86DrvMsg(pScrni->scrnIndex, X_INFO, " EXA: 0x%x bytes\n", - (unsigned int)(pGeode->pExa->memorySize - - pGeode->pExa->offScreenBase)); + xf86DrvMsg(pScrni->scrnIndex, X_INFO, " EXA: 0x%x bytes\n", + (unsigned int) (pGeode->pExa->memorySize - + pGeode->pExa->offScreenBase)); xf86DrvMsg(pScrni->scrnIndex, X_INFO, " FREE: 0x%x bytes\n", - GeodeOffscreenFreeSize(pGeode)); + GeodeOffscreenFreeSize(pGeode)); } /* Called as we go down, so blitz everybody */ @@ -303,9 +306,9 @@ GeodeCloseOffscreen(ScrnInfoPtr pScrni) GeodeMemPtr nptr; while (ptr) { - nptr = ptr->next; - free(ptr); - ptr = nptr; + nptr = ptr->next; + free(ptr); + ptr = nptr; } pGeode->offscreenList = NULL; diff --git a/driver/xf86-video-geode/src/lx_output.c b/driver/xf86-video-geode/src/lx_output.c index 6e36426ba..40455ce12 100644 --- a/driver/xf86-video-geode/src/lx_output.c +++ b/driver/xf86-video-geode/src/lx_output.c @@ -37,8 +37,7 @@ #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) -typedef struct _LXOutputPrivateRec -{ +typedef struct _LXOutputPrivateRec { I2CBusPtr pDDCBus; } LXOutputPrivateRec, *LXOutputPrivatePtr; @@ -55,30 +54,31 @@ lx_create_resources(xf86OutputPtr output) /* Scaling is only used for panels */ if (!(pGeode->Output & OUTPUT_PANEL)) - return; + return; scale_atom = MAKE_ATOM("scale"); ret = RRConfigureOutputProperty(output->randr_output, - scale_atom, FALSE, FALSE, FALSE, 0, NULL); + scale_atom, FALSE, FALSE, FALSE, 0, NULL); if (ret) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "RRConfigureOutputProperty error %d\n", ret); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "RRConfigureOutputProperty error %d\n", ret); } s = "on"; ret = RRChangeOutputProperty(output->randr_output, scale_atom, - XA_STRING, 8, PropModeReplace, strlen(s), (pointer) s, FALSE, FALSE); + XA_STRING, 8, PropModeReplace, strlen(s), + (pointer) s, FALSE, FALSE); if (ret) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "RRCharOutputProperty error %d\n", ret); + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "RRCharOutputProperty error %d\n", ret); } } static Bool lx_output_set_property(xf86OutputPtr output, Atom property, - RRPropertyValuePtr value) + RRPropertyValuePtr value) { ScrnInfoPtr pScrni = output->scrn; GeodeRec *pGeode = GEODEPTR(pScrni); @@ -87,33 +87,34 @@ lx_output_set_property(xf86OutputPtr output, Atom property, int ret; if (property != scale_atom) - return FALSE; + return FALSE; if (value->type != XA_STRING || value->format != 8) - return FALSE; + return FALSE; - s = (char *)value->data; + s = (char *) value->data; if (value->size == 2 && !strncmp("on", s, 2)) - pGeode->Scale = TRUE; + pGeode->Scale = TRUE; else if (value->size == 3 && !strncmp("off", s, 3)) - pGeode->Scale = FALSE; + pGeode->Scale = FALSE; if (pGeode->Scale != scale && output->crtc) { - xf86CrtcPtr crtc = output->crtc; + xf86CrtcPtr crtc = output->crtc; - if (crtc->enabled) { - ret = xf86CrtcSetMode(crtc, &crtc->desiredMode, - crtc->desiredRotation, crtc->desiredX, crtc->desiredY); + if (crtc->enabled) { + ret = xf86CrtcSetMode(crtc, &crtc->desiredMode, + crtc->desiredRotation, crtc->desiredX, + crtc->desiredY); - if (!ret) { - xf86DrvMsg(pScrni->scrnIndex, X_ERROR, - "Failed to set mode after property change!\n"); + if (!ret) { + xf86DrvMsg(pScrni->scrnIndex, X_ERROR, + "Failed to set mode after property change!\n"); - pGeode->Scale = scale; - return FALSE; - } - } + pGeode->Scale = scale; + return FALSE; + } + } } return TRUE; @@ -187,14 +188,14 @@ lx_output_mode_valid(xf86OutputPtr output, DisplayModePtr pMode) static Bool lx_output_mode_fixup(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) + DisplayModePtr adjusted_mode) { return TRUE; } static void lx_output_mode_set(xf86OutputPtr output, DisplayModePtr mode, - DisplayModePtr adjusted_mode) + DisplayModePtr adjusted_mode) { ScrnInfoPtr pScrni = output->scrn; GeodeRec *pGeode = GEODEPTR(pScrni); @@ -202,10 +203,10 @@ lx_output_mode_set(xf86OutputPtr output, DisplayModePtr mode, /* Configure the output path */ if (pGeode->Output & OUTPUT_PANEL) - df_set_output_path((pGeode->Output & OUTPUT_CRT) ? - DF_DISPLAY_CRT_FP : DF_DISPLAY_FP); + df_set_output_path((pGeode->Output & OUTPUT_CRT) ? + DF_DISPLAY_CRT_FP : DF_DISPLAY_FP); else - df_set_output_path(DF_DISPLAY_CRT); + df_set_output_path(DF_DISPLAY_CRT); } static xf86OutputStatus @@ -228,11 +229,12 @@ lx_output_get_modes(xf86OutputPtr output) DisplayModePtr modes; if (!(pGeode->Output & OUTPUT_PANEL)) { - mon = xf86OutputGetEDID(output, lx_output->pDDCBus); - xf86OutputSetEDID(output, mon); - modes = xf86OutputGetEDIDModes(output); - } else { - modes = xf86DuplicateMode(pGeode->panelMode); + mon = xf86OutputGetEDID(output, lx_output->pDDCBus); + xf86OutputSetEDID(output, mon); + modes = xf86OutputGetEDIDModes(output); + } + else { + modes = xf86DuplicateMode(pGeode->panelMode); } return modes; @@ -242,19 +244,19 @@ static void lx_output_destroy(xf86OutputPtr output) { if (output->driver_private) - free(output->driver_private); + free(output->driver_private); output->driver_private = NULL; } #ifdef RANDR_GET_CRTC_INTERFACE -static xf86CrtcPtr lx_output_get_crtc(xf86OutputPtr output) +static xf86CrtcPtr +lx_output_get_crtc(xf86OutputPtr output) { return output->crtc; } #endif - static const xf86OutputFuncsRec lx_output_funcs = { .create_resources = lx_create_resources, .dpms = lx_output_dpms, @@ -286,8 +288,8 @@ LXSetupOutput(ScrnInfoPtr pScrni) lxpriv = xnfcalloc(1, sizeof(LXOutputPrivateRec)); if (!lxpriv) { - xf86OutputDestroy(output); - return; + xf86OutputDestroy(output); + return; } output->driver_private = lxpriv; @@ -299,13 +301,14 @@ LXSetupOutput(ScrnInfoPtr pScrni) GeodeI2CInit(pScrni, &lxpriv->pDDCBus, "CS5536 DDC"); if (pScrni->monitor->widthmm && pScrni->monitor->heightmm) { - /* prioritize the admin's screen size */ - output->mm_width = pScrni->monitor->widthmm; - output->mm_height = pScrni->monitor->heightmm; - } else if (pGeode->mm_width && pGeode->mm_height) { - /* if we have a panel that we're certain of the size of, set it */ - output->mm_width = pScrni->monitor->widthmm = pGeode->mm_width; - output->mm_height = pScrni->monitor->heightmm = pGeode->mm_height; + /* prioritize the admin's screen size */ + output->mm_width = pScrni->monitor->widthmm; + output->mm_height = pScrni->monitor->heightmm; + } + else if (pGeode->mm_width && pGeode->mm_height) { + /* if we have a panel that we're certain of the size of, set it */ + output->mm_width = pScrni->monitor->widthmm = pGeode->mm_width; + output->mm_height = pScrni->monitor->heightmm = pGeode->mm_height; } /* We only have one CRTC, and this output is tied to it */ diff --git a/driver/xf86-video-geode/src/lx_panel.c b/driver/xf86-video-geode/src/lx_panel.c index 95cf0b344..6b5d4ed0d 100644 --- a/driver/xf86-video-geode/src/lx_panel.c +++ b/driver/xf86-video-geode/src/lx_panel.c @@ -49,29 +49,29 @@ DisplayModeRec lx_panel_modes[] = { {MODEPREFIX, 31200, 320, 354, 384, 400, 0, 240, 249, 253, 260, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 320x200@75 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 320x200@75 */ {MODEPREFIX, 25175, 640, 656, 744, 800, 0, 480, 490, 492, 525, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 640x480@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 640x480@60 */ {MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 880x600@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 880x600@60 */ {MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1024x768@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1024x768@60 */ {MODEPREFIX, 81600, 1152, 1216, 1336, 1520, 0, 864, 865, 868, 895, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1152x864@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1152x864@60 */ {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1280x1024@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1280x1024@60 */ {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1600x1200@60 */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1600x1200@60 */ {MODEPREFIX, 48960, 1024, 1064, 1168, 1312, 0, 600, 601, 604, 622, 0, - V_NHSYNC | V_NVSYNC, MODESUFFIX} - , /* 1024x600@60 wide panels */ + V_NHSYNC | V_NVSYNC, MODESUFFIX} + , /* 1024x600@60 wide panels */ }; /* Get the legacy panel size from VSA, and return the associated mode rec */ @@ -81,25 +81,26 @@ LXGetLegacyPanelMode(ScrnInfoPtr pScrni) { unsigned short reg = LX_READ_VG(0x00); unsigned char ret = (reg >> 8) & 0x07; + if ((ret == 1 || ret == 5)) { - reg = LX_READ_VG(0x02); - ret = (reg >> 3) & 0x07; + reg = LX_READ_VG(0x02); + ret = (reg >> 3) & 0x07; - /* FIXME: 7 is reserved in default. We use this value to support - * wide screen resolution 1024x600@80 now for panel. If you want to use - * that resolution, please assign ret to 7 manually here: - * "reg = 7" - * The user can use this entry for other wide screen resolutions. - */ + /* FIXME: 7 is reserved in default. We use this value to support + * wide screen resolution 1024x600@80 now for panel. If you want to use + * that resolution, please assign ret to 7 manually here: + * "reg = 7" + * The user can use this entry for other wide screen resolutions. + */ - if (ret < 8) { - xf86DrvMsg(pScrni->scrnIndex, X_INFO, - " VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n", - lx_panel_modes[ret].HDisplay, lx_panel_modes[ret].VDisplay, - lx_panel_modes[ret].Clock); - return &lx_panel_modes[ret]; - } + if (ret < 8) { + xf86DrvMsg(pScrni->scrnIndex, X_INFO, + " VSA Panel Mode is: %dx%d, pixel clock freq(kHz) is %d\n", + lx_panel_modes[ret].HDisplay, + lx_panel_modes[ret].VDisplay, lx_panel_modes[ret].Clock); + return &lx_panel_modes[ret]; + } } @@ -118,17 +119,17 @@ LXGetManualPanelMode(char *modestr) char sname[32]; int ret = sscanf(modestr, "%d %d %d %d %d %d %d %d %d", - &clock, - &hactive, &hsstart, &hsend, &htotal, - &vactive, &vsstart, &vsend, &vtotal); + &clock, + &hactive, &hsstart, &hsend, &htotal, + &vactive, &vsstart, &vsend, &vtotal); if (ret != 9) - return NULL; + return NULL; mode = xnfcalloc(1, sizeof(DisplayModeRec)); if (mode == NULL) - return NULL; + return NULL; sprintf(sname, "%dx%d", hactive, vactive); diff --git a/driver/xf86-video-geode/src/lx_video.c b/driver/xf86-video-geode/src/lx_video.c index 35e3ffa68..eb46cb5f2 100644 --- a/driver/xf86-video-geode/src/lx_video.c +++ b/driver/xf86-video-geode/src/lx_video.c @@ -61,14 +61,18 @@ #define TIMER_MASK (OFF_TIMER | FREE_TIMER) #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) +#ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof((a)) / (sizeof(*(a)))) +#endif /* Local function prototypes */ static void LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit); static void + + LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, - BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH); + BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH); static void LXResetVideo(ScrnInfoPtr pScrni); @@ -97,8 +101,7 @@ static XF86ImageRec Images[] = { XVIMAGE_RGB565 }; -typedef struct -{ +typedef struct { ExaOffscreenArea *vidmem; RegionRec clip; CARD32 filter; @@ -115,7 +118,7 @@ typedef struct static void LXCopyFromSys(GeodeRec * pGeode, unsigned char *src, unsigned int dst, - int dstPitch, int srcPitch, int h, int w) + int dstPitch, int srcPitch, int h, int w) { gp_declare_blt(0); @@ -136,36 +139,36 @@ LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv) switch (pScrni->depth) { case 8: - vg_get_display_palette_entry(pPriv->colorKey & 0xFF, &key); - red = ((key >> 16) & 0xFF); - green = ((key >> 8) & 0xFF); - blue = (key & 0xFF); - break; + vg_get_display_palette_entry(pPriv->colorKey & 0xFF, &key); + red = ((key >> 16) & 0xFF); + green = ((key >> 8) & 0xFF); + blue = (key & 0xFF); + break; case 16: - red = (pPriv->colorKey & pScrni->mask.red) >> - pScrni->offset.red << (8 - pScrni->weight.red); - green = (pPriv->colorKey & pScrni->mask.green) >> - pScrni->offset.green << (8 - pScrni->weight.green); - blue = (pPriv->colorKey & pScrni->mask.blue) >> - pScrni->offset.blue << (8 - pScrni->weight.blue); - break; + red = (pPriv->colorKey & pScrni->mask.red) >> + pScrni->offset.red << (8 - pScrni->weight.red); + green = (pPriv->colorKey & pScrni->mask.green) >> + pScrni->offset.green << (8 - pScrni->weight.green); + blue = (pPriv->colorKey & pScrni->mask.blue) >> + pScrni->offset.blue << (8 - pScrni->weight.blue); + break; default: - /* for > 16 bpp we send in the mask in xf86SetWeight. This - * function is providing the offset by 1 more. So we take - * this as a special case and subtract 1 for > 16 - */ - - red = (pPriv->colorKey & pScrni->mask.red) >> - (pScrni->offset.red - 1) << (8 - pScrni->weight.red); - green = (pPriv->colorKey & pScrni->mask.green) >> - (pScrni->offset.green - 1) << (8 - pScrni->weight.green); - blue = (pPriv->colorKey & pScrni->mask.blue) >> - (pScrni->offset.blue - 1) << (8 - pScrni->weight.blue); - break; + /* for > 16 bpp we send in the mask in xf86SetWeight. This + * function is providing the offset by 1 more. So we take + * this as a special case and subtract 1 for > 16 + */ + + red = (pPriv->colorKey & pScrni->mask.red) >> + (pScrni->offset.red - 1) << (8 - pScrni->weight.red); + green = (pPriv->colorKey & pScrni->mask.green) >> + (pScrni->offset.green - 1) << (8 - pScrni->weight.green); + blue = (pPriv->colorKey & pScrni->mask.blue) >> + (pScrni->offset.blue - 1) << (8 - pScrni->weight.blue); + break; } df_set_video_color_key((blue | (green << 8) | (red << 16)), - 0xFFFFFF, (pPriv->colorKeyMode == 0)); + 0xFFFFFF, (pPriv->colorKeyMode == 0)); REGION_EMPTY(pScrni->pScreen, &pPriv->clip); } @@ -176,8 +179,7 @@ LXSetColorkey(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv) the structure, and possibly cause us cache issues. */ -struct -{ +struct { unsigned int dstOffset; unsigned int dstPitch; unsigned int UVPitch; @@ -188,30 +190,30 @@ struct /* Copy planar YUV data */ static Bool -LXAllocateVidMem(ScrnInfoPtr pScrni, GeodePortPrivRec *pPriv, int size) +LXAllocateVidMem(ScrnInfoPtr pScrni, GeodePortPrivRec * pPriv, int size) { - if (!pPriv->vidmem || pPriv->vidmem->size < size) { - if (pPriv->vidmem) { - exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); - pPriv->vidmem = NULL; - } - - pPriv->vidmem = exaOffscreenAlloc(pScrni->pScreen, size, 4, - TRUE, NULL, NULL); - - if (pPriv->vidmem == NULL) { - ErrorF("Could not allocate memory for the video\n"); - return FALSE; - } + if (!pPriv->vidmem || pPriv->vidmem->size < size) { + if (pPriv->vidmem) { + exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); + pPriv->vidmem = NULL; + } + + pPriv->vidmem = exaOffscreenAlloc(pScrni->pScreen, size, 4, + TRUE, NULL, NULL); + + if (pPriv->vidmem == NULL) { + ErrorF("Could not allocate memory for the video\n"); + return FALSE; + } } return TRUE; -} +} static Bool LXCopyPlanar(ScrnInfoPtr pScrni, int id, unsigned char *buf, - short x1, short y1, short x2, short y2, - int width, int height, pointer data) + short x1, short y1, short x2, short y2, + int width, int height, pointer data) { GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; @@ -240,8 +242,8 @@ LXCopyPlanar(ScrnInfoPtr pScrni, int id, unsigned char *buf, size += UVDstPitch * height; if (LXAllocateVidMem(pScrni, pPriv, size) == FALSE) { - ErrorF("Error allocating an offscreen Planar region.\n"); - return FALSE; + ErrorF("Error allocating an offscreen Planar region.\n"); + return FALSE; } /* The top of the source region we want to copy */ @@ -268,14 +270,14 @@ LXCopyPlanar(ScrnInfoPtr pScrni, int id, unsigned char *buf, /* Copy Y */ LXCopyFromSys(pGeode, buf + YSrcOffset, - pPriv->vidmem->offset + YDstOffset, YDstPitch, YSrcPitch, lines, - pixels); + pPriv->vidmem->offset + YDstOffset, YDstPitch, YSrcPitch, + lines, pixels); /* Copy U + V at the same time */ LXCopyFromSys(pGeode, buf + USrcOffset, - pPriv->vidmem->offset + UDstOffset, UVDstPitch, UVSrcPitch, lines, - pixels >> 1); + pPriv->vidmem->offset + UDstOffset, UVDstPitch, UVSrcPitch, + lines, pixels >> 1); videoScratch.dstOffset = pPriv->vidmem->offset + YDstOffset; videoScratch.dstPitch = YDstPitch; @@ -288,8 +290,8 @@ LXCopyPlanar(ScrnInfoPtr pScrni, int id, unsigned char *buf, static Bool LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf, - short x1, short y1, short x2, short y2, - int width, int height, pointer data) + short x1, short y1, short x2, short y2, + int width, int height, pointer data) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; GeodeRec *pGeode = GEODEPTR(pScrni); @@ -303,8 +305,8 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf, lines = ((dstPitch * height) + pGeode->Pitch - 1) / pGeode->Pitch; if (LXAllocateVidMem(pScrni, pPriv, dstPitch * height) == FALSE) { - ErrorF("Error allocating an offscreen Packed region.\n"); - return FALSE; + ErrorF("Error allocating an offscreen Packed region.\n"); + return FALSE; } /* The top of the source region we want to copy */ @@ -326,17 +328,18 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf, if (id == FOURCC_Y800) { - /* Use the shared (unaccelerated) greyscale copy - you could probably - * accelerate it using a 2 pass blit and patterns, but it doesn't really - * seem worth it - */ + /* Use the shared (unaccelerated) greyscale copy - you could probably + * accelerate it using a 2 pass blit and patterns, but it doesn't really + * seem worth it + */ - GeodeCopyGreyscale(buf + srcOffset, pGeode->FBBase + dstOffset, - srcPitch, dstPitch, height, pixels >> 1); - } else - /* FIXME: should lines be used here instead of height? */ - LXCopyFromSys(pGeode, buf + srcOffset, dstOffset, dstPitch, srcPitch, - height, pixels); + GeodeCopyGreyscale(buf + srcOffset, pGeode->FBBase + dstOffset, + srcPitch, dstPitch, height, pixels >> 1); + } + else + /* FIXME: should lines be used here instead of height? */ + LXCopyFromSys(pGeode, buf + srcOffset, dstOffset, dstPitch, srcPitch, + height, pixels); videoScratch.dstOffset = dstOffset; videoScratch.dstPitch = dstPitch; @@ -346,7 +349,7 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf, static void LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, - BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH) + BoxPtr dstBox, short srcW, short srcH, short drawW, short drawH) { long ystart, xend, yend; unsigned long lines = 0; @@ -361,26 +364,26 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, switch (id) { case FOURCC_UYVY: - vSrcParams.video_format = DF_VIDFMT_UYVY; - break; + vSrcParams.video_format = DF_VIDFMT_UYVY; + break; case FOURCC_Y800: case FOURCC_YV12: case FOURCC_I420: - vSrcParams.video_format = DF_VIDFMT_Y0Y1Y2Y3; - break; + vSrcParams.video_format = DF_VIDFMT_Y0Y1Y2Y3; + break; case FOURCC_YUY2: - vSrcParams.video_format = DF_VIDFMT_YUYV; - break; + vSrcParams.video_format = DF_VIDFMT_YUYV; + break; case FOURCC_Y2YU: - vSrcParams.video_format = DF_VIDFMT_Y2YU; - break; + vSrcParams.video_format = DF_VIDFMT_Y2YU; + break; case FOURCC_YVYU: - vSrcParams.video_format = DF_VIDFMT_YVYU; - break; + vSrcParams.video_format = DF_VIDFMT_YVYU; + break; case FOURCC_RGB565: - vSrcParams.video_format = DF_VIDFMT_RGB; - break; + vSrcParams.video_format = DF_VIDFMT_RGB; + break; } vSrcParams.width = width; @@ -392,11 +395,11 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, df_set_video_filter_coefficients(NULL, 1); err = df_set_video_scale(width, height, drawW, drawH, - DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY); + DF_SCALEFLAG_CHANGEX | DF_SCALEFLAG_CHANGEY); if (err != CIM_STATUS_OK) { - /* Note the problem, but do nothing for now. */ - ErrorF("Video scale factor too large: %dx%d -> %dx%d\n", - width, height, drawW, drawH); + /* Note the problem, but do nothing for now. */ + ErrorF("Video scale factor too large: %dx%d -> %dx%d\n", + width, height, drawW, drawH); } /* Figure out clipping */ @@ -405,16 +408,17 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, yend = dstBox->y2; if (dstBox->y1 < 0) { - if (srcH < drawH) - lines = ((-dstBox->y1) * srcH) / drawH; - else - lines = (-dstBox->y1); - - ystart = 0; - drawH += dstBox->y1; - } else { - ystart = dstBox->y1; - lines = 0; + if (srcH < drawH) + lines = ((-dstBox->y1) * srcH) / drawH; + else + lines = (-dstBox->y1); + + ystart = 0; + drawH += dstBox->y1; + } + else { + ystart = dstBox->y1; + lines = 0; } yExtra = lines * videoScratch.dstPitch; @@ -434,17 +438,17 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, switch (id) { case FOURCC_Y800: case FOURCC_I420: - vSrcParams.u_offset = videoScratch.UDstOffset + uvExtra; - vSrcParams.v_offset = videoScratch.VDstOffset + uvExtra; - break; + vSrcParams.u_offset = videoScratch.UDstOffset + uvExtra; + vSrcParams.v_offset = videoScratch.VDstOffset + uvExtra; + break; case FOURCC_YV12: - vSrcParams.v_offset = videoScratch.UDstOffset + uvExtra; - vSrcParams.u_offset = videoScratch.VDstOffset + uvExtra; - break; + vSrcParams.v_offset = videoScratch.UDstOffset + uvExtra; + vSrcParams.u_offset = videoScratch.VDstOffset + uvExtra; + break; default: - vSrcParams.u_offset = vSrcParams.v_offset = 0; - break; + vSrcParams.u_offset = vSrcParams.v_offset = 0; + break; } vSrcParams.flags = DF_SOURCEFLAG_IMPLICITSCALING; @@ -457,11 +461,11 @@ LXDisplayVideo(ScrnInfoPtr pScrni, int id, short width, short height, static int LXPutImage(ScrnInfoPtr pScrni, - short srcX, short srcY, short drawX, short drawY, - short srcW, short srcH, short drawW, short drawH, - int id, unsigned char *buf, - short width, short height, Bool sync, RegionPtr clipBoxes, - pointer data, DrawablePtr pDraw) + short srcX, short srcY, short drawX, short drawY, + short srcW, short srcH, short drawW, short drawH, + int id, unsigned char *buf, + short width, short height, Bool sync, RegionPtr clipBoxes, + pointer data, DrawablePtr pDraw) { GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; @@ -470,18 +474,18 @@ LXPutImage(ScrnInfoPtr pScrni, Bool ret; if (pGeode->rotation != RR_Rotate_0) - return Success; + return Success; if (srcW <= 0 || srcH <= 0) { - return Success; + return Success; } if (drawW <= 0 || drawH <= 0) { - return Success; + return Success; } if (drawW > 16384) - drawW = 16384; + drawW = 16384; memset(&videoScratch, 0, sizeof(videoScratch)); @@ -501,27 +505,27 @@ LXPutImage(ScrnInfoPtr pScrni, dstBox.y2 -= pScrni->frameY0; if (id == FOURCC_YV12 || id == FOURCC_I420) - ret = LXCopyPlanar(pScrni, id, buf, x1, y1, x2, y2, width, - height, data); + ret = LXCopyPlanar(pScrni, id, buf, x1, y1, x2, y2, width, + height, data); else - ret = LXCopyPacked(pScrni, id, buf, x1, y1, x2, y2, width, - height, data); + ret = LXCopyPacked(pScrni, id, buf, x1, y1, x2, y2, width, + height, data); if (ret == FALSE) - return BadAlloc; - + return BadAlloc; + if (!RegionsEqual(&pPriv->clip, clipBoxes) || - (drawW != pPriv->pwidth || drawH != pPriv->pheight)) { - REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes); + (drawW != pPriv->pwidth || drawH != pPriv->pheight)) { + REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes); - if (pPriv->colorKeyMode == 0) { - xf86XVFillKeyHelper(pScrni->pScreen, pPriv->colorKey, clipBoxes); - } + if (pPriv->colorKeyMode == 0) { + xf86XVFillKeyHelper(pScrni->pScreen, pPriv->colorKey, clipBoxes); + } - LXDisplayVideo(pScrni, id, width, height, &dstBox, - srcW, srcH, drawW, drawH); - pPriv->pwidth = drawW; - pPriv->pheight = drawH; + LXDisplayVideo(pScrni, id, width, height, &dstBox, + srcW, srcH, drawW, drawH); + pPriv->pwidth = drawW; + pPriv->pheight = drawH; } pPriv->videoStatus = CLIENT_VIDEO_ON; @@ -531,8 +535,8 @@ LXPutImage(ScrnInfoPtr pScrni, static void LXQueryBestSize(ScrnInfoPtr pScrni, Bool motion, - short vidW, short vidH, short drawW, short drawH, - unsigned int *retW, unsigned int *retH, pointer data) + short vidW, short vidH, short drawW, short drawH, + unsigned int *retW, unsigned int *retH, pointer data) { *retW = drawW > 16384 ? 16384 : drawW; *retH = drawH; @@ -542,42 +546,45 @@ static Atom xvColorKey, xvColorKeyMode, xvFilter; static int LXGetPortAttribute(ScrnInfoPtr pScrni, - Atom attribute, INT32 * value, pointer data) + Atom attribute, INT32 *value, pointer data) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; if (attribute == xvColorKey) - *value = pPriv->colorKey; + *value = pPriv->colorKey; else if (attribute == xvColorKeyMode) - *value = pPriv->colorKeyMode; + *value = pPriv->colorKeyMode; else if (attribute == xvFilter) - *value = pPriv->filter; + *value = pPriv->filter; else - return BadMatch; + return BadMatch; return Success; } static int LXSetPortAttribute(ScrnInfoPtr pScrni, - Atom attribute, INT32 value, pointer data) + Atom attribute, INT32 value, pointer data) { GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; gp_wait_until_idle(); if (attribute == xvColorKey) { - pPriv->colorKey = value; - LXSetColorkey(pScrni, pPriv); - } else if (attribute == xvColorKeyMode) { - pPriv->colorKeyMode = value; - LXSetColorkey(pScrni, pPriv); - } else if (attribute == xvFilter) { - if ((value < 0) || (value > 1)) - return BadValue; - pPriv->filter = value; - } else - return BadMatch; + pPriv->colorKey = value; + LXSetColorkey(pScrni, pPriv); + } + else if (attribute == xvColorKeyMode) { + pPriv->colorKeyMode = value; + LXSetColorkey(pScrni, pPriv); + } + else if (attribute == xvFilter) { + if ((value < 0) || (value > 1)) + return BadValue; + pPriv->filter = value; + } + else + return BadMatch; return Success; } @@ -588,32 +595,33 @@ LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data; if (pPriv->videoStatus == 0) - return; + return; REGION_EMPTY(pScrni->pScreen, &pPriv->clip); gp_wait_until_idle(); if (exit) { - if (pPriv->videoStatus & CLIENT_VIDEO_ON) { - unsigned int val; - - df_set_video_enable(0, 0); - /* Put the LUT back in bypass */ - val = READ_VID32(DF_VID_MISC); - WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); - } - - if (pPriv->vidmem) { - exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); - pPriv->vidmem = NULL; - } - - pPriv->videoStatus = 0; - - /* Eh? */ - } else if (pPriv->videoStatus & CLIENT_VIDEO_ON) { - pPriv->videoStatus |= OFF_TIMER; - pPriv->offTime = currentTime.milliseconds + OFF_DELAY; + if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + unsigned int val; + + df_set_video_enable(0, 0); + /* Put the LUT back in bypass */ + val = READ_VID32(DF_VID_MISC); + WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); + } + + if (pPriv->vidmem) { + exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); + pPriv->vidmem = NULL; + } + + pPriv->videoStatus = 0; + + /* Eh? */ + } + else if (pPriv->videoStatus & CLIENT_VIDEO_ON) { + pPriv->videoStatus |= OFF_TIMER; + pPriv->offTime = currentTime.milliseconds + OFF_DELAY; } } @@ -623,73 +631,73 @@ LXResetVideo(ScrnInfoPtr pScrni) GeodeRec *pGeode = GEODEPTR(pScrni); if (!pGeode->NoAccel) { - GeodePortPrivRec *pPriv = pGeode->adaptor->pPortPrivates[0].ptr; + GeodePortPrivRec *pPriv = pGeode->adaptor->pPortPrivates[0].ptr; - gp_wait_until_idle(); - df_set_video_palette(NULL); + gp_wait_until_idle(); + df_set_video_palette(NULL); - LXSetColorkey(pScrni, pPriv); + LXSetColorkey(pScrni, pPriv); } } static void -LXVidBlockHandler(int i, pointer blockData, pointer pTimeout, - pointer pReadmask) +LXVidBlockHandler(BLOCKHANDLER_ARGS_DECL) { - ScreenPtr pScrn = screenInfo.screens[i]; - ScrnInfoPtr pScrni = xf86Screens[i]; + SCREEN_PTR(arg); + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); GeodePortPrivRec *pPriv = GET_PORT_PRIVATE(pScrni); pScrn->BlockHandler = pGeode->BlockHandler; - (*pScrn->BlockHandler) (i, blockData, pTimeout, pReadmask); + (*pScrn->BlockHandler) (BLOCKHANDLER_ARGS); pScrn->BlockHandler = LXVidBlockHandler; if (pPriv->videoStatus & TIMER_MASK) { - Time now = currentTime.milliseconds; - - if (pPriv->videoStatus & OFF_TIMER) { - gp_wait_until_idle(); - - if (pPriv->offTime < now) { - unsigned int val; - - df_set_video_enable(0, 0); - pPriv->videoStatus = FREE_TIMER; - pPriv->freeTime = now + FREE_DELAY; - - /* Turn off the video palette */ - val = READ_VID32(DF_VID_MISC); - WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); - } - } else { - if (pPriv->freeTime < now) { - - if (pPriv->vidmem) { - exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); - pPriv->vidmem = NULL; - } - - pPriv->videoStatus = 0; - } - } + Time now = currentTime.milliseconds; + + if (pPriv->videoStatus & OFF_TIMER) { + gp_wait_until_idle(); + + if (pPriv->offTime < now) { + unsigned int val; + + df_set_video_enable(0, 0); + pPriv->videoStatus = FREE_TIMER; + pPriv->freeTime = now + FREE_DELAY; + + /* Turn off the video palette */ + val = READ_VID32(DF_VID_MISC); + WRITE_VID32(DF_VID_MISC, val | DF_GAMMA_BYPASS_BOTH); + } + } + else { + if (pPriv->freeTime < now) { + + if (pPriv->vidmem) { + exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); + pPriv->vidmem = NULL; + } + + pPriv->videoStatus = 0; + } + } } } static XF86VideoAdaptorPtr LXSetupImageVideo(ScreenPtr pScrn) { - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); GeodeRec *pGeode = GEODEPTR(pScrni); XF86VideoAdaptorPtr adapt; GeodePortPrivRec *pPriv; adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + - sizeof(GeodePortPrivRec) + sizeof(DevUnion)); + sizeof(GeodePortPrivRec) + sizeof(DevUnion)); if (adapt == NULL) { - ErrorF("Couldn't create the rec\n"); - return NULL; + ErrorF("Couldn't create the rec\n"); + return NULL; } adapt->type = XvWindowMask | XvInputMask | XvImageMask; @@ -747,19 +755,19 @@ LXSetupImageVideo(ScreenPtr pScrn) /* Offscreen surface allocation */ -struct OffscreenPrivRec -{ +struct OffscreenPrivRec { ExaOffscreenArea *vidmem; Bool isOn; }; static int LXDisplaySurface(XF86SurfacePtr surface, - short srcX, short srcY, short drawX, short drawY, - short srcW, short srcH, short drawW, short drawH, RegionPtr clipBoxes) + short srcX, short srcY, short drawX, short drawY, + short srcW, short srcH, short drawW, short drawH, + RegionPtr clipBoxes) { struct OffscreenPrivRec *pPriv = - (struct OffscreenPrivRec *)surface->devPrivate.ptr; + (struct OffscreenPrivRec *) surface->devPrivate.ptr; ScrnInfoPtr pScrni = surface->pScrn; GeodePortPrivRec *portPriv = GET_PORT_PRIVATE(pScrni); @@ -772,7 +780,7 @@ LXDisplaySurface(XF86SurfacePtr surface, dstBox.y2 = drawY + drawH; if ((drawW <= 0) | (drawH <= 0)) - return Success; + return Success; /* Is this still valid? */ @@ -787,15 +795,15 @@ LXDisplaySurface(XF86SurfacePtr surface, videoScratch.dstPitch = surface->pitches[0]; LXDisplayVideo(pScrni, surface->id, surface->width, surface->height, - &dstBox, srcW, srcH, drawW, drawH); + &dstBox, srcW, srcH, drawW, drawH); pPriv->isOn = TRUE; if (portPriv->videoStatus & CLIENT_VIDEO_ON) { - REGION_EMPTY(pScrni->pScreen, &portPriv->clip); - UpdateCurrentTime(); - portPriv->videoStatus = FREE_TIMER; - portPriv->freeTime = currentTime.milliseconds + FREE_DELAY; + REGION_EMPTY(pScrni->pScreen, &portPriv->clip); + UpdateCurrentTime(); + portPriv->videoStatus = FREE_TIMER; + portPriv->freeTime = currentTime.milliseconds + FREE_DELAY; } return Success; @@ -803,7 +811,7 @@ LXDisplaySurface(XF86SurfacePtr surface, static int LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w, - unsigned short h, XF86SurfacePtr surface) + unsigned short h, XF86SurfacePtr surface) { GeodeRec *pGeode = GEODEPTR(pScrni); int pitch, lines; @@ -811,7 +819,7 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w, struct OffscreenPrivRec *pPriv; if (w > 1024 || h > 1024) - return BadAlloc; + return BadAlloc; /* The width needs to be word aligned */ w = (w + 1) & ~1; @@ -821,12 +829,11 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w, /* FIXME: is lines the right parameter to use here, * or should it be height * pitch? */ - vidmem = exaOffscreenAlloc(pScrni->pScreen, lines, 4, TRUE, - NULL, NULL); + vidmem = exaOffscreenAlloc(pScrni->pScreen, lines, 4, TRUE, NULL, NULL); if (vidmem == NULL) { - ErrorF("Error while allocating an offscreen region.\n"); - return BadAlloc; + ErrorF("Error while allocating an offscreen region.\n"); + return BadAlloc; } surface->width = w; @@ -840,28 +847,28 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w, if (pPriv && surface->pitches && surface->offsets) { - pPriv->vidmem = vidmem; + pPriv->vidmem = vidmem; - pPriv->isOn = FALSE; + pPriv->isOn = FALSE; - surface->pScrn = pScrni; - surface->id = id; - surface->pitches[0] = pitch; - surface->offsets[0] = vidmem->offset; - surface->devPrivate.ptr = (pointer) pPriv; + surface->pScrn = pScrni; + surface->id = id; + surface->pitches[0] = pitch; + surface->offsets[0] = vidmem->offset; + surface->devPrivate.ptr = (pointer) pPriv; - return Success; + return Success; } if (surface->offsets) - free(surface->offsets); + free(surface->offsets); if (surface->pitches) - free(surface->pitches); + free(surface->pitches); if (vidmem) { - exaOffscreenFree(pScrni->pScreen, vidmem); - vidmem = NULL; + exaOffscreenFree(pScrni->pScreen, vidmem); + vidmem = NULL; } return BadAlloc; @@ -871,7 +878,7 @@ static int LXStopSurface(XF86SurfacePtr surface) { struct OffscreenPrivRec *pPriv = (struct OffscreenPrivRec *) - surface->devPrivate.ptr; + surface->devPrivate.ptr; pPriv->isOn = FALSE; return Success; @@ -881,15 +888,15 @@ static int LXFreeSurface(XF86SurfacePtr surface) { struct OffscreenPrivRec *pPriv = (struct OffscreenPrivRec *) - surface->devPrivate.ptr; + surface->devPrivate.ptr; ScrnInfoPtr pScrni = surface->pScrn; if (pPriv->isOn) - LXStopSurface(surface); + LXStopSurface(surface); if (pPriv->vidmem) { - exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); - pPriv->vidmem = NULL; + exaOffscreenFree(pScrni->pScreen, pPriv->vidmem); + pPriv->vidmem = NULL; } free(surface->pitches); @@ -900,17 +907,17 @@ LXFreeSurface(XF86SurfacePtr surface) } static int -LXGetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 * value) +LXGetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value) { return LXGetPortAttribute(pScrni, attribute, value, - (pointer) (GET_PORT_PRIVATE(pScrni))); + (pointer) (GET_PORT_PRIVATE(pScrni))); } static int LXSetSurfaceAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 value) { return LXSetPortAttribute(pScrni, attribute, value, - (pointer) (GET_PORT_PRIVATE(pScrni))); + (pointer) (GET_PORT_PRIVATE(pScrni))); } static void @@ -920,7 +927,7 @@ LXInitOffscreenImages(ScreenPtr pScrn) /* need to free this someplace */ if (!(offscreenImages = malloc(sizeof(XF86OffscreenImageRec)))) - return; + return; offscreenImages[0].image = &Images[0]; offscreenImages[0].flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; @@ -942,7 +949,7 @@ void LXInitVideo(ScreenPtr pScrn) { GeodeRec *pGeode; - ScrnInfoPtr pScrni = xf86Screens[pScrn->myNum]; + ScrnInfoPtr pScrni = xf86ScreenToScrn(pScrn); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr newAdaptor = NULL; int num_adaptors; @@ -950,13 +957,13 @@ LXInitVideo(ScreenPtr pScrn) pGeode = GEODEPTR(pScrni); if (pGeode->NoAccel) { - ErrorF("Cannot run Xv without accelerations!\n"); - return; + ErrorF("Cannot run Xv without accelerations!\n"); + return; } if (!(newAdaptor = LXSetupImageVideo(pScrn))) { - ErrorF("Error while setting up the adaptor.\n"); - return; + ErrorF("Error while setting up the adaptor.\n"); + return; } LXInitOffscreenImages(pScrn); @@ -964,25 +971,27 @@ LXInitVideo(ScreenPtr pScrn) num_adaptors = xf86XVListGenericAdaptors(pScrni, &adaptors); if (!num_adaptors) { - num_adaptors = 1; - adaptors = &newAdaptor; - } else { - newAdaptors = - malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *)); - - if (newAdaptors) { - memcpy(newAdaptors, adaptors, num_adaptors * - sizeof(XF86VideoAdaptorPtr)); - newAdaptors[num_adaptors] = newAdaptor; - adaptors = newAdaptors; - num_adaptors++; - } else - ErrorF("Memory error while setting up the adaptor\n"); + num_adaptors = 1; + adaptors = &newAdaptor; + } + else { + newAdaptors = + malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr *)); + + if (newAdaptors) { + memcpy(newAdaptors, adaptors, num_adaptors * + sizeof(XF86VideoAdaptorPtr)); + newAdaptors[num_adaptors] = newAdaptor; + adaptors = newAdaptors; + num_adaptors++; + } + else + ErrorF("Memory error while setting up the adaptor\n"); } if (num_adaptors) - xf86XVScreenInit(pScrn, adaptors, num_adaptors); + xf86XVScreenInit(pScrn, adaptors, num_adaptors); if (newAdaptors) - free(newAdaptors); + free(newAdaptors); } diff --git a/driver/xf86-video-geode/src/panel.c b/driver/xf86-video-geode/src/panel.c index b7eb88faa..206fc7874 100644 --- a/driver/xf86-video-geode/src/panel.c +++ b/driver/xf86-video-geode/src/panel.c @@ -45,11 +45,11 @@ #include "gfx_defs.h" #include "geode.h" -#define PLATFORM_DYNAMIC 1 /* runtime selection */ -#define PLATFORM_DRACO 0 /* Draco + 9210 */ -#define PLATFORM_CENTAURUS 1 /* Centaurus + 9211 RevA */ -#define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */ -#define PLATFORM_GX2BASED 1 /* Redcloud */ +#define PLATFORM_DYNAMIC 1 /* runtime selection */ +#define PLATFORM_DRACO 0 /* Draco + 9210 */ +#define PLATFORM_CENTAURUS 1 /* Centaurus + 9211 RevA */ +#define PLATFORM_DORADO 1 /* Dorado + 9211 RevC */ +#define PLATFORM_GX2BASED 1 /* Redcloud */ unsigned char *XpressROMPtr; diff --git a/driver/xf86-video-geode/src/panel/92xx.h b/driver/xf86-video-geode/src/panel/92xx.h index f10fa096b..b7b0e25b8 100644 --- a/driver/xf86-video-geode/src/panel/92xx.h +++ b/driver/xf86-video-geode/src/panel/92xx.h @@ -114,8 +114,7 @@ typedef unsigned char UCHAR; /* GPIO Control */ int Pnl_Rev_ID; -typedef struct -{ +typedef struct { /* DISPLAY MODE PARAMETERS */ int xres; int yres; @@ -140,12 +139,10 @@ typedef struct unsigned long frm_memory_data; unsigned long memory_control; -} -CS92xx_MODE; +} CS92xx_MODE; /* VALUES USED TO SAVE AND RESTORE 9211 REGISTERS. */ -typedef struct -{ +typedef struct { unsigned long panel_state; /* VALUES USED TO SET THE FLAT PANEL DISPLAY CONTROLLER */ unsigned long panel_timing1; @@ -157,8 +154,7 @@ typedef struct unsigned long frm_memory_index; unsigned long frm_memory_data; unsigned long memory_control; -} -CS92xx_REGS; +} CS92xx_REGS; CS92xx_REGS cs9211_regs; @@ -171,200 +167,200 @@ CS92xx_REGS cs9211_regs; CS92xx_MODE FPModeParams[] = { {640, 480, 8, PNL_SSTN, PNL_COLOR_PANEL, /* display parameters */ - 0x01e00000, 0x00034000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ - 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x01e00000, 0x00034000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ + 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {640, 480, 12, PNL_TFT, PNL_COLOR_PANEL, /* display parameters */ - 0x01e00000, 0x0f100000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* block select 1, block select 2 */ - 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x01e00000, 0x0f100000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* block select 1, block select 2 */ + 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {640, 480, 18, PNL_TFT, PNL_COLOR_PANEL, /* display parameters */ - 0x01e00000, 0x0f100000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* block select 1, block select 2 */ - 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x01e00000, 0x0f100000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* block select 1, block select 2 */ + 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {640, 480, 16, PNL_DSTN, PNL_COLOR_PANEL, /* display parameters */ - 0x01e00000, 0x00014000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ - 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x0000004b, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x01e00000, 0x00014000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ + 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x0000004b, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {640, 480, 8, PNL_DSTN, PNL_MONO_PANEL, /* display parameters */ - 0x01e00000, 0x00084000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x0000004b, /* dither and frame rate control */ - 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ - 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x01e00000, 0x00084000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x0000004b, /* dither and frame rate control */ + 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ + 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {640, 480, 16, PNL_DSTN, PNL_MONO_PANEL, /* display parameters */ - 0x01e00000, 0x00094000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ - 0x81a5d470, 0x29cfb63e, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x01e00000, 0x00094000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ + 0x81a5d470, 0x29cfb63e, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {800, 600, 12, PNL_TFT, PNL_COLOR_PANEL, /* display parameters */ - 0x02580000, 0x0f100000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* block select 1, block select 2 */ - 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x02580000, 0x0f100000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* block select 1, block select 2 */ + 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {800, 600, 18, PNL_TFT, PNL_COLOR_PANEL, /* display parameters */ - 0x02580000, 0x0f100000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* block select 1, block select 2 */ - 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x02580000, 0x0f100000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* block select 1, block select 2 */ + 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {800, 600, 16, PNL_DSTN, PNL_COLOR_PANEL, /* display parameters */ - 0x02580000, 0x00014000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ - 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x0000004b, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x02580000, 0x00014000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ + 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x0000004b, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {800, 600, 8, PNL_DSTN, PNL_MONO_PANEL, /* display parameters */ - 0x02580000, 0x00084000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ - 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x0000004b, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x02580000, 0x00084000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ + 0x21446450, 0x21446450, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x0000004b, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {800, 600, 16, PNL_DSTN, PNL_MONO_PANEL, /* display parameters */ - 0x02580000, 0x00094000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /* The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ - 0x81a5d470, 0x29cfb63e, /* dispersion 1, dispersion 2 */ - /* The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000007, /* memory control */ - }, + 0x02580000, 0x00094000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /* The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x25cf3096, 0xad47b81e, /* block select 1, block select 2 */ + 0x81a5d470, 0x29cfb63e, /* dispersion 1, dispersion 2 */ + /* The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000007, /* memory control */ + }, {1024, 768, 18, PNL_TFT, PNL_COLOR_PANEL, /* display parameters */ - 0x03000000, 0x0f100000, /* panel timing reg 1, panel timing */ - /* reg 2 */ - 0x01000000, /* power management */ - /*The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* block select 1, block select 2 */ - 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ - /*The next 5 values are for revision C */ - 0x00000050, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000000, /* memory control */ - }, + 0x03000000, 0x0f100000, /* panel timing reg 1, panel timing */ + /* reg 2 */ + 0x01000000, /* power management */ + /*The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* block select 1, block select 2 */ + 0x00000000, 0x00000000, /* dispersion 1, dispersion 2 */ + /*The next 5 values are for revision C */ + 0x00000050, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000000, /* memory control */ + }, {1024, 768, 24, PNL_DSTN, PNL_COLOR_PANEL, /* display parameters */ - 0x03000000, 0x80024000, /* panel timing reg 1, panel timing reg 2 */ - 0x01000000, /* power management */ - /*The next 5 values are prior to revision C */ - 0x00000050, /* dither and frame rate control */ - 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ - 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ - /*The next 5 values are for revision C */ - 0x0000004b, /* dither and frame rate control */ - 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ - 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ - 0x00000005, /* memory control */ - } + 0x03000000, 0x80024000, /* panel timing reg 1, panel timing reg 2 */ + 0x01000000, /* power management */ + /*The next 5 values are prior to revision C */ + 0x00000050, /* dither and frame rate control */ + 0x048c26ae, 0x048c26ae, /* block select 1, block select 2 */ + 0x02468ace, 0x13579bdf, /* dispersion 1, dispersion 2 */ + /*The next 5 values are for revision C */ + 0x0000004b, /* dither and frame rate control */ + 0x00000000, 0x00000000, /* blue LSFR, red and green LSFR */ + 0x00000000, 0x00000000, /* FRM memory index, FRM memory data */ + 0x00000005, /* memory control */ + } }; -#endif /* !_92XX_h */ +#endif /* !_92XX_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/panel/cen9211.c b/driver/xf86-video-geode/src/panel/cen9211.c index 3abc7d5b2..d9cbc42b5 100644 --- a/driver/xf86-video-geode/src/panel/cen9211.c +++ b/driver/xf86-video-geode/src/panel/cen9211.c @@ -62,7 +62,7 @@ init_Centaurus_GPIO(void) /* set to bank 0 */ if (reg_val & CENT_GPIO_BANK_SELECT) { gfx_outb(CENT_CONFIG_DATA, - (unsigned char)(reg_val & ~CENT_GPIO_BANK_SELECT)); + (unsigned char) (reg_val & ~CENT_GPIO_BANK_SELECT)); } /* If this is the first time we have modified sioc2, we must @@ -108,7 +108,7 @@ init_Centaurus_GPIO(void) gfx_outb(CENT_PORT2_OUTPUT_TYPE, reg_val); return CENT_PASS; -} /* end init_GPIO() */ +} /* end init_GPIO() */ /********************************************************************* * @@ -135,7 +135,7 @@ init_Centaurus_9211(void) gfx_outb(CENT_97317_CHIP_SELECT, ReadData); return (CENT_PASS); -} /*end init_9211() */ +} /*end init_9211() */ /****************************************************************** * @@ -166,10 +166,10 @@ restore_Centaurus_97317_SIOC2(void) else return (CENT_FAIL); - } /* end if() */ + } /* end if() */ return (CENT_FAIL); -} /* end restore_97317_SIOC2bank() */ +} /* end restore_97317_SIOC2bank() */ /* ----------------------------------------------------------------------- * @@ -199,11 +199,11 @@ set_Centaurus_92xx_mode(Pnl_PanelStat * pstat) /* SET THE 92xx FOR THE SELECTED MODE */ set_Centaurus_92xx_mode_params(mode); return (CENT_PASS); - } /* end if() */ - } /* end for() */ + } /* end if() */ + } /* end for() */ return (CENT_FAIL); -} /* end set_Centaurus_92xx_mode() */ +} /* end set_Centaurus_92xx_mode() */ /*------------------------------------------------------------------- * @@ -228,51 +228,53 @@ set_Centaurus_92xx_mode_params(int mode) /* set 9211 registers using the desired panel settings */ Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_PAN_TIMING1, pMode->panel_timing1); + CS92xx_LCD_PAN_TIMING1, pMode->panel_timing1); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_PAN_TIMING2, pMode->panel_timing2); + CS92xx_LCD_PAN_TIMING2, pMode->panel_timing2); if (Pnl_Rev_ID == PNL_9211_C) { /* load the LSFR seeds */ Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_DITH_FR_CNTRL, pMode->rev_C_dither_frc); + CS92xx_LCD_DITH_FR_CNTRL, pMode->rev_C_dither_frc); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_BLUE_LSFR_SEED, pMode->blue_lsfr_seed); + CS92xx_BLUE_LSFR_SEED, pMode->blue_lsfr_seed); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_RED_GREEN_LSFR_SEED, pMode->red_green_lsfr_seed); - } else { + CS92xx_RED_GREEN_LSFR_SEED, + pMode->red_green_lsfr_seed); + } + else { Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_DITH_FR_CNTRL, pMode->pre_C_dither_frc); + CS92xx_LCD_DITH_FR_CNTRL, pMode->pre_C_dither_frc); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_BLOCK_SEL1, pMode->block_select1); + CS92xx_LCD_BLOCK_SEL1, pMode->block_select1); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_BLOCK_SEL2, pMode->block_select2); + CS92xx_LCD_BLOCK_SEL2, pMode->block_select2); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_DISPER1, pMode->dispersion1); + CS92xx_LCD_DISPER1, pMode->dispersion1); Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_DISPER2, pMode->dispersion2); + CS92xx_LCD_DISPER2, pMode->dispersion2); CentaurusProgramFRMload(); } Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_MEM_CNTRL, - pMode->memory_control); + pMode->memory_control); /* Set the power register last. This will turn the panel on at the 9211. */ Centaurus_write_gpio(FOUR_BYTES, - CS92xx_LCD_PWR_MAN, pMode->power_management); + CS92xx_LCD_PWR_MAN, pMode->power_management); -} /* end set_Centaurus_92xx_mode_params() */ +} /* end set_Centaurus_92xx_mode_params() */ void Centaurus_write_gpio(int width, ULONG address, unsigned long data) @@ -291,7 +293,7 @@ Centaurus_write_gpio(int width, ULONG address, unsigned long data) /* Write the 12-bit address */ for (count = 0; count < 12; count++) { - write_Centaurus_CX9211_GPIO((unsigned char)(Addr & 0x01)); + write_Centaurus_CX9211_GPIO((unsigned char) (Addr & 0x01)); /*the 9211 expects data LSB->MSB */ Addr = Addr >> 1; } @@ -309,7 +311,7 @@ Centaurus_write_gpio(int width, ULONG address, unsigned long data) } return; -} /* end Centaurus_write_gpio() */ +} /* end Centaurus_write_gpio() */ unsigned long Centaurus_read_gpio(int width, unsigned long address) @@ -329,7 +331,7 @@ Centaurus_read_gpio(int width, unsigned long address) /* Write the 12-bit address */ for (count = 0; count < 12; count++) { - write_Centaurus_CX9211_GPIO((unsigned char)(Addr & 0x01)); + write_Centaurus_CX9211_GPIO((unsigned char) (Addr & 0x01)); /*the 9211 expects data LSB->MSB */ Addr = Addr >> 1; @@ -347,7 +349,7 @@ Centaurus_read_gpio(int width, unsigned long address) } return data; -} /* end Centaurus_read_gpio() */ +} /* end Centaurus_read_gpio() */ /******************************************************************* * @@ -365,9 +367,9 @@ enable_Centaurus_9211_chip_select(void) /* Set the chip select (GPIO20) high */ cs_port_val = gfx_inb(CENT_97317_CHIP_SELECT); gfx_outb(CENT_97317_CHIP_SELECT, - (unsigned char)(cs_port_val | CENT_97317_CHIP_SEL_MASK)); + (unsigned char) (cs_port_val | CENT_97317_CHIP_SEL_MASK)); return; -} /* end enable_Centaurus_9211_chip_select() */ +} /* end enable_Centaurus_9211_chip_select() */ /******************************************************************** * @@ -385,10 +387,10 @@ disable_Centaurus_9211_chip_select(void) /* Set the chip select (GPIO20) low */ cs_port_val = gfx_inb(CENT_97317_CHIP_SELECT); gfx_outb(CENT_97317_CHIP_SELECT, - (unsigned char)(cs_port_val & ~CENT_97317_CHIP_SEL_MASK)); + (unsigned char) (cs_port_val & ~CENT_97317_CHIP_SEL_MASK)); return; -} /* end disable_Centaurus_9211_chip_select() */ +} /* end disable_Centaurus_9211_chip_select() */ /********************************************************************** * @@ -410,13 +412,13 @@ toggle_Centaurus_9211_clock(void) port_val = gfx_inb(CENT_97317_CLOCK_PORT); /* set the clock bit high */ gfx_outb(CENT_97317_CLOCK_PORT, - (unsigned char)(port_val | CENT_97317_CLOCK_MASK)); + (unsigned char) (port_val | CENT_97317_CLOCK_MASK)); /* set the clock bit low */ gfx_outb(CENT_97317_CLOCK_PORT, - (unsigned char)(port_val & ~CENT_97317_CLOCK_MASK)); + (unsigned char) (port_val & ~CENT_97317_CLOCK_MASK)); -} /* end toggle_Centaurus_9211_clock() */ +} /* end toggle_Centaurus_9211_clock() */ /******************************************************************** * @@ -448,7 +450,7 @@ write_Centaurus_CX9211_GPIO(unsigned char databit) toggle_Centaurus_9211_clock(); return; -} /* end write_Centaurus_CX9211_GPIO() */ +} /* end write_Centaurus_CX9211_GPIO() */ /***************************************************************** * @@ -473,14 +475,14 @@ write_Centaurus_CX9211_DWdata(unsigned long data) /* Now write the 32-bit Data */ for (count = 0; count < 32; count++) { - write_Centaurus_CX9211_GPIO((unsigned char)(data & 0x01)); + write_Centaurus_CX9211_GPIO((unsigned char) (data & 0x01)); /* the 9211 expects the data LSB->MSB */ data >>= 1; } return; -} /* end write_Centaurus_CX9211_DWdata() */ +} /* end write_Centaurus_CX9211_DWdata() */ /********************************************************************* * @@ -505,7 +507,7 @@ read_Centaurus_CX9211_GPIO(void) data_port_val >>= 1; return (data_port_val & 0x1); -} /* end read_Centaurus_CX9211_GPIO() */ +} /* end read_Centaurus_CX9211_GPIO() */ /********************************************************************** * @@ -541,12 +543,12 @@ read_Centaurus_CX9211_DWdata(void) for (count = 0; count < 32; count++) { ReadData = read_Centaurus_CX9211_GPIO(); /* 9211 sends data LSB->MSB */ - Data = Data | (((unsigned long)ReadData) << count); - } /* end for() */ + Data = Data | (((unsigned long) ReadData) << count); + } /* end for() */ return Data; -} /* end read_Centaurus_CX9211_DWdata() */ +} /* end read_Centaurus_CX9211_DWdata() */ void Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) @@ -576,7 +578,8 @@ Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) pParam->PanelChip = PNL_9211_A; else pParam->PanelChip = PNL_UNKNOWN_CHIP; - } else { /* no 9211 present */ + } + else { /* no 9211 present */ pParam->PanelChip = PNL_UNKNOWN_CHIP; } Pnl_Rev_ID = pParam->PanelChip; @@ -770,7 +773,7 @@ Centaurus_Power_Up(void) Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_PWR_MAN, off_data); return; -} /* Centaurus_Disable_Power */ +} /* Centaurus_Disable_Power */ /*********************************************************************** * @@ -788,7 +791,7 @@ Centaurus_Power_Down(void) Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_PWR_MAN, off_data); return; -} /* Centaurus_Disable_Power */ +} /* Centaurus_Disable_Power */ void Centaurus_9211init(Pnl_PanelStat * pstat) @@ -839,28 +842,28 @@ Centaurus_Restore_Panel_State(void) /* set 9211 registers using the desired panel settings */ Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_PAN_TIMING1, - cs9211_regs.panel_timing1); + cs9211_regs.panel_timing1); Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_PAN_TIMING2, - cs9211_regs.panel_timing2); + cs9211_regs.panel_timing2); /* load the LSFR seeds */ Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_DITH_FR_CNTRL, - cs9211_regs.dither_frc_ctrl); + cs9211_regs.dither_frc_ctrl); Centaurus_write_gpio(FOUR_BYTES, CS92xx_BLUE_LSFR_SEED, - cs9211_regs.blue_lsfr_seed); + cs9211_regs.blue_lsfr_seed); Centaurus_write_gpio(FOUR_BYTES, CS92xx_RED_GREEN_LSFR_SEED, - cs9211_regs.red_green_lsfr_seed); + cs9211_regs.red_green_lsfr_seed); Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_MEM_CNTRL, - cs9211_regs.memory_control); + cs9211_regs.memory_control); /* Set the power register last. This will turn the panel on at the 9211 */ Centaurus_write_gpio(FOUR_BYTES, CS92xx_LCD_PWR_MAN, - cs9211_regs.power_management); + cs9211_regs.power_management); } diff --git a/driver/xf86-video-geode/src/panel/cen9211.h b/driver/xf86-video-geode/src/panel/cen9211.h index 1ab21e8c9..c3e5d0876 100644 --- a/driver/xf86-video-geode/src/panel/cen9211.h +++ b/driver/xf86-video-geode/src/panel/cen9211.h @@ -78,8 +78,7 @@ void disable_Centaurus_9211_chip_select(void); void toggle_Centaurus_9211_clock(void); void write_Centaurus_CX9211_GPIO(unsigned char databit); void write_Centaurus_CX9211_DWdata(unsigned long data); -void Centaurus_write_gpio(int width, unsigned long address, - unsigned long data); +void Centaurus_write_gpio(int width, unsigned long address, unsigned long data); void Centaurus_Power_Up(void); void Centaurus_Power_Down(void); unsigned long Centaurus_read_gpio(int width, unsigned long address); @@ -90,12 +89,11 @@ unsigned char init_Centaurus_GPIO(void); unsigned char init_Centaurus_9211(void); unsigned char set_Centaurus_92xx_mode(Pnl_PanelStat * pstat); void CentaurusProgramFRMload(void); -void Centaurus_Get_9211_Details(unsigned long flags, - Pnl_PanelParams * pParam); +void Centaurus_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam); void Centaurus_Save_Panel_State(void); void Centaurus_Restore_Panel_State(void); void Centaurus_9211init(Pnl_PanelStat * pstat); -#endif /* !_CEN9211_h */ +#endif /* !_CEN9211_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/panel/dora9211.c b/driver/xf86-video-geode/src/panel/dora9211.c index ea52e95b1..295cf93b5 100644 --- a/driver/xf86-video-geode/src/panel/dora9211.c +++ b/driver/xf86-video-geode/src/panel/dora9211.c @@ -57,7 +57,8 @@ Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) pParam->PanelChip = PNL_9211_A; else pParam->PanelChip = PNL_UNKNOWN_CHIP; - } else { /* no 9211 present */ + } + else { /* no 9211 present */ pParam->PanelChip = PNL_UNKNOWN_CHIP; } } @@ -75,22 +76,19 @@ Dorado_Get_9211_Details(unsigned long flags, Pnl_PanelParams * pParam) DPanelType = Dorado9211ReadReg(0x434); DPanelType = (DPanelType >> (DRD_LCDRESGPIO1 + 1)); PanelTypeOrg = DPanelType >> 8; - Panel_2Byte = (unsigned char)PanelTypeOrg; - Panel_2Byte = - (Panel_2Byte >> (DRD_LCDRESGPIO2 - DRD_LCDRESGPIO1 - 1)); - DPanelType = (DPanelType | ((unsigned int)Panel_2Byte << 8)); + Panel_2Byte = (unsigned char) PanelTypeOrg; + Panel_2Byte = (Panel_2Byte >> (DRD_LCDRESGPIO2 - DRD_LCDRESGPIO1 - 1)); + DPanelType = (DPanelType | ((unsigned int) Panel_2Byte << 8)); DPanelType = DPanelType >> 1; PanelTypeOrg = DPanelType >> 8; - Panel_2Byte = (unsigned char)PanelTypeOrg; - Panel_2Byte = - (Panel_2Byte >> (DRD_LCDRESGPIO3 - DRD_LCDRESGPIO2 - 1)); - DPanelType = (DPanelType | ((unsigned int)Panel_2Byte << 8)); + Panel_2Byte = (unsigned char) PanelTypeOrg; + Panel_2Byte = (Panel_2Byte >> (DRD_LCDRESGPIO3 - DRD_LCDRESGPIO2 - 1)); + DPanelType = (DPanelType | ((unsigned int) Panel_2Byte << 8)); DPanelType = DPanelType >> 1; PanelTypeOrg = DPanelType >> 8; - Panel_2Byte = (unsigned char)PanelTypeOrg; - Panel_2Byte = - (Panel_2Byte >> (DRD_LCDRESGPIO4 - DRD_LCDRESGPIO3 - 1)); - DPanelType = (DPanelType | ((unsigned int)Panel_2Byte << 8)); + Panel_2Byte = (unsigned char) PanelTypeOrg; + Panel_2Byte = (Panel_2Byte >> (DRD_LCDRESGPIO4 - DRD_LCDRESGPIO3 - 1)); + DPanelType = (DPanelType | ((unsigned int) Panel_2Byte << 8)); DPanelType = DPanelType >> 5; DPanelType &= 0xf; @@ -210,10 +208,10 @@ Dorado9211Init(Pnl_PanelStat * pstat) Dorado9211WriteReg(CS92xx_LCD_PAN_TIMING1, pMode->panel_timing1); Dorado9211WriteReg(CS92xx_LCD_PAN_TIMING2, pMode->panel_timing2); Dorado9211WriteReg(CS92xx_LCD_DITH_FR_CNTRL, - pMode->rev_C_dither_frc); + pMode->rev_C_dither_frc); Dorado9211WriteReg(CS92xx_BLUE_LSFR_SEED, pMode->blue_lsfr_seed); Dorado9211WriteReg(CS92xx_RED_GREEN_LSFR_SEED, - pMode->red_green_lsfr_seed); + pMode->red_green_lsfr_seed); DoradoProgramFRMload(); Dorado9211WriteReg(CS92xx_LCD_MEM_CNTRL, pMode->memory_control); Dorado9211WriteReg(CS92xx_LCD_PWR_MAN, pMode->power_management); @@ -235,8 +233,8 @@ Dorado9211Init(Pnl_PanelStat * pstat) orig_value &= 0xfff1ffff; WRITE_VID32(0X4, orig_value); return; - } /*end if() */ - } /*end for() */ + } /*end if() */ + } /*end for() */ } @@ -358,7 +356,8 @@ Dorado9211ReadReg(unsigned short index) for (i = 0; i < 12; i++) { if (index & 0x1) { Dorado9211SetDataOut(); - } else { + } + else { Dorado9211ClearDataOut(); } Dorado9211ToggleClock(); @@ -382,7 +381,7 @@ Dorado9211ReadReg(unsigned short index) for (i = 0; i < 32; i++) { Dorado9211ToggleClock(); readbit = Dorado9211ReadDataIn(); - data |= (((unsigned long)readbit) << i); + data |= (((unsigned long) readbit) << i); } Dorado9211ClearCS(); @@ -407,7 +406,8 @@ Dorado9211WriteReg(unsigned short index, unsigned long data) for (i = 0; i < 12; i++) { if (index & 0x1) { Dorado9211SetDataOut(); - } else { + } + else { Dorado9211ClearDataOut(); } Dorado9211ToggleClock(); @@ -420,7 +420,8 @@ Dorado9211WriteReg(unsigned short index, unsigned long data) for (i = 0; i < 32; i++) { if (data & 0x1) { Dorado9211SetDataOut(); - } else { + } + else { Dorado9211ClearDataOut(); } Dorado9211ToggleClock(); @@ -546,7 +547,7 @@ Dorado_Power_Up(void) Dorado9211WriteReg(CS92xx_LCD_PWR_MAN, 0x01000000); return; -} /* disable_Centaurus_Power */ +} /* disable_Centaurus_Power */ /***************************************************************************** * void Dorado_Disable_Power((void); @@ -560,7 +561,7 @@ Dorado_Power_Down(void) Dorado9211WriteReg(CS92xx_LCD_PWR_MAN, 0x0); return; -} /* disable_Centaurus_Power */ +} /* disable_Centaurus_Power */ void Dorado_Save_Panel_State(void) @@ -599,7 +600,7 @@ Dorado_Restore_Panel_State(void) Dorado9211WriteReg(CS92xx_LCD_DITH_FR_CNTRL, cs9211_regs.dither_frc_ctrl); Dorado9211WriteReg(CS92xx_BLUE_LSFR_SEED, cs9211_regs.blue_lsfr_seed); Dorado9211WriteReg(CS92xx_RED_GREEN_LSFR_SEED, - cs9211_regs.red_green_lsfr_seed); + cs9211_regs.red_green_lsfr_seed); Dorado9211WriteReg(CS92xx_LCD_MEM_CNTRL, cs9211_regs.memory_control); /* Set the power register last. This will turn the panel on at the 9211 */ diff --git a/driver/xf86-video-geode/src/panel/dora9211.h b/driver/xf86-video-geode/src/panel/dora9211.h index d38b50320..fd3a4067b 100644 --- a/driver/xf86-video-geode/src/panel/dora9211.h +++ b/driver/xf86-video-geode/src/panel/dora9211.h @@ -40,13 +40,13 @@ /* GPIO Pin Configuration Registers */ -#define DRD_GEODE_GPPIN_SEL 0x20 /* GPIO Pin Configuration Select */ -#define DRD_GEODE_GPPIN_CFG 0x24 /* GPIO Pin Configuration Access */ -#define DRD_GEODE_GPPIN_RESET 0x28 /* GPIO Pin Reset */ +#define DRD_GEODE_GPPIN_SEL 0x20 /* GPIO Pin Configuration Select */ +#define DRD_GEODE_GPPIN_CFG 0x24 /* GPIO Pin Configuration Access */ +#define DRD_GEODE_GPPIN_RESET 0x28 /* GPIO Pin Reset */ -#define DRD_GEODE_GPIO_BASE 0x6400 /* F0 GPIO, IO mapped */ -#define DRD_GEODE_GPDI0 0x04 /* GPIO Data In 0 */ -#define DRD_GEODE_GPDO0 0x00 /* GPIO Data Out 0 */ +#define DRD_GEODE_GPIO_BASE 0x6400 /* F0 GPIO, IO mapped */ +#define DRD_GEODE_GPDI0 0x04 /* GPIO Data In 0 */ +#define DRD_GEODE_GPDO0 0x00 /* GPIO Data Out 0 */ /* Data Ports in */ #define DRD_CLOCKP9211IN DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDI0 @@ -61,11 +61,11 @@ #define DRD_CSP9211OUT DRD_GEODE_GPIO_BASE + DRD_GEODE_GPDO0 /* Pin MASKS */ -#define DRD_CLOCK9211 0x00000080 /* gpio 7, clock output to 9211 */ -#define DRD_DATAIN9211 0x00040000 /* gpio 18, data output to 9211 */ -#define DRD_DATAOUT9211 0x00000800 /* gpio 11, data input from 9211 */ -#define DRD_CS9211 0x00000200 /* gpio 9, chip select output to 9211 - * */ +#define DRD_CLOCK9211 0x00000080 /* gpio 7, clock output to 9211 */ +#define DRD_DATAIN9211 0x00040000 /* gpio 18, data output to 9211 */ +#define DRD_DATAOUT9211 0x00000800 /* gpio 11, data input from 9211 */ +#define DRD_CS9211 0x00000200 /* gpio 9, chip select output to 9211 + * */ /* Gpio CFG values to select in */ #define DRD_CLOCK9211CFG 0x00000007 /* gpio 7 */ @@ -97,4 +97,4 @@ void Dorado_Save_Panel_State(void); void Dorado_Restore_Panel_State(void); void Dorado9211Init(Pnl_PanelStat * pstat); -#endif /* !_DORA9211_h */ +#endif /* !_DORA9211_h */ diff --git a/driver/xf86-video-geode/src/panel/drac9210.c b/driver/xf86-video-geode/src/panel/drac9210.c index ce8b4a0dd..4eb0a98e8 100644 --- a/driver/xf86-video-geode/src/panel/drac9210.c +++ b/driver/xf86-video-geode/src/panel/drac9210.c @@ -32,12 +32,12 @@ #include "drac9210.h" -#define CS9210 0x40 /* Chip select pin */ +#define CS9210 0x40 /* Chip select pin */ /* 9210 on Draco */ -#define CLOCK9210 0x04 /* Clock pin */ -#define DATAIN9210 0x20 /* Data from 9210 */ -#define DATAOUT9210 0x80 /* Data to 9210 */ +#define CLOCK9210 0x04 /* Clock pin */ +#define DATAIN9210 0x20 /* Data from 9210 */ +#define DATAOUT9210 0x80 /* Data to 9210 */ static void DracoWriteData(unsigned char data); static void DracoReadData(unsigned char *data); @@ -393,13 +393,13 @@ Draco9210Init(Pnl_PanelStat * pstat) Draco9210ToggleClock(); Draco9210ClearCS(); -#if defined(_WIN32) /* For Windows */ +#if defined(_WIN32) /* For Windows */ for (i = 0; i < 10; i++) { _asm { out 0ED h, al} } -#elif defined(linux) /* Linux */ +#elif defined(linux) /* Linux */ #endif @@ -422,7 +422,8 @@ DracoWriteData(unsigned char data) databit = data & mask; if (data & mask) { Draco9210SetDataOut(); - } else { + } + else { Draco9210ClearDataOut(); } mask >>= 1; @@ -449,7 +450,7 @@ DracoReadData(unsigned char *data) *data = tmp; } -#if defined(_WIN32) /* For Windows */ +#if defined(_WIN32) /* For Windows */ void Draco9210GpioInit() @@ -471,14 +472,11 @@ Draco9210SetCS() Point to PCI address register mov dx, 0 CF8h; 55 XX GPIO data register mov eax, CX55x0_ID + 090 h out dx, eax; Point to PCI data register (CFCh) - mov dx, 0 CFCh +mov dx, 0 CFCh in ax, dx and ah, 30 h mov ah, c92DataReg - or ah, CS9210 mov c92DataReg, ah out dx, ax popf} -} - -void + or ah, CS9210 mov c92DataReg, ah out dx, ax popf}} void Draco9210ClearCS() { _asm { @@ -487,13 +485,10 @@ Draco9210ClearCS() 55 XX GPIO data register mov eax, CX55x0_ID + 090 h out dx, eax; Point to PCI data register (CFCh) mov dx, 0 CFCh; - Set CS LOW +Set CS LOW in ax, dx mov ah, c92DataReg - and ah, NOT CS9210 mov c92DataReg, ah out dx, ax popf} -} - -void + and ah, NOT CS9210 mov c92DataReg, ah out dx, ax popf}} void Draco9210SetDataOut() { _asm { @@ -502,30 +497,26 @@ Draco9210SetDataOut() 55 XX GPIO data register mov eax, CX55x0_ID + 090 h out dx, eax; Point to PCI data register (CFCh) mov dx, 0 CFCh; - Set DATA HIGH +Set DATA HIGH in ax, dx mov ah, c92DataReg - or ah, DATAOUT9210 mov c92DataReg, ah out dx, ax popf} -} - -void + or ah, DATAOUT9210 mov c92DataReg, ah out dx, ax popf}} void Draco9210ClearDataOut() { _asm { pushf; Point to PCI address register - mov dx, 0 CF8h mov eax, CX55x0_ID + 090 h; + mov dx, 0 CF8h mov eax, CX55x0_ID + 090 h; + ; 55 XX GPIO data register out dx, eax; Point to PCI data register (CFCh) mov dx, 0 CFCh; - Set Data LOW +Set Data LOW in ax, dx mov ah, c92DataReg - and ah, NOT DATAOUT9210 mov c92DataReg, ah out dx, ax popf} -} - -unsigned char + and ah, NOT DATAOUT9210 mov c92DataReg, ah out dx, ax popf}} + unsigned char Draco9210ReadDataIn() { unsigned char readdata; @@ -538,8 +529,7 @@ Draco9210ReadDataIn() mov dx, 0F Ch in ax, dx; Preserve just Data IN bit and ah, DATAIN9210 mov al, ah cmp al, 0; Is it LOW ? je readDataLow; - must be HIGH mov al, 1 readDataLow:mov readdata, al popf} - return (readdata); + must be HIGH mov al, 1 readDataLow:mov readdata, al popf} return (readdata); } void @@ -552,45 +542,49 @@ Draco9210ToggleClock() Point to PCI data register (CFCh) out dx, eax mov dx, 0 CFCh; SET CLOCK in ax, dx mov ah, c92DataReg or ah, CLOCK9210 mov c92DataReg, ah out dx, ax out 0ED h, al /* IOPAUSE */ - ; + ; Point to PCI address register mov dx, 0 CF8h; 55 XX GPIO data register mov eax, CX55x0_ID + 090 h out dx, eax; Point to PCI data register (CFCh) mov dx, 0 CFCh; ; - CLEAR CLOCK +CLEAR CLOCK in ax, dx mov ah, c92DataReg - and ah, NOT CLOCK9210 mov c92DataReg, ah out dx, ax popf} -} - -#elif defined(linux) /* Linux */ + and ah, NOT CLOCK9210 mov c92DataReg, ah out dx, ax popf}} +#elif defined(linux) /* Linux */ void Draco9210GpioInit() { } + void Draco9210SetCS() { } + void Draco9210ClearCS() { } + void Draco9210SetDataOut() { } + void Draco9210ClearDataOut() { } + unsigned char Draco9210ReadDataIn() { } + void Draco9210ToggleClock() { diff --git a/driver/xf86-video-geode/src/panel/drac9210.h b/driver/xf86-video-geode/src/panel/drac9210.h index 1939fd601..52485794f 100644 --- a/driver/xf86-video-geode/src/panel/drac9210.h +++ b/driver/xf86-video-geode/src/panel/drac9210.h @@ -36,6 +36,6 @@ #define _DRAC9210_h #define CX55x0_ID 0x80009000 static unsigned char c92DataReg = 0; -#endif /* !_DRAC9210_h */ +#endif /* !_DRAC9210_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/panel/gx2_9211.c b/driver/xf86-video-geode/src/panel/gx2_9211.c index 7d46b9c67..b34a19d88 100644 --- a/driver/xf86-video-geode/src/panel/gx2_9211.c +++ b/driver/xf86-video-geode/src/panel/gx2_9211.c @@ -34,13 +34,13 @@ #include "gx2_9211.h" #include "pnl_defs.h" -#if defined(_WIN32) /* windows */ +#if defined(_WIN32) /* windows */ #include "gfx_defs.h" extern DEV_STATUS gfx_msr_read(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); extern DEV_STATUS gfx_msr_write(unsigned int device, unsigned int msrRegister, - Q_WORD * msrValue); + Q_WORD * msrValue); #endif static unsigned long FPBaseAddr; @@ -80,45 +80,45 @@ SetFPBaseAddr(unsigned long addr) ****************************************************************************/ void protected_mode_access(unsigned long mode, - unsigned long width, unsigned long addr, char *pdata) + unsigned long width, unsigned long addr, char *pdata) { - void *ptr = (void *)(FPBaseAddr + addr); + void *ptr = (void *) (FPBaseAddr + addr); /* type specific buffer pointers */ - char *byte_data = (char *)pdata; - unsigned long *word_data = (unsigned long *)pdata; - unsigned long *dword_data = (unsigned long *)pdata; + char *byte_data = (char *) pdata; + unsigned long *word_data = (unsigned long *) pdata; + unsigned long *dword_data = (unsigned long *) pdata; if (mode == GX2_READ) { switch (width) { case FOUR_BYTES: - *(dword_data) = (unsigned long)(*(unsigned long *)ptr); + *(dword_data) = (unsigned long) (*(unsigned long *) ptr); break; case TWO_BYTES: - *(word_data) = (unsigned long)(*(unsigned long *)ptr); + *(word_data) = (unsigned long) (*(unsigned long *) ptr); break; default: - *(byte_data) = (char)(*(char *)ptr); + *(byte_data) = (char) (*(char *) ptr); break; } - } /* end GX2_READ */ + } /* end GX2_READ */ else if (mode == GX2_WRITE) { switch (width) { case FOUR_BYTES: - *(unsigned long *)ptr = *dword_data; + *(unsigned long *) ptr = *dword_data; break; case TWO_BYTES: - *(unsigned long *)ptr = *word_data; + *(unsigned long *) ptr = *word_data; break; default: - *(char *)ptr = *byte_data; + *(char *) ptr = *byte_data; break; - } /* end switch(mode) */ + } /* end switch(mode) */ } /* end case GX2_WRITE */ return; -} /* End of protected_mode_access. */ +} /* End of protected_mode_access. */ /************************************************************************* * void write_video_reg64_low( unsigned long offset, unsigned long value ) @@ -132,8 +132,8 @@ void write_video_reg64_low(unsigned long offset, unsigned long value) { protected_mode_access(GX2_WRITE, FOUR_BYTES, - FPBaseAddr + offset, (char *)&value); -} /*end write_video_reg64_low() */ + FPBaseAddr + offset, (char *) &value); +} /*end write_video_reg64_low() */ /************************************************************************* * unsigned long read_video_reg64_low( unsigned long offset ) @@ -149,9 +149,9 @@ read_video_reg64_low(unsigned long offset) unsigned long data; protected_mode_access(GX2_READ, FOUR_BYTES, - FPBaseAddr + offset, (char *)&data); + FPBaseAddr + offset, (char *) &data); return (data); -} /*end read_video_reg64_low() */ +} /*end read_video_reg64_low() */ /***************************************************************************** * void Redcloud_fp_reg(int mode, unsigned long address, unsigned long *data) @@ -174,11 +174,12 @@ Redcloud_fp_reg(int mode, unsigned long address, unsigned long *data) { if (mode == GX2_READ) { *data = read_video_reg64_low(address); - } else { + } + else { write_video_reg64_low(address, *data); } -} /* End of Redcloud_fp_reg() */ +} /* End of Redcloud_fp_reg() */ /*------------------------------------------------------------------- * @@ -200,7 +201,8 @@ set_Redcloud_92xx_mode_params(int mode) msrValue.low &= ~GX2_VP_PAD_SELECT_MASK; if (pMode->panel_type == PNL_TFT || pMode->panel_type == PNL_TWOP) { msrValue.low = GX2_VP_PAD_SELECT_TFT; - } else { + } + else { msrValue.low = GX2_VP_PAD_SELECT_DSTN; } gfx_msr_write(RC_ID_DF, GX2_VP_MSR_PAD_SELECT, &msrValue); @@ -208,17 +210,17 @@ set_Redcloud_92xx_mode_params(int mode) /* Turn the 92xx power off before setting any new parameters. */ temp_data = pMode->power_management & ~GX2_FP_PM_PWR_ON; - Redcloud_fp_reg(GX2_WRITE, GX2_FP_PWR_MAN, (unsigned long *)&temp_data); + Redcloud_fp_reg(GX2_WRITE, GX2_FP_PWR_MAN, (unsigned long *) &temp_data); /* Set 9211 registers using the desired panel settings */ Redcloud_fp_reg(GX2_WRITE, GX2_FP_PAN_TIMING1, - (unsigned long *)&pMode->panel_timing1); + (unsigned long *) &pMode->panel_timing1); /* On Redcloud, bit 31 is now reserved. */ temp_data = pMode->panel_timing2 & 0x7FFFFFFF; Redcloud_fp_reg(GX2_WRITE, GX2_FP_PAN_TIMING2, - (unsigned long *)&temp_data); + (unsigned long *) &temp_data); /* On Redcloud TFT parts, set this to 0x70 so all 8 bits per color run * thru fp crc but only non-TFT parts. Otherwise, set it to be 0x50. @@ -226,30 +228,31 @@ set_Redcloud_92xx_mode_params(int mode) */ if (pMode->panel_type == PNL_TFT || pMode->panel_type == PNL_TWOP) { temp_data = GX2_FP_CRC_PASS_THRU_MASK; - } else { + } + else { temp_data = pMode->rev_C_dither_frc; } Redcloud_fp_reg(GX2_WRITE, GX2_FP_DITH_FR_CNTRL, - (unsigned long *)&temp_data); + (unsigned long *) &temp_data); Redcloud_fp_reg(GX2_WRITE, GX2_FP_BLFSR, - (unsigned long *)&pMode->blue_lsfr_seed); + (unsigned long *) &pMode->blue_lsfr_seed); Redcloud_fp_reg(GX2_WRITE, GX2_FP_RLFSR, - (unsigned long *)&pMode->red_green_lsfr_seed); + (unsigned long *) &pMode->red_green_lsfr_seed); /* Set the memory information, then the power register last. * This will turn the panel on at the 9211. */ - Redcloud_fp_reg(GX2_READ, GX2_FP_FBB, (unsigned long *)&base_data); + Redcloud_fp_reg(GX2_READ, GX2_FP_FBB, (unsigned long *) &base_data); if (base_data != 0x41780000) { base_data = 0x41780000; - Redcloud_fp_reg(GX2_WRITE, GX2_FP_FBB, (unsigned long *)&base_data); + Redcloud_fp_reg(GX2_WRITE, GX2_FP_FBB, (unsigned long *) &base_data); } Redcloud_fp_reg(GX2_WRITE, GX2_FP_PWR_MAN, - (unsigned long *)&pMode->power_management); + (unsigned long *) &pMode->power_management); -} /*end set_92xx_mode_params() */ +} /*end set_92xx_mode_params() */ /* ----------------------------------------------------------------------- * SET_FLAT_PANEL_MODE @@ -277,11 +280,11 @@ set_Redcloud_92xx_mode(Pnl_PanelStat * pstat) /* SET THE 92xx FOR THE SELECTED MODE */ set_Redcloud_92xx_mode_params(mode); return TRUE; - } /* end if() */ - } /* end for() */ + } /* end if() */ + } /* end for() */ return FALSE; -} /* end set_Centaurus_92xx_mode() */ +} /* end set_Centaurus_92xx_mode() */ void Redcloud_9211init(Pnl_PanelStat * pstat) diff --git a/driver/xf86-video-geode/src/panel/gx2_9211.h b/driver/xf86-video-geode/src/panel/gx2_9211.h index 071b3fb17..ef6372c9c 100644 --- a/driver/xf86-video-geode/src/panel/gx2_9211.h +++ b/driver/xf86-video-geode/src/panel/gx2_9211.h @@ -45,20 +45,20 @@ */ #define GX2_FP_LCD_OFFSET 0x00000400 -#define CS9211_REDCLOUD 0x0400 /* Moved 9211 Rev C3 up to next major - * no. */ -#define GX2_FP_PAN_TIMING1 0x0400 /* FP timings 1 */ -#define GX2_FP_PAN_TIMING2 0x0408 /* FP timings 2 */ -#define GX2_FP_PWR_MAN 0x0410 /* FP power management */ -#define GX2_FP_DITH_FR_CNTRL 0x0418 /* FP dither and frame rate */ -#define GX2_FP_BLFSR 0x0420 /* Blue LFSR seed */ -#define GX2_FP_RLFSR 0x0428 /* Red and Green LFSR seed */ -#define GX2_FP_FMI 0x0430 /* FRM Memory Index */ -#define GX2_FP_FMD 0x0438 /* FRM Memory Data */ -#define GX2_FP_DCA 0x0448 /* Dither ram control and address */ -#define GX2_FP_DMD 0x0450 /* Dither memory data */ -#define GX2_FP_PAN_CRC_SIG 0x0458 /* FP CRC signature */ -#define GX2_FP_FBB 0x0460 /* Frame Buffer Base Address */ +#define CS9211_REDCLOUD 0x0400 /* Moved 9211 Rev C3 up to next major + * no. */ +#define GX2_FP_PAN_TIMING1 0x0400 /* FP timings 1 */ +#define GX2_FP_PAN_TIMING2 0x0408 /* FP timings 2 */ +#define GX2_FP_PWR_MAN 0x0410 /* FP power management */ +#define GX2_FP_DITH_FR_CNTRL 0x0418 /* FP dither and frame rate */ +#define GX2_FP_BLFSR 0x0420 /* Blue LFSR seed */ +#define GX2_FP_RLFSR 0x0428 /* Red and Green LFSR seed */ +#define GX2_FP_FMI 0x0430 /* FRM Memory Index */ +#define GX2_FP_FMD 0x0438 /* FRM Memory Data */ +#define GX2_FP_DCA 0x0448 /* Dither ram control and address */ +#define GX2_FP_DMD 0x0450 /* Dither memory data */ +#define GX2_FP_PAN_CRC_SIG 0x0458 /* FP CRC signature */ +#define GX2_FP_FBB 0x0460 /* Frame Buffer Base Address */ /* GX2_FP_PAN_TIMING2 bits */ @@ -107,7 +107,8 @@ void SetFPBaseAddr(unsigned long); void Redcloud_9211init(Pnl_PanelStat *); void protected_mode_access(unsigned long mode, - unsigned long width, unsigned long addr, char *pdata); + unsigned long width, unsigned long addr, + char *pdata); void write_video_reg64_low(unsigned long offset, unsigned long value); unsigned long read_video_reg64_low(unsigned long offset); void Redcloud_fp_reg(int mode, unsigned long address, unsigned long *data); diff --git a/driver/xf86-video-geode/src/panel/panel.c b/driver/xf86-video-geode/src/panel/panel.c index ffd54c911..f7b55f0bf 100644 --- a/driver/xf86-video-geode/src/panel/panel.c +++ b/driver/xf86-video-geode/src/panel/panel.c @@ -30,7 +30,7 @@ * SubModule: Geode FlatPanel library * */ -#if defined(linux) /* Linux */ +#if defined(linux) /* Linux */ #ifdef __KERNEL__ @@ -43,8 +43,8 @@ #include <linux/fs.h> #include <asm/mman.h> -#endif /* __KERNEL__ */ -#elif defined(_WIN32) /* windows */ +#endif /* __KERNEL__ */ +#elif defined(_WIN32) /* windows */ #include <windows.h> diff --git a/driver/xf86-video-geode/src/panel/panel.h b/driver/xf86-video-geode/src/panel/panel.h index bc708dfb3..93380f075 100644 --- a/driver/xf86-video-geode/src/panel/panel.h +++ b/driver/xf86-video-geode/src/panel/panel.h @@ -38,8 +38,7 @@ #include "pnl_defs.h" #ifdef __cplusplus -extern "C" -{ +extern "C" { #endif /* CLOSE BRACKET FOR C++ COMPLILATION */ @@ -63,7 +62,7 @@ extern "C" void Pnl_GetPanelInfoFromBIOS(int *xres, int *yres, int *bpp, int *hz); /* from durango */ -#if defined(_WIN32) /* windows */ +#if defined(_WIN32) /* windows */ extern void gfx_delay_milliseconds(unsigned long milliseconds); extern unsigned long gfx_ind(unsigned short port); extern void gfx_outd(unsigned short port, unsigned long data); @@ -74,7 +73,5 @@ extern "C" #ifdef __cplusplus } #endif - -#endif /* !_panel_h */ - +#endif /* !_panel_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/panel/platform.c b/driver/xf86-video-geode/src/panel/platform.c index 46bb71b50..3e5afe350 100644 --- a/driver/xf86-video-geode/src/panel/platform.c +++ b/driver/xf86-video-geode/src/panel/platform.c @@ -30,7 +30,6 @@ * SubModule: Geode FlatPanel library * */ - #define LINUX_ROM_SEGMENT 0x000F #define SEGMENT_LENGTH 0xFFFF #define PAGE_LENGTH 0x1000 @@ -38,12 +37,10 @@ #define PLT_UNKNOWN 0xFFFF -typedef struct -{ +typedef struct { char sys_board_name[SYS_BOARD_NAME_LEN]; SYS_BOARD sys_board; -} -SYS_BOARD_INFO; +} SYS_BOARD_INFO; static SYS_BOARD_INFO Sys_info; @@ -93,7 +90,8 @@ Strncmp(char *str1, char *str2, int len) for (i = 0; i < len; i++) { if (*(str1 + i) > *(str2 + i)) { return 1; - } else if (*(str1 + i) < *(str2 + i)) { + } + else if (*(str1 + i) < *(str2 + i)) { return -1; } } @@ -110,7 +108,7 @@ Strcpy(char *dst, char *src) for (i = 0; src[i] != 0x0; i++) { dst[i] = src[i]; } - dst[i] = 0x0; /* NULL termination */ + dst[i] = 0x0; /* NULL termination */ return dst; } @@ -121,7 +119,7 @@ Strlen(char *str) if (str == 0x0) return 0; - for (i = 0; str[i] != 0x0; i++) ; + for (i = 0; str[i] != 0x0; i++); return i; } @@ -141,13 +139,13 @@ FindStringInSeg(unsigned int segment_address, char *string_ptr) { int string_length = Strlen(string_ptr); char *psegment_buf; - unsigned long mem_ptr = (unsigned long)segment_address << 16; + unsigned long mem_ptr = (unsigned long) segment_address << 16; unsigned int i; /* silence compiler */ - (void)mem_ptr; + (void) mem_ptr; - psegment_buf = (char *)XpressROMPtr; + psegment_buf = (char *) XpressROMPtr; /* Now search for the first character of the string_ptr */ for (i = 0; i < SEGMENT_LENGTH + 1; i++) { @@ -166,7 +164,7 @@ FindStringInSeg(unsigned int segment_address, char *string_ptr) /* if we got this far we didn't find anything. Return NULL. */ return (0); -} /* end FindStringInSeg() */ +} /* end FindStringInSeg() */ /********************************************************************** @@ -185,7 +183,7 @@ FindStringInSeg(unsigned int segment_address, char *string_ptr) */ static unsigned char get_sys_board_type(SYS_BOARD_INFO * sys_info, - SYS_BOARD_INFO * sys_board_array_base) + SYS_BOARD_INFO * sys_board_array_base) { int index; char *xpress_rom_string_ptr = "XpressStart"; @@ -201,27 +199,28 @@ get_sys_board_type(SYS_BOARD_INFO * sys_info, sys_info->sys_board = PLT_UNKNOWN; Strcpy(sys_info->sys_board_name, "Unknown"); return (FALSE); - } else { + } + else { /* we have Xpressrom, so look for a board */ for (index = 0; index < Num_sys_board_type; index++) { if (!FindStringInSeg(segment, (sys_board_array_base + - index)->sys_board_name)) { + index)->sys_board_name)) { continue; - } else { + } + else { /* a match!! */ - sys_info->sys_board = - (sys_board_array_base + index)->sys_board; + sys_info->sys_board = (sys_board_array_base + index)->sys_board; Strcpy(sys_info->sys_board_name, - (sys_board_array_base + index)->sys_board_name); + (sys_board_array_base + index)->sys_board_name); return (TRUE); } - } /* end for() */ - } /* end else */ + } /* end for() */ + } /* end else */ /* if we are here we have failed */ sys_info->sys_board = PLT_UNKNOWN; Strcpy(sys_info->sys_board_name, "Unknown"); return (FALSE); -} /* end get_sys_board_type() */ +} /* end get_sys_board_type() */ diff --git a/driver/xf86-video-geode/src/panel/pnl_bios.c b/driver/xf86-video-geode/src/panel/pnl_bios.c index 9e3c1fe5f..56b13b9fc 100644 --- a/driver/xf86-video-geode/src/panel/pnl_bios.c +++ b/driver/xf86-video-geode/src/panel/pnl_bios.c @@ -32,7 +32,7 @@ #include "panel.h" -#if defined(_WIN32) /* windows */ +#if defined(_WIN32) /* windows */ extern unsigned long gfx_cpu_version; extern void gfx_outw(unsigned short port, unsigned short data); extern unsigned short gfx_inw(unsigned short port); @@ -47,63 +47,63 @@ extern unsigned short gfx_inw(unsigned short port); #define VR_INDEX 0xAC1C #define VR_DATA 0xAC1E #define VR_UNLOCK 0xFC53 -#define VRC_VG 0x0002 /* SoftVG Virtual Register Class */ -#define VG_MEM_SIZE 0x0000 /* MemSize Virtual Register */ +#define VRC_VG 0x0002 /* SoftVG Virtual Register Class */ +#define VG_MEM_SIZE 0x0000 /* MemSize Virtual Register */ #define FP_DETECT_MASK 0x8000 -#define VG_FP_TYPE 0x0002 /* Flat Panel Info Virtual Register */ +#define VG_FP_TYPE 0x0002 /* Flat Panel Info Virtual Register */ -#define FP_DEV_MASK 0x0003 /* Flat Panel type */ -#define FP_TYPE_SSTN 0x0000 /* SSTN panel type value */ -#define FP_TYPE_DSTN 0x0001 /* DSTN panel type value */ -#define FP_TYPE_TFT 0x0002 /* TFT panel type value */ -#define FP_TYPE_LVDS 0x0003 /* LVDS panel type value */ +#define FP_DEV_MASK 0x0003 /* Flat Panel type */ +#define FP_TYPE_SSTN 0x0000 /* SSTN panel type value */ +#define FP_TYPE_DSTN 0x0001 /* DSTN panel type value */ +#define FP_TYPE_TFT 0x0002 /* TFT panel type value */ +#define FP_TYPE_LVDS 0x0003 /* LVDS panel type value */ #define FP_RESOLUTION_MASK 0x0038 -#define FP_RES_6X4 0x0000 /* 640x480 resolution value */ -#define FP_RES_8X6 0x0008 /* 800x600 resolution value */ -#define FP_RES_10X7 0x0010 /* 1024x768 resolution value */ -#define FP_RES_11X8 0x0018 /* 1152x864 resolution value */ -#define FP_RES_12X10 0x0020 /* 1280x1024 resolution value */ -#define FP_RES_16X12 0x0028 /* 1600x1200 resolution value */ +#define FP_RES_6X4 0x0000 /* 640x480 resolution value */ +#define FP_RES_8X6 0x0008 /* 800x600 resolution value */ +#define FP_RES_10X7 0x0010 /* 1024x768 resolution value */ +#define FP_RES_11X8 0x0018 /* 1152x864 resolution value */ +#define FP_RES_12X10 0x0020 /* 1280x1024 resolution value */ +#define FP_RES_16X12 0x0028 /* 1600x1200 resolution value */ #define FP_WIDTH_MASK 0x01C0 -#define FP_WIDTH_8 0x0000 /* 8 bit data bus width */ -#define FP_WIDTH_9 0x0040 /* 9 bit data bus width */ -#define FP_WIDTH_12 0x0080 /* 12 bit data bus width */ -#define FP_WIDTH_18 0x00C0 /* 18 bit data bus width */ -#define FP_WIDTH_24 0x0100 /* 24 bit data bus width */ -#define FP_WIDTH_16 0x0140 /* 16 bit data bus width - 16 bit - * Mono DSTN only */ +#define FP_WIDTH_8 0x0000 /* 8 bit data bus width */ +#define FP_WIDTH_9 0x0040 /* 9 bit data bus width */ +#define FP_WIDTH_12 0x0080 /* 12 bit data bus width */ +#define FP_WIDTH_18 0x00C0 /* 18 bit data bus width */ +#define FP_WIDTH_24 0x0100 /* 24 bit data bus width */ +#define FP_WIDTH_16 0x0140 /* 16 bit data bus width - 16 bit + * Mono DSTN only */ #define FP_COLOR_MASK 0x0200 -#define FP_COLOR_COLOR 0x0000 /* Color panel */ -#define FP_COLOR_MONO 0x0200 /* Mono Panel */ +#define FP_COLOR_COLOR 0x0000 /* Color panel */ +#define FP_COLOR_MONO 0x0200 /* Mono Panel */ #define FP_PPC_MASK 0x0400 -#define FP_PPC_1PPC 0x0000 /* One pixel per clock */ -#define FP_PPC_2PPC 0x0400 /* Two pixels per clock */ +#define FP_PPC_1PPC 0x0000 /* One pixel per clock */ +#define FP_PPC_2PPC 0x0400 /* Two pixels per clock */ #define FP_HPOL_MASK 0x0800 -#define FP_H_POL_LGH 0x0000 /* HSync at panel, normally low, - * active high */ -#define FP_H_POL_HGL 0x0800 /* HSync at panel, normally high, - * active low */ +#define FP_H_POL_LGH 0x0000 /* HSync at panel, normally low, + * active high */ +#define FP_H_POL_HGL 0x0800 /* HSync at panel, normally high, + * active low */ #define FP_VPOL_MASK 0x1000 -#define FP_V_POL_LGH 0x0000 /* VSync at panel, normally low, - * active high */ -#define FP_V_POL_HGL 0x1000 /* VSync at panel, normally high, - * active low */ +#define FP_V_POL_LGH 0x0000 /* VSync at panel, normally low, + * active high */ +#define FP_V_POL_HGL 0x1000 /* VSync at panel, normally high, + * active low */ #define FP_REF_MASK 0xE000 -#define FP_REF_60 0x0000 /* 60Hz refresh rate */ -#define FP_REF_70 0x2000 /* 70Hz refresh rate */ -#define FP_REF_72 0x4000 /* 72Hz refresh rate */ -#define FP_REF_75 0x6000 /* 75Hz refresh rate */ -#define FP_REF_85 0x8000 /* 85Hz refresh rate */ -#define FP_REF_90 0xA000 /* 90Hz refresh rate */ -#define FP_REF_100 0xC000 /* 100Hz refresh rate */ +#define FP_REF_60 0x0000 /* 60Hz refresh rate */ +#define FP_REF_70 0x2000 /* 70Hz refresh rate */ +#define FP_REF_72 0x4000 /* 72Hz refresh rate */ +#define FP_REF_75 0x6000 /* 75Hz refresh rate */ +#define FP_REF_85 0x8000 /* 85Hz refresh rate */ +#define FP_REF_90 0xA000 /* 90Hz refresh rate */ +#define FP_REF_100 0xC000 /* 100Hz refresh rate */ /*----------------------------------------------------------------- * Pnl_IsPanelEnabledInBIOS @@ -126,7 +126,8 @@ Pnl_IsPanelEnabledInBIOS(void) data = gfx_inw(VR_DATA); if (data & FP_DETECT_MASK) ret = 1; - } else { + } + else { unsigned short crtcindex, crtcdata; crtcindex = (gfx_inb(0x3CC) & 0x01) ? 0x3D4 : 0x3B4; @@ -134,7 +135,7 @@ Pnl_IsPanelEnabledInBIOS(void) /* CHECK DisplayEnable Reg in SoftVGA */ - gfx_outb(crtcindex, (unsigned char)SOFTVGA_DISPLAY_ENABLE); + gfx_outb(crtcindex, (unsigned char) SOFTVGA_DISPLAY_ENABLE); ret = gfx_inb(crtcdata); } @@ -235,13 +236,14 @@ Pnl_GetPanelInfoFromBIOS(int *xres, int *yres, int *bpp, int *hz) break; } - } else { + } + else { crtcindex = (gfx_inb(0x3CC) & 0x01) ? 0x3D4 : 0x3B4; crtcdata = crtcindex + 1; /* CHECK FPResolution Reg in SoftVGA */ - gfx_outb(crtcindex, (unsigned char)SOFTVGA_FPRESOLUTION); + gfx_outb(crtcindex, (unsigned char) SOFTVGA_FPRESOLUTION); ret = gfx_inb(crtcdata); switch (ret & 0x3) { @@ -276,7 +278,7 @@ Pnl_GetPanelInfoFromBIOS(int *xres, int *yres, int *bpp, int *hz) /* CHECK FPClockFrequency Reg in SoftVGA */ - gfx_outb(crtcindex, (unsigned char)SOFTVGA_FPCLOCKFREQUENCY); + gfx_outb(crtcindex, (unsigned char) SOFTVGA_FPCLOCKFREQUENCY); *hz = gfx_inb(crtcdata); } } diff --git a/driver/xf86-video-geode/src/panel/pnl_defs.h b/driver/xf86-video-geode/src/panel/pnl_defs.h index 447a944b2..083d5afd0 100644 --- a/driver/xf86-video-geode/src/panel/pnl_defs.h +++ b/driver/xf86-video-geode/src/panel/pnl_defs.h @@ -33,8 +33,7 @@ #ifndef _pnl_defs_h #define _pnl_defs_h -typedef enum -{ +typedef enum { MARMOT_PLATFORM = 0, UNICORN_PLATFORM, CENTAURUS_PLATFORM, @@ -45,8 +44,7 @@ typedef enum DRACO_PLATFORM, REDCLOUD_PLATFORM, OTHER_PLATFORM -} -SYS_BOARD; +} SYS_BOARD; #define PNL_9210 0x01 #define PNL_9211_A 0x02 @@ -70,26 +68,22 @@ SYS_BOARD; #define PNL_OVERRIDE_STAT 0x10 #define PNL_OVERRIDE_ALL 0x1F -typedef struct _Pnl_PanelStat_ -{ +typedef struct _Pnl_PanelStat_ { int Type; int XRes; int YRes; int Depth; int MonoColor; -} -Pnl_PanelStat; +} Pnl_PanelStat; -typedef struct _Pnl_Params_ -{ +typedef struct _Pnl_Params_ { unsigned long Flags; int PanelPresent; int Platform; int PanelChip; Pnl_PanelStat PanelStat; -} -Pnl_PanelParams, *PPnl_PanelParams; +} Pnl_PanelParams, *PPnl_PanelParams; -#endif /* _pnl_defs_h */ +#endif /* _pnl_defs_h */ /* END OF FILE */ diff --git a/driver/xf86-video-geode/src/panel/pnl_init.c b/driver/xf86-video-geode/src/panel/pnl_init.c index 39b932ebd..3c580143d 100644 --- a/driver/xf86-video-geode/src/panel/pnl_init.c +++ b/driver/xf86-video-geode/src/panel/pnl_init.c @@ -221,7 +221,8 @@ Pnl_PowerUp(void) dcfg |= (CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN); /* Enable the flatpanel power and data */ WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg); - } else if (hw_video == GFX_VID_SC1200) { + } + else if (hw_video == GFX_VID_SC1200) { /* READ DISPLAY CONFIG FROM SC1200 */ dcfg = READ_VID32(SC1200_DISPLAY_CONFIG); @@ -229,7 +230,8 @@ Pnl_PowerUp(void) dcfg |= (SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN); /* Enable the flatpanel power and data */ WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg); - } else if (hw_video == GFX_VID_REDCLOUD) { + } + else if (hw_video == GFX_VID_REDCLOUD) { /* READ DISPLAY CONFIG FROM REDCLOUD */ dcfg = READ_VID32(RCDF_DISPLAY_CONFIG); @@ -287,7 +289,8 @@ Pnl_PowerDown(void) dcfg &= ~(CS5530_DCFG_FP_PWR_EN | CS5530_DCFG_FP_DATA_EN); /* Disable the flatpanel power and data */ WRITE_VID32(CS5530_DISPLAY_CONFIG, dcfg); - } else if (hw_video == GFX_VID_SC1200) { + } + else if (hw_video == GFX_VID_SC1200) { /* READ DISPLAY CONFIG FROM SC1200 */ dcfg = READ_VID32(SC1200_DISPLAY_CONFIG); @@ -295,7 +298,8 @@ Pnl_PowerDown(void) dcfg &= ~(SC1200_DCFG_FP_PWR_EN | SC1200_DCFG_FP_DATA_EN); /* Disable the flatpanel power and data */ WRITE_VID32(SC1200_DISPLAY_CONFIG, dcfg); - } else if (hw_video == GFX_VID_REDCLOUD) { + } + else if (hw_video == GFX_VID_REDCLOUD) { /* READ DISPLAY CONFIG FROM REDCLOUD */ dcfg = READ_VID32(RCDF_DISPLAY_CONFIG); @@ -488,16 +492,17 @@ Pnl_InitPanel(Pnl_PanelParams * pParam) { Pnl_PanelParams *pPtr; - if (pParam == 0x0) /* NULL use the static table */ + if (pParam == 0x0) /* NULL use the static table */ pPtr = &sPanelParam; else pPtr = pParam; if (!pPtr->PanelPresent) { - return -1; /* error */ - } else { + return -1; /* error */ + } + else { if ((pPtr->PanelChip < 0) || (pPtr->Platform < 0)) - return -1; /* error */ + return -1; /* error */ #if PLATFORM_DRACO /* check we are init. the right one */ @@ -526,6 +531,6 @@ Pnl_InitPanel(Pnl_PanelParams * pParam) Redcloud_9211init(&(pPtr->PanelStat)); } #endif - } /* else end */ + } /* else end */ return 1; } diff --git a/driver/xf86-video-geode/src/z4l.c b/driver/xf86-video-geode/src/z4l.c index c6a7c58e4..eccefe805 100644 --- a/driver/xf86-video-geode/src/z4l.c +++ b/driver/xf86-video-geode/src/z4l.c @@ -47,7 +47,7 @@ #include "xf86xv.h" #include "fourcc.h" -#include <linux/types.h> +#include "compat-api.h" #define __s64 __s_64 typedef long long __s64; @@ -134,22 +134,19 @@ static XF86ImageRec pixfmts[] = { #define NUM_PIXFMTS (sizeof(pixfmts)/sizeof(pixfmts[0])) -typedef struct s_std_data -{ +typedef struct s_std_data { int inp; v4l2_std_id std; unsigned int fmt; } t_std_data; -typedef struct s_ovly_bfrs -{ +typedef struct s_ovly_bfrs { void *start; unsigned long offset; size_t length; } t_ovly_bfrs; -typedef struct -{ +typedef struct { int fd; int run; int dir; @@ -183,7 +180,7 @@ IoCtl(int fd, unsigned int fn, void *arg, int flag) errno = 0; ret = ioctl(fd, fn, arg); if (ret != 0 && flag != 0) - DBLOG(0, "ioctl(%08x)=%d\n", fn, ret); + DBLOG(0, "ioctl(%08x)=%d\n", fn, ret); return ret; } @@ -194,10 +191,10 @@ z4l_ovly_unmap(Z4lPortPrivRec * pPriv) nbfrs = pPriv->nbfrs; for (i = 0; i < nbfrs; ++i) { - if (pPriv->bfrs[i].start != NULL) { - munmap(pPriv->bfrs[i].start, pPriv->bfrs[i].length); - pPriv->bfrs[i].start = NULL; - } + if (pPriv->bfrs[i].start != NULL) { + munmap(pPriv->bfrs[i].start, pPriv->bfrs[i].length); + pPriv->bfrs[i].start = NULL; + } } pPriv->nbfrs = -1; pPriv->bufsz = -1; @@ -212,10 +209,10 @@ z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir) struct v4l2_buffer bfr; struct v4l2_requestbuffers req; int type = dir >= 0 ? - V4L2_BUF_TYPE_VIDEO_CAPTURE : V4L2_BUF_TYPE_VIDEO_OVERLAY; + V4L2_BUF_TYPE_VIDEO_CAPTURE : V4L2_BUF_TYPE_VIDEO_OVERLAY; if (pPriv->run > 0) { - DBLOG(1, "busy\n"); - return; + DBLOG(1, "busy\n"); + return; } fd = pPriv->fd; memset(&req, 0, sizeof(req)); @@ -223,51 +220,51 @@ z4l_ovly_map(Z4lPortPrivRec * pPriv, int dir) req.memory = V4L2_MEMORY_MMAP; req.count = MAX_BUFFERS; if (ioctl(fd, VIDIOC_REQBUFS, &req) < 0) - goto xit; + goto xit; pPriv->nbfrs = req.count; if (pPriv->nbfrs <= 0) { - DBLOG(1, "no vidmem\n"); - return; + DBLOG(1, "no vidmem\n"); + return; } memset(&pPriv->bfrs, 0, sizeof(pPriv->bfrs)); for (i = 0; i < pPriv->nbfrs; ++i) { - memset(&bfr, 0, sizeof(bfr)); - bfr.type = type; - bfr.index = i; - if (ioctl(fd, VIDIOC_QUERYBUF, &bfr) < 0) - goto xit; - offset = bfr.m.offset; - pPriv->bfrs[i].offset = offset; - pPriv->bfrs[i].length = bfr.length; - bsz = offset + bfr.length; - if (pPriv->bufsz < bsz) - pPriv->bufsz = bsz; + memset(&bfr, 0, sizeof(bfr)); + bfr.type = type; + bfr.index = i; + if (ioctl(fd, VIDIOC_QUERYBUF, &bfr) < 0) + goto xit; + offset = bfr.m.offset; + pPriv->bfrs[i].offset = offset; + pPriv->bfrs[i].length = bfr.length; + bsz = offset + bfr.length; + if (pPriv->bufsz < bsz) + pPriv->bufsz = bsz; } for (i = 0; i < pPriv->nbfrs; ++i) { - pPriv->bfrs[i].start = mmap(NULL, bfr.length, PROT_READ | PROT_WRITE, - MAP_SHARED, fd, pPriv->bfrs[i].offset); - if (pPriv->bfrs[i].start == MAP_FAILED) - goto xit; + pPriv->bfrs[i].start = mmap(NULL, bfr.length, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, pPriv->bfrs[i].offset); + if (pPriv->bfrs[i].start == MAP_FAILED) + goto xit; } for (i = 0; i < pPriv->nbfrs; ++i) { - DBLOG(3, "bfr %d ofs %#lx adr %p sz %lu\n", i, pPriv->bfrs[i].offset, - pPriv->bfrs[i].start, (unsigned long)pPriv->bfrs[i].length); - memset(pPriv->bfrs[i].start, 0x80, pPriv->bfrs[i].length); + DBLOG(3, "bfr %d ofs %#lx adr %p sz %lu\n", i, pPriv->bfrs[i].offset, + pPriv->bfrs[i].start, (unsigned long) pPriv->bfrs[i].length); + memset(pPriv->bfrs[i].start, 0x80, pPriv->bfrs[i].length); } pPriv->last = 0; while (pPriv->last < pPriv->nbfrs - 1) { - bfr.index = pPriv->last++; - bfr.type = type; - if (ioctl(fd, VIDIOC_QBUF, &bfr) < 0) - goto xit; + bfr.index = pPriv->last++; + bfr.type = type; + if (ioctl(fd, VIDIOC_QBUF, &bfr) < 0) + goto xit; } return; - xit: + xit: z4l_ovly_unmap(pPriv); } @@ -287,7 +284,7 @@ z4l_ovly_dqbuf(Z4lPortPrivRec * pPriv) tmo.tv_sec = 0; tmo.tv_usec = 0; if (select(fd + 1, &dqset, NULL, NULL, &tmo) <= 0) - return -1; + return -1; #endif memset(&bfr, 0, sizeof(bfr)); bfr.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; @@ -303,15 +300,15 @@ z4l_open_device(Z4lPortPrivRec * pPriv) int enable; if (pPriv->fd < 0) { - pPriv->fd = open(&pPriv->dev_path[0], O_RDWR, 0); - DBLOG(1, "open(%s)=%d\n", &pPriv->dev_path[0], pPriv->fd); - enable = 1; + pPriv->fd = open(&pPriv->dev_path[0], O_RDWR, 0); + DBLOG(1, "open(%s)=%d\n", &pPriv->dev_path[0], pPriv->fd); + enable = 1; #ifdef NONBLK_IO - if (IoCtl(pPriv->fd, FIONBIO, &enable, 1) != 0) { - DBLOG(1, "open cant enable nonblocking\n"); - close(pPriv->fd); - pPriv->fd = -1; - } + if (IoCtl(pPriv->fd, FIONBIO, &enable, 1) != 0) { + DBLOG(1, "open cant enable nonblocking\n"); + close(pPriv->fd); + pPriv->fd = -1; + } #endif } return pPriv->fd; @@ -323,13 +320,13 @@ z4l_close_device(Z4lPortPrivRec * pPriv) int ret = 0; if (pPriv->fd >= 0) { - ret = close(pPriv->fd); - pPriv->fd = -1; - DBLOG(1, "close()=%d\n", ret); + ret = close(pPriv->fd); + pPriv->fd = -1; + DBLOG(1, "close()=%d\n", ret); } if (pPriv->run > 0) { - z4l_ovly_unmap(pPriv); - pPriv->run = -1; + z4l_ovly_unmap(pPriv); + pPriv->run = -1; } return ret; @@ -341,8 +338,8 @@ z4l_ovly_reset(Z4lPortPrivRec * pPriv) int ret = 0; if (pPriv->run > 0) { - z4l_close_device(pPriv); - ret = z4l_open_device(pPriv); + z4l_close_device(pPriv); + ret = z4l_open_device(pPriv); } return ret; @@ -355,28 +352,29 @@ z4l_fourcc_pixfmt(int fourcc) switch (fourcc) { case FOURCC_UYVY: - pixfmt = V4L2_PIX_FMT_UYVY; - break; + pixfmt = V4L2_PIX_FMT_UYVY; + break; case FOURCC_YV12: - pixfmt = V4L2_PIX_FMT_YVU420; - break; + pixfmt = V4L2_PIX_FMT_YVU420; + break; case FOURCC_Y800: case FOURCC_I420: - pixfmt = V4L2_PIX_FMT_YUV420; - break; + pixfmt = V4L2_PIX_FMT_YUV420; + break; case FOURCC_YUY2: - pixfmt = V4L2_PIX_FMT_YUYV; - break; + pixfmt = V4L2_PIX_FMT_YUYV; + break; } return pixfmt; } + static void z4l_ovly_pixfmt(Z4lPortPrivRec * pPriv, unsigned int pixfmt) { struct v4l2_framebuffer fbuf; - DBLOG(1, "pixfmt %4.4s %4.4s\n", (char *)&pPriv->pixfmt, (char *)&pixfmt); + DBLOG(1, "pixfmt %4.4s %4.4s\n", (char *) &pPriv->pixfmt, (char *) &pixfmt); memset(&fbuf, 0, sizeof(fbuf)); IoCtl(pPriv->fd, VIDIOC_G_FBUF, &fbuf, 1); fbuf.fmt.pixelformat = pixfmt; @@ -402,8 +400,8 @@ z4l_ovly_bfr(Z4lPortPrivRec * pPriv, int width, int height) static void z4l_ovly_rect(Z4lPortPrivRec * pPriv, - int src_x, int src_y, int src_w, int src_h, - int drw_x, int drw_y, int drw_w, int drw_h) + int src_x, int src_y, int src_w, int src_h, + int drw_x, int drw_y, int drw_w, int drw_h) { int x, dx, w, y, dy, h; struct v4l2_format fmt; @@ -418,66 +416,66 @@ z4l_ovly_rect(Z4lPortPrivRec * pPriv, pPriv->drw_h = drw_h; if ((drw_x -= z4l_x_offset) < 0) { - if ((w = pPriv->drw_w) <= 0) - w = 1; - x = -drw_x; - dx = x * pPriv->src_w / w; - src_x = pPriv->src_x + dx; - src_w = pPriv->src_w - dx; - drw_w = pPriv->drw_w - x; - drw_x = 0; + if ((w = pPriv->drw_w) <= 0) + w = 1; + x = -drw_x; + dx = x * pPriv->src_w / w; + src_x = pPriv->src_x + dx; + src_w = pPriv->src_w - dx; + drw_w = pPriv->drw_w - x; + drw_x = 0; } if ((drw_y -= z4l_y_offset) < 0) { - if ((h = pPriv->drw_h) <= 0) - h = 1; - y = -drw_y; - dy = y * pPriv->src_h / h; - src_y = pPriv->src_y + dy; - src_h = pPriv->src_h - dy; - drw_h = pPriv->drw_h - y; - drw_y = 0; + if ((h = pPriv->drw_h) <= 0) + h = 1; + y = -drw_y; + dy = y * pPriv->src_h / h; + src_y = pPriv->src_y + dy; + src_h = pPriv->src_h - dy; + drw_h = pPriv->drw_h - y; + drw_y = 0; } memset(&fmt, 0, sizeof(fmt)); fmt.type = 0x100; IoCtl(pPriv->fd, VIDIOC_G_FMT, &fmt, 1); if (pPriv->src_is_set != 0) { - if (src_x != fmt.fmt.win.w.left || src_y != fmt.fmt.win.w.top || - src_w != fmt.fmt.win.w.width || src_h != fmt.fmt.win.w.height) - pPriv->src_is_set = 0; + if (src_x != fmt.fmt.win.w.left || src_y != fmt.fmt.win.w.top || + src_w != fmt.fmt.win.w.width || src_h != fmt.fmt.win.w.height) + pPriv->src_is_set = 0; } if (pPriv->src_is_set == 0) { - pPriv->src_is_set = 1; - fmt.fmt.win.w.left = src_x; - fmt.fmt.win.w.top = src_y; - fmt.fmt.win.w.width = src_w; - fmt.fmt.win.w.height = src_h; - IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1); - DBLOG(3, " set src %d,%d %dx%d\n", src_x, src_y, src_w, src_h); + pPriv->src_is_set = 1; + fmt.fmt.win.w.left = src_x; + fmt.fmt.win.w.top = src_y; + fmt.fmt.win.w.width = src_w; + fmt.fmt.win.w.height = src_h; + IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1); + DBLOG(3, " set src %d,%d %dx%d\n", src_x, src_y, src_w, src_h); } memset(&fmt, 0, sizeof(fmt)); fmt.type = 0x101; IoCtl(pPriv->fd, VIDIOC_G_FMT, &fmt, 1); if (pPriv->drw_is_set != 0) { - if (drw_x != fmt.fmt.win.w.left || drw_y != fmt.fmt.win.w.top || - drw_w != fmt.fmt.win.w.width || drw_h != fmt.fmt.win.w.height) - pPriv->drw_is_set = 0; + if (drw_x != fmt.fmt.win.w.left || drw_y != fmt.fmt.win.w.top || + drw_w != fmt.fmt.win.w.width || drw_h != fmt.fmt.win.w.height) + pPriv->drw_is_set = 0; } if (pPriv->drw_is_set == 0) { - pPriv->drw_is_set = 1; - fmt.fmt.win.w.left = drw_x; - fmt.fmt.win.w.top = drw_y; - fmt.fmt.win.w.width = drw_w; - fmt.fmt.win.w.height = drw_h; - IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1); - DBLOG(3, " set drw %d,%d %dx%d\n", drw_x, drw_y, drw_w, drw_h); + pPriv->drw_is_set = 1; + fmt.fmt.win.w.left = drw_x; + fmt.fmt.win.w.top = drw_y; + fmt.fmt.win.w.width = drw_w; + fmt.fmt.win.w.height = drw_h; + IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1); + DBLOG(3, " set drw %d,%d %dx%d\n", drw_x, drw_y, drw_w, drw_h); } } static void z4l_ovly_pitch(unsigned int pixfmt, int w, int h, int *py_pitch, - int *puv_pitch, int *poffset1, int *poffset2, int *psize) + int *puv_pitch, int *poffset1, int *poffset2, int *psize) { int y_pitch, uv_pitch; int offset1, offset2; @@ -486,22 +484,22 @@ z4l_ovly_pitch(unsigned int pixfmt, int w, int h, int *py_pitch, switch (pixfmt) { case V4L2_PIX_FMT_YVU420: case V4L2_PIX_FMT_YUV420: - is_420 = 1; - y_pitch = ((w + 1) / 2) * 2; - uv_pitch = (w + 1) / 2; - break; + is_420 = 1; + y_pitch = ((w + 1) / 2) * 2; + uv_pitch = (w + 1) / 2; + break; default: - is_420 = 0; - y_pitch = ((w + 1) / 2) * 4; - uv_pitch = 0; - break; + is_420 = 0; + y_pitch = ((w + 1) / 2) * 4; + uv_pitch = 0; + break; } offset1 = y_pitch * h; offset2 = uv_pitch * h; if (is_420 != 0) - offset2 /= 2; + offset2 /= 2; size = offset1 + 2 * offset2; *py_pitch = y_pitch; @@ -519,10 +517,10 @@ z4l_ovly_set_colorkey(Z4lPortPrivRec * pPriv, int key) memset(&fmt, 0, sizeof(fmt)); fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; if (IoCtl(pPriv->fd, VIDIOC_G_FMT, &fmt, 1) < 0) - return 0; + return 0; fmt.fmt.win.chromakey = key; if (IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1) < 0) - return 0; + return 0; pPriv->colorkey = key; return 1; @@ -536,7 +534,7 @@ z4l_ovly_get_colorkey(Z4lPortPrivRec * pPriv, int *key) memset(&fmt, 0, sizeof(fmt)); fmt.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; if (IoCtl(pPriv->fd, VIDIOC_G_FMT, &fmt, 1) < 0) - return 0; + return 0; *key = fmt.fmt.win.chromakey; return 1; @@ -549,16 +547,16 @@ z4l_ovly_set_keymode(Z4lPortPrivRec * pPriv, int enable) memset(&fbuf, 0, sizeof(fbuf)); if (IoCtl(pPriv->fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) - return 0; + return 0; if (enable != 0) - fbuf.flags |= V4L2_FBUF_FLAG_CHROMAKEY; + fbuf.flags |= V4L2_FBUF_FLAG_CHROMAKEY; else - fbuf.flags &= ~V4L2_FBUF_FLAG_CHROMAKEY; + fbuf.flags &= ~V4L2_FBUF_FLAG_CHROMAKEY; fbuf.base = NULL; if (IoCtl(pPriv->fd, VIDIOC_S_FBUF, &fbuf, 1) < 0) - return 0; + return 0; pPriv->keymode = enable; return 1; @@ -571,7 +569,7 @@ z4l_ovly_get_keymode(Z4lPortPrivRec * pPriv, int *enable) memset(&fbuf, 0, sizeof(fbuf)); if (IoCtl(pPriv->fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) - return 0; + return 0; *enable = (fbuf.flags & V4L2_FBUF_FLAG_CHROMAKEY) != 0 ? 1 : 0; return 1; @@ -592,7 +590,7 @@ z4l_ovly_set_encoding(Z4lPortPrivRec * pPriv, int id) adpt = pPriv->adpt; DBLOG(1, "z4l_ovly_set_encoding(%d)\n", id); if (id < 0 || id >= adpt->nEncodings) - return 0; + return 0; enc = &adpt->pEncodings[id]; cp = &enc->name[0]; n = sizeof(int) - 1; @@ -602,32 +600,32 @@ z4l_ovly_set_encoding(Z4lPortPrivRec * pPriv, int id) inp = sp->inp; DBLOG(1, " nm %s fmt %4.4s inp %d std %llx\n", - cp, (char *)&sp->fmt, sp->inp, sp->std); + cp, (char *) &sp->fmt, sp->inp, sp->std); if (IoCtl(pPriv->fd, VIDIOC_S_INPUT, &inp, 1) < 0) - return 0; + return 0; std = sp->std; if (IoCtl(pPriv->fd, VIDIOC_S_STD, &std, 1) < 0) - return 0; + return 0; memset(&fmt, 0, sizeof(fmt)); fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (IoCtl(pPriv->fd, VIDIOC_G_FMT, &fmt, 1) < 0) - return 0; + return 0; fmt.fmt.pix.pixelformat = sp->fmt; if (IoCtl(pPriv->fd, VIDIOC_S_FMT, &fmt, 1) < 0) - return 0; + return 0; memset(&fbuf, 0, sizeof(fbuf)); if (IoCtl(pPriv->fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) - return 0; + return 0; fbuf.fmt.pixelformat = sp->fmt; fbuf.base = NULL; if (IoCtl(pPriv->fd, VIDIOC_S_FBUF, &fbuf, 1) < 0) - return 0; + return 0; pPriv->pixfmt = sp->fmt; pPriv->enc = enc; pPriv->src_is_set = pPriv->drw_is_set = 0; @@ -650,21 +648,21 @@ z4l_ovly_stop(Z4lPortPrivRec * pPriv) int type, enable, fd; if (pPriv->run < 0) - return; + return; fd = pPriv->fd; if (pPriv->dir > 0) { - type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - ioctl(fd, VIDIOC_STREAMOFF, &type); + type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + ioctl(fd, VIDIOC_STREAMOFF, &type); } if (pPriv->dir <= 0) { - enable = 0; - ioctl(fd, VIDIOC_OVERLAY, &enable); + enable = 0; + ioctl(fd, VIDIOC_OVERLAY, &enable); } if (pPriv->dir != 0) - z4l_ovly_unmap(pPriv); + z4l_ovly_unmap(pPriv); pPriv->run = -1; z4l_close_device(pPriv); @@ -676,16 +674,16 @@ z4l_ovly_start(Z4lPortPrivRec * pPriv, int dir) int enable; if (pPriv->run >= 0) - return; + return; if ((pPriv->dir = dir) != 0) - z4l_ovly_map(pPriv, dir); + z4l_ovly_map(pPriv, dir); enable = 1; if (IoCtl(pPriv->fd, VIDIOC_OVERLAY, &enable, 1) != 0) { - z4l_ovly_stop(pPriv); - return; + z4l_ovly_stop(pPriv); + return; } pPriv->run = 1; @@ -698,39 +696,37 @@ z4l_region_equal(RegionPtr ap, RegionPtr bp) BoxPtr abox, bbox; if (ap == NULL && bp == NULL) - return 1; + return 1; if (ap == NULL || bp == NULL) - return 0; + return 0; if ((nboxes = REGION_NUM_RECTS(ap)) != REGION_NUM_RECTS(bp) || - ap->extents.x1 != bp->extents.x1 || - ap->extents.x2 != bp->extents.x2 - || ap->extents.y1 != bp->extents.y1 - || ap->extents.y2 != bp->extents.y2) - return 0; + ap->extents.x1 != bp->extents.x1 || + ap->extents.x2 != bp->extents.x2 + || ap->extents.y1 != bp->extents.y1 || ap->extents.y2 != bp->extents.y2) + return 0; abox = REGION_RECTS(ap); bbox = REGION_RECTS(bp); while (--nboxes >= 0) { - if (abox->x1 != bbox->x1 || abox->y1 != bbox->y1 || - abox->x2 != bbox->x2 || abox->y2 != bbox->y2) - return 0; - ++abox; - ++bbox; + if (abox->x1 != bbox->x1 || abox->y1 != bbox->y1 || + abox->x2 != bbox->x2 || abox->y2 != bbox->y2) + return 0; + ++abox; + ++bbox; } return 1; } static void -z4l_setup_colorkey(Z4lPortPrivRec * pPriv, ScreenPtr pScrn, - RegionPtr clipBoxes) +z4l_setup_colorkey(Z4lPortPrivRec * pPriv, ScreenPtr pScrn, RegionPtr clipBoxes) { if (pPriv->run > 0 && pPriv->dir <= 0 && pPriv->keymode != 0 && - z4l_region_equal(&pPriv->clips, clipBoxes) == 0) { - xf86XVFillKeyHelper(pScrn, pPriv->colorkey, clipBoxes); - REGION_COPY(pScrn, &pPriv->clips, clipBoxes); + z4l_region_equal(&pPriv->clips, clipBoxes) == 0) { + xf86XVFillKeyHelper(pScrn, pPriv->colorkey, clipBoxes); + REGION_COPY(pScrn, &pPriv->clips, clipBoxes); } } @@ -742,34 +738,34 @@ Z4lStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit) DBLOG(1, "Z4lStopVideo()\n"); if (exit != 0) - z4l_ovly_stop(pPriv); + z4l_ovly_stop(pPriv); else - pPriv->src_is_set = pPriv->drw_is_set = 0; + pPriv->src_is_set = pPriv->drw_is_set = 0; REGION_EMPTY(pScrni->pScreen, &pPriv->clips); } static void Z4lQueryBestSize(ScrnInfoPtr pScrni, Bool motion, - short vid_w, short vid_h, short drw_w, short drw_h, - unsigned int *p_w, unsigned int *p_h, pointer data) + short vid_w, short vid_h, short drw_w, short drw_h, + unsigned int *p_w, unsigned int *p_h, pointer data) { if (drw_w > MAX_OVLY_WIDTH) - drw_w = MAX_OVLY_WIDTH; + drw_w = MAX_OVLY_WIDTH; if (drw_h > MAX_OVLY_HEIGHT) - drw_h = MAX_OVLY_HEIGHT; + drw_h = MAX_OVLY_HEIGHT; *p_w = drw_w; *p_h = drw_h; DBLOG(1, "Z4lQueryBestSize(%d, src %dx%d dst %dx%d)\n", motion, vid_w, - vid_h, drw_w, drw_h); + vid_h, drw_w, drw_h); } static int Z4lPutImage(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, - short drw_y, short src_w, short src_h, short drw_w, short drw_h, - int id, unsigned char *buf, short width, short height, - Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) + short drw_y, short src_w, short src_h, short drw_w, short drw_h, + int id, unsigned char *buf, short width, short height, + Bool sync, RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) { int fd, size; int y_pitch, uv_pitch, offset1, offset2; @@ -779,63 +775,64 @@ Z4lPutImage(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, Z4lPortPrivRec *pPriv = (Z4lPortPrivRec *) data; if (pPriv->run > 0 && pPriv->dir >= 0) - return BadMatch; + return BadMatch; if (pPriv->fd < 0) { - z4l_open_device(pPriv); - if (pPriv->fd < 0) - return BadValue; + z4l_open_device(pPriv); + if (pPriv->fd < 0) + return BadValue; } fd = pPriv->fd; if (pPriv->run < 0) { - DBLOG(2, "PutImg id %#x src %d,%d %dx%d drw %d,%d %dx%d bfr %p " - "%dx%d data %p\n", id, src_x, src_y, src_w, src_h, drw_x, - drw_y, drw_w, drw_h, buf, width, height, data); - pPriv->pixfmt = pPriv->height = -1; - pPriv->src_is_set = pPriv->drw_is_set = 0; + DBLOG(2, "PutImg id %#x src %d,%d %dx%d drw %d,%d %dx%d bfr %p " + "%dx%d data %p\n", id, src_x, src_y, src_w, src_h, drw_x, + drw_y, drw_w, drw_h, buf, width, height, data); + pPriv->pixfmt = pPriv->height = -1; + pPriv->src_is_set = pPriv->drw_is_set = 0; } pixfmt = z4l_fourcc_pixfmt(id); if (pixfmt != pPriv->pixfmt) { - z4l_ovly_reset(pPriv); - z4l_ovly_pixfmt(pPriv, pixfmt); + z4l_ovly_reset(pPriv); + z4l_ovly_pixfmt(pPriv, pixfmt); } if (pPriv->width != width || pPriv->height != height) { - z4l_ovly_reset(pPriv); - z4l_ovly_bfr(pPriv, width, height); + z4l_ovly_reset(pPriv); + z4l_ovly_bfr(pPriv, width, height); } if (pPriv->src_is_set == 0 || pPriv->drw_is_set == 0 || - pPriv->src_x != src_x || pPriv->src_y != src_y || - pPriv->src_w != src_w || pPriv->src_h != src_h || - pPriv->drw_x != drw_x || pPriv->drw_y != drw_y || - pPriv->drw_w != drw_w || pPriv->drw_h != drw_h) - z4l_ovly_rect(pPriv, src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, - drw_h); + pPriv->src_x != src_x || pPriv->src_y != src_y || + pPriv->src_w != src_w || pPriv->src_h != src_h || + pPriv->drw_x != drw_x || pPriv->drw_y != drw_y || + pPriv->drw_w != drw_w || pPriv->drw_h != drw_h) + z4l_ovly_rect(pPriv, src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, + drw_h); if (pPriv->run < 0) { - z4l_ovly_start(pPriv, -1); - if (pPriv->run < 0) - return BadValue; + z4l_ovly_start(pPriv, -1); + if (pPriv->run < 0) + return BadValue; } if (pPriv->last < 0 && (pPriv->last = z4l_ovly_dqbuf(pPriv)) < 0) - return BadAlloc; + return BadAlloc; z4l_ovly_pitch(pixfmt, width, height, &y_pitch, &uv_pitch, - &offset1, &offset2, &size); + &offset1, &offset2, &size); src = buf; - dst = (unsigned char *)pPriv->bfrs[pPriv->last].start; + dst = (unsigned char *) pPriv->bfrs[pPriv->last].start; DBLOG(3, "cpy %4.4s src %p dst %p yp %d uvp %d o1 %d o2 %d sz %d\n", - (char *)&id, src, dst, y_pitch, uv_pitch, offset1, offset2, size); + (char *) &id, src, dst, y_pitch, uv_pitch, offset1, offset2, size); if (id == FOURCC_Y800) { - memcpy(dst, src, offset1); - src += offset1; - dst += offset1; - memset(dst, 0x80, 2 * offset2); - } else - memcpy(dst, src, size); + memcpy(dst, src, offset1); + src += offset1; + dst += offset1; + memset(dst, 0x80, 2 * offset2); + } + else + memcpy(dst, src, size); memset(&bfr, 0, sizeof(bfr)); bfr.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; @@ -844,7 +841,7 @@ Z4lPutImage(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, bfr.timestamp.tv_usec = 0; bfr.flags |= V4L2_BUF_FLAG_TIMECODE; if (IoCtl(fd, VIDIOC_QBUF, &bfr, 1) != 0) - return BadAccess; + return BadAccess; pPriv->last = z4l_ovly_dqbuf(pPriv); z4l_setup_colorkey(pPriv, pScrni->pScreen, clipBoxes); @@ -854,7 +851,7 @@ Z4lPutImage(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, static int Z4lQueryImageAttributes(ScrnInfoPtr pScrni, int id, unsigned short *width, - unsigned short *height, int *pitches, int *offsets) + unsigned short *height, int *pitches, int *offsets) { int w, h, size; int y_pitch, uv_pitch, offset1, offset2; @@ -863,70 +860,70 @@ Z4lQueryImageAttributes(ScrnInfoPtr pScrni, int id, unsigned short *width, w = *width; h = *height; if (w > MAX_OVLY_WIDTH) - w = MAX_OVLY_WIDTH; + w = MAX_OVLY_WIDTH; if (h > MAX_OVLY_HEIGHT) - h = MAX_OVLY_HEIGHT; + h = MAX_OVLY_HEIGHT; z4l_ovly_pitch(pixfmt, w, h, &y_pitch, &uv_pitch, - &offset1, &offset2, &size); + &offset1, &offset2, &size); if (offsets != NULL) - offsets[0] = 0; + offsets[0] = 0; if (pitches != NULL) - pitches[0] = y_pitch; + pitches[0] = y_pitch; switch (pixfmt) { case V4L2_PIX_FMT_YVU420: case V4L2_PIX_FMT_YUV420: - if (offsets != NULL) { - offsets[1] = offset1; - offsets[2] = offset1 + offset2; - } - if (pitches != NULL) - pitches[1] = pitches[2] = uv_pitch; - h = (h + 1) & ~1; - break; + if (offsets != NULL) { + offsets[1] = offset1; + offsets[2] = offset1 + offset2; + } + if (pitches != NULL) + pitches[1] = pitches[2] = uv_pitch; + h = (h + 1) & ~1; + break; } w = (w + 1) & ~1; *width = w; *height = h; DBLOG(1, "Z4lQueryImageAttributes(%4.4s) = %d, %dx%d %d/%d %d/%d\n", - (char *)&id, size, w, h, y_pitch, uv_pitch, offset1, offset2); + (char *) &id, size, w, h, y_pitch, uv_pitch, offset1, offset2); return size; } static int Z4lPutVideo(ScrnInfoPtr pScrni, short src_x, short src_y, short drw_x, - short drw_y, short src_w, short src_h, short drw_w, short drw_h, - RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) + short drw_y, short src_w, short src_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data, DrawablePtr pDraw) { int id; Z4lPortPrivRec *pPriv = (Z4lPortPrivRec *) data; DBLOG(2, "PutVid src %d,%d %dx%d drw %d,%d %dx%d data %p\n", - src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, drw_h, data); + src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, drw_h, data); if (z4l_open_device(pPriv) >= 0) { - if (pPriv->run < 0) { - DBLOG(2, "PutVid start\n"); - z4l_ovly_get_encoding(pPriv, &id); - z4l_ovly_set_encoding(pPriv, id); - } - DBLOG(2, "PutVid priv %d,%d %dx%d drw %d,%d %dx%d\n", - pPriv->src_x, pPriv->src_y, pPriv->src_w, pPriv->src_h, - pPriv->drw_x, pPriv->drw_y, pPriv->drw_w, pPriv->drw_h); - if (pPriv->src_is_set == 0 || pPriv->drw_is_set == 0 || - pPriv->src_w != src_w || pPriv->src_h != src_h || - pPriv->drw_x != drw_x || pPriv->drw_y != drw_y || - pPriv->drw_w != drw_w || pPriv->drw_h != drw_h) - z4l_ovly_rect(pPriv, src_x, src_y, src_w, src_h, drw_x, drw_y, - drw_w, drw_h); - if (pPriv->run < 0) - z4l_ovly_start(pPriv, 0); - - z4l_setup_colorkey(pPriv, pScrni->pScreen, clipBoxes); + if (pPriv->run < 0) { + DBLOG(2, "PutVid start\n"); + z4l_ovly_get_encoding(pPriv, &id); + z4l_ovly_set_encoding(pPriv, id); + } + DBLOG(2, "PutVid priv %d,%d %dx%d drw %d,%d %dx%d\n", + pPriv->src_x, pPriv->src_y, pPriv->src_w, pPriv->src_h, + pPriv->drw_x, pPriv->drw_y, pPriv->drw_w, pPriv->drw_h); + if (pPriv->src_is_set == 0 || pPriv->drw_is_set == 0 || + pPriv->src_w != src_w || pPriv->src_h != src_h || + pPriv->drw_x != drw_x || pPriv->drw_y != drw_y || + pPriv->drw_w != drw_w || pPriv->drw_h != drw_h) + z4l_ovly_rect(pPriv, src_x, src_y, src_w, src_h, drw_x, drw_y, + drw_w, drw_h); + if (pPriv->run < 0) + z4l_ovly_start(pPriv, 0); + + z4l_setup_colorkey(pPriv, pScrni->pScreen, clipBoxes); } return Success; @@ -937,10 +934,10 @@ Z4lNewEncoding(XF86VideoEncodingPtr * encs, int *nencs) { XF86VideoEncodingPtr enc; XF86VideoEncodingPtr tencs = - (XF86VideoEncodingPtr) realloc(*encs, sizeof(*tencs) * (*nencs + 1)); + (XF86VideoEncodingPtr) realloc(*encs, sizeof(*tencs) * (*nencs + 1)); if (tencs == NULL) - return NULL; + return NULL; *encs = tencs; enc = &tencs[*nencs]; @@ -956,60 +953,61 @@ Z4lEncodingName(char *ename, int l, char *inp_name, char *std_name, char *fmt) int i, ch; while ((ch = *inp_name++) != 0) { - if (isalnum(ch) == 0) - continue; - if (--l <= 0) - goto xit; - *ename++ = ch; + if (isalnum(ch) == 0) + continue; + if (--l <= 0) + goto xit; + *ename++ = ch; } if (--l <= 0) - goto xit; + goto xit; *ename++ = '-'; while ((ch = *std_name++) != 0) { - if (isalnum(ch) == 0) - continue; - if (--l <= 0) - goto xit; - *ename++ = ch; + if (isalnum(ch) == 0) + continue; + if (--l <= 0) + goto xit; + *ename++ = ch; } if (--l <= 0) - goto xit; + goto xit; *ename++ = '-'; i = 4; while (--i >= 0 && (ch = *fmt++) != 0) { - if (isalnum(ch) == 0) - continue; - if (--l <= 0) - goto xit; - *ename++ = ch; + if (isalnum(ch) == 0) + continue; + if (--l <= 0) + goto xit; + *ename++ = ch; } - xit: + xit: *ename = 0; } static int Z4lAddEncoding(XF86VideoEncodingPtr enc, char *name, int id, int width, - int height, int numer, int denom, int inp, v4l2_std_id std, - unsigned int fmt) + int height, int numer, int denom, int inp, v4l2_std_id std, + unsigned int fmt) { int l, n; t_std_data *sp; char *cp; + n = sizeof(int) - 1; l = strlen(&name[0]) + 1; l = (l + n) & ~n; n = l + sizeof(*sp); - cp = (char *)malloc(n); + cp = (char *) malloc(n); if (cp == NULL) - return 0; + return 0; sp = (t_std_data *) (cp + l); enc->id = id; @@ -1032,10 +1030,10 @@ Z4lNewImage(XF86ImagePtr * imgs, int *nimgs) { XF86ImagePtr img; XF86ImagePtr timgs = - (XF86ImagePtr) realloc(*imgs, sizeof(*timgs) * (*nimgs + 1)); + (XF86ImagePtr) realloc(*imgs, sizeof(*timgs) * (*nimgs + 1)); if (timgs == NULL) - return NULL; + return NULL; *imgs = timgs; img = &timgs[*nimgs]; @@ -1049,7 +1047,7 @@ static int Z4lAddImage(XF86ImagePtr img, XF86ImagePtr ip) { *img = *ip; - DBLOG(1, "img %4.4s\n", (char *)&img->id); + DBLOG(1, "img %4.4s\n", (char *) &img->id); return 1; } @@ -1058,10 +1056,10 @@ Z4lNewAttribute(XF86AttributePtr * attrs, int *nattrs) { XF86AttributePtr attr; XF86AttributePtr tattrs = - (XF86AttributePtr) realloc(*attrs, sizeof(*tattrs) * (*nattrs + 1)); + (XF86AttributePtr) realloc(*attrs, sizeof(*tattrs) * (*nattrs + 1)); if (tattrs == NULL) - return NULL; + return NULL; *attrs = tattrs; attr = &tattrs[*nattrs]; @@ -1078,22 +1076,22 @@ Z4lAttributeName(char *bp, int l, char *cp) char *atomNm = bp; if (l > 0) { - *bp++ = 'X'; - --l; + *bp++ = 'X'; + --l; } if (l > 0) { - *bp++ = 'V'; - --l; + *bp++ = 'V'; + --l; } if (l > 0) { - *bp++ = '_'; - --l; + *bp++ = '_'; + --l; } while (l > 0 && (ch = *cp++) != 0) { - if (isalnum(ch) == 0) - continue; - *bp++ = toupper(ch); + if (isalnum(ch) == 0) + continue; + *bp++ = toupper(ch); } *bp = 0; @@ -1101,13 +1099,12 @@ Z4lAttributeName(char *bp, int l, char *cp) } static int -Z4lAddAttribute(XF86AttributePtr attr, char *name, - int min, int max, int flags) +Z4lAddAttribute(XF86AttributePtr attr, char *name, int min, int max, int flags) { - char *cp = (char *)malloc(strlen((char *)&name[0]) + 1); + char *cp = (char *) malloc(strlen((char *) &name[0]) + 1); if (cp == NULL) - return 0; + return 0; attr->name = cp; strcpy(&attr->name[0], name); @@ -1127,10 +1124,10 @@ Z4lNewAdaptor(XF86VideoAdaptorPtr ** adpts, int *nadpts, int nattrs) XF86VideoAdaptorPtr adpt, *tadpts; tadpts = (XF86VideoAdaptorPtr *) realloc(*adpts, - sizeof(*tadpts) * (*nadpts + 1)); + sizeof(*tadpts) * (*nadpts + 1)); if (tadpts == NULL) - return NULL; + return NULL; *adpts = tadpts; n = sizeof(*adpt) + sizeof(*pPriv) + 1 * sizeof(*adpt->pPortPrivates); @@ -1138,12 +1135,12 @@ Z4lNewAdaptor(XF86VideoAdaptorPtr ** adpts, int *nadpts, int nattrs) adpt = (XF86VideoAdaptorPtr) malloc(n); if (adpt == NULL) - return NULL; + return NULL; memset(adpt, 0, n); tadpts[*nadpts] = adpt; ++*nadpts; - adpt->pPortPrivates = (DevUnion *) & adpt[1]; + adpt->pPortPrivates = (DevUnion *) &adpt[1]; pPriv = (Z4lPortPrivRec *) & adpt->pPortPrivates[1]; adpt->pPortPrivates[0].ptr = (pointer) pPriv; pPriv->adpt = adpt; @@ -1154,7 +1151,7 @@ Z4lNewAdaptor(XF86VideoAdaptorPtr ** adpts, int *nadpts, int nattrs) static int Z4lSetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 value, - pointer data) + pointer data) { Z4lPortPrivRec *pPriv = (Z4lPortPrivRec *) data; XF86VideoAdaptorPtr adpt; @@ -1164,58 +1161,58 @@ Z4lSetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 value, const char *name = NameForAtom(attribute); int old_fd = pPriv->fd; - DBLOG(1, "Z4lSetPortAttribute(%#lx,%d) '%s'\n", (unsigned long)attribute, - (int)value, name != NULL ? name : "_null_"); + DBLOG(1, "Z4lSetPortAttribute(%#lx,%d) '%s'\n", (unsigned long) attribute, + (int) value, name != NULL ? name : "_null_"); if (name == NULL) - return BadImplementation; + return BadImplementation; if (old_fd < 0 && z4l_open_device(pPriv) < 0) - return BadAccess; + return BadAccess; adpt = pPriv->adpt; attr = adpt->pAttributes; nattrs = adpt->nAttributes; for (i = 0; i < nattrs; ++i, ++attr) - if (strcmp(attr->name, name) == 0) - break; + if (strcmp(attr->name, name) == 0) + break; if (i >= nattrs) - return BadMatch; + return BadMatch; attrId = pPriv->attrIds[i]; val = value; switch (attrId) { case ATTR_ENCODING_ID: - z4l_ovly_set_encoding(pPriv, val); - break; + z4l_ovly_set_encoding(pPriv, val); + break; case ATTR_KEYMODE_ID: - z4l_ovly_set_keymode(pPriv, val); - REGION_EMPTY(pScrni->pScreen, &pPriv->clips); - z4l_setup_colorkey(pPriv, pScrni->pScreen, &pPriv->clips); - break; + z4l_ovly_set_keymode(pPriv, val); + REGION_EMPTY(pScrni->pScreen, &pPriv->clips); + z4l_setup_colorkey(pPriv, pScrni->pScreen, &pPriv->clips); + break; case ATTR_COLORKEY_ID: - z4l_ovly_set_colorkey(pPriv, val); - break; + z4l_ovly_set_colorkey(pPriv, val); + break; default: - memset(&ctrl, 0, sizeof(ctrl)); - ctrl.id = attrId + V4L2_CID_BASE; - ctrl.value = val; - if (IoCtl(pPriv->fd, VIDIOC_S_CTRL, &ctrl, 1) != 0) - return BadMatch; - break; + memset(&ctrl, 0, sizeof(ctrl)); + ctrl.id = attrId + V4L2_CID_BASE; + ctrl.value = val; + if (IoCtl(pPriv->fd, VIDIOC_S_CTRL, &ctrl, 1) != 0) + return BadMatch; + break; } if (old_fd < 0) - z4l_close_device(pPriv); + z4l_close_device(pPriv); return Success; } static int -Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 * value, - pointer data) +Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 *value, + pointer data) { Z4lPortPrivRec *pPriv = (Z4lPortPrivRec *) data; XF86VideoAdaptorPtr adpt; @@ -1226,80 +1223,82 @@ Z4lGetPortAttribute(ScrnInfoPtr pScrni, Atom attribute, INT32 * value, int old_fd = pPriv->fd; DBLOG(1, "Z4lGetPortAttribute(%#lx) '%s'\n", - (unsigned long)attribute, name != NULL ? name : "_null_"); + (unsigned long) attribute, name != NULL ? name : "_null_"); if (name == NULL) - return BadImplementation; + return BadImplementation; if (old_fd < 0 && z4l_open_device(pPriv) < 0) - return BadAccess; + return BadAccess; adpt = pPriv->adpt; attr = adpt->pAttributes; nattrs = adpt->nAttributes; for (i = 0; i < nattrs; ++i, ++attr) - if (strcmp(attr->name, name) == 0) - break; + if (strcmp(attr->name, name) == 0) + break; if (i >= nattrs) - return BadMatch; + return BadMatch; attrId = pPriv->attrIds[i]; val = 0; switch (attrId) { case ATTR_ENCODING_ID: - z4l_ovly_get_encoding(pPriv, &val); - *value = val; - break; + z4l_ovly_get_encoding(pPriv, &val); + *value = val; + break; case ATTR_KEYMODE_ID: - z4l_ovly_get_keymode(pPriv, &val); - *value = val; - break; + z4l_ovly_get_keymode(pPriv, &val); + *value = val; + break; case ATTR_COLORKEY_ID: - z4l_ovly_get_colorkey(pPriv, &val); - break; + z4l_ovly_get_colorkey(pPriv, &val); + break; default: - memset(&ctrl, 0, sizeof(ctrl)); - ctrl.id = attrId + V4L2_CID_BASE; - if (IoCtl(pPriv->fd, VIDIOC_G_CTRL, &ctrl, 1) != 0) - return BadMatch; - val = ctrl.value; - break; + memset(&ctrl, 0, sizeof(ctrl)); + ctrl.id = attrId + V4L2_CID_BASE; + if (IoCtl(pPriv->fd, VIDIOC_G_CTRL, &ctrl, 1) != 0) + return BadMatch; + val = ctrl.value; + break; } if (old_fd < 0) - z4l_close_device(pPriv); + z4l_close_device(pPriv); *value = val; return Success; } -static void (*oldAdjustFrame) (int scrnIndex, int x, int y, int flags) = NULL; +static void (*oldAdjustFrame) (ADJUST_FRAME_ARGS_DECL) = NULL; static void -Z4lAdjustFrame(int scrnIndex, int x, int y, int flags) +Z4lAdjustFrame(ADJUST_FRAME_ARGS_DECL) { + SCRN_INFO_PTR(arg); int i; XF86VideoAdaptorPtr adpt; Z4lPortPrivRec *pPriv; - DBLOG(3, "Z4lAdjustFrame(%d,%d,%d)\n", x, y, flags); + DBLOG(3, "Z4lAdjustFrame(%d,%d)\n", x, y); z4l_x_offset = x; z4l_y_offset = y; - oldAdjustFrame(scrnIndex, x, y, flags); + oldAdjustFrame(ADJUST_FRAME_ARGS(x, y)); /* xv adjust does not handle putvideo case */ for (i = 0; i < Z4l_nAdaptors; ++i) { - adpt = Z4l_pAdaptors[i]; - pPriv = (Z4lPortPrivRec *) adpt->pPortPrivates[0].ptr; - if (pPriv->run > 0) { - pPriv->drw_is_set = 0; - z4l_ovly_rect(pPriv, - pPriv->src_x, pPriv->src_y, pPriv->src_w, pPriv->src_h, - pPriv->drw_x, pPriv->drw_y, pPriv->drw_w, pPriv->drw_h); - } + adpt = Z4l_pAdaptors[i]; + pPriv = (Z4lPortPrivRec *) adpt->pPortPrivates[0].ptr; + if (pPriv->run > 0) { + pPriv->drw_is_set = 0; + z4l_ovly_rect(pPriv, + pPriv->src_x, pPriv->src_y, pPriv->src_w, + pPriv->src_h, pPriv->drw_x, pPriv->drw_y, + pPriv->drw_w, pPriv->drw_h); + } } } @@ -1330,8 +1329,8 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) DBLOG(1, "Init\n"); if (oldAdjustFrame == NULL) { - oldAdjustFrame = pScrni->AdjustFrame; - pScrni->AdjustFrame = Z4lAdjustFrame; + oldAdjustFrame = pScrni->AdjustFrame; + pScrni->AdjustFrame = Z4lAdjustFrame; } fd = -1; @@ -1350,254 +1349,255 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) has_video = has_image = has_colorkey = 0; for (dev = 0; z4l_dev_paths[dev] != NULL; ++dev) { - fd = open(z4l_dev_paths[dev], O_RDWR, 0); - if (fd < 0) - continue; - DBLOG(1, "%s open ok\n", z4l_dev_paths[dev]); - msg = NULL; - enable = 1; - if (IoCtl(fd, VIDIOC_QUERYCAP, &capability, 1) < 0) - msg = "bad querycap"; - else if ((capability.capabilities & V4L2_CAP_VIDEO_OVERLAY) == 0) - msg = "no overlay"; - else if ((capability.capabilities & V4L2_CAP_STREAMING) == 0) - msg = "no streaming"; + fd = open(z4l_dev_paths[dev], O_RDWR, 0); + if (fd < 0) + continue; + DBLOG(1, "%s open ok\n", z4l_dev_paths[dev]); + msg = NULL; + enable = 1; + if (IoCtl(fd, VIDIOC_QUERYCAP, &capability, 1) < 0) + msg = "bad querycap"; + else if ((capability.capabilities & V4L2_CAP_VIDEO_OVERLAY) == 0) + msg = "no overlay"; + else if ((capability.capabilities & V4L2_CAP_STREAMING) == 0) + msg = "no streaming"; #ifdef NONBLK_IO - else if (IoCtl(fd, FIONBIO, &enable, 1) != 0) - msg = "cant enable non-blocking io"; + else if (IoCtl(fd, FIONBIO, &enable, 1) != 0) + msg = "cant enable non-blocking io"; #endif - if (msg == NULL) { - memset(&format, 0, sizeof(format)); - format.type = 0x100; - if (IoCtl(fd, VIDIOC_G_FMT, &format, 1) != 0) - msg = "no src/dst ovly fmt"; - } - if (msg != NULL) { - DBLOG(0, "%s %s\n", z4l_dev_paths[dev], msg); - close(fd); - continue; - } - - memset(&cfmt, 0, sizeof(cfmt)); - cfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - if (IoCtl(fd, VIDIOC_G_FMT, &cfmt, 1) < 0) - goto fail; - if (IoCtl(fd, VIDIOC_G_STD, &cstd_id, 1) < 0) - goto fail; - if (IoCtl(fd, VIDIOC_G_INPUT, &cinp, 1) < 0) - goto fail; - cpixfmt = cfmt.fmt.pix.pixelformat; - cenc = 0; - for (inp = 0;; ++inp) { - memset(&input, 0, sizeof(input)); - input.index = inp; - if (IoCtl(fd, VIDIOC_ENUMINPUT, &input, 0) < 0) - break; - id = inp; - if (IoCtl(fd, VIDIOC_S_INPUT, &id, 1) < 0) - goto fail; - for (std = 0;; ++std) { - memset(&standard, 0, sizeof(standard)); - standard.index = std; - if (IoCtl(fd, VIDIOC_ENUMSTD, &standard, 0) < 0) - break; - std_id = standard.id; - denom = standard.frameperiod.denominator; - numer = standard.frameperiod.numerator; - if (IoCtl(fd, VIDIOC_S_STD, &std_id, 1) < 0) - continue; - memset(&format, 0, sizeof(format)); - format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - if (IoCtl(fd, VIDIOC_G_FMT, &format, 1) < 0) - continue; - width = format.fmt.pix.width; - height = format.fmt.pix.height; - for (fmt = 0;; ++fmt) { - memset(&fmtdesc, 0, sizeof(fmtdesc)); - fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - fmtdesc.index = fmt; - if (IoCtl(fd, VIDIOC_ENUM_FMT, &fmtdesc, 0) < 0) - break; - pixfmt = fmtdesc.pixelformat; - ip = &pixfmts[0]; - for (i = sizeof(pixfmts) / sizeof(pixfmts[0]); --i >= 0; - ++ip) - if (z4l_fourcc_pixfmt(ip->id) == pixfmt) - break; - - if (i >= 0) { - id = nencs; - has_video = 1; - if ((enc = Z4lNewEncoding(&encs, &nencs)) == NULL) - goto fail; - Z4lEncodingName(&enc_name[0], sizeof(enc_name), - (char *)&input.name[0], - (char *)&standard.name[0], (char *)&pixfmt); - if (Z4lAddEncoding(enc, &enc_name[0], id, width, - height, denom, numer, inp, std_id, - pixfmt) == 0) - goto fail; - if (std_id == cstd_id && inp == cinp - && pixfmt == cpixfmt) - cenc = id; - } - } - } - } - - if (IoCtl(fd, VIDIOC_S_INPUT, &cinp, 1) < 0) - goto fail; - if (IoCtl(fd, VIDIOC_S_STD, &cstd_id, 1) < 0) - goto fail; - if (IoCtl(fd, VIDIOC_S_FMT, &cfmt, 1) < 0) - goto fail; - - if (encs == NULL) { - DBLOG(0, "no encodings\n"); - goto fail; - } - - for (fmt = 0;; ++fmt) { - memset(&fmtdesc, 0, sizeof(fmtdesc)); - fmtdesc.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; - fmtdesc.index = fmt; - if (IoCtl(fd, VIDIOC_ENUM_FMT, &fmtdesc, 0) < 0) - break; - pixfmt = fmtdesc.pixelformat; - ip = &pixfmts[0]; - for (i = sizeof(pixfmts) / sizeof(pixfmts[0]); --i >= 0; ++ip) - if (z4l_fourcc_pixfmt(ip->id) == pixfmt) - break; - - if (i >= 0) { - has_image = 1; - if ((img = Z4lNewImage(&imgs, &nimgs)) == NULL) - goto fail; - if (Z4lAddImage(img, ip) == 0) - goto fail; - } - } - - if (nimgs > 0) { - id = nencs; - if ((enc = Z4lNewEncoding(&encs, &nencs)) == NULL) - goto fail; - if (Z4lAddEncoding(enc, "XV_IMAGE", id, MAX_OVLY_WIDTH, - MAX_OVLY_HEIGHT, 0, 0, 0, 0, pixfmt) == 0) - goto fail; - } - - ctl = 0; - for (ctl = 0; ctl < (V4L2_CID_LASTP1 - V4L2_CID_BASE); ++ctl) { - memset(&queryctrl, 0, sizeof(queryctrl)); - queryctrl.id = V4L2_CID_BASE + ctl; - if (IoCtl(fd, VIDIOC_QUERYCTRL, &queryctrl, 0) < 0) - continue; - if (queryctrl.type != V4L2_CTRL_TYPE_INTEGER && - queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN) - continue; - attrIds[nattrs] = ctl; - if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) - goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), - (char *)&queryctrl.name[0]); - if (Z4lAddAttribute(attr, &attr_name[0], - queryctrl.minimum, queryctrl.maximum, - XvSettable | XvGettable) == 0) - goto fail; - } - attrIds[nattrs] = ATTR_ENCODING_ID; - if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) - goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_ENCODING); - if (Z4lAddAttribute(attr, &attr_name[0], 0, nencs - 1, - XvSettable | XvGettable) == 0) - goto fail; - memset(&fbuf, 0, sizeof(fbuf)); - if (IoCtl(fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) - goto fail; - opixfmt = fbuf.fmt.pixelformat; - - if ((fbuf.capability & V4L2_FBUF_CAP_CHROMAKEY) != 0) { - attrIds[nattrs] = ATTR_KEYMODE_ID; - if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) - goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_KEYMODE); - if (Z4lAddAttribute(attr, &attr_name[0], 0, 1, - XvSettable | XvGettable) == 0) - goto fail; - attrIds[nattrs] = ATTR_COLORKEY_ID; - if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) - goto fail; - Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_COLORKEY); - if (Z4lAddAttribute(attr, &attr_name[0], 0, 0xffffff, - XvSettable | XvGettable) == 0) - goto fail; - has_colorkey = 1; - } - - dp = malloc(strlen((char *)&capability.card[0]) + 1); - if (dp == NULL) - goto fail; - strcpy(dp, (char *)&capability.card[0]); - if ((adpt = Z4lNewAdaptor(&adpts, &nadpts, nattrs)) == NULL) - goto fail; - adpt->type = XvWindowMask | XvInputMask; - if (has_video != 0) - adpt->type |= XvVideoMask; - if (has_image != 0) - adpt->type |= XvImageMask; - adpt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; - adpt->name = dp; - adpt->type = XvInputMask | XvWindowMask | XvVideoMask | XvImageMask; - adpt->pEncodings = encs; - adpt->nEncodings = nencs; - adpt->pFormats = &Formats[0]; - adpt->nFormats = sizeof(Formats) / sizeof(Formats[0]); - adpt->pAttributes = attrs; - adpt->nAttributes = nattrs; - attrs = NULL; - nattrs = 0; - adpt->pImages = imgs; - adpt->nImages = nimgs; - imgs = NULL; - nimgs = 0; - adpt->PutVideo = Z4lPutVideo; - adpt->StopVideo = Z4lStopVideo; - adpt->SetPortAttribute = Z4lSetPortAttribute; - adpt->GetPortAttribute = Z4lGetPortAttribute; - adpt->QueryBestSize = Z4lQueryBestSize; - adpt->PutImage = Z4lPutImage; - adpt->QueryImageAttributes = Z4lQueryImageAttributes; - pPriv = (Z4lPortPrivRec *) adpt->pPortPrivates[0].ptr; - pPriv->fd = fd; - pPriv->run = -1; - pPriv->dir = 0; - pPriv->nbfrs = -1; - pPriv->bufsz = -1; - pPriv->last = -1; - pPriv->pixfmt = opixfmt; + if (msg == NULL) { + memset(&format, 0, sizeof(format)); + format.type = 0x100; + if (IoCtl(fd, VIDIOC_G_FMT, &format, 1) != 0) + msg = "no src/dst ovly fmt"; + } + if (msg != NULL) { + DBLOG(0, "%s %s\n", z4l_dev_paths[dev], msg); + close(fd); + continue; + } + + memset(&cfmt, 0, sizeof(cfmt)); + cfmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + if (IoCtl(fd, VIDIOC_G_FMT, &cfmt, 1) < 0) + goto fail; + if (IoCtl(fd, VIDIOC_G_STD, &cstd_id, 1) < 0) + goto fail; + if (IoCtl(fd, VIDIOC_G_INPUT, &cinp, 1) < 0) + goto fail; + cpixfmt = cfmt.fmt.pix.pixelformat; + cenc = 0; + for (inp = 0;; ++inp) { + memset(&input, 0, sizeof(input)); + input.index = inp; + if (IoCtl(fd, VIDIOC_ENUMINPUT, &input, 0) < 0) + break; + id = inp; + if (IoCtl(fd, VIDIOC_S_INPUT, &id, 1) < 0) + goto fail; + for (std = 0;; ++std) { + memset(&standard, 0, sizeof(standard)); + standard.index = std; + if (IoCtl(fd, VIDIOC_ENUMSTD, &standard, 0) < 0) + break; + std_id = standard.id; + denom = standard.frameperiod.denominator; + numer = standard.frameperiod.numerator; + if (IoCtl(fd, VIDIOC_S_STD, &std_id, 1) < 0) + continue; + memset(&format, 0, sizeof(format)); + format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + if (IoCtl(fd, VIDIOC_G_FMT, &format, 1) < 0) + continue; + width = format.fmt.pix.width; + height = format.fmt.pix.height; + for (fmt = 0;; ++fmt) { + memset(&fmtdesc, 0, sizeof(fmtdesc)); + fmtdesc.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + fmtdesc.index = fmt; + if (IoCtl(fd, VIDIOC_ENUM_FMT, &fmtdesc, 0) < 0) + break; + pixfmt = fmtdesc.pixelformat; + ip = &pixfmts[0]; + for (i = sizeof(pixfmts) / sizeof(pixfmts[0]); --i >= 0; + ++ip) + if (z4l_fourcc_pixfmt(ip->id) == pixfmt) + break; + + if (i >= 0) { + id = nencs; + has_video = 1; + if ((enc = Z4lNewEncoding(&encs, &nencs)) == NULL) + goto fail; + Z4lEncodingName(&enc_name[0], sizeof(enc_name), + (char *) &input.name[0], + (char *) &standard.name[0], + (char *) &pixfmt); + if (Z4lAddEncoding + (enc, &enc_name[0], id, width, height, denom, numer, + inp, std_id, pixfmt) == 0) + goto fail; + if (std_id == cstd_id && inp == cinp + && pixfmt == cpixfmt) + cenc = id; + } + } + } + } + + if (IoCtl(fd, VIDIOC_S_INPUT, &cinp, 1) < 0) + goto fail; + if (IoCtl(fd, VIDIOC_S_STD, &cstd_id, 1) < 0) + goto fail; + if (IoCtl(fd, VIDIOC_S_FMT, &cfmt, 1) < 0) + goto fail; + + if (encs == NULL) { + DBLOG(0, "no encodings\n"); + goto fail; + } + + for (fmt = 0;; ++fmt) { + memset(&fmtdesc, 0, sizeof(fmtdesc)); + fmtdesc.type = V4L2_BUF_TYPE_VIDEO_OVERLAY; + fmtdesc.index = fmt; + if (IoCtl(fd, VIDIOC_ENUM_FMT, &fmtdesc, 0) < 0) + break; + pixfmt = fmtdesc.pixelformat; + ip = &pixfmts[0]; + for (i = sizeof(pixfmts) / sizeof(pixfmts[0]); --i >= 0; ++ip) + if (z4l_fourcc_pixfmt(ip->id) == pixfmt) + break; + + if (i >= 0) { + has_image = 1; + if ((img = Z4lNewImage(&imgs, &nimgs)) == NULL) + goto fail; + if (Z4lAddImage(img, ip) == 0) + goto fail; + } + } + + if (nimgs > 0) { + id = nencs; + if ((enc = Z4lNewEncoding(&encs, &nencs)) == NULL) + goto fail; + if (Z4lAddEncoding(enc, "XV_IMAGE", id, MAX_OVLY_WIDTH, + MAX_OVLY_HEIGHT, 0, 0, 0, 0, pixfmt) == 0) + goto fail; + } + + ctl = 0; + for (ctl = 0; ctl < (V4L2_CID_LASTP1 - V4L2_CID_BASE); ++ctl) { + memset(&queryctrl, 0, sizeof(queryctrl)); + queryctrl.id = V4L2_CID_BASE + ctl; + if (IoCtl(fd, VIDIOC_QUERYCTRL, &queryctrl, 0) < 0) + continue; + if (queryctrl.type != V4L2_CTRL_TYPE_INTEGER && + queryctrl.type != V4L2_CTRL_TYPE_BOOLEAN) + continue; + attrIds[nattrs] = ctl; + if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) + goto fail; + Z4lAttributeName(&attr_name[0], sizeof(attr_name), + (char *) &queryctrl.name[0]); + if (Z4lAddAttribute(attr, &attr_name[0], + queryctrl.minimum, queryctrl.maximum, + XvSettable | XvGettable) == 0) + goto fail; + } + attrIds[nattrs] = ATTR_ENCODING_ID; + if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) + goto fail; + Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_ENCODING); + if (Z4lAddAttribute(attr, &attr_name[0], 0, nencs - 1, + XvSettable | XvGettable) == 0) + goto fail; + memset(&fbuf, 0, sizeof(fbuf)); + if (IoCtl(fd, VIDIOC_G_FBUF, &fbuf, 1) < 0) + goto fail; + opixfmt = fbuf.fmt.pixelformat; + + if ((fbuf.capability & V4L2_FBUF_CAP_CHROMAKEY) != 0) { + attrIds[nattrs] = ATTR_KEYMODE_ID; + if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) + goto fail; + Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_KEYMODE); + if (Z4lAddAttribute(attr, &attr_name[0], 0, 1, + XvSettable | XvGettable) == 0) + goto fail; + attrIds[nattrs] = ATTR_COLORKEY_ID; + if ((attr = Z4lNewAttribute(&attrs, &nattrs)) == NULL) + goto fail; + Z4lAttributeName(&attr_name[0], sizeof(attr_name), ATTR_COLORKEY); + if (Z4lAddAttribute(attr, &attr_name[0], 0, 0xffffff, + XvSettable | XvGettable) == 0) + goto fail; + has_colorkey = 1; + } + + dp = malloc(strlen((char *) &capability.card[0]) + 1); + if (dp == NULL) + goto fail; + strcpy(dp, (char *) &capability.card[0]); + if ((adpt = Z4lNewAdaptor(&adpts, &nadpts, nattrs)) == NULL) + goto fail; + adpt->type = XvWindowMask | XvInputMask; + if (has_video != 0) + adpt->type |= XvVideoMask; + if (has_image != 0) + adpt->type |= XvImageMask; + adpt->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; + adpt->name = dp; + adpt->type = XvInputMask | XvWindowMask | XvVideoMask | XvImageMask; + adpt->pEncodings = encs; + adpt->nEncodings = nencs; + adpt->pFormats = &Formats[0]; + adpt->nFormats = sizeof(Formats) / sizeof(Formats[0]); + adpt->pAttributes = attrs; + adpt->nAttributes = nattrs; + attrs = NULL; + nattrs = 0; + adpt->pImages = imgs; + adpt->nImages = nimgs; + imgs = NULL; + nimgs = 0; + adpt->PutVideo = Z4lPutVideo; + adpt->StopVideo = Z4lStopVideo; + adpt->SetPortAttribute = Z4lSetPortAttribute; + adpt->GetPortAttribute = Z4lGetPortAttribute; + adpt->QueryBestSize = Z4lQueryBestSize; + adpt->PutImage = Z4lPutImage; + adpt->QueryImageAttributes = Z4lQueryImageAttributes; + pPriv = (Z4lPortPrivRec *) adpt->pPortPrivates[0].ptr; + pPriv->fd = fd; + pPriv->run = -1; + pPriv->dir = 0; + pPriv->nbfrs = -1; + pPriv->bufsz = -1; + pPriv->last = -1; + pPriv->pixfmt = opixfmt; #if defined(REGION_NULL) - REGION_NULL(pScrni->pScreen, &pPriv->clips); + REGION_NULL(pScrni->pScreen, &pPriv->clips); #else - REGION_INIT(pScrni->pScreen, &pPriv->clips, NullBox, 0); + REGION_INIT(pScrni->pScreen, &pPriv->clips, NullBox, 0); #endif - strncpy(&pPriv->dev_path[0], z4l_dev_paths[dev], - sizeof(pPriv->dev_path)); - pPriv->enc = &encs[cenc]; - for (i = 0; i < adpt->nAttributes; ++i) - pPriv->attrIds[i] = attrIds[i]; - DBLOG(1, "adpt %s\n", dp); - if (has_colorkey != 0) { - z4l_ovly_set_colorkey(pPriv, DEFAULT_COLORKEY); - z4l_ovly_set_keymode(pPriv, DEFAULT_KEYMODE); - } - close(fd); - pPriv->fd = -1; - adpt = NULL; - cenc = 0; - encs = NULL; - nencs = 0; + strncpy(&pPriv->dev_path[0], z4l_dev_paths[dev], + sizeof(pPriv->dev_path)); + pPriv->enc = &encs[cenc]; + for (i = 0; i < adpt->nAttributes; ++i) + pPriv->attrIds[i] = attrIds[i]; + DBLOG(1, "adpt %s\n", dp); + if (has_colorkey != 0) { + z4l_ovly_set_colorkey(pPriv, DEFAULT_COLORKEY); + z4l_ovly_set_keymode(pPriv, DEFAULT_KEYMODE); + } + close(fd); + pPriv->fd = -1; + adpt = NULL; + cenc = 0; + encs = NULL; + nencs = 0; } DBLOG(0, "init done, %d device(s) found\n", nadpts); @@ -1607,52 +1607,52 @@ Z4lInit(ScrnInfoPtr pScrni, XF86VideoAdaptorPtr ** adaptors) return nadpts; - fail: + fail: if (attrs != NULL) { - for (i = 0; i < nattrs; ++i) - if (attrs[i].name != NULL) - free(attrs[i].name); - free(attrs); + for (i = 0; i < nattrs; ++i) + if (attrs[i].name != NULL) + free(attrs[i].name); + free(attrs); } if (encs != NULL) { - for (i = 0; i < nencs; ++i) { - if (encs[i].name != NULL) - free(encs[i].name); - } - free(encs); + for (i = 0; i < nencs; ++i) { + if (encs[i].name != NULL) + free(encs[i].name); + } + free(encs); } if (imgs != NULL) - free(imgs); + free(imgs); if (adpts != NULL) { - for (i = 0; i < nadpts; ++i) { - if ((adpt = adpts[i]) != NULL) { - if (adpt->name != NULL) - free(adpt->name); - if ((attrs = adpt->pAttributes) != NULL) { - for (i = 0; i < adpt->nAttributes; ++i) - if (attrs[i].name != NULL) - free(attrs[i].name); - free(attrs); - } - if ((encs = adpt->pEncodings) != NULL) { - for (i = 0; i < adpt->nEncodings; ++i, ++enc) - if (encs[i].name != NULL) - free(encs[i].name); - free(encs); - } - if ((imgs = adpt->pImages) != NULL) - free(imgs); - free(adpt); - } - } - free(adpts); + for (i = 0; i < nadpts; ++i) { + if ((adpt = adpts[i]) != NULL) { + if (adpt->name != NULL) + free(adpt->name); + if ((attrs = adpt->pAttributes) != NULL) { + for (i = 0; i < adpt->nAttributes; ++i) + if (attrs[i].name != NULL) + free(attrs[i].name); + free(attrs); + } + if ((encs = adpt->pEncodings) != NULL) { + for (i = 0; i < adpt->nEncodings; ++i, ++enc) + if (encs[i].name != NULL) + free(encs[i].name); + free(encs); + } + if ((imgs = adpt->pImages) != NULL) + free(imgs); + free(adpt); + } + } + free(adpts); } if (fd >= 0) - close(fd); + close(fd); return 0; } @@ -1662,7 +1662,7 @@ Z4lProbe(DriverPtr drv, int flags) { DBLOG(1, "Probe\n"); if (flags & PROBE_DETECT) - return TRUE; + return TRUE; xf86XVRegisterGenericAdaptorDriver(Z4lInit); drv->refCount++; @@ -1713,21 +1713,21 @@ z4lSetup(pointer module, pointer opts, int *errmaj, int *errmin) static Bool setupDone = FALSE; if (setupDone != FALSE) { - if (errmaj != NULL) - *errmaj = LDR_ONCEONLY; - return NULL; + if (errmaj != NULL) + *errmaj = LDR_ONCEONLY; + return NULL; } setupDone = TRUE; LoaderGetOS(&osname, NULL, NULL, NULL); if (osname == NULL || strcmp(osname, "linux") != 0) { - if (errmaj) - *errmaj = LDR_BADOS; - if (errmin) - *errmin = 0; + if (errmaj) + *errmaj = LDR_BADOS; + if (errmin) + *errmin = 0; - return NULL; + return NULL; } xf86AddDriver(&Z4l, module, 0); @@ -1736,4 +1736,4 @@ z4lSetup(pointer module, pointer opts, int *errmaj, int *errmin) } #endif -#endif /* !XvExtension */ +#endif /* !XvExtension */ |